Version: 8.3.0
DriverMED_W_SMESHDS_Mesh Class Reference

#include <DriverMED_W_SMESHDS_Mesh.h>

Inheritance diagram for DriverMED_W_SMESHDS_Mesh:

Public Types

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

Public Member Functions

 DriverMED_W_SMESHDS_Mesh ()
 
virtual void SetFile (const std::string &theFileName)
 
void SetFile (const std::string &theFileName, MED::EVersion theId)
 
void SetAutoDimension (bool toFindOutDimension)
 
void AddGroupOfNodes ()
 
void AddGroupOfEdges ()
 
void AddGroupOfFaces ()
 
void AddGroupOfVolumes ()
 
void AddGroupOf0DElems ()
 
void AddGroupOfBalls ()
 
void AddAllToGroup ()
 Set up a flag to add all elements not belonging to any group to some auxiliary group. More...
 
void AddGroup (SMESHDS_GroupBase *theGroup)
 functions to prepare adding one mesh More...
 
void AddAllSubMeshes ()
 
void AddSubMesh (SMESHDS_SubMesh *theSubMesh, int theID)
 
void AddODOnVertices (bool toAdd)
 
virtual Status Perform ()
 add one mesh More...
 
void SetMesh (SMESHDS_Mesh *theMesh)
 
void SetMeshId (int theMeshId)
 
virtual void SetMeshName (const std::string &theMeshName)
 
virtual std::string GetMeshName () const
 
virtual void SetOption (const std::string &optionName, const std::string &optionValue)
 
virtual SMESH_ComputeErrorPtr GetError ()
 Return a structure containing description of errors. More...
 

Static Public Member Functions

static std::string GetVersionString (const MED::EVersion theVersion, int theNbDigits=2)
 
static bool getNodesOfMissing0DOnVert (SMESHDS_Mesh *mesh, std::vector< const SMDS_MeshElement * > &nodes)
 Returns nodes on VERTEXes where 0D elements are absent. More...
 

Protected Member Functions

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

Protected Attributes

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

Private Attributes

MED::EVersion myMedVersion
 
std::list< SMESHDS_GroupBase * > myGroups
 
bool myAllSubMeshes
 
std::vector< SMESHDS_SubMesh * > mySubMeshes
 
bool myDoGroupOfNodes
 
bool myDoGroupOfEdges
 
bool myDoGroupOfFaces
 
bool myDoGroupOfVolumes
 
bool myDoGroupOf0DElems
 
bool myDoGroupOfBalls
 
bool myAutoDimension
 
bool myAddODOnVertices
 
bool myDoAllInGroups
 

Member Enumeration Documentation

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

Constructor & Destructor Documentation

DriverMED_W_SMESHDS_Mesh::DriverMED_W_SMESHDS_Mesh ( )

Member Function Documentation

void DriverMED_W_SMESHDS_Mesh::AddAllSubMeshes ( )

References myAllSubMeshes.

void DriverMED_W_SMESHDS_Mesh::AddAllToGroup ( )

Set up a flag to add all elements not belonging to any group to some auxiliary group.

This is needed for SMESH -> SAUVE -> SMESH conversion, which since PAL0023285 reads only SAUVE elements belonging to any group, and hence can lose some elements. That auxiliary group is ignored while reading a MED file.

References myDoAllInGroups.

void DriverMED_W_SMESHDS_Mesh::AddGroup ( SMESHDS_GroupBase theGroup)

functions to prepare adding one mesh

References myGroups.

void DriverMED_W_SMESHDS_Mesh::AddGroupOf0DElems ( )

References myDoGroupOf0DElems.

void DriverMED_W_SMESHDS_Mesh::AddGroupOfBalls ( )

References myDoGroupOfBalls.

void DriverMED_W_SMESHDS_Mesh::AddGroupOfEdges ( )

References myDoGroupOfEdges.

void DriverMED_W_SMESHDS_Mesh::AddGroupOfFaces ( )

References myDoGroupOfFaces.

void DriverMED_W_SMESHDS_Mesh::AddGroupOfNodes ( )

