Class representing meshes in CalculiX input deck (similar to ABAQUS) More...
Currently supports the keywords ELEMENT ("C3D4", "C3D8", and "C3D6" types, ELSET parameter), ELSET, NSET, and SURFACE (TYPE=ELEMENT only). By default, physical groups with dimension equal to mesh dimension are turned into ELSETs, and NSETs and physical groups with dimension one less than mesh dimension are turned into SURFACEs and NSETs.
Definition at line 49 of file inpGeoMesh.H.
Classes | |
struct | InpSets |
Public Member Functions | |
decltype(InpSets::nodeSets) & | getNSets () |
decltype(InpSets::elSets) & | getElSets () |
decltype(InpSets::surfaces) & | getSurfaces () |
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 | 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 inpGeoMesh * | New () |
static inpGeoMesh * | Read (const std::string &fileName) |
Protected Member Functions | |
inpGeoMesh () | |
inpGeoMesh (const std::string &fileName) | |
void | reconstructGeo () override |
Construct the geometry from the mesh alone. 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 | |
inpGeoMesh (std::pair< GeoMesh, InpSets > mesh) | |
Ctor meant for ease of delegating to geoMeshBase ctor. More... | |
void | resetNative () override |
Static Private Member Functions | |
static std::pair< GeoMesh, InpSets > | inp2GM (const std::string &fileName) |
Private Attributes | |
InpSets | inpSets_ |
Holds data specific to inp format. More... | |
Inherits NEM::MSH::geoMeshBase.
|
protected |
Definition at line 605 of file inpGeoMesh.C.
References NEM::MSH::inpGeoMesh::InpSets::elSets, NEM::MSH::geoMeshBase::getGeoMesh(), inpSets_, mesh, NEM::MSH::inpGeoMesh::InpSets::nodeSets, points, NEM::MSH::geoMeshBase::report(), NEM::MSH::inpGeoMesh::InpSets::surfaces, and NEM::MSH::geoMeshBase::write().
|
explicitprotected |
Definition at line 599 of file inpGeoMesh.C.
mesh | from parsing a .inp mesh file |
Definition at line 602 of file inpGeoMesh.C.
|
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.
|
inline |
Definition at line 75 of file inpGeoMesh.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.
|
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(), 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(), 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 74 of file inpGeoMesh.H.
|
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.
|
inline |
Definition at line 76 of file inpGeoMesh.H.
References mesh.
|
staticprivate |
Definition at line 719 of file inpGeoMesh.C.
References NEM::MSH::geoMeshBase::GEO_ENT_DEFAULT_NAME, nemAux::getRandomString(), NEM::MSH::GmshInterface::Initialize(), mesh, NEM::MSH::New(), and points.
|
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().
|
static |
Referenced by NEM::MSH::Read().
|
overrideprotectedvirtual |
Sets geometry, link, and side set. Does not alter the mesh.
Reimplemented from NEM::MSH::geoMeshBase.
Definition at line 673 of file inpGeoMesh.C.
References NEM::MSH::geoMeshBase::reconstructGeo(), and resetNative().
|
pure virtualinherited |
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 NEM::MSH::geoMeshBase::getGeoMesh(), mesh, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
Referenced by inpGeoMesh(), NEM::MSH::mesh_(), NEM::MSH::vtkGeoMesh::report(), NEM::MSH::gmshGeoMesh::report(), NEM::MSH::foamGeoMesh::report(), NEM::MSH::exoGeoMesh::report(), and NEM::MSH::oshGeoMesh::report().
|
overrideprivatevirtual |
Implements NEM::MSH::geoMeshBase.
Definition at line 678 of file inpGeoMesh.C.
References NEM::MSH::inpGeoMesh::InpSets::elSets, NEM::MSH::geoMeshBase::getGeoMesh(), inpSets_, NEM::MSH::geoMeshBase::GeoMesh::mesh, NEM::MSH::inpGeoMesh::InpSets::nodeSets, NEM::MSH::geoMeshBase::SideSet::sides, NEM::MSH::geoMeshBase::GeoMesh::sideSet, and NEM::MSH::inpGeoMesh::InpSets::surfaces.
Referenced by reconstructGeo().
|
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.
|
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(), 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().
|
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.
|
pure virtualinherited |
fileName | file name |
Implemented in NEM::MSH::oshGeoMesh, NEM::MSH::exoGeoMesh, NEM::MSH::foamGeoMesh, NEM::MSH::gmshGeoMesh, and NEM::MSH::vtkGeoMesh.
Referenced by inpGeoMesh(), and NEM::MSH::mesh_().
|
staticprotectedinherited |
Definition at line 446 of file geoMeshBase.H.
Referenced by NEM::MSH::gmshGeoMesh::gmsh2GM(), inp2GM(), NEM::MSH::oshGeoMesh::osh2GM(), NEM::MSH::exoGeoMesh::reconstructGeo(), NEM::MSH::geoMeshBase::reconstructGeo(), and NEM::MSH::gmshGeoMesh::resetNative().
|
private |
Definition at line 96 of file inpGeoMesh.H.
Referenced by inpGeoMesh(), and resetNative().