43 #ifndef __Panzer_STK_Interface_hpp__
44 #define __Panzer_STK_Interface_hpp__
49 #include <stk_mesh/base/Types.hpp>
50 #include <stk_mesh/base/MetaData.hpp>
51 #include <stk_mesh/base/BulkData.hpp>
52 #include <stk_mesh/base/Field.hpp>
53 #include <stk_mesh/base/FieldBase.hpp>
54 #include <stk_mesh/base/MetaData.hpp>
55 #include <stk_mesh/base/CoordinateSystems.hpp>
57 #include "Kokkos_Core.hpp"
59 #include <Shards_CellTopology.hpp>
60 #include <Shards_CellTopologyData.h>
62 #include <PanzerAdaptersSTK_config.hpp>
63 #include <Kokkos_ViewFactory.hpp>
65 #include <unordered_map>
67 #ifdef PANZER_HAVE_IOSS
68 #include <stk_io/StkMeshIoBroker.hpp>
71 namespace panzer_stk {
73 class PeriodicBC_MatcherBase;
80 ElementDescriptor(stk::mesh::EntityId gid,
const std::vector<stk::mesh::EntityId> & nodes);
87 std::vector<stk::mesh::EntityId>
nodes_;
124 void addElementBlock(
const std::string & name,
const CellTopologyData * ctData);
128 void addSideset(
const std::string & name,
const CellTopologyData * ctData);
136 void addSolutionField(
const std::string & fieldName,
const std::string & blockId);
140 void addCellField(
const std::string & fieldName,
const std::string & blockId);
151 const std::vector<std::string> & coordField,
152 const std::string & dispPrefix);
163 void initialize(stk::ParallelMachine parallelMach,
bool setupIO=
true);
188 void addNode(stk::mesh::EntityId gid,
const std::vector<double> & coord);
231 std::vector<stk::mesh::EntityId> & subcellIds)
const;
235 void getMyElements(std::vector<stk::mesh::Entity> & elements)
const;
239 void getMyElements(
const std::string & blockID,std::vector<stk::mesh::Entity> & elements)
const;
248 void getNeighborElements(
const std::string & blockID,std::vector<stk::mesh::Entity> & elements)
const;
257 void getMySides(
const std::string & sideName,std::vector<stk::mesh::Entity> & sides)
const;
267 void getMySides(
const std::string & sideName,
const std::string & blockName,std::vector<stk::mesh::Entity> & sides)
const;
276 void getAllSides(
const std::string & sideName,std::vector<stk::mesh::Entity> & sides)
const;
287 void getAllSides(
const std::string & sideName,
const std::string & blockName,std::vector<stk::mesh::Entity> & sides)
const;
298 void getMyNodes(
const std::string & sideName,
const std::string & blockName,std::vector<stk::mesh::Entity> & nodes)
const;
308 stk::mesh::Entity
findConnectivityById(stk::mesh::Entity src, stk::mesh::EntityRank tgt_rank,
unsigned rel_id)
const;
322 const std::string& filename);
340 const std::string& filename);
379 const std::string& key,
403 const std::string& key,
404 const double& value);
427 const std::string& key,
428 const std::vector<int>& value);
451 const std::string& key,
452 const std::vector<double>& value);
466 {
if(
bulkData_==Teuchos::null)
return false;
467 return bulkData_->in_modifiable_state(); }
511 std::map<std::string, stk::mesh::Part*>::const_iterator itr =
elementBlocks_.find(name);
543 void getNodeIdsForElement(stk::mesh::Entity element,std::vector<stk::mesh::EntityId> & nodeIds)
const;
548 std::vector<int> & relIds)
const;
553 std::vector<int> & relIds,
unsigned int matchType)
const;
557 void getElementsSharingNodes(
const std::vector<stk::mesh::EntityId> nodeId,std::vector<stk::mesh::Entity> & elements)
const;
583 {
return bulkData_->parallel_owner_rank(entity); }
587 inline bool isValid(stk::mesh::Entity entity)
const
599 const std::string & blockId)
const;
605 stk::mesh::Field<double> *
getCellField(
const std::string & fieldName,
606 const std::string & blockId)
const;
632 template <
typename ArrayT>
634 const std::vector<std::size_t> & localElementIds,
const ArrayT & solutionValues,
double scaleValue=1.0);
650 template <
typename ArrayT>
652 const std::vector<std::size_t> & localElementIds,ArrayT & solutionValues)
const;
668 template <
typename ArrayT>
669 void setCellFieldData(
const std::string & fieldName,
const std::string & blockId,
670 const std::vector<std::size_t> & localElementIds,
const ArrayT & solutionValues,
double scaleValue=1.0);
680 template <
typename ArrayT>
681 void getElementVertices(
const std::vector<std::size_t> & localIds, ArrayT & vertices)
const;
691 template <
typename ArrayT>
692 void getElementVertices(
const std::vector<stk::mesh::Entity> & elements, ArrayT & vertices)
const;
703 template <
typename ArrayT>
704 void getElementVertices(
const std::vector<std::size_t> & localIds,
const std::string & eBlock, ArrayT & vertices)
const;
715 template <
typename ArrayT>
716 void getElementVertices(
const std::vector<stk::mesh::Entity> & elements,
const std::string & eBlock, ArrayT & vertices)
const;
726 template <
typename ArrayT>
737 template <
typename ArrayT>
749 template <
typename ArrayT>
750 void getElementVerticesNoResize(
const std::vector<std::size_t> & localIds,
const std::string & eBlock, ArrayT & vertices)
const;
761 template <
typename ArrayT>
762 void getElementVerticesNoResize(
const std::vector<stk::mesh::Entity> & elements,
const std::string & eBlock, ArrayT & vertices)
const;
767 stk::mesh::EntityRank
getElementRank()
const {
return stk::topology::ELEMENT_RANK; }
769 stk::mesh::EntityRank
getFaceRank()
const {
return stk::topology::FACE_RANK; }
770 stk::mesh::EntityRank
getEdgeRank()
const {
return stk::topology::EDGE_RANK; }
771 stk::mesh::EntityRank
getNodeRank()
const {
return stk::topology::NODE_RANK; }
783 const std::vector<Teuchos::RCP<const PeriodicBC_MatcherBase> > &
789 std::vector<Teuchos::RCP<const PeriodicBC_MatcherBase> > &
818 void print(std::ostream & os)
const;
888 template <
typename ArrayT>
891 template <
typename ArrayT>
893 const std::string & eBlock, ArrayT & vertices)
const;
904 template <
typename ArrayT>
907 template <
typename ArrayT>
948 bool isMeshCoordField(
const std::string & eBlock,
const std::string & fieldName,
int & axis)
const;
965 template <
typename ArrayT>
966 void setDispFieldData(
const std::string & fieldName,
const std::string & blockId,
int axis,
967 const std::vector<std::size_t> & localElementIds,
const ArrayT & solutionValues);
1015 #ifdef PANZER_HAVE_IOSS
1024 enum class GlobalVariable
1048 const GlobalVariable& flag);
1089 template <
typename ArrayT>
1091 const std::vector<std::size_t> & localElementIds,
const ArrayT & solutionValues,
double scaleValue)
1095 int field_axis = -1;
1097 setDispFieldData(fieldName,blockId,field_axis,localElementIds,solutionValues);
1103 for(std::size_t cell=0;cell<localElementIds.size();cell++) {
1104 std::size_t localId = localElementIds[cell];
1105 stk::mesh::Entity element = elements[localId];
1108 const size_t num_nodes =
bulkData_->num_nodes(element);
1109 stk::mesh::Entity
const* nodes =
bulkData_->begin_nodes(element);
1110 for(std::size_t i=0; i<num_nodes; ++i) {
1111 stk::mesh::Entity node = nodes[i];
1113 double * solnData = stk::mesh::field_data(*field,node);
1115 solnData[0] = scaleValue*solutionValues(cell,i);
1120 template <
typename ArrayT>
1122 const std::vector<std::size_t> & localElementIds,
const ArrayT & dispValues)
1131 for(std::size_t cell=0;cell<localElementIds.size();cell++) {
1132 std::size_t localId = localElementIds[cell];
1133 stk::mesh::Entity element = elements[localId];
1136 const size_t num_nodes =
bulkData_->num_nodes(element);
1137 stk::mesh::Entity
const* nodes =
bulkData_->begin_nodes(element);
1138 for(std::size_t i=0; i<num_nodes; ++i) {
1139 stk::mesh::Entity node = nodes[i];
1141 double * solnData = stk::mesh::field_data(*field,node);
1142 double * coordData = stk::mesh::field_data(coord_field,node);
1144 solnData[0] = dispValues(cell,i)-coordData[axis];
1149 template <
typename ArrayT>
1151 const std::vector<std::size_t> & localElementIds,ArrayT & solutionValues)
const
1157 localElementIds.size(),
1158 bulkData_->num_nodes(elements[localElementIds[0]]));
1162 for(std::size_t cell=0;cell<localElementIds.size();cell++) {
1163 std::size_t localId = localElementIds[cell];
1164 stk::mesh::Entity element = elements[localId];
1167 const size_t num_nodes =
bulkData_->num_nodes(element);
1168 stk::mesh::Entity
const* nodes =
bulkData_->begin_nodes(element);
1169 for(std::size_t i=0; i<num_nodes; ++i) {
1170 stk::mesh::Entity node = nodes[i];
1172 double * solnData = stk::mesh::field_data(*field,node);
1174 solutionValues(cell,i) = solnData[0];
1179 template <
typename ArrayT>
1181 const std::vector<std::size_t> & localElementIds,
const ArrayT & solutionValues,
double scaleValue)
1187 for(std::size_t cell=0;cell<localElementIds.size();cell++) {
1188 std::size_t localId = localElementIds[cell];
1189 stk::mesh::Entity element = elements[localId];
1191 double * solnData = stk::mesh::field_data(*field,element);
1193 solnData[0] = scaleValue*solutionValues(cell,0);
1197 template <
typename ArrayT>
1208 std::vector<stk::mesh::Entity> selected_elements;
1209 for(std::size_t cell=0;cell<localElementIds.size();cell++)
1210 selected_elements.push_back(elements[localElementIds[cell]]);
1216 "STK_Interface::getElementVertices: Cannot call this method when field coordinates are used "
1217 "without specifying an element block.");
1221 template <
typename ArrayT>
1229 "STK_Interface::getElementVertices: Cannot call this method when field coordinates are used "
1230 "without specifying an element block.");
1234 template <
typename ArrayT>
1245 template <
typename ArrayT>
1251 std::vector<stk::mesh::Entity> selected_elements;
1252 for(std::size_t cell=0;cell<localElementIds.size();cell++)
1253 selected_elements.push_back(elements[localElementIds[cell]]);
1263 template <
typename ArrayT>
1274 std::vector<stk::mesh::Entity> selected_elements;
1275 for(std::size_t cell=0;cell<localElementIds.size();cell++)
1276 selected_elements.push_back(elements[localElementIds[cell]]);
1282 "STK_Interface::getElementVerticesNoResize: Cannot call this method when field coordinates are used "
1283 "without specifying an element block.");
1287 template <
typename ArrayT>
1295 "STK_Interface::getElementVerticesNoResize: Cannot call this method when field coordinates are used "
1296 "without specifying an element block.");
1300 template <
typename ArrayT>
1311 template <
typename ArrayT>
1317 std::vector<stk::mesh::Entity> selected_elements;
1318 for(std::size_t cell=0;cell<localElementIds.size();cell++)
1319 selected_elements.push_back(elements[localElementIds[cell]]);
1329 template <
typename ArrayT>
1333 if(elements.size()==0) {
1343 unsigned masterVertexCount
1344 = stk::mesh::get_cell_topology(
bulkData_->bucket(elements[0]).topology()).getCellTopologyData()->vertex_count;
1351 for(std::size_t cell=0;cell<elements.size();cell++) {
1352 stk::mesh::Entity element = elements[cell];
1355 unsigned vertexCount
1356 = stk::mesh::get_cell_topology(
bulkData_->bucket(element).topology()).getCellTopologyData()->vertex_count;
1358 "In call to STK_Interface::getElementVertices all elements "
1359 "must have the same vertex count!");
1362 const size_t num_nodes =
bulkData_->num_nodes(element);
1363 stk::mesh::Entity
const* nodes =
bulkData_->begin_nodes(element);
1365 "In call to STK_Interface::getElementVertices cardinality of "
1366 "element node relations must be the vertex count!");
1367 for(std::size_t node=0; node<num_nodes; ++node) {
1371 for(
unsigned d=0;d<dim;d++)
1372 vertices(cell,node,d) = coord[d];
1377 template <
typename ArrayT>
1381 if(elements.size()==0) {
1390 unsigned masterVertexCount
1391 = stk::mesh::get_cell_topology(
bulkData_->bucket(elements[0]).topology()).getCellTopologyData()->vertex_count;
1395 for(std::size_t cell=0;cell<elements.size();cell++) {
1396 stk::mesh::Entity element = elements[cell];
1399 unsigned vertexCount
1400 = stk::mesh::get_cell_topology(
bulkData_->bucket(element).topology()).getCellTopologyData()->vertex_count;
1402 "In call to STK_Interface::getElementVertices all elements "
1403 "must have the same vertex count!");
1406 const size_t num_nodes =
bulkData_->num_nodes(element);
1407 stk::mesh::Entity
const* nodes =
bulkData_->begin_nodes(element);
1409 "In call to STK_Interface::getElementVertices cardinality of "
1410 "element node relations must be the vertex count!");
1411 for(std::size_t node=0; node<num_nodes; ++node) {
1415 for(
unsigned d=0;d<dim;d++)
1416 vertices(cell,node,d) = coord[d];
1421 template <
typename ArrayT>
1427 if(elements.size()==0) {
1433 unsigned masterVertexCount
1434 = stk::mesh::get_cell_topology(
bulkData_->bucket(elements[0]).topology()).getCellTopologyData()->vertex_count;
1439 std::map<std::string,std::vector<std::string> >::const_iterator itr =
meshCoordFields_.find(eBlock);
1445 const std::vector<std::string> & coordField = itr->second;
1446 std::vector<SolutionFieldType*> fields(
getDimension());
1447 for(std::size_t d=0;d<fields.size();d++) {
1451 for(std::size_t cell=0;cell<elements.size();cell++) {
1452 stk::mesh::Entity element = elements[cell];
1455 const size_t num_nodes =
bulkData_->num_nodes(element);
1456 stk::mesh::Entity
const* nodes =
bulkData_->begin_nodes(element);
1457 for(std::size_t i=0; i<num_nodes; ++i) {
1458 stk::mesh::Entity node = nodes[i];
1463 double * solnData = stk::mesh::field_data(*fields[d],node);
1467 vertices(cell,i,d) = solnData[0]+coord[d];
1473 template <
typename ArrayT>
1475 const std::string & eBlock, ArrayT & vertices)
const
1480 if(elements.size()==0) {
1484 std::map<std::string,std::vector<std::string> >::const_iterator itr =
meshCoordFields_.find(eBlock);
1490 const std::vector<std::string> & coordField = itr->second;
1491 std::vector<SolutionFieldType*> fields(
getDimension());
1492 for(std::size_t d=0;d<fields.size();d++) {
1496 for(std::size_t cell=0;cell<elements.size();cell++) {
1497 stk::mesh::Entity element = elements[cell];
1500 const size_t num_nodes =
bulkData_->num_nodes(element);
1501 stk::mesh::Entity
const* nodes =
bulkData_->begin_nodes(element);
1502 for(std::size_t i=0; i<num_nodes; ++i) {
1503 stk::mesh::Entity node = nodes[i];
1508 double * solnData = stk::mesh::field_data(*fields[d],node);
1512 vertices(cell,i,d) = solnData[0]+coord[d];
void initializeFromMetaData()
Teuchos::RCP< ElementDescriptor > buildElementDescriptor(stk::mesh::EntityId elmtId, std::vector< stk::mesh::EntityId > &nodes)
Teuchos::RCP< Teuchos::MpiComm< int > > getSafeCommunicator(stk::ParallelMachine parallelMach) const
void getSidesetNames(std::vector< std::string > &name) const
std::pair< Teuchos::RCP< std::vector< std::pair< std::size_t, std::size_t > > >, Teuchos::RCP< std::vector< unsigned int > > > getPeriodicNodePairing() const
Kokkos::DynRankView< typename InputArray::value_type, PHX::Device > createDynRankView(const InputArray &a, const std::string &name, const DimensionPack...dims)
Wrapper to simplify Panzer use of Sacado ViewFactory.
ElementBlockException(const std::string &what)
void addNodeset(const std::string &name)
Teuchos::RCP< stk::mesh::BulkData > bulkData_
void print(std::ostream &os) const
unsigned entityOwnerRank(stk::mesh::Entity entity) const
Teuchos::RCP< const std::vector< stk::mesh::Entity > > getElementsOrderedByLID() const
void setSolutionFieldData(const std::string &fieldName, const std::string &blockId, const std::vector< std::size_t > &localElementIds, const ArrayT &solutionValues, double scaleValue=1.0)
std::vector< stk::mesh::Part * > facesPartVec_
std::vector< stk::mesh::EntityId > nodes_
std::map< std::pair< std::string, std::string >, SolutionFieldType * > fieldNameToSolution_
void getElementVerticesNoResize(const std::vector< std::size_t > &localIds, ArrayT &vertices) const
void addEntityToNodeset(stk::mesh::Entity entity, stk::mesh::Part *nodeset)
void addGlobalToExodus(const std::string &key, const int &value)
Add an int global variable to the information to be written to the Exodus output file.
void setDispFieldData(const std::string &fieldName, const std::string &blockId, int axis, const std::vector< std::size_t > &localElementIds, const ArrayT &solutionValues)
void getElementBlockNames(std::vector< std::string > &names) const
void addPeriodicBC(const Teuchos::RCP< const PeriodicBC_MatcherBase > &bc)
void getSubcellIndices(unsigned entityRank, stk::mesh::EntityId elementId, std::vector< stk::mesh::EntityId > &subcellIds) const
std::vector< Teuchos::RCP< const PeriodicBC_MatcherBase > > & getPeriodicBCVector()
void getElementsSharingNodes(const std::vector< stk::mesh::EntityId > nodeId, std::vector< stk::mesh::Entity > &elements) const
get a set of elements sharing multiple nodes
stk::mesh::Field< double > SolutionFieldType
stk::mesh::Part * getElementBlockPart(const std::string &name) const
get the block count
std::vector< stk::mesh::Part * > edgesPartVec_
std::map< std::string, double > blockWeights_
VectorFieldType * coordinatesField_
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
std::size_t getEntityCounts(unsigned entityRank) const
get the global counts for the entity of specified rank
void printMetaData(std::ostream &os) const
void getElementVertices(const std::vector< std::size_t > &localIds, ArrayT &vertices) const
void addEntityToSideset(stk::mesh::Entity entity, stk::mesh::Part *sideset)
stk::mesh::Part * nodesPart_
void getElementVertices_FromCoords(const std::vector< stk::mesh::Entity > &elements, ArrayT &vertices) const
void addSolutionField(const std::string &fieldName, const std::string &blockId)
std::map< std::string, Teuchos::RCP< shards::CellTopology > > elementBlockCT_
stk::mesh::EntityId getMaxEntityId(unsigned entityRank) const
get max entity ID of type entityRank
std::size_t currentLocalId_
std::map< std::string, stk::mesh::Part * > sidesets_
std::vector< std::size_t > entityCounts_
bool validBlockId(const std::string &blockId) const
stk::mesh::Part * getNodeset(const std::string &name) const
void initialize(stk::ParallelMachine parallelMach, bool setupIO=true)
stk::mesh::Field< double > * getSolutionField(const std::string &fieldName, const std::string &blockId) const
SolutionFieldType * loadBalField_
const double * getNodeCoordinates(stk::mesh::EntityId nodeId) const
stk::mesh::Part * getSideset(const std::string &name) const
static const std::string nodesString
void instantiateBulkData(stk::ParallelMachine parallelMach)
void getElementVertices_FromFieldNoResize(const std::vector< stk::mesh::Entity > &elements, const std::string &eBlock, ArrayT &vertices) const
void getMySides(const std::string &sideName, std::vector< stk::mesh::Entity > &sides) const
std::size_t getNumSidesets() const
get the side set count
stk::mesh::EntityId elementGlobalId(stk::mesh::Entity elmt) const
std::size_t elementLocalId(stk::mesh::Entity elmt) const
bool useFieldCoordinates_
void getElementVertices_FromCoordsNoResize(const std::vector< stk::mesh::Entity > &elements, ArrayT &vertices) const
unsigned getDimension() const
get the dimension
void addElement(const Teuchos::RCP< ElementDescriptor > &ed, stk::mesh::Part *block)
std::map< std::string, std::vector< std::string > > meshDispFields_
VectorFieldType * edgesField_
void setUseFieldCoordinates(bool useFieldCoordinates)
stk::mesh::EntityRank getSideRank() const
static const std::string coordsString
stk::mesh::Field< double, stk::mesh::Cartesian > VectorFieldType
std::size_t getNumElementBlocks() const
get the block count
Teuchos::RCP< stk::mesh::BulkData > getBulkData() const
void getElementVertices_FromField(const std::vector< stk::mesh::Entity > &elements, const std::string &eBlock, ArrayT &vertices) const
void writeToExodus(const std::string &filename)
Write this mesh and associated fields to the given output file.
bool getUseFieldCoordinates() const
stk::mesh::EntityId elementGlobalId(std::size_t lid) const
std::map< std::string, stk::mesh::Part * > elementBlocks_
std::vector< stk::mesh::Part * > nodesPartVec_
static const std::string edgesString
SidesetException(const std::string &what)
std::string containingBlockId(stk::mesh::Entity elmt) const
stk::mesh::EntityRank getFaceRank() const
const STK_Interface * mesh_
std::vector< Teuchos::RCP< const PeriodicBC_MatcherBase > > periodicBCs_
void getOwnedElementsSharingNode(stk::mesh::Entity node, std::vector< stk::mesh::Entity > &elements, std::vector< int > &relIds) const
void addNode(stk::mesh::EntityId gid, const std::vector< double > &coord)
void setBlockWeight(const std::string &blockId, double weight)
void buildSubcells()
force the mesh to build subcells: edges and faces
Teuchos::RCP< Teuchos::MpiComm< int > > mpiComm_
LocalIdCompare(const STK_Interface *mesh)
void setInitialStateTime(double value)
Teuchos::RCP< stk::mesh::MetaData > metaData_
Teuchos::RCP< stk::mesh::MetaData > getMetaData() const
virtual ~ElementDescriptor()
Teuchos::RCP< std::vector< stk::mesh::Entity > > orderedElementVector_
std::size_t getNumNodesets() const
get the side set count
double getInitialStateTime() const
bool isInitialized() const
Has initialize been called on this mesh object?
void getMyNodes(const std::string &sideName, const std::string &blockName, std::vector< stk::mesh::Entity > &nodes) const
void getSolutionFieldData(const std::string &fieldName, const std::string &blockId, const std::vector< std::size_t > &localElementIds, ArrayT &solutionValues) const
void addMeshCoordFields(const std::string &blockId, const std::vector< std::string > &coordField, const std::string &dispPrefix)
void applyElementLoadBalanceWeights()
stk::mesh::Entity findConnectivityById(stk::mesh::Entity src, stk::mesh::EntityRank tgt_rank, unsigned rel_id) const
void setUseLowerCaseForIO(bool useLowerCase)
bool isMeshCoordField(const std::string &eBlock, const std::string &fieldName, int &axis) const
void getAllSides(const std::string &sideName, std::vector< stk::mesh::Entity > &sides) const
void addSideset(const std::string &name, const CellTopologyData *ctData)
void setCellFieldData(const std::string &fieldName, const std::string &blockId, const std::vector< std::size_t > &localElementIds, const ArrayT &solutionValues, double scaleValue=1.0)
const VectorFieldType & getEdgesField() const
ProcIdFieldType * getProcessorIdField()
PHX::MDField< ScalarT, panzer::Cell, panzer::BASIS > field
A field to which we'll contribute, or in which we'll store, the result of computing this integral...
void rebalance(const Teuchos::ParameterList ¶ms)
std::map< std::string, std::vector< std::string > > meshCoordFields_
stk::mesh::EntityRank getEdgeRank() const
static const std::string facesString
void initializeFieldsInSTK(const std::map< std::pair< std::string, std::string >, SolutionFieldType * > &nameToField, bool setupIO)
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
get the comm associated with this mesh
const std::vector< Teuchos::RCP< const PeriodicBC_MatcherBase > > & getPeriodicBCVector() const
const VectorFieldType & getFacesField() const
void buildLocalElementIDs()
bool isModifiable() const
void setupExodusFile(const std::string &filename)
Set up an output Exodus file for writing results.
std::unordered_map< stk::mesh::EntityId, std::size_t > localIDHash_
bool isValid(stk::mesh::Entity entity) const
std::vector< stk::mesh::EntityId > maxEntityId_
stk::mesh::Field< ProcIdData > ProcIdFieldType
void addPeriodicBCs(const std::vector< Teuchos::RCP< const PeriodicBC_MatcherBase > > &bc_vec)
void getElementsSharingNode(stk::mesh::EntityId nodeId, std::vector< stk::mesh::Entity > &elements) const
get a set of elements sharing a single node
#define TEUCHOS_ASSERT(assertion_test)
void getMyElements(std::vector< stk::mesh::Entity > &elements) const
stk::mesh::EntityRank getNodeRank() const
void addCellField(const std::string &fieldName, const std::string &blockId)
void getNodeIdsForElement(stk::mesh::Entity element, std::vector< stk::mesh::EntityId > &nodeIds) const
get a list of node ids for nodes connected to an element
stk::mesh::Part * edgesPart_
bool operator()(stk::mesh::Entity a, stk::mesh::Entity b)
stk::mesh::EntityRank getElementRank() const
stk::mesh::Part * facesPart_
ProcIdFieldType * processorIdField_
void addElementBlock(const std::string &name, const CellTopologyData *ctData)
const std::vector< stk::mesh::EntityId > & getNodes() const
stk::mesh::Field< double > * getCellField(const std::string &fieldName, const std::string &blockId) const
const VectorFieldType & getCoordinatesField() const
stk::mesh::Part * getOwnedPart() const
Get a pointer to the locally owned part.
stk::mesh::EntityId getGID() const
bool getUseLowerCaseForIO() const
double getCurrentStateTime() const
void getNeighborElements(std::vector< stk::mesh::Entity > &elements) const
void getNodesetNames(std::vector< std::string > &name) const
Teuchos::RCP< const shards::CellTopology > getCellTopology(const std::string &eBlock) const
std::map< std::pair< std::string, std::string >, SolutionFieldType * > fieldNameToCellField_
std::map< std::string, stk::mesh::Part * > nodesets_
VectorFieldType * facesField_