Note
The documentation on this page was automatically extracted from the DOLFIN C++ code and may need to be edited or expanded.
Create uniformly refined mesh
Refine a MeshHierarchy
Create uniformly refined mesh
Create locally refined mesh
CellFunction<bool> cell_markers(mesh);
cell_markers.set_all(false);
Point origin(0.0, 0.0, 0.0);
for (CellIterator cell(mesh); !cell.end(); ++cell)
{
Point p = cell->midpoint();
if (p.distance(origin) < 0.1)
cell_markers[*cell] = true;
}
mesh = refine(mesh, cell_markers);
Create locally refined mesh