Dear all,
I've read the documentation of msh
, but maybe I overlooked, since I cannot find a clear statement where I can see how I can set mesh parameters, for instance, the desired cell size or similar properties. I've tried the following, stolen from the mshr::CSGCGALMeshGenerator2D::default_parameters()
code, but it won't do anything:
Can anyone help me in the (really simple) problem?
Thanks!
// Create a simple mesh
Mesh simple;
// Vector of points
std::vector<Point> pts;
pts.push_back(Point( 0.0, 0.0));
pts.push_back(Point( 1.0, 0.0));
pts.push_back(Point( 1.0, 3.0));
pts.push_back(Point( 0.0, 3.0));
parameters.add("mesh_resolution", 10);
parameters.add("cell_size", 1);
// Polyline
mshr::Polygon polyline(pts);
// Generator
mshr::CSGCGALMeshGenerator2D generator;
// Mesh it!
generator.generate(polyline, simple);
// Spit the mesh
File meshfile("simple.pvd");
meshfile << simple;