#include <iostream>
#include <string>
using namespace gismo;
int main(
int argc,
char* argv[])
{
real_t a = 0;
real_t b = 1;
bool paraview = false;
gsCmdLine cmd(
"This is a tutorial on the gsBSplineBasis class.");
cmd.addReal("","starting","Starting knot",a);
cmd.addReal("","ending","Ending knot",b);
cmd.addInt("n","interior","Number of interior knots",interior);
cmd.addInt("m","mult","Multiplicity at the two end knots",multEnd);
cmd.addSwitch("plot","Plot with paraview",paraview);
try { cmd.getValues(argc,argv); } catch (int rv) { return rv; }
gsInfo <<
"------------- Constructions -----------------------------\n";
int degree = multEnd - 1;
print(bsb0, "bsb0");
print(bsb1, "bsb1");
gsInfo <<
"------------- Some properties -----------------------\n\n";
gsInfo <<
"bsb0.size(): " << bsb0.size() <<
"\n\n"
<< "bsb0.numElements(): " << bsb0.numElements() << "\n\n"
<< "bsb0.degree(): " << bsb0.degree() << "\n\n";
gsInfo <<
"------------- Some operations -----------------------\n\n";
if (paraview)
printToParaview(bsb0, "basis");
gsInfo <<
"bsb0.uniformRefine()\n";
bsb0.uniformRefine();
if (paraview)
printToParaview(bsb0, "basisRefined");
gsInfo <<
"bsb0.degreeElevate()\n";
bsb0.degreeElevate();
if (paraview)
printToParaview(bsb0, "basisElevated");
else
gsInfo <<
"Done. No output created, re-run with --plot to get a ParaView "
"files containing the solution.\n";
return 0;
}
const std::string& name)
{
gsInfo <<
"Writing bsb0 to paraview in a file: " << name <<
"\n\n";
gsWriteParaview(bsb, name);
}
const std::string& name)
{
}