References myDoGroupOfNodes.

void DriverMED_W_SMESHDS_Mesh::AddGroupOfVolumes ( )

References myDoGroupOfVolumes.

Driver_Mesh::Status Driver_Mesh::addMessage ( const std::string &  msg,
const bool  isFatal = false 
)
protectedinherited
void DriverMED_W_SMESHDS_Mesh::AddODOnVertices ( bool  toAdd)
void DriverMED_W_SMESHDS_Mesh::AddSubMesh ( SMESHDS_SubMesh theSubMesh,
int  theID 
)

References mySubMeshes.

SMESH_ComputeErrorPtr Driver_Mesh::GetError ( )
virtualinherited
std::string Driver_Mesh::GetMeshName ( ) const
virtualinherited
bool DriverMED_W_SMESHDS_Mesh::getNodesOfMissing0DOnVert ( SMESHDS_Mesh mesh,
std::vector< const SMDS_MeshElement * > &  nodes 
)
static
string DriverMED_W_SMESHDS_Mesh::GetVersionString ( const MED::EVersion  theVersion,
int  theNbDigits = 2 
)
static
Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform ( )
virtual

add one mesh

Implements Driver_Mesh.

References MED::CrWrapper(), Driver_Mesh::DRS_FAIL, Driver_Mesh::DRS_OK, MED::eARETE, MED::eBALL, MED::eCART, Edge, MED::eFACE, MED::eFAUX, MED::eFULL_INTERLACE, MED::eHEXA20, MED::eHEXA27, MED::eHEXA8, SMDS_Mesh::elementEntityIterator(), SMDS_Mesh::elementGeomIterator(), SMDS_Mesh::elementsIterator(), MED::eMAILLE, MED::eNOD, MED::eNOEUD_ELEMENT, MED::eOCTA12, MED::ePENTA15, 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::eTETRA10, MED::eTETRA4, MED::eTRIA3, MED::eTRIA6, MED::eTRIA7, MED::eVRAI, Face, SMDS_MeshElement::GetID(), SMDS_Mesh::GetMeshInfo(), MED::GetNbNodes(), SMDS_MeshElement::GetNode(), getNodesOfMissing0DOnVert(), SMDS_Mesh::hasConstructionEdges(), SMDS_Mesh::hasConstructionFaces(), SMDS_MeshElement::IsPoly(), DriverMED_Family::MakeFamilies(), Max(), myAddODOnVertices, myAllSubMeshes, myAutoDimension, myDoAllInGroups, myDoGroupOf0DElems, myDoGroupOfBalls, myDoGroupOfEdges, myDoGroupOfFaces, myDoGroupOfNodes, myDoGroupOfVolumes, Driver_Mesh::myFile, myGroups, myMedVersion, Driver_SMESHDS_Mesh::myMesh, Driver_Mesh::myMeshId, Driver_Mesh::myMeshName, SMDS_MeshInfo::Nb0DElements(), SMDS_Mesh::Nb0DElements(), SMDS_MeshInfo::NbBalls(), SMDS_Mesh::NbBalls(), SMDS_MeshInfo::NbBiQuadQuadrangles(), SMDS_MeshInfo::NbBiQuadTriangles(), SMDS_MeshInfo::NbEdges(), SMDS_Mesh::NbEdges(), SMDS_VtkVolume::NbFaceNodes(), SMDS_VtkVolume::NbFaces(), SMDS_Mesh::NbFaces(), SMDS_MeshInfo::NbHexas(), SMDS_MeshInfo::NbHexPrisms(), SMDS_VtkVolume::NbNodes(), SMDS_MeshElement::NbNodes(), SMDS_Mesh::NbNodes(), SMDS_MeshInfo::NbPolygons(), SMDS_MeshInfo::NbPolyhedrons(), SMDS_MeshInfo::NbPrisms(), SMDS_MeshInfo::NbPyramids(), SMDS_MeshInfo::NbQuadrangles(), SMDS_MeshInfo::NbTetras(), SMDS_MeshInfo::NbTriangles(), SMDS_MeshInfo::NbTriQuadHexas(), SMDS_Mesh::NbVolumes(), NIG_0DELEM_FAMILY, NIG_BALL_FAMILY, NIG_EDGES_FAMILY, NIG_FACES_FAMILY, NIG_VOLS_FAMILY, SMDS_MeshElement::nodesIterator(), SMDS_Mesh::nodesIterator(), ORDER_LINEAR, ORDER_QUADRATIC, REST_0DELEM_FAMILY, REST_BALL_FAMILY, REST_EDGES_FAMILY, REST_FACES_FAMILY, REST_NODES_FAMILY, REST_VOLUMES_FAMILY, SMESHDS_Mesh::ShapeToMesh(), SMDSAbs_0DElement, SMDSAbs_Ball, SMDSAbs_Edge, SMDSAbs_Face, SMDSAbs_NbElementTypes, SMDSAbs_Node, SMDSAbs_Volume, SMDSEntity_Polygon, SMDSEntity_Quad_Polygon, SMDSGeom_POLYHEDRA, SMESHDS_Mesh::SubMeshes(), SMESHDS_Mesh::SubMeshIndices(), SMDS_MeshNode::X(), SMDS_MeshNode::Y(), and SMDS_MeshNode::Z().

