libMesh
Public Member Functions | Public Attributes | List of all members
libMesh::TetGenWrapper Class Reference

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 (const std::string &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...
 

Detailed Description

The TetGenWrapper provides an interface for basic access to TetGen data structures and methods.

Author
Steffen Petersen
Date
2004
Author
John W. Peterson
Date
2011

Definition at line 45 of file mesh_tetgen_wrapper.h.

Constructor & Destructor Documentation

◆ TetGenWrapper()

libMesh::TetGenWrapper::TetGenWrapper ( )

Constructor.

◆ ~TetGenWrapper()

libMesh::TetGenWrapper::~TetGenWrapper ( )

Destructor.

Empty.

Member Function Documentation

◆ allocate_facet_polygonlist()

void libMesh::TetGenWrapper::allocate_facet_polygonlist ( unsigned  i,
int  numofpolygons 
)

Allocates memory, sets number of polygons for facet i in the TetGen input.

◆ allocate_facetlist()

void libMesh::TetGenWrapper::allocate_facetlist ( int  numoffacets,
int  numofholes 
)

Allocates memory, sets number of facets, holes in the TetGen input.

◆ allocate_pointlist()

void libMesh::TetGenWrapper::allocate_pointlist ( int  numofpoints)

Allocates memory, sets number of nodes in the TetGen input.

◆ allocate_polygon_vertexlist()

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.

◆ allocate_regionlist()

void libMesh::TetGenWrapper::allocate_regionlist ( int  numofregions)

Allocates memory, sets number of regions in the TetGen input.

◆ get_element_attribute()

REAL libMesh::TetGenWrapper::get_element_attribute ( unsigned  i)
Returns
The attribute of element i in the TetGen output.

◆ get_element_node()

int libMesh::TetGenWrapper::get_element_node ( unsigned  i,
unsigned  j 
)
Returns
The index of jth node from element i in the TetGen output.

◆ get_numberofpoints()

int libMesh::TetGenWrapper::get_numberofpoints ( )
Returns
Number of nodes in the TetGen output.

◆ get_numberoftetrahedra()

int libMesh::TetGenWrapper::get_numberoftetrahedra ( )
Returns
Number of tetrahedra in the TetGen output.

◆ get_numberoftrifaces()

int libMesh::TetGenWrapper::get_numberoftrifaces ( )
Returns
Number of triangle surface elements in the TetGen output.

◆ get_output_node()

void libMesh::TetGenWrapper::get_output_node ( unsigned  i,
REAL x,
REAL y,
REAL z 
)
Returns
The coordinates of point i in the TetGen output.

◆ get_triface_node()

int libMesh::TetGenWrapper::get_triface_node ( unsigned  i,
unsigned  j 
)
Returns
The index of the jth node from surface triangle i in the TetGen output.

◆ run_tetgen()

void libMesh::TetGenWrapper::run_tetgen ( )

Starts the triangulation.

◆ set_facet_numberofholes()

void libMesh::TetGenWrapper::set_facet_numberofholes ( unsigned  i,
int  num 
)

Sets the number of holes for facet i in the TetGen input.

◆ set_facet_numberofpolygons()

void libMesh::TetGenWrapper::set_facet_numberofpolygons ( unsigned  i,
int  num 
)

Sets the number of polygons for facet i in the TetGen input.

◆ set_hole()

void libMesh::TetGenWrapper::set_hole ( unsigned  i,
REAL  x,
REAL  y,
REAL  z 
)

Sets coordinates of hole i in the TetGen input.

◆ set_node()

void libMesh::TetGenWrapper::set_node ( unsigned  i,
REAL  x,
REAL  y,
REAL  z 
)

Sets coordinates of point i in the TetGen input.

◆ set_numberoffacets()

void libMesh::TetGenWrapper::set_numberoffacets ( int  i)

Sets the number of facets in the TetGen input.

◆ set_numberofholes()

void libMesh::TetGenWrapper::set_numberofholes ( int  i)

Sets the number of holes in the TetGen input.

◆ set_numberofpoints()

void libMesh::TetGenWrapper::set_numberofpoints ( int  i)

Sets the number of nodes in the TetGen input.

◆ set_numberofregions()

void libMesh::TetGenWrapper::set_numberofregions ( int  i)

Sets the number of regions in the TetGen input.

◆ set_polygon_numberofvertices()

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.

◆ set_region()

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.

Note
Coordinates and attributes will only be considered if the corresponding switches are enabled. See TetGen documentation for more details.

◆ set_switches()

void libMesh::TetGenWrapper::set_switches ( const std::string &  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.

◆ set_vertex()

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.

Member Data Documentation

◆ tetgen_be

tetgenbehavior libMesh::TetGenWrapper::tetgen_be

TetGen control class (from the TetGen library).

Definition at line 240 of file mesh_tetgen_wrapper.h.

◆ tetgen_data

tetgenio libMesh::TetGenWrapper::tetgen_data

TetGen input structure.

Definition at line 225 of file mesh_tetgen_wrapper.h.

◆ tetgen_mesh

tetgenmesh libMesh::TetGenWrapper::tetgen_mesh

TetGen mesh structure (from the TetGen library).

Definition at line 235 of file mesh_tetgen_wrapper.h.

◆ tetgen_output

std::unique_ptr<tetgenio> libMesh::TetGenWrapper::tetgen_output

TetGen output structure.

Definition at line 230 of file mesh_tetgen_wrapper.h.


The documentation for this class was generated from the following file: