NeoPZ
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TPZReadTetGen Class Reference

Implement the interface between TPZGeoMesh and the files produced by tetgen. Getting Data. More...

#include <pzreadtetgen.h>

Public Member Functions

 TPZReadTetGen ()
 
 ~TPZReadTetGen ()
 
TPZGeoMeshProcess (std::string NodeFileName, std::string FaceFileName, std::string TetraFileName)
 Convert tetgen files in a TPZGeoMesh object. More...
 

Private Member Functions

bool ProcessNodes (std::string NodeFileName, TPZGeoMesh &gmesh, int64_t &numbernodes)
 Process nodes. More...
 
bool ProcessFaces (std::string FaceFileName, TPZGeoMesh &gmesh, int64_t &numberfaces)
 Process faces. More...
 
bool ProcessTetra (std::string TetraFileName, TPZGeoMesh &gmesh, int64_t &numbervols)
 Process tetrahedras. More...
 

Private Attributes

std::map< int64_t, int64_t > fNodeIndices
 Nodes in tetgen are counted from 1 to n as a fortran based code. More...
 

Detailed Description

Implement the interface between TPZGeoMesh and the files produced by tetgen. Getting Data.

Since
March 03, 2006 What is tetgen ? Take a look on http://tetgen.berlios.de/index.html "TetGen - A Quality Tetrahedral Mesh Generator and Three-Dimensional Delaunay Triangulator. Hang Si Research Group of Numerical Mathematics and Scientific Computing Weierstrass Institute for Applied Analysis and Stochastics Mohrenstr. 39 10117 Berlin, Germany si@wi.nosp@m.as-b.nosp@m.erlin.nosp@m..de"

Definition at line 26 of file pzreadtetgen.h.

Constructor & Destructor Documentation

◆ TPZReadTetGen()

TPZReadTetGen::TPZReadTetGen ( )

Definition at line 13 of file pzreadtetgen.cpp.

◆ ~TPZReadTetGen()

TPZReadTetGen::~TPZReadTetGen ( )

Definition at line 17 of file pzreadtetgen.cpp.

Member Function Documentation

◆ Process()

TPZGeoMesh * TPZReadTetGen::Process ( std::string  NodeFileName,
std::string  FaceFileName,
std::string  TetraFileName 
)

Convert tetgen files in a TPZGeoMesh object.

If something does not work in the process, a null pointer is returned.

Definition at line 21 of file pzreadtetgen.cpp.

References TPZGeoMesh::BuildConnectivity(), ProcessFaces(), TPZMultiTimer::processName(), ProcessNodes(), ProcessTetra(), TPZMultiTimer::start(), and TPZMultiTimer::stop().

◆ ProcessFaces()

bool TPZReadTetGen::ProcessFaces ( std::string  FaceFileName,
TPZGeoMesh gmesh,
int64_t &  numberfaces 
)
private

Process faces.

Returns true if the process worked succesfuly and false otherwise.

Definition at line 101 of file pzreadtetgen.cpp.

References TPZGeoMesh::CreateGeoElement(), ETriangle, fNodeIndices, and nodind.

Referenced by Process().

◆ ProcessNodes()

bool TPZReadTetGen::ProcessNodes ( std::string  NodeFileName,
TPZGeoMesh gmesh,
int64_t &  numbernodes 
)
private

Process nodes.

Return true if the process worked succesfuly and false otherwise.

Definition at line 67 of file pzreadtetgen.cpp.

References TPZAdmChunkVector< T, EXP >::AllocateNewElement(), fNodeIndices, and TPZGeoMesh::NodeVec().

Referenced by Process().

◆ ProcessTetra()

bool TPZReadTetGen::ProcessTetra ( std::string  TetraFileName,
TPZGeoMesh gmesh,
int64_t &  numbervols 
)
private

Process tetrahedras.

Returns true if the process worked succesfuly and false otherwise.

Definition at line 128 of file pzreadtetgen.cpp.

References TPZGeoMesh::CreateGeoElement(), ETetraedro, fNodeIndices, and nodind.

Referenced by Process().

Member Data Documentation

◆ fNodeIndices

std::map<int64_t, int64_t> TPZReadTetGen::fNodeIndices
private

Nodes in tetgen are counted from 1 to n as a fortran based code.

In PZ, nodes have one Id and one index. index is defined by TPZGeoMesh when a new node is allocated in NodeVec(). This object maps from the Id to the index. fNodeIndices[ Id ] = index.

Definition at line 57 of file pzreadtetgen.h.

Referenced by ProcessFaces(), ProcessNodes(), and ProcessTetra().


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