A concrete implementation of geoMeshBase
representing an Exodus II mesh.
More...
Note that only the title, dimension, element blocks, element block properties, element block variables, node variables, global variables, node sets, and side sets (and the names of each of these fields) are read and stored in an exoGeoMesh class. Side set sides are ignored if the source element does not have the same dimensionality as the mesh.
Definition at line 56 of file exoGeoMesh.H.
Classes | |
struct | elemBlock |
struct | nodeSet |
Public Member Functions | |
vtkSmartPointer< vtkPolyData > | getSS () |
exoGeoMesh () | |
Reads an EXODUS II file into an exoGeoMesh object. More... | |
exoGeoMesh (const std::string &fileName, int timeStep=1) | |
exoGeoMesh constructor from file. More... | |
~exoGeoMesh () override | |
void | write (const std::string &fileName) override |
Write exoGeoMesh out to a file. More... | |
void | report (std::ostream &out) const override |
Write a summary of this exoGeoMesh to out . More... | |
void | reconstructGeo () override |
Construct the geometry from the mesh alone. More... | |
void | takeGeoMesh (geoMeshBase *otherGeoMesh) override |
Take the GeoMesh of another geoMeshBase . More... | |
const std::string & | getTitle () const |
Get the title of the exoGeoMesh (used for writing out to EXODUS II file) More... | |
void | setTitle (const std::string &title) |
Set the title of the exoGeoMesh (used for writing out to EXODUS II file) More... | |
int | getNumElemBlocks () const |
Get number of element blocks. More... | |
std::map< int, std::string > | getElemBlockNames () const |
Get all element block names. More... | |
const std::string & | getElemBlockName (int id) const |
Get the name of an element block (used for writing out to EXODUS II file) More... | |
void | setElemBlockName (int id, const std::string &name) |
Set the name of an element block (used for writing out to EXODUS II file) More... | |
std::vector< int > | getElemBlockIds () const |
Get all element block IDs. More... | |
int | getElemBlockId (vtkIdType cellIdx) const |
Get the element block ID of a cell. More... | |
std::vector< vtkIdType > | getElemBlock (int blockId) const |
Get (0-based) indices of the cells that are in a specific element block. More... | |
int | addElemBlock (vtkUnstructuredGrid *elements, const std::string &name="", float tol=1e-15f) |
Add a new element block to the mesh. More... | |
void | addCellsToBlock (vtkUnstructuredGrid *elements, int blockId, float tol=1e-15f) |
Add cells to an existing element block. More... | |
int | reassignCells (const std::vector< vtkIdType > &cells, int blockId=-1, const std::string &elemBlockName={}) |
Reassign cells to a different element block. More... | |
bool | addElemBlockProperty (const std::string &propName) |
Add a property to element blocks (with default value 0 on all element blocks) More... | |
std::vector< std::string > | getElemBlockPropertyNames () const |
Get the names of all block properties. More... | |
int | getElemBlockProperty (const std::string &propName, int blockId) const |
Get the value of an element block property on a block. More... | |
void | setElemBlockProperty (const std::string &propName, int blockId, int value) |
Set the value of an element block property on a block. More... | |
int | getNumSideSets () const |
Get number of side sets. More... | |
const std::map< int, std::string > & | getSideSetNames () const |
Get all side set names. More... | |
const std::string & | getSideSetName (int id) const |
Get the name of a side set (used for writing out to EXODUS II file) More... | |
void | setSideSetName (int id, const std::string &name) |
Set the name of a side set (used for writing out to EXODUS II file) More... | |
std::vector< int > | getSideSetIds () const |
Get all side set IDs. More... | |
std::pair< std::vector< vtkIdType >, std::vector< int > > | getSideSet (int sideSetId) const |
Get sides in a side set. More... | |
int | addSideSet (const std::vector< vtkIdType > &elements, const std::vector< int > &sides, const std::string &name="") |
Add a new side set. More... | |
int | getNumNodeSets () const |
Get number of node sets. More... | |
std::map< int, std::string > | getNodeSetNames () const |
Get all node set names. More... | |
const std::string & | getNodeSetName (int id) const |
Get the name of a node set (used for writing out to EXODUS II file) More... | |
void | setNodeSetName (int id, const std::string &name) |
Set the name of a node set (used for writing out to EXODUS II file) More... | |
std::vector< int > | getNodeSetIds () const |
Get the IDs of all node sets. More... | |
const std::vector< vtkIdType > & | getNodeSet (int nodeSetId) const |
Get the nodes of a node set. More... | |
int | addNodeSet (const std::vector< vtkIdType > &nodes, const std::string &name="") |
Add a new node set. More... | |
const std::string & | getPhysGrpPropertyName () const |
Get the name of the element block property that maps element blocks to physical groups (if empty, each element block represents its own physical group) More... | |
void | setPhysGrpPropertyName (const std::string &physGrpName) |
Sets the name of the element block property that maps element blocks to physical groups (if empty, each element block represents its own physical group) More... | |
void | stitch (const exoGeoMesh &otherGM, float tol=1e-15f) |
Stitch another exoGeoMesh object onto this one. More... | |
void | scaleNodes (double scale) |
Scale point locations. 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 exoGeoMesh * | New () |
Protected Member Functions | |
exoGeoMesh (const vtkSmartPointer< vtkExodusIIReader > &reader) | |
exoGeoMesh constructor from vtkExodusIIReader 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 | |
void | resetElemBlocks () |
Clears element block names, element block properties. More... | |
void | resetNodeSetPoints (vtkIdTypeArray *nodeMap=nullptr) |
Renumbers the nodes in all node sets based on nodeMap if provided. More... | |
void | setSideSetObjId () |
Sets the (Exodus) side set IDs of each cell in the GeoMesh.sideSet by creating a side set for each pair (side entity, parent entity). More... | |
void | resetNative () override |
Static Private Member Functions | |
static vtkSmartPointer< vtkExodusIIReader > | getExoReader (const std::string &fileName, int timeStep=1) |
static GeoMesh | exoReader2GM (vtkSmartPointer< vtkExodusIIReader > reader) |
static const char * | getExoIdArrName () |
Private Attributes | |
std::string | _title |
std::map< int, elemBlock > | _elemBlocks |
std::map< int, std::string > | _sideSetNames |
std::map< int, nodeSet > | _nodeSets |
std::set< std::string > | _elemBlockPropNames |
std::string | _physGrpName |
Inherits NEM::MSH::geoMeshBase.
NEM::MSH::exoGeoMesh::exoGeoMesh | ( | ) |
fileName | Name of file to read. Empty string interpreted as creating new exoGeoMesh with empty mesh |
timeStep | Time step (using EXODUS II indexing) to read |
Definition at line 257 of file exoGeoMesh.C.
Referenced by NEM::MSH::vtkStandardNewMacro().
|
explicit |
fileName | Name of EXODUS II file to read |
timeStep | Time step (using EXODUS II indexing) to read |
Definition at line 377 of file exoGeoMesh.C.
|
override |
Definition at line 380 of file exoGeoMesh.C.
|
explicitprotected |
Note that side set side indices in the reader's output are ignored and are read from reader->GetFileName()
instead. Element block properties are also read from the file separately.
reader | Existing vtkExodusIIReader from which to create exoGeoMesh object. Update() should already have been called. |
Definition at line 259 of file exoGeoMesh.C.
References _elemBlockPropNames, _elemBlocks, _nodeSets, _sideSetNames, _title, cellType, getExoIdArrName(), NEM::MSH::geoMeshBase::getGeoMesh(), NEM::MSH::geoMeshBase::GeoMesh::mesh, nodes, and nodeSets.
void NEM::MSH::exoGeoMesh::addCellsToBlock | ( | vtkUnstructuredGrid * | elements, |
int | blockId, | ||
float | tol = 1e-15f |
||
) |
Invalidates geometry, if any. PointData and CellData arrays are intersected.
elements | vtkUnstructuredGrid of cells to add to the mesh. All cells should be of the same type as cells in the block given by blockId . |
blockId | ID of existing element block |
tol | Tolerance for merging points |
Definition at line 938 of file exoGeoMesh.C.
References _elemBlocks, NEM::MSH::exoGeoMesh::elemBlock::cellType, NEM::MSH::geoMeshBase::GeoMesh::geo, getExoIdArrName(), NEM::MSH::geoMeshBase::getGeoMesh(), NEM::MSH::geoMeshBase::GeoMesh::link, mesh, NEM::MSH::geoMeshBase::GeoMesh::mesh, NEM::MSH::New(), resetNodeSetPoints(), NEM::MSH::geoMeshBase::setGeoMesh(), and NEM::MSH::geoMeshBase::GeoMesh::sideSet.
Referenced by addElemBlock().
int NEM::MSH::exoGeoMesh::addElemBlock | ( | vtkUnstructuredGrid * | elements, |
const std::string & | name = "" , |
||
float | tol = 1e-15f |
||
) |
Invalidates geometry, if any. PointData and CellData arrays are intersected.
elements | vtkUnstructuredGrid of cells to add to the mesh. All cells should be of same cell type. |
name | Name of new element block |
tol | Tolerance for merging points |
Definition at line 901 of file exoGeoMesh.C.
References _elemBlocks, addCellsToBlock(), NEM::MSH::exoGeoMesh::elemBlock::cellType, NEM::MSH::geoMeshBase::getGeoMesh(), nemAux::leastUnusedKey(), mesh, NEM::MSH::geoMeshBase::GeoMesh::mesh, NEM::MSH::exoGeoMesh::elemBlock::name, NEM::MSH::New(), resetNative(), and NEM::MSH::geoMeshBase::setGeoMesh().
bool NEM::MSH::exoGeoMesh::addElemBlockProperty | ( | const std::string & | propName | ) |
propName | Name of new property |
Definition at line 1040 of file exoGeoMesh.C.
References _elemBlockPropNames, and NEM::MSH::geoMeshBase::getGeoMesh().
int NEM::MSH::exoGeoMesh::addNodeSet | ( | const std::vector< vtkIdType > & | nodes, |
const std::string & | name = "" |
||
) |
nodes | Node indices that should belong on the new node set (0-based indexing) |
name | Name of new node set |
Definition at line 1257 of file exoGeoMesh.C.
References _nodeSets, NEM::MSH::geoMeshBase::getGeoMesh(), nemAux::leastUnusedKey(), and NEM::MSH::geoMeshBase::GeoMesh::mesh.
int NEM::MSH::exoGeoMesh::addSideSet | ( | const std::vector< vtkIdType > & | elements, |
const std::vector< int > & | sides, | ||
const std::string & | name = "" |
||
) |
elements | The (0-based) index of the cells that each side comes from |
sides | The index of the face/edge that of the side (according to VTK face/edge ordering) |
name | Name of new side set |
Definition at line 1145 of file exoGeoMesh.C.
References _sideSetNames, NEM::MSH::geoMeshBase::GeoMesh::geo, getExoIdArrName(), NEM::MSH::geoMeshBase::SideSet::getGeoEntArr(), NEM::MSH::geoMeshBase::getGeoMesh(), nemAux::leastUnusedKey(), NEM::MSH::geoMeshBase::GeoMesh::link, NEM::MSH::geoMeshBase::GeoMesh::mesh, NEM::MSH::New(), NEM::MSH::geoMeshBase::setGeoMesh(), and NEM::MSH::geoMeshBase::GeoMesh::sideSet.
|
staticprivate |
Definition at line 1472 of file exoGeoMesh.C.
References getExoIdArrName(), mesh, and NEM::MSH::New().
|
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.
std::vector< vtkIdType > NEM::MSH::exoGeoMesh::getElemBlock | ( | int | blockId | ) | const |
blockId | ID of an element block |
blockID
Definition at line 869 of file exoGeoMesh.C.
References _elemBlocks, getExoIdArrName(), NEM::MSH::geoMeshBase::getGeoMesh(), and NEM::MSH::geoMeshBase::GeoMesh::mesh.
int NEM::MSH::exoGeoMesh::getElemBlockId | ( | vtkIdType | cellIdx | ) | const |
cellIdx | 0-based index of a cell |
Definition at line 886 of file exoGeoMesh.C.
References getExoIdArrName(), NEM::MSH::geoMeshBase::getGeoMesh(), and NEM::MSH::geoMeshBase::GeoMesh::mesh.
std::vector< int > NEM::MSH::exoGeoMesh::getElemBlockIds | ( | ) | const |
const std::string & NEM::MSH::exoGeoMesh::getElemBlockName | ( | int | id | ) | const |
id | ID of the element block |
Definition at line 840 of file exoGeoMesh.C.
References _elemBlocks.
std::map< int, std::string > NEM::MSH::exoGeoMesh::getElemBlockNames | ( | ) | const |
Definition at line 829 of file exoGeoMesh.C.
References _elemBlocks.
int NEM::MSH::exoGeoMesh::getElemBlockProperty | ( | const std::string & | propName, |
int | blockId | ||
) | const |
propName | Name of an element block property |
blockId | ID of an element block |
Definition at line 1053 of file exoGeoMesh.C.
References _elemBlockPropNames, and _elemBlocks.
Referenced by reconstructGeo(), and setPhysGrpPropertyName().
std::vector< std::string > NEM::MSH::exoGeoMesh::getElemBlockPropertyNames | ( | ) | const |
Definition at line 1047 of file exoGeoMesh.C.
References _elemBlockPropNames.
|
staticprivate |
Definition at line 253 of file exoGeoMesh.C.
Referenced by addCellsToBlock(), addSideSet(), exoGeoMesh(), exoReader2GM(), getElemBlock(), getElemBlockId(), getSideSet(), reassignCells(), reconstructGeo(), resetElemBlocks(), resetNative(), setPhysGrpPropertyName(), setSideSetObjId(), stitch(), and write().
|
staticprivate |
Definition at line 1605 of file exoGeoMesh.C.
References NEM::MSH::New().
|
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 addCellsToBlock(), addElemBlock(), addElemBlockProperty(), addNodeSet(), addSideSet(), exoGeoMesh(), getElemBlock(), getElemBlockId(), getSideSet(), NEM::MSH::vtkGeoMesh::getVtkMesh(), NEM::MSH::inpGeoMesh::inpGeoMesh(), reassignCells(), NEM::MSH::oshGeoMesh::reconstructGeo(), reconstructGeo(), NEM::MSH::geoMeshBase::report(), resetElemBlocks(), NEM::MSH::smeshGeoMesh::resetNative(), NEM::MSH::gmshGeoMesh::resetNative(), NEM::MSH::inpGeoMesh::resetNative(), NEM::MSH::foamGeoMesh::resetNative(), NEM::MSH::oshGeoMesh::resetNative(), resetNative(), scaleNodes(), NEM::MSH::oshGeoMesh::setOshMesh(), setPhysGrpPropertyName(), setSideSetObjId(), stitch(), NEM::MSH::vtkGeoMesh::write(), NEM::MSH::gmshGeoMesh::write(), and write().
const std::vector< vtkIdType > & NEM::MSH::exoGeoMesh::getNodeSet | ( | int | nodeSetId | ) | const |
nodeSetId | ID of a node set |
Definition at line 1248 of file exoGeoMesh.C.
References _nodeSets.
std::vector< int > NEM::MSH::exoGeoMesh::getNodeSetIds | ( | ) | const |
const std::string & NEM::MSH::exoGeoMesh::getNodeSetName | ( | int | id | ) | const |
id | ID of a node set |
Definition at line 1219 of file exoGeoMesh.C.
References _nodeSets.
std::map< int, std::string > NEM::MSH::exoGeoMesh::getNodeSetNames | ( | ) | const |
Definition at line 1209 of file exoGeoMesh.C.
References _nodeSets.
|
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().
int NEM::MSH::exoGeoMesh::getNumElemBlocks | ( | ) | const |
Definition at line 827 of file exoGeoMesh.C.
References _elemBlocks.
int NEM::MSH::exoGeoMesh::getNumNodeSets | ( | ) | const |
int NEM::MSH::exoGeoMesh::getNumSideSets | ( | ) | const |
Definition at line 1088 of file exoGeoMesh.C.
References _sideSetNames.
const std::string & NEM::MSH::exoGeoMesh::getPhysGrpPropertyName | ( | ) | const |
Definition at line 1275 of file exoGeoMesh.C.
References _physGrpName.
|
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.
std::pair< std::vector< vtkIdType >, std::vector< int > > NEM::MSH::exoGeoMesh::getSideSet | ( | int | sideSetId | ) | const |
sideSetId | ID of a side set |
Definition at line 1123 of file exoGeoMesh.C.
References _sideSetNames, getExoIdArrName(), and NEM::MSH::geoMeshBase::getGeoMesh().
std::vector< int > NEM::MSH::exoGeoMesh::getSideSetIds | ( | ) | const |
Definition at line 1114 of file exoGeoMesh.C.
References _sideSetNames.
const std::string & NEM::MSH::exoGeoMesh::getSideSetName | ( | int | id | ) | const |
id | ID of a side set |
Definition at line 1094 of file exoGeoMesh.C.
References _sideSetNames.
const std::map< int, std::string > & NEM::MSH::exoGeoMesh::getSideSetNames | ( | ) | const |
Definition at line 1090 of file exoGeoMesh.C.
References _sideSetNames.
|
inline |
Definition at line 58 of file exoGeoMesh.H.
References NEM::MSH::New(), nodes, NEM::MSH::Read(), and sides.
const std::string & NEM::MSH::exoGeoMesh::getTitle | ( | ) | const |
|
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().
int NEM::MSH::exoGeoMesh::reassignCells | ( | const std::vector< vtkIdType > & | cells, |
int | blockId = -1 , |
||
const std::string & | elemBlockName = {} |
||
) |
Cells must all have same cell type. May result in empty blocks. Invalidates geometry, if any.
cells | vector of cell indices |
blockId | id of block to assign to; if not an existing block, one is created (if blockId is positive, the new block will have that ID; otherwise, one is chosen) |
elemBlockName | if blockId is not an existing block, the name of the new block |
Definition at line 1001 of file exoGeoMesh.C.
References _elemBlocks, cellType, getExoIdArrName(), NEM::MSH::geoMeshBase::getGeoMesh(), nemAux::leastUnusedKey(), mesh, NEM::MSH::geoMeshBase::GeoMesh::mesh, NEM::MSH::geoMeshBase::setGeoMesh(), and NEM::MSH::geoMeshBase::GeoMesh::sideSet.
|
overridevirtual |
Sets geometry, link, and side set. Does not alter the mesh. If physGrpName
is not empty, then physical groups are set based on the property physGrpName
for each element block. Otherwise, each element block represents its own physical group.
Reimplemented from NEM::MSH::geoMeshBase.
Definition at line 796 of file exoGeoMesh.C.
References _physGrpName, NEM::MSH::geoMeshBase::GeoMesh::geo, NEM::MSH::geoMeshBase::GEO_ENT_DEFAULT_NAME, getElemBlockProperty(), getExoIdArrName(), NEM::MSH::geoMeshBase::getGeoMesh(), NEM::MSH::geoMeshBase::GeoMesh::link, NEM::MSH::geoMeshBase::GeoMesh::mesh, NEM::MSH::New(), NEM::MSH::geoMeshBase::reconstructGeo(), NEM::MSH::geoMeshBase::setGeoMesh(), setSideSetObjId(), and NEM::MSH::geoMeshBase::GeoMesh::sideSet.
|
overridevirtual |
out | Stream to write summary to. |
Implements NEM::MSH::geoMeshBase.
Definition at line 770 of file exoGeoMesh.C.
References _elemBlocks, _nodeSets, _sideSetNames, _title, and NEM::MSH::geoMeshBase::report().
|
private |
Creates element blocks and sets the dimension based on the GeoMesh
.
Definition at line 1667 of file exoGeoMesh.C.
References _elemBlockPropNames, _elemBlocks, _physGrpName, cellType, NEM::MSH::exoGeoMesh::elemBlock::cellType, getExoIdArrName(), NEM::MSH::geoMeshBase::getGeoMesh(), nemAux::leastUnusedKey(), NEM::MSH::geoMeshBase::GeoMesh::mesh, and NEM::MSH::exoGeoMesh::elemBlock::properties.
Referenced by resetNative().
|
overrideprivatevirtual |
Implements NEM::MSH::geoMeshBase.
Definition at line 1639 of file exoGeoMesh.C.
References _nodeSets, _physGrpName, getExoIdArrName(), NEM::MSH::geoMeshBase::getGeoMesh(), NEM::MSH::geoMeshBase::GeoMesh::link, NEM::MSH::geoMeshBase::GeoMesh::mesh, NEM::MSH::New(), resetElemBlocks(), NEM::MSH::geoMeshBase::setGeoMesh(), and setSideSetObjId().
Referenced by addElemBlock().
|
private |
Removes duplicate node ids within a node set.
nodeMap | map from old to new node indices (can be many-to-one) |
Definition at line 1699 of file exoGeoMesh.C.
References _nodeSets, and NEM::MSH::exoGeoMesh::nodeSet::nodes.
Referenced by addCellsToBlock(), stitch(), and write().
void NEM::MSH::exoGeoMesh::scaleNodes | ( | double | scale | ) |
Does not change point data.
scale | Multiplicative factor for point locations |
Definition at line 1457 of file exoGeoMesh.C.
References NEM::MSH::geoMeshBase::GeoMesh::geo, NEM::MSH::geoMeshBase::getGeoMesh(), NEM::MSH::geoMeshBase::GeoMesh::link, mesh, NEM::MSH::New(), NEM::MSH::geoMeshBase::setGeoMesh(), NEM::MSH::geoMeshBase::SideSet::sides, and NEM::MSH::geoMeshBase::GeoMesh::sideSet.
|
inlineinherited |
angleThreshold | (in radians) |
Definition at line 176 of file geoMeshBase.H.
|
inlineprotectedinherited |
array | array pointer |
Definition at line 473 of file geoMeshBase.H.
void NEM::MSH::exoGeoMesh::setElemBlockName | ( | int | id, |
const std::string & | name | ||
) |
id | ID of the element block |
name | new name of the element block |
Definition at line 850 of file exoGeoMesh.C.
References _elemBlocks.
void NEM::MSH::exoGeoMesh::setElemBlockProperty | ( | const std::string & | propName, |
int | blockId, | ||
int | value | ||
) |
propName | Name of an element block property |
blockId | ID of an element block |
value | Value of a property on an element block |
Definition at line 1073 of file exoGeoMesh.C.
References _elemBlockPropNames, and _elemBlocks.
|
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 addCellsToBlock(), addElemBlock(), addSideSet(), reassignCells(), reconstructGeo(), NEM::MSH::gmshGeoMesh::resetNative(), resetNative(), scaleNodes(), NEM::MSH::foamGeoMesh::setFoamMesh(), NEM::MSH::oshGeoMesh::setOshMesh(), NEM::MSH::smeshGeoMesh::setSMeshMesh(), NEM::MSH::vtkGeoMesh::setVtkMesh(), stitch(), NEM::MSH::oshGeoMesh::takeGeoMesh(), and takeGeoMesh().
void NEM::MSH::exoGeoMesh::setNodeSetName | ( | int | id, |
const std::string & | name | ||
) |
id | ID of a node set |
name | New name of the node set |
Definition at line 1229 of file exoGeoMesh.C.
References _nodeSets.
void NEM::MSH::exoGeoMesh::setPhysGrpPropertyName | ( | const std::string & | physGrpName | ) |
physGrpName | Name of element block property mapping element blocks to physical groups (use empty string to unset). Must be an existing element block property name. |
Definition at line 1279 of file exoGeoMesh.C.
References _elemBlockPropNames, _physGrpName, getElemBlockProperty(), getExoIdArrName(), NEM::MSH::geoMeshBase::getGeoMesh(), NEM::MSH::geoMeshBase::GeoMesh::link, and NEM::MSH::geoMeshBase::GeoMesh::mesh.
|
inlineprotectedinherited |
array | array pointer |
Definition at line 465 of file geoMeshBase.H.
void NEM::MSH::exoGeoMesh::setSideSetName | ( | int | id, |
const std::string & | name | ||
) |
id | ID of a side set |
name | New name of the side set |
Definition at line 1104 of file exoGeoMesh.C.
References _sideSetNames.
|
private |
Definition at line 1709 of file exoGeoMesh.C.
References _sideSetNames, getExoIdArrName(), NEM::MSH::geoMeshBase::getGeoMesh(), and NEM::MSH::New().
Referenced by reconstructGeo(), and resetNative().
void NEM::MSH::exoGeoMesh::setTitle | ( | const std::string & | title | ) |
void NEM::MSH::exoGeoMesh::stitch | ( | const exoGeoMesh & | otherGM, |
float | tol = 1e-15f |
||
) |
PointData and CellData arrays are intersected. Adds side sets and node sets if available. Element block properties from otherGM
are copied if property also defined in this exoGeoMesh.
otherGM | Other exoGeoMesh to addd to this one |
tol | Tolerance for merging points |
Definition at line 1301 of file exoGeoMesh.C.
References _elemBlockPropNames, _elemBlocks, _nodeSets, _sideSetNames, NEM::MSH::geoMeshBase::GeoMesh::geo, NEM::MSH::geoMeshBase::GeoMesh::getDimension(), getExoIdArrName(), NEM::MSH::geoMeshBase::SideSet::getGeoEntArr(), NEM::MSH::geoMeshBase::getGeoMesh(), nemAux::leastUnusedKey(), NEM::MSH::geoMeshBase::GeoMesh::link, mesh, NEM::MSH::geoMeshBase::GeoMesh::mesh, NEM::MSH::exoGeoMesh::nodeSet::name, NEM::MSH::New(), NEM::MSH::exoGeoMesh::nodeSet::nodes, resetNodeSetPoints(), NEM::MSH::geoMeshBase::setGeoMesh(), and NEM::MSH::geoMeshBase::GeoMesh::sideSet.
|
overridevirtual |
Note that otherGeoMesh
will be left with an empty mesh.
otherGeoMesh | other geoMeshBase object; mesh will be left empty |
Reimplemented from NEM::MSH::geoMeshBase.
Definition at line 778 of file exoGeoMesh.C.
References _elemBlockPropNames, _elemBlocks, _nodeSets, _physGrpName, _sideSetNames, _title, NEM::MSH::New(), NEM::MSH::geoMeshBase::setGeoMesh(), and NEM::MSH::geoMeshBase::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 |
If fileName
already exists, it is overwritten. If there are more than 900 side sets, they are concatenated, with a side set variable named "NEM_SIDE_SET_ID"
added that contains the id of the side in this exoGeoMesh.
fileName | Name of file. Must end in ".exo", ".e", ".gen", or ".g" |
Implements NEM::MSH::geoMeshBase.
Definition at line 382 of file exoGeoMesh.C.
References _elemBlockPropNames, _elemBlocks, _nodeSets, _sideSetNames, _title, cellType, data, nemAux::find_ext(), getExoIdArrName(), NEM::MSH::geoMeshBase::getGeoMesh(), NEM::MSH::exoGeoMesh::nodeSet::name, nodes, NEM::MSH::exoGeoMesh::nodeSet::nodes, and resetNodeSetPoints().
|
private |
Definition at line 391 of file exoGeoMesh.H.
Referenced by addElemBlockProperty(), exoGeoMesh(), getElemBlockProperty(), getElemBlockPropertyNames(), resetElemBlocks(), setElemBlockProperty(), setPhysGrpPropertyName(), stitch(), takeGeoMesh(), and write().
|
private |
Definition at line 388 of file exoGeoMesh.H.
Referenced by addCellsToBlock(), addElemBlock(), exoGeoMesh(), getElemBlock(), getElemBlockIds(), getElemBlockName(), getElemBlockNames(), getElemBlockProperty(), getNumElemBlocks(), reassignCells(), report(), resetElemBlocks(), setElemBlockName(), setElemBlockProperty(), stitch(), takeGeoMesh(), and write().
|
private |
Definition at line 390 of file exoGeoMesh.H.
Referenced by addNodeSet(), exoGeoMesh(), getNodeSet(), getNodeSetIds(), getNodeSetName(), getNodeSetNames(), getNumNodeSets(), report(), resetNative(), resetNodeSetPoints(), setNodeSetName(), stitch(), takeGeoMesh(), and write().
|
private |
Definition at line 392 of file exoGeoMesh.H.
Referenced by getPhysGrpPropertyName(), reconstructGeo(), resetElemBlocks(), resetNative(), setPhysGrpPropertyName(), and takeGeoMesh().
|
private |
Definition at line 389 of file exoGeoMesh.H.
Referenced by addSideSet(), exoGeoMesh(), getNumSideSets(), getSideSet(), getSideSetIds(), getSideSetName(), getSideSetNames(), report(), setSideSetName(), setSideSetObjId(), stitch(), takeGeoMesh(), and write().
|
private |
Definition at line 387 of file exoGeoMesh.H.
Referenced by exoGeoMesh(), getTitle(), report(), setTitle(), takeGeoMesh(), 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(), reconstructGeo(), NEM::MSH::geoMeshBase::reconstructGeo(), and NEM::MSH::gmshGeoMesh::resetNative().