NeoPZ
Public Member Functions | Protected Member Functions | List of all members
TPZReadMeshHR Class Reference

Reads a mesh in a "human readable" format, i.e. in text format and with coments. Getting Data. More...

#include <pzreadmeshhr.h>

Inheritance diagram for TPZReadMeshHR:
[legend]
Collaboration diagram for TPZReadMeshHR:
[legend]

Public Member Functions

 TPZReadMeshHR (const char *inFile)
 Default Constructor. More...
 
virtual ~TPZReadMeshHR ()
 Default Destructor. More...
 
virtual TPZCompMeshReadMesh ()
 Read and return the mesh from a given file. More...
 
TPZGeoMeshreadGeoMesh ()
 
- Public Member Functions inherited from TPZReadMesh
 TPZReadMesh (const char *inFile)
 Default constructor. More...
 
virtual ~TPZReadMesh ()
 Default destructor. More...
 

Protected Member Functions

virtual void ReadNodes (int64_t NNos, TPZGeoMesh &GMesh)
 Read the nodes data. More...
 
virtual void ReadElements (int64_t NElem, TPZGeoMesh &GMesh)
 Read the elements data. More...
 
virtual void ReadMaterials (int NMat, TPZCompMesh &CMesh)
 Read the material data. More...
 
virtual void ReadBCs (int NMat, TPZCompMesh &CMesh)
 Read the boundary conditions. More...
 
void removeComents (std::string &NumberOf)
 Remove the coments and return the integer parameter of the first line without comment token. More...
 
int64_t GetNodeIndex (TPZGeoMesh *GMesh, int64_t Id)
 Translate a node id to a node index. More...
 

Additional Inherited Members

- Protected Attributes inherited from TPZReadMesh
std::ifstream fInputFile
 Input file. More...
 

Detailed Description

Reads a mesh in a "human readable" format, i.e. in text format and with coments. Getting Data.

Author
Edimar Cesar Rylo
Since
September 2006 The lines that contains comments must start with a ":" Note that this parser provides interface for read only 2D elasticity materials!

Definition at line 31 of file pzreadmeshhr.h.

Constructor & Destructor Documentation

◆ TPZReadMeshHR()

TPZReadMeshHR::TPZReadMeshHR ( const char *  inFile)

Default Constructor.

See also
TPZReadMesh class documentation

Definition at line 25 of file pzreadmeshhr.cpp.

◆ ~TPZReadMeshHR()

TPZReadMeshHR::~TPZReadMeshHR ( )
virtual

Default Destructor.

Definition at line 28 of file pzreadmeshhr.cpp.

Member Function Documentation

◆ GetNodeIndex()

int64_t TPZReadMeshHR::GetNodeIndex ( TPZGeoMesh GMesh,
int64_t  Id 
)
protected

Translate a node id to a node index.

Definition at line 251 of file pzreadmeshhr.cpp.

References LOGPZ_WARN, TPZChunkVector< T, EXP >::NElements(), and TPZGeoMesh::NodeVec().

Referenced by ReadElements().

◆ ReadBCs()

void TPZReadMeshHR::ReadBCs ( int  NMat,
TPZCompMesh CMesh 
)
protectedvirtual

Read the boundary conditions.

Parameters
NMat[in] number of bcs to be read
CMesh[in,out] mesh where the bcs will be inserted

Definition at line 210 of file pzreadmeshhr.cpp.

References TPZMaterial::CreateBC(), TPZReadMesh::fInputFile, TPZCompMesh::InsertMaterialObject(), LOGPZ_ERROR, and TPZCompMesh::MaterialVec().

Referenced by ReadMesh().

◆ ReadElements()

void TPZReadMeshHR::ReadElements ( int64_t  NElem,
TPZGeoMesh GMesh 
)
protectedvirtual

Read the elements data.

Parameters
NElem[in] number of elements to be read
GMesh[in,out] geometric mesh where the elements will be inserted

Definition at line 75 of file pzreadmeshhr.cpp.

References TPZGeoMesh::CreateGeoElement(), ECube, EOned, EPiramide, EPoint, EPrisma, EQuadrilateral, ETetraedro, ETriangle, TPZReadMesh::fInputFile, GetNodeIndex(), and LOGPZ_WARN.

Referenced by readGeoMesh().

◆ readGeoMesh()

TPZGeoMesh * TPZReadMeshHR::readGeoMesh ( )

Definition at line 280 of file pzreadmeshhr.cpp.

References TPZGeoMesh::BuildConnectivity(), ReadElements(), ReadNodes(), and removeComents().

Referenced by ReadMesh().

◆ ReadMaterials()

void TPZReadMeshHR::ReadMaterials ( int  NMat,
TPZCompMesh CMesh 
)
protectedvirtual

Read the material data.

Parameters
NMat[in] number of materials to be read
CMesh[in,out] mesh where the materials will be inserted

Definition at line 143 of file pzreadmeshhr.cpp.

References DebugStop, TPZReadMesh::fInputFile, TPZCompMesh::InsertMaterialObject(), LOGPZ_FATAL, TPZMat2dLin::SetMaterial(), and TPZMatPoisson3d::SetParameters().

Referenced by ReadMesh().

◆ ReadMesh()

TPZCompMesh * TPZReadMeshHR::ReadMesh ( )
virtual

Read and return the mesh from a given file.

Implements TPZReadMesh.

Definition at line 31 of file pzreadmeshhr.cpp.

References TPZCompMesh::AutoBuild(), ReadBCs(), readGeoMesh(), ReadMaterials(), and removeComents().

◆ ReadNodes()

void TPZReadMeshHR::ReadNodes ( int64_t  NNos,
TPZGeoMesh GMesh 
)
protectedvirtual

Read the nodes data.

Parameters
NNos[in] number of nodes to be read
GMesh[in,out] geometric mesh where the nodes will be inserted

Definition at line 61 of file pzreadmeshhr.cpp.

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

Referenced by readGeoMesh().

◆ removeComents()

void TPZReadMeshHR::removeComents ( std::string &  NumberOf)
protected

Remove the coments and return the integer parameter of the first line without comment token.

Definition at line 46 of file pzreadmeshhr.cpp.

References TPZReadMesh::fInputFile.

Referenced by readGeoMesh(), and ReadMesh().


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