Note
The documentation on this page was automatically extracted from the DOLFIN C++ code and may need to be edited or expanded.
A simple mesh editor for creating simplicial meshes in 1D, 2D and 3D.
Constructor
Open mesh of given topological and geometrical dimension
Mesh mesh;
MeshEditor editor;
editor.open(mesh, 2, 2);
Open mesh of given cell type, topological and geometrical dimension
Open mesh of given cell type, topological and geometrical dimension
Specify number of vertices (serial version)
Mesh mesh;
MeshEditor editor;
editor.open(mesh, 2, 2);
editor.init_vertices(9);
Specify number of vertices (distributed version)
Mesh mesh;
MeshEditor editor;
editor.open(mesh, 2, 2);
editor.init_vertices(4, 8);
Specify number of cells (serial version)
Mesh mesh;
MeshEditor editor;
editor.open(mesh, 2, 2);
editor.init_cells(8);
Specify number of cells (distributed version)
Mesh mesh;
MeshEditor editor;
editor.open(mesh, 2, 2);
editor.init_cells(2, 6);
Add vertex v at given point p
Add vertex v at given coordinate x
Add vertex v at given point x (for a 1D mesh)
Add vertex v at given point (x, y) (for a 2D mesh)
Add vertex v at given point (x, y, z) (for a 3D mesh)
Add vertex v at given point p
Add vertex v at given coordinate x
Add cell with given vertices (1D)
Add cell with given vertices (2D)
Add cell with given vertices (3D)
Add cell with given vertices (non-templated version for Python interface)
Add cell with given vertices
Add cell with given vertices
Close mesh, finish editing, and order entities locally
MeshEditor editor;
editor.open(mesh, 2, 2);
...
editor.close()