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 , DRS_TOO_LARGE_MESH } |
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 &, 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_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.
References _fn.
| DriverCGNS_Read::~DriverCGNS_Read | ( | ) |
Close the cgns file at destruction.
References _fn.
|
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 GetNbMeshes(), open(), Perform(), DriverCGNS_Write::Perform(), DriverStructuredCGNS_Write::Perform(), DriverGMF_Read::Perform(), DriverGMF_Write::Perform(), DriverMED_R_SMESHDS_Mesh::Perform(), DriverMED_W_Field::Perform(), DriverMED_W_Field::PerformInternal(), and DriverGMF_Read::storeBadNodeIds().
|
staticprotectedinherited |
Assure a string is UTF-8 valid by replacing invalid chars.
Referenced by DriverMED_R_SMESHDS_Mesh::Perform().
|
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::ExportCGNS(), SMESH_Mesh_i::exportMEDFields(), SMESH_Mesh::ExportStructuredCGNS(), SMESH_Mesh::GMFToMesh(), and SMESH_Mesh::MEDToMesh().
|
virtualinherited |
References Driver_Mesh::myMeshName.
Referenced by SMESH_Mesh::CGNSToMesh().
| int DriverCGNS_Read::GetNbMeshes | ( | Status & | theStatus | ) |
Reads nb of meshes in myFile.
References _fn, Driver_Mesh::addMessage(), Driver_Mesh::DRS_OK, and open().
Referenced by SMESH_Gen_i::CreateMeshesFromCGNS(), Perform(), and SMESH_Gen_i::ReloadMeshesFromCGNS().
|
private |
Opens myFile.
References _fn, Driver_Mesh::addMessage(), Driver_Mesh::DRS_FAIL, Driver_Mesh::DRS_OK, and Driver_Mesh::myFile.
Referenced by GetNbMeshes(), and Perform().
|
virtual |
Perform reading a myMeshId-th mesh.
Implements Driver_Mesh.
References _fn, SMDS_MeshGroup::Add(), SMESHDS_Mesh::AddEdgeWithID(), SMESHDS_Mesh::AddFaceWithID(), SMESHDS_Mesh::AddGroup(), Driver_Mesh::addMessage(), SMESHDS_Mesh::AddNodeWithID(), SMESHDS_Mesh::AddPolyhedralVolumeWithID(), SMESHDS_Mesh::AddVolumeWithID(), CGNS_NAME_SIZE, cgsize_t, SMESHDS_Mesh::CompactMesh(), Driver_Mesh::DRS_OK, Driver_Mesh::DRS_WARN_SKIP_ELEM, end(), SMDS_Mesh::FindElement(), SMDS_Mesh::FindNode(), SMDS_Mesh::GetElementType(), SMESHDS_Mesh::GetGroups(), SMDS_Mesh::GetMeshInfo(), GetNbMeshes(), SMDS_MeshGroup::GetType(), SMDS_MeshElement::GetType(), SMESH::if(), SMDS_MeshElement::interlacedNodesIterator(), SMDS_MeshElement::IsQuadratic(), MESSAGE, SMDS_Mesh::Modified(), Driver_Mesh::myErrorMessages, Driver_SMESHDS_Mesh::myMesh, Driver_Mesh::myMeshId, Driver_Mesh::myMeshName, NB_ZONE_SIZE_VAL, SMDS_MeshInfo::NbElements(), SMDS_MeshInfo::NbNodes(), SMDS_MeshElement::NbNodes(), open(), SMESHDS_Mesh::RemoveFreeNode(), 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 |
References Driver_Mesh::myFile.
Referenced by SMESH_Mesh::CGNSToMesh(), SMESH_Gen_i::CreateMeshesFromCGNS(), SMESH_Gen_i::CreateMeshesFromMED(), SMESH_Gen_i::CreateMeshesFromMESHIO(), SMESH_Mesh::ExportCGNS(), SMESH_Mesh::ExportDAT(), MEDFileSpeCls::exportField(), SMESH_Mesh::ExportGMF(), SMESH_Mesh::ExportSTL(), SMESH_Mesh::ExportStructuredCGNS(), SMESH_Mesh::ExportUNV(), SMESH_PreMeshInfo::FullLoadFromFile(), MG_ADAPT::MgAdapt::getCommandToRun(), GetMGLicenseKeyImpl(), SMESH_Mesh::GMFToMesh(), SMESH_Mesh::MEDToMesh(), SMESH_Gen_i::ReloadMeshesFromCGNS(), SMESH_Gen_i::ReloadMeshesFromMED(), SMESH_Gen_i::ReloadMeshesFromMESHIO(), DriverMED_W_SMESHDS_Mesh::SetFile(), SMESH_Mesh::STLToMesh(), and SMESH_Mesh::UNVToMesh().
|
inherited |
References Driver_SMESHDS_Mesh::myMesh.
Referenced by SMESH_Mesh::CGNSToMesh(), SMESH_Mesh::ExportCGNS(), SMESH_Mesh::ExportGMF(), SMESH_Mesh::exportMEDCommmon(), SMESH_Mesh::ExportStructuredCGNS(), SMESH_PreMeshInfo::FullLoadFromFile(), SMESH_Mesh::GMFToMesh(), SMESH_Mesh::MEDToMesh(), SMESH_Gen_i::Save(), and DriverMED_W_Field::Set().
|
inherited |
References Driver_Mesh::myMeshId.
Referenced by SMESH_Mesh::CGNSToMesh(), SMESH_Gen_i::CreateMeshesFromMED(), SMESH_Gen_i::CreateMeshesFromMESHIO(), SMESH_Mesh::ExportDAT(), SMESH_Mesh::exportMEDCommmon(), SMESH_Mesh::ExportSTL(), SMESH_Mesh::ExportUNV(), SMESH_PreMeshInfo::FullLoadFromFile(), SMESH_Mesh::MEDToMesh(), SMESH_Gen_i::ReloadMeshesFromMED(), SMESH_Gen_i::ReloadMeshesFromMESHIO(), SMESH_Gen_i::Save(), SMESH_Mesh::STLToMesh(), and SMESH_Mesh::UNVToMesh().
|
virtualinherited |
|
virtualinherited |
|
private |
file index
Referenced by DriverCGNS_Read(), GetNbMeshes(), open(), Perform(), and ~DriverCGNS_Read().
|
protectedinherited |
|
protectedinherited |
Referenced by DriverGMF_Read::GetMeshInfo(), DriverMED_R_SMESHDS_Mesh::GetMeshNames(), open(), DriverCGNS_Write::Perform(), DriverStructuredCGNS_Write::Perform(), DriverDAT_R_SMDS_Mesh::Perform(), DriverGMF_Read::Perform(), DriverGMF_Write::Perform(), DriverMED_R_SMESHDS_Mesh::Perform(), DriverSTL_R_SMDS_Mesh::Perform(), DriverUNV_R_SMDS_Mesh::Perform(), DriverDAT_W_SMDS_Mesh::Perform(), DriverMED_W_Field::Perform(), DriverMED_W_Field_Mem::Perform(), DriverMED_W_SMESHDS_Mesh::Perform(), DriverMED_W_SMESHDS_Mesh_Mem::Perform(), DriverUNV_W_SMDS_Mesh::Perform(), DriverSTL_R_SMDS_Mesh::readAscii(), Driver_Mesh::SetFile(), DriverSTL_W_SMDS_Mesh::writeAscii(), and DriverSTL_W_SMDS_Mesh::writeBinary().
|
protectedinherited |
Referenced by DriverStructuredCGNS_Write::CheckForGroupNameOnEdgeInterfaces(), DriverStructuredCGNS_Write::CheckForGroupNameOnFaceInterfaces(), DriverMED_R_SMESHDS_Mesh::CreateAllSubMeshes(), DriverGMF_Write::elementIterator(), DriverStructuredCGNS_Write::GetGroupName(), DriverStructuredCGNS_Write::GetGroupNamesMap(), DriverMED_W_Field::GetOrderedElems(), Perform(), DriverCGNS_Write::Perform(), DriverStructuredCGNS_Write::Perform(), DriverGMF_Read::Perform(), DriverGMF_Write::Perform(), DriverMED_R_SMESHDS_Mesh::Perform(), DriverMED_W_SMESHDS_Mesh::PerformInternal(), DriverMED_W_Field::PerformInternal(), DriverMED_W_Field::Set(), Driver_SMESHDS_Mesh::SetMesh(), and DriverGMF_Read::storeBadNodeIds().
|
protectedinherited |
|
protectedinherited |
Referenced by Driver_Mesh::GetMeshName(), Perform(), DriverCGNS_Write::Perform(), DriverStructuredCGNS_Write::Perform(), DriverUNV_R_SMDS_Mesh::Perform(), DriverUNV_W_SMDS_Mesh::Perform(), DriverMED_W_SMESHDS_Mesh::PerformInternal(), DriverMED_W_Field::PerformInternal(), and Driver_Mesh::SetMeshName().
|
protectedinherited |
Referenced by Driver_Mesh::addMessage(), Driver_Mesh::GetError(), and DriverGMF_Read::storeBadNodeIds().