libMesh
|
Class TetGenMeshInterface
provides an interface for tetrahedralization of meshes using the TetGen library.
More...
#include <mesh_tetgen_interface.h>
Public Member Functions | |
TetGenMeshInterface (UnstructuredMesh &mesh) | |
Constructor. More... | |
~TetGenMeshInterface () | |
Empty destructor. More... | |
void | set_switches (const std::string &) |
Method to set switches to tetgen, allowing for different behaviours. More... | |
void | triangulate_pointset () |
Method invokes TetGen library to compute a Delaunay tetrahedralization from the nodes point set. More... | |
void | pointset_convexhull () |
Method invokes TetGen library to compute a Delaunay tetrahedralization from the nodes point set. More... | |
void | triangulate_conformingDelaunayMesh (double quality_constraint=0., double volume_constraint=0.) |
Method invokes TetGen library to compute a Delaunay tetrahedralization from the nodes point set. More... | |
void | triangulate_conformingDelaunayMesh_carvehole (const std::vector< Point > &holes, double quality_constraint=0., double volume_constraint=0.) |
Method invokes TetGen library to compute a Delaunay tetrahedralization from the nodes point set. More... | |
Protected Member Functions | |
void | fill_pointlist (TetGenWrapper &wrapper) |
This function copies nodes from the _mesh into TetGen's pointlist. More... | |
void | assign_nodes_to_elem (unsigned *node_labels, Elem *elem) |
Assigns the node IDs contained in the 'node_labels' array to 'elem'. More... | |
unsigned | check_hull_integrity () |
This function checks the integrity of the current set of elements in the Mesh to see if they comprise a convex hull, that is: More... | |
void | process_hull_integrity_result (unsigned result) |
This function prints an informative message and crashes based on the output of the check_hull_integrity() function. More... | |
void | delete_2D_hull_elements () |
Delete original convex hull elements from the Mesh after performing a Delaunay tetrahedralization. More... | |
Protected Attributes | |
UnstructuredMesh & | _mesh |
Local reference to the mesh we are working with. More... | |
std::vector< unsigned > | _sequential_to_libmesh_node_map |
We should not assume libmesh nodes are numbered sequentially... More... | |
MeshSerializer | _serializer |
Tetgen only operates on serial meshes. More... | |
std::string | _switches |
Parameter controlling the behaviour of tetgen. More... | |
Class TetGenMeshInterface
provides an interface for tetrahedralization of meshes using the TetGen library.
For information about TetGen cf. TetGen home page.
Definition at line 54 of file mesh_tetgen_interface.h.
|
explicit |
Constructor.
Takes a reference to the mesh.
libMesh::TetGenMeshInterface::~TetGenMeshInterface | ( | ) |
|
protected |
Assigns the node IDs contained in the 'node_labels' array to 'elem'.
|
protected |
This function checks the integrity of the current set of elements in the Mesh to see if they comprise a convex hull, that is:
|
protected |
Delete original convex hull elements from the Mesh after performing a Delaunay tetrahedralization.
|
protected |
This function copies nodes from the _mesh into TetGen's pointlist.
Takes some pains to ensure that non-sequential node numberings (which can happen with e.g. DistributedMesh) are handled.
void libMesh::TetGenMeshInterface::pointset_convexhull | ( | ) |
Method invokes TetGen library to compute a Delaunay tetrahedralization from the nodes point set.
Stores only 2D hull surface elements.
|
protected |
This function prints an informative message and crashes based on the output of the check_hull_integrity() function.
It is a separate function so that you can check hull integrity without crashing if you desire.
void libMesh::TetGenMeshInterface::set_switches | ( | const std::string & | ) |
Method to set switches to tetgen, allowing for different behaviours.
void libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh | ( | double | quality_constraint = 0. , |
double | volume_constraint = 0. |
||
) |
Method invokes TetGen library to compute a Delaunay tetrahedralization from the nodes point set.
Boundary constraints are taken from elements array.
void libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole | ( | const std::vector< Point > & | holes, |
double | quality_constraint = 0. , |
||
double | volume_constraint = 0. |
||
) |
Method invokes TetGen library to compute a Delaunay tetrahedralization from the nodes point set.
Boundary constraints are taken from elements array. Include carve-out functionality.
void libMesh::TetGenMeshInterface::triangulate_pointset | ( | ) |
Method invokes TetGen library to compute a Delaunay tetrahedralization from the nodes point set.
|
protected |
Local reference to the mesh we are working with.
Definition at line 151 of file mesh_tetgen_interface.h.
|
protected |
We should not assume libmesh nodes are numbered sequentially...
This is not the default behavior of DistributedMesh, for example, unless you specify node IDs explicitly. So this array allows us to keep a mapping between the sequential numbering in tetgen_data.pointlist.
Definition at line 160 of file mesh_tetgen_interface.h.
|
protected |
Tetgen only operates on serial meshes.
Definition at line 165 of file mesh_tetgen_interface.h.
|
protected |
Parameter controlling the behaviour of tetgen.
By default quiet.
Definition at line 171 of file mesh_tetgen_interface.h.