libsurf
Programmer's Documentation

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TetMesh Class Reference

Detailed Description

Simple tetrahedral volume mesh.

TetMesh is a 'dumb' volume mesh container which does nothing more than support i/o to a few different formats. If the tetgen library libtet.a is available, the member function callTetgen() can be used to generate a quality-conforming Delaunay tetrahedralization of the domain limited by the given boundary triangles.

Note that tetgen may not terminate if excessive quality is called for.

Deprecated:

#include <tetmesh.h>

Collaboration diagram for TetMesh:
[legend]

Public Types

typedef DMatrix< int > IndexMatrix
 
typedef DVector< int > IndexVector
 

Public Member Functions

 TetMesh ()
 create empty mesh
 
virtual ~TetMesh ()
 virtual destructor
 
void init (const TriMesh &allb)
 initialize from single mesh which contains all boundaries
 
uint nnodes () const
 count nodes
 
uint nfaces () const
 count boundary faces
 
uint nelements () const
 count tetrahedra
 
const PointList< 3 > & nodes () const
 access nodes
 
const TetFaceface (uint i) const
 access triangle i
 
TetFaceface (uint i)
 access triangle i
 
const TetElementelement (uint i) const
 access tetrahedron i
 
uint nboundaries () const
 number of boundaries identified
 
const TetBoundaryGroupboundaryGroup (uint i) const
 access boundary i
 
TetBoundaryGroupboundaryGroup (uint i)
 access boundary i
 
Vct3 findHolePosition (const TriMesh &m) const
 compute hole position from wall boundary mesh
 
bool findHoles (const TriMesh &m, PointList< 3 > &holes) const
 determine multiple holes for unconnected components
 
void initBoundaries (const TriMesh &wall, TriMesh &mfarfield)
 set location of hole marker More...
 
void reverseBoundary (uint k)
 reverse triangles of boundary k
 
uint groupByTag (int t) const
 locate boundary group by tag
 
void reorder ()
 reorder nodes
 
void cutElements (const Plane &p, TriMesh &tms) const
 generate a plane cut through the tetrahedral mesh
 
void toMx (MxMesh &mx) const
 convert to newer, more flexible mesh representation
 
void readTetgen (const std::string &bname)
 read tetgen format files with basename bname
 
void writeTetgen (const std::string &bname, int offs=1) const
 write tetgen format files
 
void writeSmesh (const std::string &bname, int offs=1) const
 write boundary only in smesh format (for tetgen)
 
void readCgns (const std::string &bname)
 read cgns file
 
void writeCgns (const std::string &fname, bool bcAsSections=false)
 write all present data to cgns file
 
void writeMsh (const std::string &fname) const
 write to bmsh file (for Edge)
 
void writeBoc (const std::string &fname) const
 write boundary conditions for Edge to file
 
void clear ()
 clear all data
 

Protected Member Functions

int readTetgenNodes (std::istream &is)
 scan node file and return node index offset
 
void readTetgenElements (std::istream &is, int offs=0)
 scan element file
 
void readTetgenFaces (std::istream &is, int offs=0)
 scan boundary face file
 
void collectFaces (uint itag, IndexMatrix &ielm) const
 collect boundary elements for boundary tagged with itag
 
void collectFaceIndices (uint itag, IndexVector &ielm) const
 collect indices of faces for boundary tagged with itag
 
bool triangleHole (const TriMesh &m, uint fix, Vct3 &hole) const
 check whether triangle fix can be used to determine internal point
 

Protected Attributes

PointList< 3 > vtx
 nodes
 
TetElementArray tets
 elements
 
TetFaceArray faces
 boundary triangles
 
BGroupArray boco
 boundary region names
 
PointList< 3 > mholes
 hole positions
 

Member Function Documentation

void TetMesh::initBoundaries ( const TriMesh wall,
TriMesh mfarfield 
)

set location of hole marker

initialize boundary from wall and farfield mesh


The documentation for this class was generated from the following files:
Generated on Mon Jan 24 2022 03:03:20 for libsurf by   doxygen 1.8.5