The next step is to load a mesh. The source code is available in mymesh.cpp
.
Step by step explanations
- Loading a Mesh in 2D
- The laodMesh function has a "_name" option set by default as the default value of the "--gmsh.filename" option.
auto mesh = loadMesh(_mesh=new Mesh<Simplex<2>>);
- Loading2DMeshExport Exporting the Mesh for visualisation
auto e = exporter( _mesh=mesh );
e->addRegions();
e->save();
Some results
Complete code
#include <feel/feelfilters/loadmesh.hpp>
#include <feel/feelfilters/exporter.hpp>
int main( int argc, char** argv )
{
Environment env( _argc=argc, _argv=argv,
_about=about( _name="mymesh" ,
_author="Feel++ Consortium",
_email="feelpp-devel@feelpp.org" ) );
auto mesh = loadMesh(_mesh=new Mesh<Simplex<2>>);
#if 0
auto e = exporter( _mesh=mesh );
e->addRegions();
e->save();
#endif
}