libMesh
|
The TetGenWrapper
provides an interface for basic access to TetGen data structures and methods.
More...
#include <mesh_tetgen_wrapper.h>
Public Member Functions | |
TetGenWrapper () | |
Constructor. More... | |
~TetGenWrapper () | |
Destructor. More... | |
void | set_switches (std::string_view s) |
Method to set TetGen commandline switches -p Tetrahedralizes a piecewise linear complex (.poly or .smesh file). More... | |
void | run_tetgen () |
Starts the triangulation. More... | |
int | get_numberoftetrahedra () |
int | get_numberoftrifaces () |
void | set_numberofpoints (int i) |
Sets the number of nodes in the TetGen input. More... | |
int | get_numberofpoints () |
void | set_numberoffacets (int i) |
Sets the number of facets in the TetGen input. More... | |
void | set_numberofholes (int i) |
Sets the number of holes in the TetGen input. More... | |
void | set_numberofregions (int i) |
Sets the number of regions in the TetGen input. More... | |
void | allocate_pointlist (int numofpoints) |
Allocates memory, sets number of nodes in the TetGen input. More... | |
void | allocate_facetlist (int numoffacets, int numofholes) |
Allocates memory, sets number of facets, holes in the TetGen input. More... | |
void | allocate_regionlist (int numofregions) |
Allocates memory, sets number of regions in the TetGen input. More... | |
void | set_node (unsigned i, REAL x, REAL y, REAL z) |
Sets coordinates of point i in the TetGen input. More... | |
void | get_output_node (unsigned i, REAL &x, REAL &y, REAL &z) |
int | get_element_node (unsigned i, unsigned j) |
int | get_triface_node (unsigned i, unsigned j) |
REAL | get_element_attribute (unsigned i) |
void | set_hole (unsigned i, REAL x, REAL y, REAL z) |
Sets coordinates of hole i in the TetGen input. More... | |
void | set_facet_numberofpolygons (unsigned i, int num) |
Sets the number of polygons for facet i in the TetGen input. More... | |
void | set_facet_numberofholes (unsigned i, int num) |
Sets the number of holes for facet i in the TetGen input. More... | |
void | allocate_facet_polygonlist (unsigned i, int numofpolygons) |
Allocates memory, sets number of polygons for facet i in the TetGen input. More... | |
void | set_polygon_numberofvertices (unsigned i, unsigned j, int num) |
Sets the number of vertices for polygon j, facet i in the TetGen input. More... | |
void | allocate_polygon_vertexlist (unsigned i, unsigned j, int numofvertices) |
Allocates memory, sets number of vertices for polygon j, facet i in the TetGen input. More... | |
void | set_vertex (unsigned i, unsigned j, unsigned k, int nodeindex) |
Sets index of ith facet, jth polygon, kth vertex in the TetGen input. More... | |
void | set_region (unsigned i, REAL x, REAL y, REAL z, REAL attribute, REAL vol_constraint) |
Sets coordinates, attribute, and volume constraint for region i in the TetGen input. More... | |
Public Attributes | |
tetgenio | tetgen_data |
TetGen input structure. More... | |
std::unique_ptr< tetgenio > | tetgen_output |
TetGen output structure. More... | |
tetgenmesh | tetgen_mesh |
TetGen mesh structure (from the TetGen library). More... | |
tetgenbehavior | tetgen_be |
TetGen control class (from the TetGen library). More... | |
The TetGenWrapper
provides an interface for basic access to TetGen data structures and methods.
Definition at line 45 of file mesh_tetgen_wrapper.h.
libMesh::TetGenWrapper::TetGenWrapper | ( | ) |
Constructor.
Definition at line 32 of file mesh_tetgen_wrapper.C.
References tetgen_data.
|
default |
Destructor.
Empty.
void libMesh::TetGenWrapper::allocate_facet_polygonlist | ( | unsigned | i, |
int | numofpolygons | ||
) |
Allocates memory, sets number of polygons for facet i in the TetGen input.
Definition at line 275 of file mesh_tetgen_wrapper.C.
References set_facet_numberofholes(), set_facet_numberofpolygons(), and tetgen_data.
Referenced by libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole().
Allocates memory, sets number of facets, holes in the TetGen input.
Definition at line 206 of file mesh_tetgen_wrapper.C.
References set_numberoffacets(), set_numberofholes(), and tetgen_data.
Referenced by libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole().
void libMesh::TetGenWrapper::allocate_pointlist | ( | int | numofpoints | ) |
Allocates memory, sets number of nodes in the TetGen input.
Definition at line 134 of file mesh_tetgen_wrapper.C.
References set_numberofpoints(), and tetgen_data.
Referenced by libMesh::TetGenMeshInterface::fill_pointlist().
void libMesh::TetGenWrapper::allocate_polygon_vertexlist | ( | unsigned | i, |
unsigned | j, | ||
int | numofvertices | ||
) |
Allocates memory, sets number of vertices for polygon j, facet i in the TetGen input.
Definition at line 305 of file mesh_tetgen_wrapper.C.
References set_polygon_numberofvertices(), and tetgen_data.
Referenced by libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole().
void libMesh::TetGenWrapper::allocate_regionlist | ( | int | numofregions | ) |
Allocates memory, sets number of regions in the TetGen input.
Definition at line 240 of file mesh_tetgen_wrapper.C.
References set_numberofregions(), and tetgen_data.
REAL libMesh::TetGenWrapper::get_element_attribute | ( | unsigned | i | ) |
Definition at line 126 of file mesh_tetgen_wrapper.C.
References libMesh::libmesh_assert(), and tetgen_output.
int libMesh::TetGenWrapper::get_element_node | ( | unsigned | i, |
unsigned | j | ||
) |
Definition at line 112 of file mesh_tetgen_wrapper.C.
References tetgen_output.
Referenced by libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), and libMesh::TetGenMeshInterface::triangulate_pointset().
int libMesh::TetGenWrapper::get_numberofpoints | ( | ) |
Definition at line 105 of file mesh_tetgen_wrapper.C.
References tetgen_output.
Referenced by libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole().
int libMesh::TetGenWrapper::get_numberoftetrahedra | ( | ) |
Definition at line 91 of file mesh_tetgen_wrapper.C.
References tetgen_output.
Referenced by libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), and libMesh::TetGenMeshInterface::triangulate_pointset().
int libMesh::TetGenWrapper::get_numberoftrifaces | ( | ) |
Definition at line 98 of file mesh_tetgen_wrapper.C.
References tetgen_output.
Referenced by libMesh::TetGenMeshInterface::pointset_convexhull().
void libMesh::TetGenWrapper::get_output_node | ( | unsigned | i, |
REAL & | x, | ||
REAL & | y, | ||
REAL & | z | ||
) |
Definition at line 74 of file mesh_tetgen_wrapper.C.
References tetgen_output.
Referenced by libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole().
int libMesh::TetGenWrapper::get_triface_node | ( | unsigned | i, |
unsigned | j | ||
) |
Definition at line 119 of file mesh_tetgen_wrapper.C.
References tetgen_output.
Referenced by libMesh::TetGenMeshInterface::pointset_convexhull().
void libMesh::TetGenWrapper::run_tetgen | ( | ) |
Starts the triangulation.
Definition at line 174 of file mesh_tetgen_wrapper.C.
References tetgen_be, tetgen_data, and tetgen_output.
Referenced by libMesh::TetGenMeshInterface::pointset_convexhull(), libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), and libMesh::TetGenMeshInterface::triangulate_pointset().
void libMesh::TetGenWrapper::set_facet_numberofholes | ( | unsigned | i, |
int | num | ||
) |
Sets the number of holes for facet i in the TetGen input.
Definition at line 266 of file mesh_tetgen_wrapper.C.
References tetgen_data.
Referenced by allocate_facet_polygonlist().
void libMesh::TetGenWrapper::set_facet_numberofpolygons | ( | unsigned | i, |
int | num | ||
) |
Sets the number of polygons for facet i in the TetGen input.
Definition at line 258 of file mesh_tetgen_wrapper.C.
References tetgen_data.
Referenced by allocate_facet_polygonlist().
void libMesh::TetGenWrapper::set_hole | ( | unsigned | i, |
REAL | x, | ||
REAL | y, | ||
REAL | z | ||
) |
Sets coordinates of hole i in the TetGen input.
Definition at line 56 of file mesh_tetgen_wrapper.C.
References tetgen_data.
Referenced by libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole().
void libMesh::TetGenWrapper::set_node | ( | unsigned | i, |
REAL | x, | ||
REAL | y, | ||
REAL | z | ||
) |
Sets coordinates of point i in the TetGen input.
Definition at line 46 of file mesh_tetgen_wrapper.C.
References tetgen_data.
Referenced by libMesh::TetGenMeshInterface::fill_pointlist().
void libMesh::TetGenWrapper::set_numberoffacets | ( | int | i | ) |
Sets the number of facets in the TetGen input.
Definition at line 182 of file mesh_tetgen_wrapper.C.
References tetgen_data.
Referenced by allocate_facetlist().
void libMesh::TetGenWrapper::set_numberofholes | ( | int | i | ) |
Sets the number of holes in the TetGen input.
Definition at line 190 of file mesh_tetgen_wrapper.C.
References tetgen_data.
Referenced by allocate_facetlist().
void libMesh::TetGenWrapper::set_numberofpoints | ( | int | i | ) |
Sets the number of nodes in the TetGen input.
Definition at line 66 of file mesh_tetgen_wrapper.C.
References tetgen_data.
Referenced by allocate_pointlist().
void libMesh::TetGenWrapper::set_numberofregions | ( | int | i | ) |
Sets the number of regions in the TetGen input.
Definition at line 198 of file mesh_tetgen_wrapper.C.
References tetgen_data.
Referenced by allocate_regionlist().
void libMesh::TetGenWrapper::set_polygon_numberofvertices | ( | unsigned | i, |
unsigned | j, | ||
int | num | ||
) |
Sets the number of vertices for polygon j, facet i in the TetGen input.
Definition at line 297 of file mesh_tetgen_wrapper.C.
References tetgen_data.
Referenced by allocate_polygon_vertexlist().
void libMesh::TetGenWrapper::set_region | ( | unsigned | i, |
REAL | x, | ||
REAL | y, | ||
REAL | z, | ||
REAL | attribute, | ||
REAL | vol_constraint | ||
) |
Sets coordinates, attribute, and volume constraint for region i in the TetGen input.
Definition at line 332 of file mesh_tetgen_wrapper.C.
References tetgen_data.
void libMesh::TetGenWrapper::set_switches | ( | std::string_view | s | ) |
Method to set TetGen commandline switches -p Tetrahedralizes a piecewise linear complex (.poly or .smesh file).
-q Quality mesh generation. A minimum radius-edge ratio may be specified (default 2.0). -a Applies a maximum tetrahedron volume constraint. -A Assigns attributes to identify tetrahedra in certain regions. -r Reconstructs and Refines a previously generated mesh. -Y Suppresses boundary facets/segments splitting. -i Inserts a list of additional points into mesh. -M Does not merge coplanar facets. -T Set a tolerance for coplanar test (default 1e-8). -d Detect intersections of PLC facets. -z Numbers all output items starting from zero. -o2 Generates second-order subparametric elements. -f Outputs faces (including non-boundary faces) to .face file. -e Outputs subsegments to .edge file. -n Outputs tetrahedra neighbors to .neigh file. -g Outputs mesh to .mesh file for viewing by Medit. -G Outputs mesh to .msh file for viewing by Gid. -O Outputs mesh to .off file for viewing by Geomview. -J No jettison of unused vertices from output .node file. -B Suppresses output of boundary information. -N Suppresses output of .node file. -E Suppresses output of .ele file. -F Suppresses output of .face file. -I Suppresses mesh iteration numbers. -C Checks the consistency of the final mesh. -Q Quiet: No terminal output except errors. -V Verbose: Detailed information, more terminal output. -v Prints the version information. -h Help: A brief instruction for using TetGen.
Definition at line 153 of file mesh_tetgen_wrapper.C.
References libMesh::out, and tetgen_be.
Referenced by libMesh::TetGenMeshInterface::pointset_convexhull(), libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), and libMesh::TetGenMeshInterface::triangulate_pointset().
void libMesh::TetGenWrapper::set_vertex | ( | unsigned | i, |
unsigned | j, | ||
unsigned | k, | ||
int | nodeindex | ||
) |
Sets index of ith facet, jth polygon, kth vertex in the TetGen input.
Definition at line 324 of file mesh_tetgen_wrapper.C.
References tetgen_data.
Referenced by libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole().
tetgenbehavior libMesh::TetGenWrapper::tetgen_be |
TetGen control class (from the TetGen library).
Definition at line 240 of file mesh_tetgen_wrapper.h.
Referenced by run_tetgen(), and set_switches().
tetgenio libMesh::TetGenWrapper::tetgen_data |
TetGen input structure.
Definition at line 225 of file mesh_tetgen_wrapper.h.
Referenced by allocate_facet_polygonlist(), allocate_facetlist(), allocate_pointlist(), allocate_polygon_vertexlist(), allocate_regionlist(), run_tetgen(), set_facet_numberofholes(), set_facet_numberofpolygons(), set_hole(), set_node(), set_numberoffacets(), set_numberofholes(), set_numberofpoints(), set_numberofregions(), set_polygon_numberofvertices(), set_region(), set_vertex(), and TetGenWrapper().
tetgenmesh libMesh::TetGenWrapper::tetgen_mesh |
TetGen mesh structure (from the TetGen library).
Definition at line 235 of file mesh_tetgen_wrapper.h.
std::unique_ptr<tetgenio> libMesh::TetGenWrapper::tetgen_output |
TetGen output structure.
Definition at line 230 of file mesh_tetgen_wrapper.h.
Referenced by get_element_attribute(), get_element_node(), get_numberofpoints(), get_numberoftetrahedra(), get_numberoftrifaces(), get_output_node(), get_triface_node(), and run_tetgen().