Version: 9.16.0
DriverMED_R_SMESHDS_Mesh Class Reference

#include <DriverMED_R_SMESHDS_Mesh.h>

Inheritance diagram for DriverMED_R_SMESHDS_Mesh:

Public Types

enum  Status {
  DRS_OK , DRS_EMPTY , DRS_WARN_RENUMBER , DRS_WARN_SKIP_ELEM ,
  DRS_WARN_DESCENDING , DRS_FAIL , DRS_TOO_LARGE_MESH
}
 

Public Member Functions

virtual Status Perform ()
 Reads a med file. More...
 
std::list< TNameAndTypeGetGroupNamesAndTypes ()
 
void GetGroup (SMESHDS_Group *theGroup)
 
void CreateAllSubMeshes ()
 
void GetSubMesh (SMESHDS_SubMesh *theSubMesh, const int theId)
 
std::list< std::string > GetMeshNames (Status &theStatus)
 
void SetMeshName (std::string theMeshName)
 Stores a mesh name. More...
 
void SetMesh (SMESHDS_Mesh *theMesh)
 
void SetMeshId (int theMeshId)
 
virtual void SetFile (const std::string &theFileName)
 
virtual void SetMeshName (const std::string &theMeshName)
 
virtual std::string GetMeshName () const
 
virtual void SetOption (const std::string &, const std::string &)
 
virtual SMESH_ComputeErrorPtr GetError ()
 Return a structure containing description of errors. More...
 

Static Public Member Functions

template<typename IDTYPE >
static bool IsMeshTooLarge (const SMDS_Mesh *mesh, bool checkIDs)
 

Protected Member Functions

Status addMessage (const std::string &msg, const bool isFatal=false)
 Stores an error message. More...
 

Static Protected Member Functions

static std::string fixUTF8 (const std::string &s)
 Assure a string is UTF-8 valid by replacing invalid chars. More...
 

Protected Attributes

SMESHDS_MeshmyMesh
 
std::string myFile
 
int myMeshId
 
std::vector< std::string > myErrorMessages
 
Status myStatus
 

Private Attributes

std::string myMeshName
 
std::map< int, DriverMED_FamilyPtrmyFamilies
 
TName2Falilies myGroups2FamiliesMap
 

Member Enumeration Documentation

◆ Status

enum Driver_Mesh::Status
inherited
Enumerator
DRS_OK 
DRS_EMPTY 
DRS_WARN_RENUMBER 
DRS_WARN_SKIP_ELEM 
DRS_WARN_DESCENDING 
DRS_FAIL 
DRS_TOO_LARGE_MESH 

Member Function Documentation

◆ addMessage()

◆ CreateAllSubMeshes()

◆ fixUTF8()

std::string Driver_Mesh::fixUTF8 ( const std::string &  s)
staticprotectedinherited

Assure a string is UTF-8 valid by replacing invalid chars.

Referenced by Perform().

◆ GetError()

◆ GetGroup()

◆ GetGroupNamesAndTypes()

list< TNameAndType > DriverMED_R_SMESHDS_Mesh::GetGroupNamesAndTypes ( )

References myFamilies.

Referenced by SMESH_Mesh::MEDToMesh().

◆ GetMeshName()

std::string Driver_Mesh::GetMeshName ( ) const
virtualinherited

◆ GetMeshNames()

◆ GetSubMesh()

void DriverMED_R_SMESHDS_Mesh::GetSubMesh ( SMESHDS_SubMesh theSubMesh,
const int  theId 
)

◆ IsMeshTooLarge()

template<typename IDTYPE >
static bool Driver_Mesh::IsMeshTooLarge ( const SMDS_Mesh mesh,
bool  checkIDs 
)
staticinherited

◆ Perform()

Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform ( )
virtual

Reads a med file.

Implements Driver_Mesh.

