using namespace gismo;
int main(
int argc,
char *argv[])
{
bool plot = false;
gsCmdLine cmd(
"Tutorial on assemblying a Poisson problem.");
cmd.addSwitch("plot", "Create a ParaView visualization file with the solution", plot);
try { cmd.getValues(argc,argv); } catch (int rv) { return rv; }
gsInfo <<
"The domain is: "<< patches <<
"\n";
2);
bit = patches.
bBegin(); bit != patches.bEnd(); ++bit)
{
}
int numRefine = 2;
int numElevate = 2;
if ( numElevate > -1 )
{
int max_tmp = splinebasis.minCwiseDegree();
max_tmp += numElevate;
splinebasis.setDegree(max_tmp);
}
for (int i = 0; i < numRefine; ++i)
splinebasis.uniformRefine();
2);
opt.
setInt(
"DirichletValues" , dirichlet::l2Projection);
opt.
setInt(
"DirichletStrategy", dirichlet::elimination );
opt.
setInt(
"InterfaceStrategy", iFace ::conforming );
splinebasis.getMapper((dirichlet::strategy)opt.getInt("DirichletStrategy"),
(iFace:: strategy)opt.getInt("InterfaceStrategy"),
bcInfo, mapper, 0);
sys.reserve(10, ppde.numRhs() );
gsInfo <<
"Assembled a system (matrix and load vector) with "
gsSparseSolver<>::CGDiagonal solver( PA.
matrix() );
gsInfo <<
"Solved the system with CG solver.\n";
if (plot)
{
gsInfo<<
"Plotting in Paraview...\n";
gsWriteParaview<>(sol, "poisson2d", 1000);
gsWriteParaview<>( exact, "poisson2d_exact", 1000);
}
else
{
gsInfo <<
"Done. No output created, re-run with --plot to get a ParaView "
"file containing the solution.\n";
}
return 0;
}