Driver reading a mesh from the CGNS file. More...
#include <DriverCGNS_Read.hxx>
Public Types | |
enum | Status { DRS_OK, DRS_EMPTY, DRS_WARN_RENUMBER, DRS_WARN_SKIP_ELEM, DRS_WARN_DESCENDING, DRS_FAIL } |
Public Member Functions | |
DriverCGNS_Read () | |
Constructor. More... | |
~DriverCGNS_Read () | |
Close the cgns file at destruction. More... | |
virtual Status | Perform () |
Perform reading a myMeshId-th mesh. More... | |
int | GetNbMeshes (Status &theStatus) |
Reads nb of meshes in myFile. 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 &optionName, const std::string &optionValue) |
virtual SMESH_ComputeErrorPtr | GetError () |
Return a structure containing description of errors. More... | |
Protected Member Functions | |
Status | addMessage (const std::string &msg, const bool isFatal=false) |
Stores an error message. More... | |
Protected Attributes | |
SMESHDS_Mesh * | myMesh |
std::string | myFile |
std::string | myMeshName |
int | myMeshId |
std::vector< std::string > | myErrorMessages |
Status | myStatus |
Private Member Functions | |
Status | open () |
Opens myFile. More... | |
Private Attributes | |
int | _fn |
file index More... | |
Driver reading a mesh from the CGNS file.
The mesh to read is selected by an index (counted from 0) set via SetMeshId()
|
inherited |
DriverCGNS_Read::DriverCGNS_Read | ( | ) |
Constructor.
DriverCGNS_Read::~DriverCGNS_Read | ( | ) |
Close the cgns file at destruction.
|
protectedinherited |
Stores an error message.
We consider an error fatal if none mesh can be read
References Driver_Mesh::DRS_FAIL, Driver_Mesh::DRS_WARN_SKIP_ELEM, MESSAGE, Driver_Mesh::myErrorMessages, and Driver_Mesh::myStatus.
Referenced by DriverGMF_Write::Perform(), DriverGMF_Read::Perform(), DriverMED_W_Field::Perform(), and DriverGMF_Read::storeBadNodeIds().
|
virtualinherited |
Return a structure containing description of errors.
References COMPERR_OK, Driver_Mesh::DRS_OK, Driver_Mesh::myErrorMessages, Driver_Mesh::myStatus, and SMESH_ComputeError::New().
Referenced by SMESH_Mesh_i::exportMEDFields(), SMESH_Mesh::GMFToMesh(), and SMESH_Mesh::MEDToMesh().
|
virtualinherited |
References Driver_Mesh::myMeshName.
Referenced by SMESH_Mesh::CGNSToMesh().
Reads nb of meshes in myFile.
References SMESH::DRS_OK.
Referenced by SMESH_Gen_i::CreateMeshesFromCGNS().
|
private |
Opens myFile.
References SMESH::DRS_FAIL, and SMESH::DRS_OK.
|
virtual |
Perform reading a myMeshId-th mesh.
Implements Driver_Mesh.
References SMDS_MeshGroup::Add(), CGNS_NAME_SIZE, cgsize_t, SMESH::DRS_OK, SMESH::DRS_WARN_SKIP_ELEM, faceID, SMDS_MeshGroup::GetType(), SMDS_MeshElement::GetType(), if(), SMDS_MeshElement::interlacedNodesElemIterator(), SMDS_MeshElement::IsQuadratic(), NB_ZONE_SIZE_VAL, SMDS_MeshInfo::NbElements(), SMDS_MeshInfo::NbNodes(), SMDS_MeshElement::NbNodes(), reverse(), SMESHDS_GroupBase::SetStoreName(), SMESHDS_Group::SetType(), SMDSAbs_All, SMDSAbs_Edge, SMDSAbs_Face, SMDSAbs_Node, and SMESHDS_Group::SMDSGroup().
Referenced by SMESH_Mesh::CGNSToMesh().
|
virtualinherited |
Reimplemented in DriverMED_W_SMESHDS_Mesh.
References Driver_Mesh::myFile.
Referenced by SMESH_Mesh::CGNSToMesh(), SMESH_Gen_i::CreateMeshesFromCGNS(), SMESH_Gen_i::CreateMeshesFromMEDorSAUV(), SMESH_Mesh_i::ExportPartToMED(), SMESH_PreMeshInfo::FullLoadFromFile(), SMESH_Mesh::GMFToMesh(), SMESH_Mesh::MEDToMesh(), DriverMED_W_SMESHDS_Mesh::SetFile(), SMESH_Mesh::STLToMesh(), and SMESH_Mesh::UNVToMesh().
|
inherited |
References Driver_SMESHDS_Mesh::myMesh.
Referenced by SMESH_Mesh::CGNSToMesh(), SMESH_PreMeshInfo::FullLoadFromFile(), SMESH_Mesh::GMFToMesh(), SMESH_Mesh::MEDToMesh(), and DriverMED_W_Field::Set().
|
inherited |
|
virtualinherited |
References Driver_Mesh::myMeshName.
Referenced by SMESH_Mesh_i::ExportPartToMED().
|
virtualinherited |
|
private |
file index
|
protectedinherited |
Referenced by Driver_Mesh::addMessage(), and Driver_Mesh::GetError().
|
protectedinherited |
Referenced by DriverSTL_R_SMDS_Mesh::Perform(), DriverGMF_Write::Perform(), DriverGMF_Read::Perform(), DriverMED_W_Field::Perform(), DriverMED_W_SMESHDS_Mesh::Perform(), DriverSTL_R_SMDS_Mesh::readAscii(), Driver_Mesh::SetFile(), DriverSTL_W_SMDS_Mesh::writeAscii(), and DriverSTL_W_SMDS_Mesh::writeBinary().
|
protectedinherited |
Referenced by DriverGMF_Write::elementIterator(), DriverMED_W_Field::GetOrderedElems(), DriverGMF_Write::Perform(), DriverGMF_Read::Perform(), DriverMED_W_Field::Perform(), DriverMED_W_SMESHDS_Mesh::Perform(), DriverMED_W_Field::Set(), Driver_SMESHDS_Mesh::SetMesh(), and DriverGMF_Read::storeBadNodeIds().
|
protectedinherited |
Referenced by DriverMED_W_Field::Perform(), DriverMED_W_SMESHDS_Mesh::Perform(), and Driver_Mesh::SetMeshId().
|
protectedinherited |
|
protectedinherited |
Referenced by Driver_Mesh::addMessage(), Driver_Mesh::GetError(), and DriverGMF_Read::storeBadNodeIds().