References SMESHDS_Mesh::Add0DElement(), SMESHDS_Mesh::Add0DElementWithID(), SMESHDS_Mesh::AddBall(), SMESHDS_Mesh::AddBallWithID(), SMESHDS_Mesh::AddEdge(), SMESHDS_Mesh::AddEdgeWithID(), SMESHDS_Mesh::AddFace(), SMESHDS_Mesh::AddFaceWithID(), Driver_Mesh::addMessage(), SMESHDS_Mesh::AddNodeWithID(), SMESHDS_Mesh::AddPolygonalFace(), SMESHDS_Mesh::AddPolygonalFaceWithID(), SMESHDS_Mesh::AddPolyhedralVolume(), SMESHDS_Mesh::AddPolyhedralVolumeWithID(), SMESHDS_Mesh::AddQuadPolygonalFace(), SMESHDS_Mesh::AddQuadPolygonalFaceWithID(), SMESHDS_Mesh::AddVolume(), SMESHDS_Mesh::AddVolumeWithID(), SMDS_UnstructuredGrid::AllocateDiameters(), DriverMED::buildMeshGrille(), DriverMED::checkFamilyID(), MED::CrWrapperR(), Driver_Mesh::DRS_EMPTY, Driver_Mesh::DRS_FAIL, Driver_Mesh::DRS_OK, Driver_Mesh::DRS_WARN_DESCENDING, Driver_Mesh::DRS_WARN_RENUMBER, Driver_Mesh::DRS_WARN_SKIP_ELEM, MED::eDESC, MED::eFAUX, MED::eHEXA20, MED::eHEXA27, MED::eHEXA8, MED::eNOD, MED::eNOEUD, MED::eOCTA12, MED::ePENTA15, MED::ePENTA18, MED::ePENTA6, MED::ePOINT1, MED::ePOLYEDRE, MED::ePOLYGON2, MED::ePOLYGONE, MED::ePYRA13, MED::ePYRA5, MED::eQUAD4, MED::eQUAD8, MED::eQUAD9, MED::eSEG2, MED::eSEG3, MED::eSTRUCT_ELEMENT, MED::eSTRUCTURE, MED::eTETRA10, MED::eTETRA4, MED::eTRIA3, MED::eTRIA6, MED::eTRIA7, MED::eVRAI, DriverMED::FindNode(), SMDS_Mesh::FindNode(), Driver_Mesh::fixUTF8(), MED::GetCoordHelper(), SMDS_Mesh::GetGrid(), SMDS_MeshElement::GetType(), SMDS_Mesh::MaxElementID(), MESSAGE, myFamilies, Driver_Mesh::myFile, Driver_SMESHDS_Mesh::myMesh, Driver_Mesh::myMeshId, myMeshName, NIG_GROUP_PREFIX, MED::TCSlice< TValueType >::size(), SMDSAbs_Ball, and SMDSAbs_Node.

Referenced by SMESH_PreMeshInfo::FullLoadFromFile(), and SMESH_Mesh::MEDToMesh().

◆ SetFile()

◆ SetMesh()

◆ SetMeshId()

◆ SetMeshName() [1/2]

void Driver_Mesh::SetMeshName ( const std::string &  theMeshName)
virtualinherited

◆ SetMeshName() [2/2]

void DriverMED_R_SMESHDS_Mesh::SetMeshName ( std::string  theMeshName)

Stores a mesh name.

References myMeshName.

Referenced by SMESH_Mesh::MEDToMesh().

◆ SetOption()

virtual void Driver_Mesh::SetOption ( const std::string &  ,
const std::string &   
)
virtualinherited

Field Documentation

◆ myErrorMessages

std::vector< std::string > Driver_Mesh::myErrorMessages
protectedinherited

◆ myFamilies

std::map<int, DriverMED_FamilyPtr> DriverMED_R_SMESHDS_Mesh::myFamilies
private

◆ myFile

◆ myGroups2FamiliesMap

TName2Falilies DriverMED_R_SMESHDS_Mesh::myGroups2FamiliesMap
private

Referenced by GetGroup().

◆ myMesh

◆ myMeshId

◆ myMeshName

std::string DriverMED_R_SMESHDS_Mesh::myMeshName
private

Referenced by Perform(), and SetMeshName().

◆ myStatus

Status Driver_Mesh::myStatus
protectedinherited