Driver writinging a mesh into the CGNS file. More...
#include <DriverStructuredCGNS_Write.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 | |
| DriverStructuredCGNS_Write () | |
| Constructor. More... | |
| ~DriverStructuredCGNS_Write () | |
| Close the cgns file at destruction. More... | |
| virtual Status | Perform () |
| Write the mesh into the CGNS file. More... | |
| std::string | GetGroupName (const int shapeToIndex, int dim) |
| Search for a SMESHDS_GroupOnGeom associated to the geometry and return his name. More... | |
| void | CheckForGroupNameOnFaceInterfaces (const SMESHUtils::SMESH_RegularGrid *grid, std::vector< std::string > &interfaceNames) |
| Fill name of face interfaces associated to mesh groups. More... | |
| void | CheckForGroupNameOnEdgeInterfaces (const SMESHUtils::SMESH_RegularGrid *grid, std::vector< std::string > &interfaceNames) |
| Fill name of edge interfaces associated to mesh groups. 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 | |
| void | GetGroupNamesMap (const TopoDS_Shape &shape, int dim, std::map< size_t, std::string > &groupNameMapById) |
| Get the map between a solid (or face) id and its unique name. More... | |
Private Attributes | |
| int | _fn |
| file index More... | |
Driver writinging a mesh into the CGNS file.
|
inherited |
| DriverStructuredCGNS_Write::DriverStructuredCGNS_Write | ( | ) |
Constructor.
| DriverStructuredCGNS_Write::~DriverStructuredCGNS_Write | ( | ) |
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 DriverCGNS_Read::GetNbMeshes(), DriverCGNS_Read::open(), DriverCGNS_Read::Perform(), DriverCGNS_Write::Perform(), Perform(), DriverGMF_Read::Perform(), DriverGMF_Write::Perform(), DriverMED_R_SMESHDS_Mesh::Perform(), DriverMED_W_Field::Perform(), DriverMED_W_Field::PerformInternal(), and DriverGMF_Read::storeBadNodeIds().
| void DriverStructuredCGNS_Write::CheckForGroupNameOnEdgeInterfaces | ( | const SMESHUtils::SMESH_RegularGrid * | grid, |
| std::vector< std::string > & | interfaceNames | ||
| ) |
Fill name of edge interfaces associated to mesh groups.
References SMESHUtils::SMESH_RegularGrid::getEdgeTypeByGeomEdge(), SMESHDS_Mesh::GetGroups(), SMESHDS_GroupOnGeom::GetShape(), SMESHDS_GroupBase::GetStoreName(), Driver_SMESHDS_Mesh::myMesh, and SMESHUtils::SMESH_RegularGrid::NONE.
Referenced by Perform().
| void DriverStructuredCGNS_Write::CheckForGroupNameOnFaceInterfaces | ( | const SMESHUtils::SMESH_RegularGrid * | grid, |
| std::vector< std::string > & | interfaceNames | ||
| ) |
Fill name of face interfaces associated to mesh groups.
References SMESHUtils::SMESH_RegularGrid::B_NONE, SMESHUtils::SMESH_RegularGrid::getFaceTypeByGeomFace(), SMESHDS_Mesh::GetGroups(), SMESHDS_GroupOnGeom::GetShape(), SMESHDS_GroupBase::GetStoreName(), and Driver_SMESHDS_Mesh::myMesh.
Referenced by Perform().
|
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().
| std::string DriverStructuredCGNS_Write::GetGroupName | ( | const int | shapeToIndex, |
| int | dim | ||
| ) |
Search for a SMESHDS_GroupOnGeom associated to the geometry and return his name.
| shapeToIndex,the | index of the shape as given by shapeToIndex method |
References SMESHDS_Mesh::GetGroups(), SMESHDS_GroupOnGeom::GetShape(), SMESHDS_GroupBase::GetStoreName(), Driver_SMESHDS_Mesh::myMesh, and SMESHDS_Mesh::ShapeToIndex().
Referenced by GetGroupNamesMap().
|
private |
Get the map between a solid (or face) id and its unique name.
Add a suffix if needed to avoid duplicate group name.
References Face, GetGroupName(), Driver_SMESHDS_Mesh::myMesh, and SMESHDS_Mesh::ShapeToIndex().
Referenced by Perform().
|
virtualinherited |
References Driver_Mesh::myMeshName.
Referenced by SMESH_Mesh::CGNSToMesh().
|
virtual |
Write the mesh into the CGNS file.
Implements Driver_Mesh.
References _fn, Driver_Mesh::addMessage(), cgsize_t, CheckForGroupNameOnEdgeInterfaces(), CheckForGroupNameOnFaceInterfaces(), Driver_Mesh::DRS_OK, Driver_Mesh::DRS_TOO_LARGE_MESH, Face, GetGroupNamesMap(), SMDS_Mesh::GetMeshInfo(), SMESHDS_Mesh::GetTheGrid(), SMESHDS_Mesh::HasStructuredGridFilled(), Driver_Mesh::myErrorMessages, Driver_Mesh::myFile, Driver_SMESHDS_Mesh::myMesh, Driver_Mesh::myMeshName, SMDS_MeshInfo::NbElements(), SMDS_Mesh::NbFaces(), SMDS_Mesh::NbVolumes(), SMESHDS_Mesh::ShapeToIndex(), and SMESHDS_Mesh::ShapeToMesh().
Referenced by SMESH_Mesh::ExportStructuredCGNS().
|
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 Perform(), and ~DriverStructuredCGNS_Write().
|
protectedinherited |
|
protectedinherited |
Referenced by DriverGMF_Read::GetMeshInfo(), DriverMED_R_SMESHDS_Mesh::GetMeshNames(), DriverCGNS_Read::open(), DriverCGNS_Write::Perform(), 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 CheckForGroupNameOnEdgeInterfaces(), CheckForGroupNameOnFaceInterfaces(), DriverMED_R_SMESHDS_Mesh::CreateAllSubMeshes(), DriverGMF_Write::elementIterator(), GetGroupName(), GetGroupNamesMap(), DriverMED_W_Field::GetOrderedElems(), DriverCGNS_Read::Perform(), DriverCGNS_Write::Perform(), 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 |
|
protectedinherited |
Referenced by Driver_Mesh::addMessage(), Driver_Mesh::GetError(), and DriverGMF_Read::storeBadNodeIds().