std::basic_string< CepsChar > CepsString
C++ format string.
std::vector< _Type, _Alloc > CepsVector
C++ vector.
std::make_unsigned_t< CepsInt > CepsUInt
Unsigned version on CepsInt.
int32_t CepsInt
Need 32 bit integer.
Abstract base class that encapsulates primary functionalities of each mesh reader.
Parser for tetgen .ele .node ... files.
TetgenMeshReader(const CepsString &fileName, const CepsUInt &dim, CepsBool quads=false)
Constructor. The .ele file name must be provided.
CepsString m_bdryFileName
File with boundary cells.
CepsUInt m_indexOffset
Cells and nodes indices may start from 0 or 1...
CepsBool open() override
Redefinition of base class open method as more than 1 file must be opened.
CepsString m_nodesFileName
File with nodes.
std::ifstream m_nodesFile
File with nodes.
CepsBool hasBoundaryMarker() const
True if current mesh has boundary markers.
void initialize() override
Get number of nodes and cells from files. Prior to any reading.
void readCells(CepsUInt indexStart, CepsUInt indexEnd, CepsUInt nodeOffset, CepsUInt cellOffset, CepsVector< CepsNodeGlobalIndex > &nodeIndices, CepsVector< CepsUInt > &nodeIndicesPtr, CepsVector< CepsAttribute > &cellAttr, CepsVector< CepsUInt > &cellAttrPtr, CepsVector< CepsChar > &isBoundaryCell) override
Reads several cells in mesh file.
std::ifstream m_bdryFile
File with boundary cells.
~TetgenMeshReader() override
Destructor.
CepsInt m_bdryMarker
Should be 1 or 0.
void resetStreams()
Place the streams at the correct lines.
CepsUInt m_bdryIndexOffset
Index offset for boundary cells.
void readNodes(CepsUInt indexStart, CepsUInt indexEnd, CepsUInt nodeOffset, CepsVector< CepsReal > &coords, CepsVector< CepsAttribute > &attr, CepsVector< CepsUInt > &attrPtr) override
Reads several nodes in mesh file.
void getNextCell(CepsUInt cellId, CepsUInt fileCellId, CepsUInt nodeOffset, CepsVector< CepsNodeGlobalIndex > &nodeIndices, CepsVector< CepsUInt > &nodeIndicesPtr, CepsVector< CepsAttribute > &cellAttr, CepsVector< CepsUInt > &cellAttrPtr, CepsVector< CepsChar > &isBoundaryCell, CepsBool boundaryFlag) override
Reads a single cell in mesh file.