A concrete implementation of geoMeshBase representing a mesh in a fvMesh.
More...
Definition at line 52 of file foamGeoMesh.H.
Public Member Functions | |
| foamGeoMesh () | |
| Create a foamMesh from mesh in current directory. More... | |
| foamGeoMesh (Foam::fvMesh *foamMesh, const std::string &phyGrpArrayName=std::string()) | |
| Construct a foamGeoMesh from an existing fvMesh. More... | |
| ~foamGeoMesh () override | |
| foamGeoMesh destructor More... | |
| void | write (const std::string &fileName) override |
| Writes foam mesh into current directory. More... | |
| void | report (std::ostream &out) const override |
| Reports data about mesh. More... | |
| const Foam::fvMesh & | getFoamMesh () const |
| Copy the mesh. More... | |
| void | setFoamMesh (std::unique_ptr< Foam::fvMesh > foamMesh) |
Set the foamGeoMesh's mesh to foamMesh. More... | |
| void | resetNative () override |
| Resets the class members and initiates an empty foam mesh. More... | |
| virtual void | takeGeoMesh (geoMeshBase *otherGeoMesh) |
Take the GeoMesh of another geoMeshBase. More... | |
| virtual void | reconstructGeo () |
| Construct the geometry from the mesh alone. More... | |
| virtual void | mergeGeoMesh (geoMeshBase *otherGeoMesh) |
| Merge mesh data from a new geoMesh to an existing geoMesh. More... | |
| const std::string & | getGeoEntArrayName () const |
| Get the name of the geometric entities array. More... | |
| void | setGeoEntArrayName (const std::string &geoEntArrayName) |
| Set the name of the geometric entities array. More... | |
| double | getAngleThreshold () const |
| Get the angle threshold used for surface classification. More... | |
| void | setAngleThreshold (double angleThreshold) |
| Set the angle threshold used for surface classification. More... | |
| nemId_t | getNumberOfPoints () const |
| Get the number of points in mesh. More... | |
| nemId_t | getNumberOfCells () const |
| Get the number of cells in mesh. More... | |
| void | getPoint (nemId_t id, std::array< double, 3 > *x) const |
| Get the coordinate of a point. More... | |
| std::array< double, 3 > | getPoint (nemId_t id) const |
| Get the coordinate of a point. More... | |
| void | getCell (nemId_t cellId, vtkGenericCell *cell) const |
| Get cell. More... | |
| vtkCell * | getCell (nemId_t cellId) const |
| Get cell. More... | |
| void | getCellBounds (nemId_t cellId, std::array< double, 6 > *bounds) const |
| Get cell bounds. More... | |
| std::array< double, 6 > | getCellBounds (nemId_t cellId) const |
| Get cell bounds. More... | |
| VTKCellType | getCellType (nemId_t cellId) const |
| Get VTK cell type. More... | |
| void | getCellPoints (nemId_t cellId, vtkIdList *ptIds) const |
| Get list of point ids defining specified cell. More... | |
| void | getPointCells (nemId_t ptId, vtkIdList *cellIds) const |
| Get list of cell ids using specified point. More... | |
| void | getCellNeighbors (nemId_t cellId, vtkIdList *ptIds, vtkIdList *cellIds) const |
Get list of cells sharing points ptIds excluding cellId. More... | |
| int | getNumberOfPointDataArrays () const |
| Get number of arrays in the point data. More... | |
| void | getPointDataArrayCopy (const std::string &arrayName, vtkAbstractArray *array, int *arrayIdx=nullptr) const |
| Get copy of point data array by name. More... | |
| vtkSmartPointer< vtkAbstractArray > | getPointDataArrayCopy (const std::string &arrayName, int *arrayIdx=nullptr) const |
| Create and return a copy of point data array by name. More... | |
| void | getPointDataArrayCopy (int arrayIdx, vtkAbstractArray *array) const |
| Get copy of point data array by index. More... | |
| vtkSmartPointer< vtkAbstractArray > | getPointDataArrayCopy (int arrayIdx) const |
| Create and return a copy of point data array by index. More... | |
| int | getNumberOfCellDataArrays () const |
| Get number of arrays in the cell data. More... | |
| void | getCellDataArrayCopy (const std::string &arrayName, vtkAbstractArray *array, int *arrayIdx=nullptr) const |
| Get copy of cell data array by name. More... | |
| vtkSmartPointer< vtkAbstractArray > | getCellDataArrayCopy (const std::string &arrayName, int *arrayIdx=nullptr) const |
| Create and return a copy of cell data array by name. More... | |
| void | getCellDataArrayCopy (int arrayIdx, vtkAbstractArray *array) const |
| Get copy of cell data array by index. More... | |
| vtkSmartPointer< vtkAbstractArray > | getCellDataArrayCopy (int arrayIdx) const |
| Create and return a copy of cell data array by index. More... | |
| int | getNumberOfFieldDataArrays () const |
| Get number of arrays in the field data. More... | |
| void | getFieldDataArrayCopy (const std::string &arrayName, vtkAbstractArray *array, int *arrayIdx=nullptr) const |
| Get copy of field data array by name. More... | |
| vtkSmartPointer< vtkAbstractArray > | getFieldDataArrayCopy (const std::string &arrayName, int *arrayIdx=nullptr) const |
| Create and return a copy of field data array by name. More... | |
| void | getFieldDataArrayCopy (int arrayIdx, vtkAbstractArray *array) const |
| Get copy of field data array by index. More... | |
| vtkSmartPointer< vtkAbstractArray > | getFieldDataArrayCopy (int arrayIdx) const |
| Create and return a copy of field data array by index. More... | |
Static Public Member Functions | |
| static foamGeoMesh * | New () |
Protected Member Functions | |
| int | setPointDataArray (vtkAbstractArray *array) |
| Set point data. More... | |
| int | setCellDataArray (vtkAbstractArray *array) |
| Set cell data. More... | |
| int | setFieldDataArray (vtkAbstractArray *array) |
| Set field data. More... | |
| void | unsetPointDataArray (int arrayIdx) |
| Remove point data array by index. More... | |
| void | unsetPointDataArray (const std::string &arrayName) |
| Remove point data array by name. More... | |
| void | unsetCellDataArray (int arrayIdx) |
| Remove cell data array by index. More... | |
| void | unsetCellDataArray (const std::string &arrayName) |
| Remove cell data array by name. More... | |
| void | unsetFieldDataArray (int arrayIdx) |
| Remove field data array by index. More... | |
| void | unsetFieldDataArray (const std::string &arrayName) |
| Remove field data array by name. More... | |
| const GeoMesh & | getGeoMesh () const |
| Get the underlying geometry object. More... | |
| void | setGeoMesh (const geoMeshBase::GeoMesh &geoMesh) |
| Set the underlying geometry object. More... | |
Static Protected Attributes | |
| static constexpr auto | GEO_ENT_DEFAULT_NAME = "GeoEnt" |
Private Member Functions | |
| void | InitializeFoam () |
| Initializes arguments and runtime objects. More... | |
Static Private Member Functions | |
| static GeoMesh | foam2GM (Foam::fvMesh *foamMesh, const std::string &phyGrpArrayName=std::string()) |
Create a GeoMesh from a fvMesh. More... | |
| static std::unique_ptr< Foam::fvMesh > | GM2foam (const GeoMesh &geoMesh, Foam::Time *runTime, const std::string &phyGrpArrayName=std::string()) |
Create a fvMesh from geoMeshBase. More... | |
Private Attributes | |
| std::unique_ptr< Foam::dictionary > | controlDict_ |
| std::unique_ptr< Foam::dictionary > | fvSchemes_ |
| std::unique_ptr< Foam::dictionary > | fvSolution_ |
| std::unique_ptr< Foam::Time > | runTime_ |
| std::unique_ptr< Foam::fvMesh > | fmesh_ |
Inherits NEM::MSH::geoMeshBase.
| NEM::MSH::foamGeoMesh::foamGeoMesh | ( | ) |
| fileName | name of file |
| phyGrpArrayName | name of a volScalarField defining the physical group of each cell |
Definition at line 95 of file foamGeoMesh.C.
References InitializeFoam().
Referenced by NEM::MSH::vtkStandardNewMacro().
|
explicit |
| foamMesh | existing foamMesh |
| phyGrpArrayName | name of a volScalarField defining the physical group of each cell |
Definition at line 97 of file foamGeoMesh.C.
|
override |
Definition at line 103 of file foamGeoMesh.C.
|
staticprivate |
Assumes gmsh has already been initialized.
| foamMesh | fv mesh |
| phyGrpArrayName | name of cell data array describing physical group of each cell |
GeoMesh Definition at line 107 of file foamGeoMesh.C.
References nemAux::getRandomString(), NEM::MSH::GmshInterface::Initialize(), and NEM::MSH::New().
Referenced by setFoamMesh(), and NEM::MSH::vtkStandardNewMacro().
|
inlineinherited |
Definition at line 171 of file geoMeshBase.H.
|
inlineinherited |
| cellId | cell id |
| cell | cell |
Definition at line 214 of file geoMeshBase.H.
Referenced by NEM::MSH::diffMesh().
|
inlineinherited |
| cellId | cell id |
Definition at line 222 of file geoMeshBase.H.
|
inlineinherited |
| cellId | cell id |
| bounds | array of bounds as (x_min,x_max, y_min,y_max, z_min,z_max) |
Definition at line 230 of file geoMeshBase.H.
|
inlineinherited |
| cellId | cell id |
Definition at line 238 of file geoMeshBase.H.
|
inherited |
Optionally, get array index.
| arrayName | array name |
| array | cell data array |
| arrayIdx | array index |
Definition at line 180 of file geoMeshBase.C.
References NEM::MSH::geoMeshBase::_geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
Referenced by NEM::MSH::diffMesh().
|
inherited |
Optionally, get array index.
| arrayName | array name |
| arrayIdx | array index |
Definition at line 186 of file geoMeshBase.C.
References NEM::MSH::geoMeshBase::_geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
|
inherited |
| arrayIdx | array index |
| array | cell data array |
Definition at line 191 of file geoMeshBase.C.
References NEM::MSH::geoMeshBase::_geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
|
inherited |
| arrayIdx | array index |
Definition at line 196 of file geoMeshBase.C.
References NEM::MSH::geoMeshBase::_geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
|
inlineinherited |
| cellId | id of cell to exclude |
| ptIds | point id |
| cellIds | list of cell ids |
Definition at line 273 of file geoMeshBase.H.
|
inlineinherited |
| cellId | cell id |
| ptIds | list of point ids |
Definition at line 256 of file geoMeshBase.H.
|
inlineinherited |
| cellId | cell id |
Definition at line 248 of file geoMeshBase.H.
|
inherited |
Optionally, get array index.
| arrayName | array name |
| array | field data array |
| arrayIdx | array index |
Definition at line 201 of file geoMeshBase.C.
References NEM::MSH::geoMeshBase::_geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
|
inherited |
Optionally, get array index.
| arrayName | array name |
| arrayIdx | array index |
Definition at line 207 of file geoMeshBase.C.
References NEM::MSH::geoMeshBase::_geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
|
inherited |
| arrayIdx | array index |
| array | field data array |
Definition at line 212 of file geoMeshBase.C.
References NEM::MSH::geoMeshBase::_geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
|
inherited |
| arrayIdx | array index |
Definition at line 217 of file geoMeshBase.C.
References NEM::MSH::geoMeshBase::_geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
|
inline |
Definition at line 105 of file foamGeoMesh.H.
Referenced by MeshManipulationFoam::addArtificialThicknessElements(), and MeshManipulationFoam::addCohesiveElements().
|
inlineinherited |
Definition at line 157 of file geoMeshBase.H.
Referenced by NEM::MSH::diffMesh().
|
inlineprotectedinherited |
Definition at line 533 of file geoMeshBase.H.
Referenced by NEM::MSH::exoGeoMesh::addCellsToBlock(), NEM::MSH::exoGeoMesh::addElemBlock(), NEM::MSH::exoGeoMesh::addElemBlockProperty(), NEM::MSH::exoGeoMesh::addNodeSet(), NEM::MSH::exoGeoMesh::addSideSet(), NEM::MSH::exoGeoMesh::exoGeoMesh(), NEM::MSH::exoGeoMesh::getElemBlock(), NEM::MSH::exoGeoMesh::getElemBlockId(), NEM::MSH::exoGeoMesh::getSideSet(), NEM::MSH::vtkGeoMesh::getVtkMesh(), NEM::MSH::inpGeoMesh::inpGeoMesh(), NEM::MSH::exoGeoMesh::reassignCells(), NEM::MSH::oshGeoMesh::reconstructGeo(), NEM::MSH::exoGeoMesh::reconstructGeo(), NEM::MSH::geoMeshBase::report(), NEM::MSH::exoGeoMesh::resetElemBlocks(), NEM::MSH::smeshGeoMesh::resetNative(), NEM::MSH::gmshGeoMesh::resetNative(), NEM::MSH::inpGeoMesh::resetNative(), resetNative(), NEM::MSH::oshGeoMesh::resetNative(), NEM::MSH::exoGeoMesh::resetNative(), NEM::MSH::exoGeoMesh::scaleNodes(), NEM::MSH::oshGeoMesh::setOshMesh(), NEM::MSH::exoGeoMesh::setPhysGrpPropertyName(), NEM::MSH::exoGeoMesh::setSideSetObjId(), NEM::MSH::exoGeoMesh::stitch(), NEM::MSH::gmshGeoMesh::write(), NEM::MSH::vtkGeoMesh::write(), and NEM::MSH::exoGeoMesh::write().
|
inlineinherited |
Definition at line 318 of file geoMeshBase.H.
Referenced by NEM::MSH::diffMesh().
|
inlineinherited |
Definition at line 190 of file geoMeshBase.H.
Referenced by NEM::MSH::diffMesh().
|
inlineinherited |
Definition at line 355 of file geoMeshBase.H.
|
inlineinherited |
Definition at line 281 of file geoMeshBase.H.
Referenced by NEM::MSH::diffMesh().
|
inlineinherited |
Definition at line 183 of file geoMeshBase.H.
Referenced by NEM::MSH::diffMesh().
|
inlineinherited |
| id | point id |
| x | array of coordinates as (x,y,z) |
Definition at line 196 of file geoMeshBase.H.
Referenced by NEM::MSH::diffMesh().
|
inlineinherited |
| id | point id |
Definition at line 204 of file geoMeshBase.H.
|
inlineinherited |
| ptId | point id |
| cellIds | list of cell ids |
Definition at line 264 of file geoMeshBase.H.
|
inherited |
Optionally, get array index.
| arrayName | array name |
| array | point data array |
| arrayIdx | array index |
Definition at line 159 of file geoMeshBase.C.
References NEM::MSH::geoMeshBase::_geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
Referenced by NEM::MSH::diffMesh().
|
inherited |
Optionally, get array index.
| arrayName | array name |
| arrayIdx | array index |
Definition at line 165 of file geoMeshBase.C.
References NEM::MSH::geoMeshBase::_geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
|
inherited |
| arrayIdx | array index |
| array | point data array |
Definition at line 170 of file geoMeshBase.C.
References NEM::MSH::geoMeshBase::_geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
|
inherited |
| arrayIdx | array index |
Definition at line 175 of file geoMeshBase.C.
References NEM::MSH::geoMeshBase::_geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
|
staticprivate |
| geoMesh | GeoMesh |
| runTime | TODO |
| phyGrpArrayName | name of cell data array describing physical group of each cell |
fvMesh Definition at line 297 of file foamGeoMesh.C.
References NEM::MSH::geoMeshBase::GeoMesh::mesh, NEM::MSH::New(), NEM::MSH::geoMeshBase::SideSet::sides, and NEM::MSH::geoMeshBase::GeoMesh::sideSet.
Referenced by resetNative().
|
private |
Definition at line 667 of file foamGeoMesh.C.
References controlDict_, fvSchemes_, fvSolution_, and runTime_.
Referenced by foamGeoMesh(), and resetNative().
|
virtualinherited |
Deletes the data from the new geoMesh pointer
| otherGeoMesh | A new geoMesh data to merge |
Definition at line 113 of file geoMeshBase.C.
References NEM::MSH::geoMeshBase::_geoMesh, NEM::MSH::geoMeshBase::GeoMesh::mesh, NEM::MSH::New(), and NEM::MSH::geoMeshBase::resetNative().
|
static |
Referenced by NEM::MSH::New(), and NEM::SRV::srvBase::RequestDataObject().
|
virtualinherited |
Sets geometry, link, and side set. Does not alter the mesh.
Reimplemented in NEM::MSH::exoGeoMesh, NEM::MSH::oshGeoMesh, and NEM::MSH::inpGeoMesh.
Definition at line 466 of file geoMeshBaseReconstructGeo.C.
References NEM::MSH::geoMeshBase::_angleThreshold, NEM::MSH::geoMeshBase::_geoMesh, NEM::MSH::geoMeshBase::GeoMesh::geo, NEM::MSH::geoMeshBase::GEO_ENT_DEFAULT_NAME, nemAux::getRandomString(), NEM::MSH::geoMeshBase::GeoMesh::link, NEM::MSH::geoMeshBase::GeoMesh::mesh, NEM::MSH::geoMeshBase::SideSet::sides, and NEM::MSH::geoMeshBase::GeoMesh::sideSet.
Referenced by NEM::MSH::inpGeoMesh::reconstructGeo(), NEM::MSH::oshGeoMesh::reconstructGeo(), and NEM::MSH::exoGeoMesh::reconstructGeo().
|
overridevirtual |
Implements NEM::MSH::geoMeshBase.
Definition at line 642 of file foamGeoMesh.C.
References NEM::MSH::geoMeshBase::report().
|
overridevirtual |
Implements NEM::MSH::geoMeshBase.
Definition at line 652 of file foamGeoMesh.C.
References controlDict_, fmesh_, fvSchemes_, fvSolution_, NEM::MSH::geoMeshBase::getGeoMesh(), GM2foam(), InitializeFoam(), and runTime_.
|
inlineinherited |
| angleThreshold | (in radians) |
Definition at line 176 of file geoMeshBase.H.
|
inlineprotectedinherited |
| array | array pointer |
Definition at line 473 of file geoMeshBase.H.
|
inlineprotectedinherited |
| array | array pointer |
Definition at line 481 of file geoMeshBase.H.
| void NEM::MSH::foamGeoMesh::setFoamMesh | ( | std::unique_ptr< Foam::fvMesh > | foamMesh | ) |
| foamMesh | existing fvMesh; |
Definition at line 644 of file foamGeoMesh.C.
References fmesh_, foam2GM(), and NEM::MSH::geoMeshBase::setGeoMesh().
|
inlineinherited |
| geoEntArrayName | name of geometric entities array |
Definition at line 162 of file geoMeshBase.H.
|
inlineprotectedinherited |
| geoMesh | a mesh and geometry |
Definition at line 538 of file geoMeshBase.H.
References NEM::MSH::geoMeshBase::GeoMesh::mesh, NEM::MSH::geoMeshBase::SideSet::sides, and NEM::MSH::geoMeshBase::GeoMesh::sideSet.
Referenced by NEM::MSH::exoGeoMesh::addCellsToBlock(), NEM::MSH::exoGeoMesh::addElemBlock(), NEM::MSH::exoGeoMesh::addSideSet(), NEM::MSH::exoGeoMesh::reassignCells(), NEM::MSH::exoGeoMesh::reconstructGeo(), NEM::MSH::gmshGeoMesh::resetNative(), NEM::MSH::exoGeoMesh::resetNative(), NEM::MSH::exoGeoMesh::scaleNodes(), setFoamMesh(), NEM::MSH::oshGeoMesh::setOshMesh(), NEM::MSH::smeshGeoMesh::setSMeshMesh(), NEM::MSH::vtkGeoMesh::setVtkMesh(), NEM::MSH::exoGeoMesh::stitch(), NEM::MSH::oshGeoMesh::takeGeoMesh(), and NEM::MSH::exoGeoMesh::takeGeoMesh().
|
inlineprotectedinherited |
| array | array pointer |
Definition at line 465 of file geoMeshBase.H.
|
virtualinherited |
Note that otherGeoMesh will be left with an empty mesh.
| otherGeoMesh | other geoMeshBase object; mesh will be left empty |
Reimplemented in NEM::MSH::exoGeoMesh, and NEM::MSH::oshGeoMesh.
Definition at line 104 of file geoMeshBase.C.
References NEM::MSH::geoMeshBase::_geoMesh, NEM::MSH::New(), and NEM::MSH::geoMeshBase::resetNative().
Referenced by NEM::MSH::oshGeoMesh::takeGeoMesh(), and NEM::MSH::exoGeoMesh::takeGeoMesh().
|
inlineprotectedinherited |
| arrayIdx | array index |
Definition at line 503 of file geoMeshBase.H.
|
inlineprotectedinherited |
| arrayName | array name |
Definition at line 510 of file geoMeshBase.H.
|
inlineprotectedinherited |
| arrayIdx | array index |
Definition at line 517 of file geoMeshBase.H.
|
inlineprotectedinherited |
| arrayName | array name |
Definition at line 524 of file geoMeshBase.H.
|
inlineprotectedinherited |
| arrayIdx | array index |
Definition at line 489 of file geoMeshBase.H.
|
inlineprotectedinherited |
| arrayName | array name |
Definition at line 496 of file geoMeshBase.H.
|
overridevirtual |
| fileName | Directory path where foam mesh should be written |
Implements NEM::MSH::geoMeshBase.
Definition at line 529 of file foamGeoMesh.C.
References controlDict_, fmesh_, fvSchemes_, and fvSolution_.
|
private |
Definition at line 150 of file foamGeoMesh.H.
Referenced by InitializeFoam(), resetNative(), and write().
|
private |
Definition at line 162 of file foamGeoMesh.H.
Referenced by resetNative(), setFoamMesh(), and write().
|
private |
Definition at line 153 of file foamGeoMesh.H.
Referenced by InitializeFoam(), resetNative(), and write().
|
private |
Definition at line 156 of file foamGeoMesh.H.
Referenced by InitializeFoam(), resetNative(), and write().
|
staticprotectedinherited |
Definition at line 446 of file geoMeshBase.H.
Referenced by NEM::MSH::gmshGeoMesh::gmsh2GM(), NEM::MSH::inpGeoMesh::inp2GM(), NEM::MSH::oshGeoMesh::osh2GM(), NEM::MSH::exoGeoMesh::reconstructGeo(), NEM::MSH::geoMeshBase::reconstructGeo(), and NEM::MSH::gmshGeoMesh::resetNative().
|
private |
Definition at line 159 of file foamGeoMesh.H.
Referenced by InitializeFoam(), and resetNative().