abstract class to specify geometry and mesh data More...
geoMeshBase is an abstract class that specifies an interface for geometry and mesh objects.
Definition at line 102 of file geoMeshBase.H.
Classes | |
struct | GeoMesh |
struct | SideSet |
Public Member Functions | |
geoMeshBase () | |
Query for conversion from vtk to gmsh. More... | |
~geoMeshBase () override | |
virtual void | write (const std::string &fileName)=0 |
Write mesh to file. More... | |
virtual void | report (std::ostream &out) const =0 |
Print a report about the 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... | |
Protected Member Functions | |
geoMeshBase (GeoMesh inGeoMesh) | |
Construct geoMeshBase from a GeoMesh struct. More... | |
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 | |
virtual void | resetNative ()=0 |
Private Attributes | |
GeoMesh | _geoMesh |
double | _angleThreshold |
Dihedral angle threshold (in radians) to classify surfaces (Default: 30 degrees) More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const geoMeshBase &base) |
Inherits vtkDataObject.
Inherited by NEM::MSH::exoGeoMesh, NEM::MSH::foamGeoMesh, NEM::MSH::gmshGeoMesh, NEM::MSH::inpGeoMesh, NEM::MSH::oshGeoMesh, NEM::MSH::smeshGeoMesh, and NEM::MSH::vtkGeoMesh.
NEM::MSH::geoMeshBase::geoMeshBase | ( | ) |
vtkType |
GMSH_MSH_TYPES
enum Definition at line 77 of file geoMeshBase.C.
References NEM::MSH::New().
|
override |
|
explicitprotected |
inGeoMesh | a mesh, geo, link, and sideSet |
Definition at line 80 of file geoMeshBase.C.
References NEM::MSH::GmshInterface::Initialize().
|
inline |
Definition at line 171 of file geoMeshBase.H.
|
inline |
cellId | cell id |
cell | cell |
Definition at line 214 of file geoMeshBase.H.
Referenced by NEM::MSH::diffMesh().
|
inline |
cellId | cell id |
Definition at line 222 of file geoMeshBase.H.
|
inline |
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.
|
inline |
cellId | cell id |
Definition at line 238 of file geoMeshBase.H.
void NEM::MSH::geoMeshBase::getCellDataArrayCopy | ( | const std::string & | arrayName, |
vtkAbstractArray * | array, | ||
int * | arrayIdx = nullptr |
||
) | const |
Optionally, get array index.
arrayName | array name |
array | cell data array |
arrayIdx | array index |
Definition at line 180 of file geoMeshBase.C.
References _geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
Referenced by NEM::MSH::diffMesh().
vtkSmartPointer< vtkAbstractArray > NEM::MSH::geoMeshBase::getCellDataArrayCopy | ( | const std::string & | arrayName, |
int * | arrayIdx = nullptr |
||
) | const |
Optionally, get array index.
arrayName | array name |
arrayIdx | array index |
Definition at line 186 of file geoMeshBase.C.
References _geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
void NEM::MSH::geoMeshBase::getCellDataArrayCopy | ( | int | arrayIdx, |
vtkAbstractArray * | array | ||
) | const |
arrayIdx | array index |
array | cell data array |
Definition at line 191 of file geoMeshBase.C.
References _geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
vtkSmartPointer< vtkAbstractArray > NEM::MSH::geoMeshBase::getCellDataArrayCopy | ( | int | arrayIdx | ) | const |
arrayIdx | array index |
Definition at line 196 of file geoMeshBase.C.
References _geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
|
inline |
cellId | id of cell to exclude |
ptIds | point id |
cellIds | list of cell ids |
Definition at line 273 of file geoMeshBase.H.
|
inline |
cellId | cell id |
ptIds | list of point ids |
Definition at line 256 of file geoMeshBase.H.
|
inline |
cellId | cell id |
Definition at line 248 of file geoMeshBase.H.
void NEM::MSH::geoMeshBase::getFieldDataArrayCopy | ( | const std::string & | arrayName, |
vtkAbstractArray * | array, | ||
int * | arrayIdx = nullptr |
||
) | const |
Optionally, get array index.
arrayName | array name |
array | field data array |
arrayIdx | array index |
Definition at line 201 of file geoMeshBase.C.
References _geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
vtkSmartPointer< vtkAbstractArray > NEM::MSH::geoMeshBase::getFieldDataArrayCopy | ( | const std::string & | arrayName, |
int * | arrayIdx = nullptr |
||
) | const |
Optionally, get array index.
arrayName | array name |
arrayIdx | array index |
Definition at line 207 of file geoMeshBase.C.
References _geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
void NEM::MSH::geoMeshBase::getFieldDataArrayCopy | ( | int | arrayIdx, |
vtkAbstractArray * | array | ||
) | const |
arrayIdx | array index |
array | field data array |
Definition at line 212 of file geoMeshBase.C.
References _geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
vtkSmartPointer< vtkAbstractArray > NEM::MSH::geoMeshBase::getFieldDataArrayCopy | ( | int | arrayIdx | ) | const |
arrayIdx | array index |
Definition at line 217 of file geoMeshBase.C.
References _geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
|
inline |
Definition at line 157 of file geoMeshBase.H.
Referenced by NEM::MSH::diffMesh().
|
inlineprotected |
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(), report(), NEM::MSH::exoGeoMesh::resetElemBlocks(), NEM::MSH::smeshGeoMesh::resetNative(), NEM::MSH::gmshGeoMesh::resetNative(), NEM::MSH::inpGeoMesh::resetNative(), NEM::MSH::foamGeoMesh::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::vtkGeoMesh::write(), NEM::MSH::gmshGeoMesh::write(), and NEM::MSH::exoGeoMesh::write().
|
inline |
Definition at line 318 of file geoMeshBase.H.
Referenced by NEM::MSH::diffMesh().
|
inline |
Definition at line 190 of file geoMeshBase.H.
Referenced by NEM::MSH::diffMesh().
|
inline |
Definition at line 355 of file geoMeshBase.H.
|
inline |
Definition at line 281 of file geoMeshBase.H.
Referenced by NEM::MSH::diffMesh().
|
inline |
Definition at line 183 of file geoMeshBase.H.
Referenced by NEM::MSH::diffMesh().
|
inline |
id | point id |
x | array of coordinates as (x,y,z) |
Definition at line 196 of file geoMeshBase.H.
Referenced by NEM::MSH::diffMesh().
|
inline |
id | point id |
Definition at line 204 of file geoMeshBase.H.
|
inline |
ptId | point id |
cellIds | list of cell ids |
Definition at line 264 of file geoMeshBase.H.
void NEM::MSH::geoMeshBase::getPointDataArrayCopy | ( | const std::string & | arrayName, |
vtkAbstractArray * | array, | ||
int * | arrayIdx = nullptr |
||
) | const |
Optionally, get array index.
arrayName | array name |
array | point data array |
arrayIdx | array index |
Definition at line 159 of file geoMeshBase.C.
References _geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
Referenced by NEM::MSH::diffMesh().
vtkSmartPointer< vtkAbstractArray > NEM::MSH::geoMeshBase::getPointDataArrayCopy | ( | const std::string & | arrayName, |
int * | arrayIdx = nullptr |
||
) | const |
Optionally, get array index.
arrayName | array name |
arrayIdx | array index |
Definition at line 165 of file geoMeshBase.C.
References _geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
void NEM::MSH::geoMeshBase::getPointDataArrayCopy | ( | int | arrayIdx, |
vtkAbstractArray * | array | ||
) | const |
arrayIdx | array index |
array | point data array |
Definition at line 170 of file geoMeshBase.C.
References _geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
vtkSmartPointer< vtkAbstractArray > NEM::MSH::geoMeshBase::getPointDataArrayCopy | ( | int | arrayIdx | ) | const |
arrayIdx | array index |
Definition at line 175 of file geoMeshBase.C.
References _geoMesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
|
virtual |
Deletes the data from the new geoMesh pointer
otherGeoMesh | A new geoMesh data to merge |
Definition at line 113 of file geoMeshBase.C.
References _geoMesh, NEM::MSH::geoMeshBase::GeoMesh::mesh, NEM::MSH::New(), and resetNative().
|
virtual |
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 _angleThreshold, _geoMesh, NEM::MSH::geoMeshBase::GeoMesh::geo, 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().
|
pure virtual |
out | stream |
Implemented in NEM::MSH::oshGeoMesh, NEM::MSH::exoGeoMesh, NEM::MSH::foamGeoMesh, NEM::MSH::gmshGeoMesh, and NEM::MSH::vtkGeoMesh.
Definition at line 97 of file geoMeshBase.C.
References getGeoMesh(), mesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
Referenced by NEM::MSH::inpGeoMesh::inpGeoMesh(), NEM::MSH::mesh_(), NEM::MSH::gmshGeoMesh::report(), NEM::MSH::vtkGeoMesh::report(), NEM::MSH::foamGeoMesh::report(), NEM::MSH::exoGeoMesh::report(), and NEM::MSH::oshGeoMesh::report().
|
privatepure virtual |
Implemented in NEM::MSH::exoGeoMesh, NEM::MSH::oshGeoMesh, NEM::MSH::foamGeoMesh, NEM::MSH::vtkGeoMesh, NEM::MSH::inpGeoMesh, NEM::MSH::gmshGeoMesh, and NEM::MSH::smeshGeoMesh.
Referenced by mergeGeoMesh(), and takeGeoMesh().
|
inline |
angleThreshold | (in radians) |
Definition at line 176 of file geoMeshBase.H.
|
inlineprotected |
array | array pointer |
Definition at line 473 of file geoMeshBase.H.
|
inlineprotected |
array | array pointer |
Definition at line 481 of file geoMeshBase.H.
|
inline |
geoEntArrayName | name of geometric entities array |
Definition at line 162 of file geoMeshBase.H.
|
inlineprotected |
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(), NEM::MSH::foamGeoMesh::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().
|
inlineprotected |
array | array pointer |
Definition at line 465 of file geoMeshBase.H.
|
virtual |
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 _geoMesh, NEM::MSH::New(), and resetNative().
Referenced by NEM::MSH::oshGeoMesh::takeGeoMesh(), and NEM::MSH::exoGeoMesh::takeGeoMesh().
|
inlineprotected |
arrayIdx | array index |
Definition at line 503 of file geoMeshBase.H.
|
inlineprotected |
arrayName | array name |
Definition at line 510 of file geoMeshBase.H.
|
inlineprotected |
arrayIdx | array index |
Definition at line 517 of file geoMeshBase.H.
|
inlineprotected |
arrayName | array name |
Definition at line 524 of file geoMeshBase.H.
|
inlineprotected |
arrayIdx | array index |
Definition at line 489 of file geoMeshBase.H.
|
inlineprotected |
arrayName | array name |
Definition at line 496 of file geoMeshBase.H.
|
pure virtual |
fileName | file name |
Implemented in NEM::MSH::oshGeoMesh, NEM::MSH::exoGeoMesh, NEM::MSH::foamGeoMesh, NEM::MSH::gmshGeoMesh, and NEM::MSH::vtkGeoMesh.
Referenced by NEM::MSH::inpGeoMesh::inpGeoMesh(), and NEM::MSH::mesh_().
|
friend |
Definition at line 129 of file geoMeshBase.H.
|
private |
Definition at line 554 of file geoMeshBase.H.
Referenced by reconstructGeo().
|
private |
Definition at line 550 of file geoMeshBase.H.
Referenced by getCellDataArrayCopy(), getFieldDataArrayCopy(), getPointDataArrayCopy(), mergeGeoMesh(), reconstructGeo(), and takeGeoMesh().
|
staticprotected |
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(), reconstructGeo(), and NEM::MSH::gmshGeoMesh::resetNative().