#include <mesh_tetgen_support.h>
TetGenWrapper ()
~TetGenWrapper ()
void set_switches (const std::string &s)
void run_tetgen ()
int get_numberoftetrahedra ()
int get_numberoftrifaces ()
void set_numberofpoints (const int i)
int get_numberofpoints ()
void set_numberoffacets (const int i)
void set_numberofholes (const int i)
void set_numberofregions (const int i)
void set_pointlist (const int numofpoints)
void set_facetlist (const int numoffacets, const int numofholes)
void set_regionlist (const int numofregions)
void set_node (const int i, const REAL x, const REAL y, const REAL z)
void get_output_node (const int i, REAL &x, REAL &y, REAL &z)
int get_element_node (const int i, const int j)
int get_triface_node (const int i, const int j)
REAL get_element_attribute (const int i)
void set_hole (const int i, const REAL x, const REAL y, const REAL z)
void set_facet_numberofpolygons (const int i, const int num)
void set_facet_numberofholes (const int i, const int num)
void set_facet_polygonlist (const int i, const int numofpolygons)
void set_polygon_numberofvertices (const int i, const int j, const int num)
void set_polygon_vertexlist (const int i, const int j, const int numofvertices)
void set_vertex (const int i, const int j, const int k, const int nodeindex)
void set_region (const int i, const REAL x, const REAL y, const REAL z, const REAL attribute, const REAL vol_constraint)
tetgenio tetgen_data
tetgenio * tetgen_output
tetgenmesh tetgen_mesh
tetgenbehavior tetgen_be
Abstract class TetGenWrapper provides an interface for basic access to TetGen data structures and methods.
Definition at line 47 of file mesh_tetgen_support.h.
Definition at line 37 of file mesh_tetgen_support.C.
References tetgen_data, and tetgen_output.
{
tetgen_output = new tetgenio;
this->tetgen_data.mesh_dim = 3;
this->tetgen_data.numberofpointattributes = 0;
this->tetgen_data.firstnumber = 0;
}
Definition at line 48 of file mesh_tetgen_support.C.
References tetgen_output.
{
delete tetgen_output;
}
Definition at line 126 of file mesh_tetgen_support.C.
References tetgen_output.
{
libmesh_assert(tetgen_output->numberoftetrahedronattributes>0);
return tetgen_output->tetrahedronattributelist[tetgen_output->numberoftetrahedronattributes*i];
}
Definition at line 112 of file mesh_tetgen_support.C.
References tetgen_output.
Referenced by TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), and TetGenMeshInterface::triangulate_pointset().
{
return tetgen_output->tetrahedronlist[i*4+j];
}
Definition at line 105 of file mesh_tetgen_support.C.
References tetgen_output.
Referenced by TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole().
{
return tetgen_output->numberofpoints;
}
Definition at line 91 of file mesh_tetgen_support.C.
References tetgen_output.
Referenced by TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), and TetGenMeshInterface::triangulate_pointset().
{
return tetgen_output->numberoftetrahedra;
}
Definition at line 98 of file mesh_tetgen_support.C.
References tetgen_output.
Referenced by TetGenMeshInterface::pointset_convexhull().
{
return tetgen_output->numberoftrifaces;
}
Definition at line 82 of file mesh_tetgen_support.C.
References tetgen_output.
Referenced by TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole().
{
x = tetgen_output->pointlist[3*i];
y = tetgen_output->pointlist[3*i+1];
z = tetgen_output->pointlist[3*i+2];
}
Definition at line 119 of file mesh_tetgen_support.C.
References tetgen_output.
Referenced by TetGenMeshInterface::pointset_convexhull().
{
return tetgen_output->trifacelist[i*3+j];
}
Definition at line 155 of file mesh_tetgen_support.C.
References tetgen_be, tetgen_data, and tetgen_output.
Referenced by TetGenMeshInterface::pointset_convexhull(), TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), and TetGenMeshInterface::triangulate_pointset().
{
// Call tetrahedralize from the TetGen library.
tetrahedralize(&tetgen_be, &tetgen_data, tetgen_output);
}
Definition at line 211 of file mesh_tetgen_support.C.
References tetgen_data.
Referenced by set_facet_polygonlist().
{
this->tetgen_data.facetlist[i].numberofholes = num;
}
Definition at line 204 of file mesh_tetgen_support.C.
References tetgen_data.
Referenced by set_facet_polygonlist().
{
this->tetgen_data.facetlist[i].numberofpolygons = num;
}
Definition at line 219 of file mesh_tetgen_support.C.
References set_facet_numberofholes(), set_facet_numberofpolygons(), and tetgen_data.
Referenced by TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole().
{
set_facet_numberofpolygons(i, numofpolygons);
set_facet_numberofholes(i, 0);
this->tetgen_data.facetlist[i].polygonlist = new tetgenio::polygon[numofpolygons];
for (int j=0; j<this->tetgen_data.facetlist[i].numberofpolygons; j++)
this->tetgen_data.init(&(this->tetgen_data.facetlist[i].polygonlist[j]));
}
Definition at line 184 of file mesh_tetgen_support.C.
References set_numberoffacets(), set_numberofholes(), and tetgen_data.
Referenced by TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole().
{
set_numberoffacets(numoffacets);
set_numberofholes(numofholes);
this->tetgen_data.facetlist = new tetgenio::facet[this->tetgen_data.numberoffacets];
for (int i=0; i<numoffacets; i++)
this->tetgen_data.init(&(this->tetgen_data.facetlist[i]));
this->tetgen_data.holelist = new REAL[this->tetgen_data.numberofholes * 3];
}
Definition at line 65 of file mesh_tetgen_support.C.
References tetgen_data.
Referenced by TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole().
{
int index = i*3;
tetgen_data.holelist[index++] = x;
tetgen_data.holelist[index++] = y;
tetgen_data.holelist[index++] = z;
}
Definition at line 55 of file mesh_tetgen_support.C.
References tetgen_data.
Referenced by TetGenMeshInterface::pointset_convexhull(), TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), and TetGenMeshInterface::triangulate_pointset().
{
int index = i*3;
tetgen_data.pointlist[index++] = x;
tetgen_data.pointlist[index++] = y;
tetgen_data.pointlist[index++] = z;
}
Definition at line 163 of file mesh_tetgen_support.C.
References tetgen_data.
Referenced by set_facetlist().
{
this->tetgen_data.numberoffacets = i;
}
Definition at line 170 of file mesh_tetgen_support.C.
References tetgen_data.
Referenced by set_facetlist().
{
this->tetgen_data.numberofholes = i;
}
Definition at line 75 of file mesh_tetgen_support.C.
References tetgen_data.
Referenced by set_pointlist().
{
tetgen_data.numberofpoints = i;
}
Definition at line 177 of file mesh_tetgen_support.C.
References tetgen_data.
Referenced by set_regionlist().
{
this->tetgen_data.numberofregions = i;
}
Definition at line 134 of file mesh_tetgen_support.C.
References set_numberofpoints(), and tetgen_data.
Referenced by TetGenMeshInterface::pointset_convexhull(), TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), and TetGenMeshInterface::triangulate_pointset().
{
this->set_numberofpoints(numofpoints);
this->tetgen_data.pointlist = new REAL[tetgen_data.numberofpoints * 3];
}
Definition at line 230 of file mesh_tetgen_support.C.
References tetgen_data.
Referenced by set_polygon_vertexlist().
{
this->tetgen_data.facetlist[i].polygonlist[j].numberofvertices = num;
}
Definition at line 237 of file mesh_tetgen_support.C.
References set_polygon_numberofvertices(), and tetgen_data.
Referenced by TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole().
{
set_polygon_numberofvertices(i, j, numofvertices);
this->tetgen_data.facetlist[i].polygonlist[j].vertexlist = new int[numofvertices];
}
Definition at line 253 of file mesh_tetgen_support.C.
References tetgen_data.
{
int index = i*5;
tetgen_data.regionlist[index++] = x;
tetgen_data.regionlist[index++] = y;
tetgen_data.regionlist[index++] = z;
tetgen_data.regionlist[index++] = attribute;
tetgen_data.regionlist[index++] = vol_constraint;
}
Definition at line 196 of file mesh_tetgen_support.C.
References set_numberofregions(), and tetgen_data.
{
set_numberofregions(numofregions);
this->tetgen_data.regionlist = new REAL[this->tetgen_data.numberofregions * 5];
}
Definition at line 142 of file mesh_tetgen_support.C.
References tetgen_be.
Referenced by TetGenMeshInterface::pointset_convexhull(), TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), and TetGenMeshInterface::triangulate_pointset().
{
// Copy the string to a temporary buffer for passing to the C API
char buffer[256];
libmesh_assert (s.size() < sizeof(buffer)-1);
buffer[ s.copy( buffer , sizeof( buffer ) - 1 ) ] = ' ' ;
if (!tetgen_be.parse_commandline(buffer))
std::cout << 'TetGen replies: Wrong switches!' << std::endl;
}
Definition at line 246 of file mesh_tetgen_support.C.
References tetgen_data.
Referenced by TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole().
{
this->tetgen_data.facetlist[i].polygonlist[j].vertexlist[k] = nodeindex;
}
Definition at line 211 of file mesh_tetgen_support.h.
Referenced by run_tetgen(), and set_switches().
Definition at line 196 of file mesh_tetgen_support.h.
Referenced by run_tetgen(), set_facet_numberofholes(), set_facet_numberofpolygons(), set_facet_polygonlist(), set_facetlist(), set_hole(), set_node(), set_numberoffacets(), set_numberofholes(), set_numberofpoints(), set_numberofregions(), set_pointlist(), set_polygon_numberofvertices(), set_polygon_vertexlist(), set_region(), set_regionlist(), set_vertex(), and TetGenWrapper().
Definition at line 206 of file mesh_tetgen_support.h.
Definition at line 201 of file mesh_tetgen_support.h.
Referenced by get_element_attribute(), get_element_node(), get_numberofpoints(), get_numberoftetrahedra(), get_numberoftrifaces(), get_output_node(), get_triface_node(), run_tetgen(), TetGenWrapper(), and ~TetGenWrapper().
Generated automatically by Doxygen for libMesh from the source code.