MeshEditor¶
-
class
dolfin.cpp.mesh.
MeshEditor
¶ Bases:
object
A simple mesh editor for creating simplicial meshes in 1D, 2D and 3D.
Constructor
-
add_cell
()¶ Overloaded versions
add_cell(c, v0, v1)
Add cell with given vertices (1D)
- Arguments
- c (int)
The cell (index).
- v0 (numpy.array(int))
The first vertex (local index).
- v1 (numpy.array(int))
The second vertex (local index).
add_cell(c, v0, v1, v2)
Add cell with given vertices (2D)
- Arguments
- c (int)
The cell (index).
- v0 (numpy.array(int))
The first vertex (local index).
- v1 (numpy.array(int))
The second vertex (local index).
- v2 (numpy.array(int))
The third vertex (local index).
add_cell(c, v0, v1, v2, v3)
Add cell with given vertices (3D)
- Arguments
- c (int)
The cell (index).
- v0 (numpy.array(int))
The first vertex (local index).
- v1 (numpy.array(int))
The second vertex (local index).
- v2 (numpy.array(int))
The third vertex (local index).
- v3 (numpy.array(int))
The fourth vertex (local index).
add_cell(c, v)
Add cell with given vertices
- Arguments
- c (int)
The cell (index).
- v (numpy.array(int))
The vertex indices (local indices)
add_cell(local_index, global_index, v)
Add cell with given vertices
- Arguments
- local_index (int)
The cell (index).
- global_index (int)
The global (user) cell index.
- v (numpy.array(int))
The vertex indices (local indices)
-
add_vertex
()¶ Overloaded versions
add_vertex(index, p)
Add vertex v at given point p
- Arguments
- index (int)
The vertex (index).
- p (
Point
) The point.
add_vertex(index, x)
Add vertex v at given coordinate x
- Arguments
- index (int)
The vertex (index).
- x (numpy.array(float))
The x-coordinates.
add_vertex(index, x)
Add vertex v at given point x (for a 1D mesh)
- Arguments
- index (int)
The vertex (index).
- x (float)
The x-coordinate.
add_vertex(index, x, y)
Add vertex v at given point (x, y) (for a 2D mesh)
- Arguments
- index (int)
The vertex (index).
- x (float)
The x-coordinate.
- y (float)
The y-coordinate.
add_vertex(index, x, y, z)
Add vertex v at given point (x, y, z) (for a 3D mesh)
- Arguments
- index (int)
The vertex (index).
- x (float)
The x-coordinate.
- y (float)
The y-coordinate.
- z (float)
The z-coordinate.
-
add_vertex_global
()¶ Overloaded versions
add_vertex_global(local_index, global_index, p)
Add vertex v at given point p
- Arguments
- local_index (int)
The vertex (local index).
- global_index (int)
The vertex (global_index).
- p (
Point
) The point.
add_vertex_global(local_index, global_index, x)
Add vertex v at given coordinate x
- Arguments
- local_index (int)
The vertex (local index).
- global_index (int)
The vertex (global_index).
- x (numpy.array(float))
The x-coordinates.
-
close
()¶ Close mesh, finish editing, and order entities locally
- Arguments
- order (bool)
- Order entities locally if true. Default values is true.
- Example
Note
No example code available for this function.
-
init_cells
()¶ Specify number of cells (serial version)
- Arguments
- num_cells (int)
- The number of cells.
- Example
Note
No example code available for this function.
-
init_cells_global
()¶ Specify number of cells (distributed version)
- Arguments
- num_local_cells (int)
- The number of local cells.
- num_global_cells (int)
- The number of cells in distributed mesh.
- Example
Note
No example code available for this function.
-
init_vertices
()¶ Specify number of vertices (serial version)
- Arguments
- num_vertices (int)
- The number of vertices.
- Example
Note
No example code available for this function.
-
init_vertices_global
()¶ Specify number of vertices (distributed version)
- Arguments
- num_local_vertices (int)
- The number of vertices on this process.
- num_global_vertices (int)
- The number of vertices in distributed mesh.
- Example
Note
No example code available for this function.
-
open
()¶ Overloaded versions
open(mesh, tdim, gdim)
Open mesh of given topological and geometrical dimension
- Arguments
- mesh (
Mesh
) The mesh to open.
- tdim (int)
The topological dimension.
- gdim (int)
The geometrical dimension.
- mesh (
- Example
Note
No example code available for this function.
open(mesh, type, tdim, gdim)
Open mesh of given cell type, topological and geometrical dimension
- Arguments
- mesh (
Mesh
) The mesh to open.
- type (CellType::Type)
Cell type.
- tdim (int)
The topological dimension.
- gdim (int)
The geometrical dimension.
- mesh (
open(mesh, type, tdim, gdim)
Open mesh of given cell type, topological and geometrical dimension
- Arguments
- mesh (
Mesh
) The mesh to open.
- type (str)
Cell type.
- tdim (int)
The topological dimension.
- gdim (int)
The geometrical dimension.
- mesh (
-
thisown
¶ The membership flag
-