void DriverMED_W_SMESHDS_Mesh::SetAutoDimension ( bool  toFindOutDimension)
void DriverMED_W_SMESHDS_Mesh::SetFile ( const std::string &  theFileName)
virtual

Reimplemented from Driver_Mesh.

References Driver_Mesh::SetFile().

Referenced by SMESH_Gen_i::Save().

void DriverMED_W_SMESHDS_Mesh::SetFile ( const std::string &  theFileName,
MED::EVersion  theId 
)
void Driver_Mesh::SetMeshName ( const std::string &  theMeshName)
virtualinherited
virtual void Driver_Mesh::SetOption ( const std::string &  optionName,
const std::string &  optionValue 
)
virtualinherited

Field Documentation

bool DriverMED_W_SMESHDS_Mesh::myAddODOnVertices
private

Referenced by Perform().

bool DriverMED_W_SMESHDS_Mesh::myAllSubMeshes
private

Referenced by AddAllSubMeshes(), and Perform().

bool DriverMED_W_SMESHDS_Mesh::myAutoDimension
private

Referenced by Perform().

bool DriverMED_W_SMESHDS_Mesh::myDoAllInGroups
private

Referenced by AddAllToGroup(), and Perform().

bool DriverMED_W_SMESHDS_Mesh::myDoGroupOf0DElems
private

Referenced by AddGroupOf0DElems(), and Perform().

bool DriverMED_W_SMESHDS_Mesh::myDoGroupOfBalls
private

Referenced by AddGroupOfBalls(), and Perform().

bool DriverMED_W_SMESHDS_Mesh::myDoGroupOfEdges
private

Referenced by AddGroupOfEdges(), and Perform().

bool DriverMED_W_SMESHDS_Mesh::myDoGroupOfFaces
private

Referenced by AddGroupOfFaces(), and Perform().

bool DriverMED_W_SMESHDS_Mesh::myDoGroupOfNodes
private

Referenced by AddGroupOfNodes(), and Perform().

bool DriverMED_W_SMESHDS_Mesh::myDoGroupOfVolumes
private

Referenced by AddGroupOfVolumes(), and Perform().

std::vector< std::string > Driver_Mesh::myErrorMessages
protectedinherited
std::list<SMESHDS_GroupBase*> DriverMED_W_SMESHDS_Mesh::myGroups
private

Referenced by AddGroup(), and Perform().

MED::EVersion DriverMED_W_SMESHDS_Mesh::myMedVersion
private

Referenced by Perform(), and SetFile().

int Driver_Mesh::myMeshId
protectedinherited
std::string Driver_Mesh::myMeshName
protectedinherited
Status Driver_Mesh::myStatus
protectedinherited
std::vector<SMESHDS_SubMesh*> DriverMED_W_SMESHDS_Mesh::mySubMeshes
private

Referenced by AddSubMesh().