#include <iostream>
using namespace gismo;
template <typename T>
{
return result;
}
int main(
int argc,
char* argv[])
{
std::string input("surfaces/simple.xml");
std::string output("");
gsCmdLine cmd(
"Tutorial on gsGeometry class.");
cmd.addPlainString("filename", "G+Smo input geometry file.", input);
cmd.addString("o", "output", "Name of the output file", output);
try { cmd.getValues(argc,argv); } catch (int rv) { return rv; }
{
}
else
{
gsInfo << "Input file doesn't have a geometry inside." << "\n";
return -1;
}
if (!pGeom)
{
gsInfo << "Didn't find any geometry." << "\n";
return -1;
}
gsInfo << "The file contains: \n" << *pGeom << "\n";
gsInfo << "\nBasis: \n" << basis << "\n";
gsInfo << "\nCoefficients: \n" << coefs << "\n" << "\n";
gsInfo <<
"Dimension of the parameter space: " << pGeom->
parDim() <<
"\n"
<< "Dimension of the geometry: " << pGeom->geoDim() << "\n";
gsInfo << "Support: \n"
<< support << "\n" << "\n";
gsMatrix<> u = 0.3 * support.col(0) + 0.7 * support.col(1);
gsInfo << "u " << size(u) << ": \n" << u << "\n" << "\n";
gsInfo << "Value at u " << size(value) << ": \n"
<< value
<< "\n\nDerivative at u " << size(der1) << ": \n"
<< der1
<< "\n\nSecond derivative at u " << size(der2) << ": \n"
<< der2
<< "\n" << "\n";
gsInfo << "\nFor more information about evaluation "
<< "(and order of derivatives) look at doxygen documentation."
<< "\n" << "\n";
pGeom->controlNet(mesh);
if (!output.empty())
{
std::string out = output + "Geometry";
gsInfo << "Writing the geometry to a paraview file: " << out
<< "\n\n";
gsWriteParaview(*pGeom, out);
out = output + "Basis";
gsInfo << "Writing the basis to a paraview file: " << out
<< "\n\n";
gsWriteParaview(basis, out);
out = output + "ContolNet";
gsInfo << "Writing the control net to a paraview file: " << out
<< "\n" << "\n";
gsWriteParaview(mesh, out);
}
else
gsInfo << "Done. No output created, re-run with --output <fn> to get a ParaView "
"file containing the solution.\n";
return 0;
}