DOLFIN
DOLFIN C++ interface
|
#include <MeshEditor.h>
Public Member Functions | |
MeshEditor () | |
Constructor. | |
~MeshEditor () | |
Destructor. | |
void | open (Mesh &mesh, CellType::Type type, std::size_t tdim, std::size_t gdim, std::size_t degree=1) |
void | open (Mesh &mesh, std::string type, std::size_t tdim, std::size_t gdim, std::size_t degree=1) |
void | init_vertices (std::size_t num_vertices) |
void | init_entities () |
void | init_vertices_global (std::size_t num_local_vertices, std::size_t num_global_vertices) |
void | init_cells (std::size_t num_cells) |
void | init_cells_global (std::size_t num_local_cells, std::size_t num_global_cells) |
void | add_vertex (std::size_t index, const Point &p) |
void | add_vertex (std::size_t index, const std::vector< double > &x) |
void | add_vertex (std::size_t index, double x) |
void | add_vertex (std::size_t index, double x, double y) |
void | add_vertex (std::size_t index, double x, double y, double z) |
void | add_vertex_global (std::size_t local_index, std::size_t global_index, const Point &p) |
void | add_vertex_global (std::size_t local_index, std::size_t global_index, const std::vector< double > &x) |
void | add_entity_point (std::size_t entity_dim, std::size_t order, std::size_t index, const Point &p) |
Add a point in a given entity of dimension entity_dim. | |
void | add_cell (std::size_t c, std::size_t v0, std::size_t v1) |
void | add_cell (std::size_t c, std::size_t v0, std::size_t v1, std::size_t v2) |
void | add_cell (std::size_t c, std::size_t v0, std::size_t v1, std::size_t v2, std::size_t v3) |
void | add_cell (std::size_t c, const std::vector< std::size_t > &v) |
template<typename T > | |
void | add_cell (std::size_t c, const T &v) |
template<typename T > | |
void | add_cell (std::size_t local_index, std::size_t global_index, const T &v) |
void | close (bool order=true) |
Friends | |
class | TetrahedronCell |
A simple mesh editor for creating simplicial meshes in 1D, 2D and 3D.
void MeshEditor::add_cell | ( | std::size_t | c, |
std::size_t | v0, | ||
std::size_t | v1 | ||
) |
Add cell with given vertices (1D)
c | (std::size_t) The cell (index). |
v0 | (std::vector<std::size_t>) The first vertex (local index). |
v1 | (std::vector<std::size_t>) The second vertex (local index). |
void MeshEditor::add_cell | ( | std::size_t | c, |
std::size_t | v0, | ||
std::size_t | v1, | ||
std::size_t | v2 | ||
) |
Add cell with given vertices (2D)
c | (std::size_t) The cell (index). |
v0 | (std::vector<std::size_t>) The first vertex (local index). |
v1 | (std::vector<std::size_t>) The second vertex (local index). |
v2 | (std::vector<std::size_t>) The third vertex (local index). |
void MeshEditor::add_cell | ( | std::size_t | c, |
std::size_t | v0, | ||
std::size_t | v1, | ||
std::size_t | v2, | ||
std::size_t | v3 | ||
) |
Add cell with given vertices (3D)
c | (std::size_t) The cell (index). |
v0 | (std::vector<std::size_t>) The first vertex (local index). |
v1 | (std::vector<std::size_t>) The second vertex (local index). |
v2 | (std::vector<std::size_t>) The third vertex (local index). |
v3 | (std::vector<std::size_t>) The fourth vertex (local index). |
|
inline |
Add cell with given vertices (non-templated version for Python interface)
c | (std::size_t) The cell (index). |
v | (std::vector<std::size_t>) The vertex indices (local indices) |
|
inline |
Add cell with given vertices
c | (std::size_t) The cell (index). |
v | (typename T) The vertex indices (local indices) |
|
inline |
Add cell with given vertices
local_index | (std::size_t) The cell (index). |
global_index | (std::size_t) The global (user) cell index. |
v | (std::vector<std::size_t>) The vertex indices (local indices) |
void MeshEditor::add_vertex | ( | std::size_t | index, |
const Point & | p | ||
) |
Add vertex v at given point p
index | (std::size_t) The vertex (index). |
p | (Point) The point. |
void MeshEditor::add_vertex | ( | std::size_t | index, |
const std::vector< double > & | x | ||
) |
Add vertex v at given coordinate x
index | (std::size_t) The vertex (index). |
x | (std::vector<double>) The x-coordinates. |
void MeshEditor::add_vertex | ( | std::size_t | index, |
double | x | ||
) |
Add vertex v at given point x (for a 1D mesh)
index | (std::size_t) The vertex (index). |
x | (double) The x-coordinate. |
void MeshEditor::add_vertex | ( | std::size_t | index, |
double | x, | ||
double | y | ||
) |
Add vertex v at given point (x, y) (for a 2D mesh)
index | (std::size_t) The vertex (index). |
x | (double) The x-coordinate. |
y | (double) The y-coordinate. |
void MeshEditor::add_vertex | ( | std::size_t | index, |
double | x, | ||
double | y, | ||
double | z | ||
) |
Add vertex v at given point (x, y, z) (for a 3D mesh)
index | (std::size_t) The vertex (index). |
x | (double) The x-coordinate. |
y | (double) The y-coordinate. |
z | (double) The z-coordinate. |
void MeshEditor::add_vertex_global | ( | std::size_t | local_index, |
std::size_t | global_index, | ||
const Point & | p | ||
) |
Add vertex v at given point p
local_index | (std::size_t) The vertex (local index). |
global_index | (std::size_t) The vertex (global_index). |
p | (Point) The point. |
void MeshEditor::add_vertex_global | ( | std::size_t | local_index, |
std::size_t | global_index, | ||
const std::vector< double > & | x | ||
) |
Add vertex v at given coordinate x
local_index | (std::size_t) The vertex (local index). |
global_index | (std::size_t) The vertex (global_index). |
x | (std::vector<double>) The x-coordinates. |
void MeshEditor::close | ( | bool | order = true | ) |
Close mesh, finish editing, and order entities locally
order | (bool) Order entities locally if true. Default values is true. |
|
inline |
Specify number of cells (serial version)
num_cells | (std::size_t) The number of cells. |
void MeshEditor::init_cells_global | ( | std::size_t | num_local_cells, |
std::size_t | num_global_cells | ||
) |
Specify number of cells (distributed version)
num_local_cells | (std::size_t) The number of local cells. |
num_global_cells | (std::size_t) The number of cells in distributed mesh. |
void MeshEditor::init_entities | ( | ) |
Initialise entities in MeshGeometry
Create required Edges and Faces for the current polynomial degree in the mesh topology, so that points can be added for them. In order to initialise entities, cells must all be added first.
|
inline |
Specify number of vertices (serial version)
num_vertices | (std::size_t) The number of vertices. |
void MeshEditor::init_vertices_global | ( | std::size_t | num_local_vertices, |
std::size_t | num_global_vertices | ||
) |
Specify number of vertices (distributed version)
num_local_vertices | (std::size_t) The number of vertices on this process. |
num_global_vertices | (std::size_t) The number of vertices in distributed mesh. |
void MeshEditor::open | ( | Mesh & | mesh, |
CellType::Type | type, | ||
std::size_t | tdim, | ||
std::size_t | gdim, | ||
std::size_t | degree = 1 |
||
) |
Open mesh of given cell type, topological and geometrical dimension
mesh | (Mesh) The mesh to open. |
type | (CellType::Type) Cell type. |
tdim | (std::size_t) The topological dimension. |
gdim | (std::size_t) The geometrical dimension. |
degree | (std::size_t) The polynomial degree. |
void MeshEditor::open | ( | Mesh & | mesh, |
std::string | type, | ||
std::size_t | tdim, | ||
std::size_t | gdim, | ||
std::size_t | degree = 1 |
||
) |