11 #include <PanzerAdaptersSTK_config.hpp>
15 #include <Teuchos_RCPStdSharedPtrConversions.hpp>
19 #include <stk_mesh/base/FieldBase.hpp>
20 #include <stk_mesh/base/Comm.hpp>
21 #include <stk_mesh/base/Selector.hpp>
22 #include <stk_mesh/base/GetEntities.hpp>
23 #include <stk_mesh/base/GetBuckets.hpp>
24 #include <stk_mesh/base/MeshBuilder.hpp>
25 #include <stk_mesh/base/CreateAdjacentEntities.hpp>
32 #include <stk_util/parallel/ParallelReduce.hpp>
33 #include <stk_util/parallel/CommSparse.hpp>
35 #ifdef PANZER_HAVE_IOSS
36 #include <Ionit_Initializer.h>
37 #include <stk_io/IossBridge.hpp>
38 #include <stk_io/WriteMesh.hpp>
41 #ifdef PANZER_HAVE_PERCEPT
42 #include <percept/PerceptMesh.hpp>
43 #include <adapt/UniformRefinerPattern.hpp>
44 #include <adapt/UniformRefiner.hpp>
54 namespace panzer_stk {
58 : gid_(gid), nodes_(nodes) {}
77 : dimension_(0), initialized_(false), currentLocalId_(0), initialStateTime_(0.0), currentStateTime_(0.0), useFieldCoordinates_(false)
84 : dimension_(0), initialized_(false), currentLocalId_(0), initialStateTime_(0.0), currentStateTime_(0.0), useFieldCoordinates_(false)
91 : dimension_(dim), initialized_(false), currentLocalId_(0), useFieldCoordinates_(false)
93 std::vector<std::string> entity_rank_names = stk::mesh::entity_rank_names();
94 entity_rank_names.push_back(
"FAMILY_TREE");
107 stk::mesh::Part * sideset =
metaData_->get_part(name);
109 sideset = &
metaData_->declare_part_with_topology(name,
110 stk::mesh::get_topology(shards::CellTopology(ctData),
dimension_));
111 sidesets_.insert(std::make_pair(name,sideset));
119 stk::mesh::Part * nodeset =
metaData_->get_part(name);
120 if(nodeset==
nullptr) {
121 const CellTopologyData * ctData = shards::getCellTopologyData<shards::Node>();
122 nodeset = &
metaData_->declare_part_with_topology(name,
123 stk::mesh::get_topology(shards::CellTopology(ctData),
dimension_));
125 nodesets_.insert(std::make_pair(name,nodeset));
131 "Unknown element block \"" << blockId <<
"\"");
132 std::pair<std::string,std::string> key = std::make_pair(fieldName,blockId);
138 field = &
metaData_->declare_field<
double>(stk::topology::NODE_RANK, fieldName);
141 stk::mesh::put_field_on_mesh(*field,
metaData_->universal_part(),
nullptr);
150 "Unknown element block \"" << blockId <<
"\"");
151 std::pair<std::string,std::string> key = std::make_pair(fieldName,blockId);
157 field = &
metaData_->declare_field<
double>(stk::topology::ELEMENT_RANK, fieldName);
161 stk::mesh::put_field_on_mesh(*field,
metaData_->universal_part(),
nullptr);
170 "Unknown element block \"" << blockId <<
"\"");
171 std::pair<std::string,std::string> key = std::make_pair(fieldName,blockId);
177 field = &
metaData_->declare_field<
double>(stk::topology::EDGE_RANK, fieldName);
182 stk::mesh::put_field_on_mesh(*field,
metaData_->universal_part(),
nullptr);
191 "Unknown element block \"" << blockId <<
"\"");
192 std::pair<std::string,std::string> key = std::make_pair(fieldName,blockId);
198 field = &
metaData_->declare_field<
double>(stk::topology::FACE_RANK, fieldName);
203 stk::mesh::put_field_on_mesh(*field,
metaData_->universal_part(),
nullptr);
210 const std::vector<std::string> & coordNames,
211 const std::string & dispPrefix)
217 "Unknown element block \"" << blockId <<
"\"");
221 "STK_Interface::addMeshCoordFields: Can't set more than one set of coordinate "
222 "fields for element block \""+blockId+
"\".");
235 std::pair<std::string,std::string> key = std::make_pair(coordNames[i],blockId);
236 std::string dispName = dispPrefix+coordNames[i];
238 dispFields[i] = dispName;
246 field = &
metaData_->declare_field<
double>(stk::topology::NODE_RANK, dispName);
259 const bool buildRefinementSupport)
282 #ifdef PANZER_HAVE_IOSS
289 std::map<std::string, stk::mesh::Part*>::iterator itr;
291 if(!stk::io::is_part_io_part(*itr->second))
292 stk::io::put_io_part_attribute(*itr->second);
297 std::map<std::string, stk::mesh::Part*>::iterator itr;
299 if(!stk::io::is_part_edge_block_io_part(*itr->second))
300 stk::io::put_edge_block_io_part_attribute(*itr->second);
305 std::map<std::string, stk::mesh::Part*>::iterator itr;
307 if(!stk::io::is_part_face_block_io_part(*itr->second))
308 stk::io::put_face_block_io_part_attribute(*itr->second);
313 std::map<std::string, stk::mesh::Part*>::iterator itr;
315 if(!stk::io::is_part_io_part(*itr->second))
316 stk::io::put_io_part_attribute(*itr->second);
321 std::map<std::string, stk::mesh::Part*>::iterator itr;
323 if(!stk::io::is_part_io_part(*itr->second))
324 stk::io::put_io_part_attribute(*itr->second);
332 stk::io::set_field_output_type(*
coordinatesField_, stk::io::FieldOutputType::VECTOR_3D);
333 stk::io::set_field_role(*
edgesField_, Ioss::Field::MESH);
334 stk::io::set_field_output_type(*
edgesField_, stk::io::FieldOutputType::VECTOR_3D);
336 stk::io::set_field_role(*
facesField_, Ioss::Field::MESH);
337 stk::io::set_field_output_type(*
facesField_, stk::io::FieldOutputType::VECTOR_3D);
345 if (buildRefinementSupport) {
346 #ifdef PANZER_HAVE_PERCEPT
351 breakPattern_ =
Teuchos::rcp(
new percept::URP_Heterogeneous_3D(*refinedMesh_));
354 "ERROR: Uniform refinement requested. This requires the Percept package to be enabled in Trilinos!");
369 std::set<SolutionFieldType*> uniqueFields;
370 std::map<std::pair<std::string,std::string>,
SolutionFieldType*>::const_iterator fieldIter;
371 for(fieldIter=nameToField.begin();fieldIter!=nameToField.end();++fieldIter)
372 uniqueFields.insert(fieldIter->second);
375 std::set<SolutionFieldType*>::const_iterator uniqueFieldIter;
376 for(uniqueFieldIter=uniqueFields.begin();uniqueFieldIter!=uniqueFields.end();++uniqueFieldIter)
377 stk::mesh::put_field_on_mesh(*(*uniqueFieldIter),
metaData_->universal_part(),
nullptr);
380 #ifdef PANZER_HAVE_IOSS
383 std::set<SolutionFieldType*>::const_iterator uniqueFieldIter;
384 for(uniqueFieldIter=uniqueFields.begin();uniqueFieldIter!=uniqueFields.end();++uniqueFieldIter)
385 stk::io::set_field_role(*(*uniqueFieldIter), Ioss::Field::TRANSIENT);
396 std::unique_ptr<stk::mesh::BulkData> bulkUPtr = stk::mesh::MeshBuilder(*
mpiComm_->getRawMpiComm()).create(Teuchos::get_shared_ptr(
metaData_));
403 "STK_Interface: Must call \"initialized\" or \"instantiateBulkData\" before \"beginModification\"");
411 "STK_Interface: Must call \"initialized\" or \"instantiateBulkData\" before \"endModification\"");
418 stk::CommSparse comm(
bulkData_->parallel());
420 for (
int phase=0;phase<2;++phase) {
421 for (
int i=0;i<
bulkData_->parallel_size();++i) {
423 const stk::mesh::BucketVector& buckets =
bulkData_->buckets(stk::topology::NODE_RANK);
424 for (
size_t j=0;j<buckets.size();++j) {
425 const stk::mesh::Bucket& bucket = *buckets[j];
426 if ( bucket.owned() ) {
427 for (
size_t k=0;k<bucket.size();++k) {
428 stk::mesh::EntityKey key =
bulkData_->entity_key(bucket[k]);
429 comm.send_buffer(i).pack<stk::mesh::EntityKey>(key);
437 comm.allocate_buffers();
444 for (
int i=0;i<
bulkData_->parallel_size();++i) {
446 while(comm.recv_buffer(i).remaining()) {
447 stk::mesh::EntityKey key;
448 comm.recv_buffer(i).unpack<stk::mesh::EntityKey>(key);
449 stk::mesh::Entity node =
bulkData_->get_entity(key);
467 "STK_Interface::addNode: STK_Interface must be modifiable to add a node");
469 "STK_Interface::addNode: number of coordinates in vector must mation dimension");
471 "STK_Interface::addNode: STK has STUPID restriction of no zero GIDs, pick something else");
478 for(std::size_t i=0;i<coord.size();++i)
479 fieldCoords[i] = coord[i];
484 std::vector<stk::mesh::Part*> sidesetV;
485 sidesetV.push_back(sideset);
487 bulkData_->change_entity_parts(entity,sidesetV);
492 std::vector<stk::mesh::Part*> nodesetV;
493 nodesetV.push_back(nodeset);
495 bulkData_->change_entity_parts(entity,nodesetV);
500 std::vector<stk::mesh::Part*> edgeblockV;
501 edgeblockV.push_back(edgeblock);
503 bulkData_->change_entity_parts(entity,edgeblockV);
507 if (entities.size() > 0) {
508 std::vector<stk::mesh::Part*> edgeblockV;
509 edgeblockV.push_back(edgeblock);
511 bulkData_->change_entity_parts(entities,edgeblockV);
517 std::vector<stk::mesh::Part*> faceblockV;
518 faceblockV.push_back(faceblock);
520 bulkData_->change_entity_parts(entity,faceblockV);
524 if (entities.size() > 0) {
525 std::vector<stk::mesh::Part*> faceblockV;
526 faceblockV.push_back(faceblock);
528 bulkData_->change_entity_parts(entities,faceblockV);
534 std::vector<stk::mesh::Part*> blockVec;
535 blockVec.push_back(block);
539 stk::mesh::Entity element =
bulkData_->declare_entity(elementRank,ed->getGID(),blockVec);
542 const std::vector<stk::mesh::EntityId> & nodes = ed->getNodes();
543 for(std::size_t i=0;i<nodes.size();++i) {
545 stk::mesh::Entity node =
bulkData_->get_entity(nodeRank,nodes[i]);
547 bulkData_->declare_relation(element,node,i);
551 procId[0] = Teuchos::as<ProcIdData>(
procRank_);
559 std::vector<stk::mesh::Entity> localElmts;
561 std::vector<stk::mesh::Entity>::const_iterator itr;
562 for(itr=localElmts.begin();itr!=localElmts.end();++itr) {
563 stk::mesh::Entity element = (*itr);
564 stk::mesh::EntityId gid =
bulkData_->identifier(element);
565 std::vector<stk::mesh::EntityId> subcellIds;
568 for(std::size_t i=0;i<subcellIds.size();++i) {
569 stk::mesh::Entity edge =
bulkData_->get_entity(edgeRank,subcellIds[i]);
570 stk::mesh::Entity
const* relations =
bulkData_->begin_nodes(edge);
576 double * edgeCoords = stk::mesh::field_data(*
edgesField_,edge);
578 edgeCoords[j] = (node_coord_1[j]+node_coord_2[j])/2.0;
587 std::vector<stk::mesh::Entity> localElmts;
589 std::vector<stk::mesh::Entity>::const_iterator itr;
590 for(itr=localElmts.begin();itr!=localElmts.end();++itr) {
591 stk::mesh::Entity element = (*itr);
593 std::vector<stk::mesh::EntityId> subcellIds;
596 for(std::size_t i=0;i<subcellIds.size();++i) {
597 stk::mesh::Entity face =
bulkData_->get_entity(faceRank,subcellIds[i]);
598 stk::mesh::Entity
const* relations =
bulkData_->begin_nodes(face);
599 const size_t num_relations =
bulkData_->num_nodes(face);
602 double * faceCoords = stk::mesh::field_data(*
facesField_,face);
605 for(std::size_t k=0;k<num_relations;++k)
607 faceCoords[j] /= double(num_relations);
615 const size_t num_rels =
bulkData_->num_connectivity(src, tgt_rank);
616 stk::mesh::Entity
const* relations =
bulkData_->begin(src, tgt_rank);
617 stk::mesh::ConnectivityOrdinal
const* ordinals =
bulkData_->begin_ordinals(src, tgt_rank);
618 for (
size_t i = 0; i < num_rels; ++i) {
619 if (ordinals[i] == static_cast<stk::mesh::ConnectivityOrdinal>(rel_id)) {
624 return stk::mesh::Entity();
650 const bool append_after_restart_time,
651 const double restart_time)
653 std::vector<Ioss::Property> ioss_properties;
657 append_after_restart_time,
664 const std::vector<Ioss::Property>& ioss_properties,
666 const bool append_after_restart_time,
667 const double restart_time)
669 using std::runtime_error;
670 using stk::io::StkMeshIoBroker;
671 using stk::mesh::FieldVector;
672 using stk::ParallelMachine;
674 PANZER_FUNC_TIME_MONITOR(
"STK_Interface::setupExodusFile(filename)");
675 #ifdef PANZER_HAVE_IOSS
678 ParallelMachine comm = *
mpiComm_->getRawMpiComm();
679 meshData_ =
rcp(
new StkMeshIoBroker(comm));
680 meshData_->set_bulk_data(Teuchos::get_shared_ptr(
bulkData_));
681 Ioss::PropertyManager props;
682 props.add(Ioss::Property(
"LOWER_CASE_VARIABLE_NAMES",
"FALSE"));
683 for (
const auto& p : ioss_properties ) {
687 if (append_after_restart_time) {
688 meshIndex_ = meshData_->create_output_mesh(filename, stk::io::APPEND_RESULTS,
689 props, restart_time);
692 meshIndex_ = meshData_->create_output_mesh(filename, stk::io::APPEND_RESULTS, props);
695 meshIndex_ = meshData_->create_output_mesh(filename, stk::io::WRITE_RESULTS, props);
696 const FieldVector& fields =
metaData_->get_fields();
697 for (
size_t i(0); i < fields.size(); ++i) {
703 auto role = stk::io::get_field_role(*fields[i]);
704 if (role !=
nullptr) {
705 if (*role != Ioss::Field::MESH)
706 meshData_->add_field(meshIndex_, *fields[i]);
708 meshData_->add_field(meshIndex_, *fields[i]);
714 meshData_->add_info_records(meshIndex_, deduped_info_records);
733 using Teuchos::rcpFromRef;
734 PANZER_FUNC_TIME_MONITOR(
"STK_Interface::writeToExodus(timestep)");
735 #ifdef PANZER_HAVE_IOSS
736 if (not meshData_.is_null())
739 globalToExodus(GlobalVariable::ADD);
741 meshData_->write_defined_output_fields(meshIndex_);
742 globalToExodus(GlobalVariable::WRITE);
743 meshData_->end_output_step(meshIndex_);
748 out.setOutputToRootOnly(0);
749 out <<
"WARNING: Exodus I/O has been disabled or not setup properly; "
750 <<
"not writing to Exodus." << endl;
765 const GlobalVariable& flag)
767 using std::invalid_argument;
774 for (
auto i = globalData_.begin(); i != globalData_.end(); ++i)
776 const string& name = globalData_.name(i);
779 if (globalData_.isType<
int>(name))
781 const auto& value = globalData_.get<
int>(name);
782 if (flag == GlobalVariable::ADD)
786 meshData_->add_global(meshIndex_, name, value,
787 stk::util::ParameterType::INTEGER);
795 meshData_->write_global(meshIndex_, name, value,
796 stk::util::ParameterType::INTEGER);
800 else if (globalData_.isType<
double>(name))
802 const auto& value = globalData_.get<
double>(name);
803 if (flag == GlobalVariable::ADD)
807 meshData_->add_global(meshIndex_, name, value,
808 stk::util::ParameterType::DOUBLE);
816 meshData_->write_global(meshIndex_, name, value,
817 stk::util::ParameterType::DOUBLE);
821 else if (globalData_.isType<Array<int>>(name))
823 const auto& value = globalData_.get<Array<int>>(name).toVector();
824 if (flag == GlobalVariable::ADD)
828 meshData_->add_global(meshIndex_, name, value,
829 stk::util::ParameterType::INTEGERVECTOR);
837 meshData_->write_global(meshIndex_, name, value,
838 stk::util::ParameterType::INTEGERVECTOR);
842 else if (globalData_.isType<Array<double>>(name))
844 const auto& value = globalData_.get<Array<double>>(name).toVector();
845 if (flag == GlobalVariable::ADD)
849 meshData_->add_global(meshIndex_, name, value,
850 stk::util::ParameterType::DOUBLEVECTOR);
858 meshData_->write_global(meshIndex_, name, value,
859 stk::util::ParameterType::DOUBLEVECTOR);
865 "STK_Interface::globalToExodus(): The global variable to be added " \
866 "to the Exodus output file is of an invalid type. Valid types are " \
867 "int and double, along with std::vectors of those types.")
879 const std::string& key,
882 globalData_.set(key, value);
893 const std::string& key,
896 globalData_.set(key, value);
907 const std::string& key,
908 const std::vector<int>& value)
911 globalData_.set(key, Array<int>(value));
922 const std::string& key,
923 const std::vector<double>& value)
926 globalData_.set(key, Array<double>(value));
931 #ifdef PANZER_HAVE_IOSS
943 stk::mesh::Entity node =
bulkData_->get_entity(nodeRank,nodeId);
944 const size_t numElements =
bulkData_->num_elements(node);
945 stk::mesh::Entity
const* relations =
bulkData_->begin_elements(node);
948 elements.insert(elements.end(), relations, relations + numElements);
952 std::vector<int> & relIds)
const
955 const size_t numElements =
bulkData_->num_elements(node);
956 stk::mesh::Entity
const* relations =
bulkData_->begin_elements(node);
957 stk::mesh::ConnectivityOrdinal
const* rel_ids =
bulkData_->begin_element_ordinals(node);
960 for (
size_t i = 0; i < numElements; ++i) {
961 stk::mesh::Entity element = relations[i];
965 elements.push_back(element);
966 relIds.push_back(rel_ids[i]);
972 std::vector<int> & relIds,
unsigned int matchType)
const
974 stk::mesh::EntityRank rank;
977 else if(matchType == 1)
979 else if(matchType == 2)
984 stk::mesh::Entity node =
bulkData_->get_entity(rank,nodeId);
991 std::vector<stk::mesh::Entity> current;
994 std::sort(current.begin(),current.end());
997 for(std::size_t n=1;n<nodeIds.size();++n) {
999 std::vector<stk::mesh::Entity> nextNode;
1001 std::sort(nextNode.begin(),nextNode.end());
1004 std::vector<stk::mesh::Entity> intersection(std::min(nextNode.size(),current.size()));
1005 std::vector<stk::mesh::Entity>::const_iterator endItr
1006 = std::set_intersection(current.begin(),current.end(),
1007 nextNode.begin(),nextNode.end(),
1008 intersection.begin());
1009 std::size_t newLength = endItr-intersection.begin();
1010 intersection.resize(newLength);
1014 current = intersection;
1023 stk::mesh::Entity
const* nodeRel =
getBulkData()->begin_nodes(element);
1024 const size_t numNodes =
getBulkData()->num_nodes(element);
1026 nodeIds.reserve(numNodes);
1027 for(
size_t i = 0; i < numNodes; ++i) {
1042 const auto entityRankCount =
metaData_->entity_rank_count();
1043 const size_t commCount = 10;
1048 stk::ParallelMachine mach = *
mpiComm_->getRawMpiComm();
1050 std::vector<stk::mesh::EntityId> local(commCount,0);
1053 stk::mesh::Selector ownedPart =
metaData_->locally_owned_part();
1054 for(stk::mesh::EntityRank i=stk::topology::NODE_RANK;
1055 i < static_cast<stk::mesh::EntityRank>(entityRankCount); ++i) {
1056 std::vector<stk::mesh::Entity> entities;
1058 stk::mesh::get_selected_entities(ownedPart,
bulkData_->buckets(i),entities);
1061 std::vector<stk::mesh::Entity>::const_iterator itr;
1062 for(itr=entities.begin();itr!=entities.end();++itr) {
1063 stk::mesh::EntityId
id =
bulkData_->identifier(*itr);
1070 stk::all_reduce(mach,stk::ReduceMax<10>(&local[0]));
1071 maxEntityId_.assign(local.begin(),local.begin()+entityRankCount+1);
1077 "STK_Interface::getEntityCounts: Entity counts do not include rank: " << entityRank);
1085 "STK_Interface::getMaxEntityId: Max entity ids do not include rank: " << entityRank);
1092 stk::mesh::PartVector emptyPartVector;
1093 stk::mesh::create_adjacent_entities(*
bulkData_,emptyPartVector);
1115 std::vector<stk::mesh::EntityId> & subcellIds)
const
1118 stk::mesh::Entity cell =
bulkData_->get_entity(elementRank,elementId);
1121 "STK_Interface::getSubcellIndices: could not find element requested (GID = " << elementId <<
")");
1123 const size_t numSubcells =
bulkData_->num_connectivity(cell, static_cast<stk::mesh::EntityRank>(entityRank));
1124 stk::mesh::Entity
const* subcells =
bulkData_->begin(cell, static_cast<stk::mesh::EntityRank>(entityRank));
1126 subcellIds.resize(numSubcells,0);
1129 for(
size_t i = 0; i < numSubcells; ++i) {
1130 stk::mesh::Entity subcell = subcells[i];
1131 subcellIds[i] =
bulkData_->identifier(subcell);
1138 stk::mesh::Selector ownedPart =
metaData_->locally_owned_part();
1142 stk::mesh::get_selected_entities(ownedPart,
bulkData_->buckets(elementRank),elements);
1153 stk::mesh::Selector ownedBlock =
metaData_->locally_owned_part() & (*elementBlock);
1157 stk::mesh::get_selected_entities(ownedBlock,
bulkData_->buckets(elementRank),elements);
1163 stk::mesh::Selector neighborBlock = (!
metaData_->locally_owned_part());
1167 stk::mesh::get_selected_entities(neighborBlock,
bulkData_->buckets(elementRank),elements);
1177 stk::mesh::Selector neighborBlock = (!
metaData_->locally_owned_part()) & (*elementBlock);
1181 stk::mesh::get_selected_entities(neighborBlock,
bulkData_->buckets(elementRank),elements);
1187 stk::mesh::Selector ownedPart =
metaData_->locally_owned_part();
1195 stk::mesh::Part * edgeBlockPart =
getEdgeBlock(edgeBlockName);
1197 "Unknown edge block \"" << edgeBlockName <<
"\"");
1199 stk::mesh::Selector edge_block = *edgeBlockPart;
1200 stk::mesh::Selector owned_block =
metaData_->locally_owned_part() & edge_block;
1206 void STK_Interface::getMyEdges(
const std::string & edgeBlockName,
const std::string & blockName,std::vector<stk::mesh::Entity> & edges)
const
1208 stk::mesh::Part * edgeBlockPart =
getEdgeBlock(edgeBlockName);
1211 "Unknown edge block \"" << edgeBlockName <<
"\"");
1213 "Unknown element block \"" << blockName <<
"\"");
1215 stk::mesh::Selector edge_block = *edgeBlockPart;
1216 stk::mesh::Selector element_block = *elmtPart;
1217 stk::mesh::Selector owned_block =
metaData_->locally_owned_part() & element_block & edge_block;
1225 stk::mesh::Part * edgeBlockPart =
getEdgeBlock(edgeBlockName);
1227 "Unknown edge block \"" << edgeBlockName <<
"\"");
1229 stk::mesh::Selector edge_block = *edgeBlockPart;
1237 stk::mesh::Part * edgeBlockPart =
getEdgeBlock(edgeBlockName);
1240 "Unknown edge block \"" << edgeBlockName <<
"\"");
1242 "Unknown element block \"" << blockName <<
"\"");
1244 stk::mesh::Selector edge_block = *edgeBlockPart;
1245 stk::mesh::Selector element_block = *elmtPart;
1246 stk::mesh::Selector element_edge_block = element_block & edge_block;
1255 stk::mesh::Selector ownedPart =
metaData_->locally_owned_part();
1259 stk::mesh::get_selected_entities(ownedPart,
bulkData_->buckets(faceRank),faces);
1264 stk::mesh::Part * faceBlockPart =
getFaceBlock(faceBlockName);
1266 "Unknown face block \"" << faceBlockName <<
"\"");
1268 stk::mesh::Selector face_block = *faceBlockPart;
1269 stk::mesh::Selector owned_block =
metaData_->locally_owned_part() & face_block;
1275 void STK_Interface::getMyFaces(
const std::string & faceBlockName,
const std::string & blockName,std::vector<stk::mesh::Entity> & faces)
const
1277 stk::mesh::Part * faceBlockPart =
getFaceBlock(faceBlockName);
1280 "Unknown face block \"" << faceBlockName <<
"\"");
1282 "Unknown element block \"" << blockName <<
"\"");
1284 stk::mesh::Selector face_block = *faceBlockPart;
1285 stk::mesh::Selector element_block = *elmtPart;
1286 stk::mesh::Selector owned_block =
metaData_->locally_owned_part() & element_block & face_block;
1294 stk::mesh::Part * faceBlockPart =
getFaceBlock(faceBlockName);
1296 "Unknown face block \"" << faceBlockName <<
"\"");
1298 stk::mesh::Selector face_block = *faceBlockPart;
1306 stk::mesh::Part * faceBlockPart =
getFaceBlock(faceBlockName);
1309 "Unknown face block \"" << faceBlockName <<
"\"");
1311 "Unknown element block \"" << blockName <<
"\"");
1313 stk::mesh::Selector face_block = *faceBlockPart;
1314 stk::mesh::Selector element_block = *elmtPart;
1315 stk::mesh::Selector element_face_block = element_block & face_block;
1323 stk::mesh::Part * sidePart =
getSideset(sideName);
1325 "Unknown side set \"" << sideName <<
"\"");
1327 stk::mesh::Selector side = *sidePart;
1328 stk::mesh::Selector ownedBlock =
metaData_->locally_owned_part() & side;
1336 stk::mesh::Part * sidePart =
getSideset(sideName);
1339 "Unknown side set \"" << sideName <<
"\"");
1341 "Unknown element block \"" << blockName <<
"\"");
1343 stk::mesh::Selector side = *sidePart;
1344 stk::mesh::Selector block = *elmtPart;
1345 stk::mesh::Selector ownedBlock =
metaData_->locally_owned_part() & block & side;
1353 stk::mesh::Part * sidePart =
getSideset(sideName);
1355 "Unknown side set \"" << sideName <<
"\"");
1357 stk::mesh::Selector side = *sidePart;
1365 stk::mesh::Part * sidePart =
getSideset(sideName);
1368 "Unknown side set \"" << sideName <<
"\"");
1370 "Unknown element block \"" << blockName <<
"\"");
1372 stk::mesh::Selector side = *sidePart;
1373 stk::mesh::Selector block = *elmtPart;
1374 stk::mesh::Selector sideBlock = block & side;
1382 stk::mesh::Part * nodePart =
getNodeset(nodesetName);
1385 "Unknown node set \"" << nodesetName <<
"\"");
1387 "Unknown element block \"" << blockName <<
"\"");
1389 stk::mesh::Selector nodeset = *nodePart;
1390 stk::mesh::Selector block = *elmtPart;
1391 stk::mesh::Selector ownedBlock =
metaData_->locally_owned_part() & block & nodeset;
1404 std::map<std::string, stk::mesh::Part*>::const_iterator blkItr;
1406 names.push_back(blkItr->first);
1416 std::map<std::string, stk::mesh::Part*>::const_iterator sideItr;
1418 names.push_back(sideItr->first);
1426 std::map<std::string, stk::mesh::Part*>::const_iterator nodeItr;
1428 names.push_back(nodeItr->first);
1436 std::map<std::string, stk::mesh::Part*>::const_iterator edgeBlockItr;
1438 names.push_back(edgeBlockItr->first);
1446 std::map<std::string, stk::mesh::Part*>::const_iterator faceBlockItr;
1448 names.push_back(faceBlockItr->first);
1464 std::unordered_map<stk::mesh::EntityId,std::size_t>::const_iterator itr =
localIDHash_.find(gid);
1476 std::unordered_map<stk::mesh::EntityId,std::size_t>::const_iterator itr =
localEdgeIDHash_.find(gid);
1490 std::unordered_map<stk::mesh::EntityId,std::size_t>::const_iterator itr =
localEdgeIDHash_.find(gid);
1502 std::unordered_map<stk::mesh::EntityId,std::size_t>::const_iterator itr =
localFaceIDHash_.find(gid);
1516 std::unordered_map<stk::mesh::EntityId,std::size_t>::const_iterator itr =
localFaceIDHash_.find(gid);
1525 if(
bulkData_->bucket(elmt).member(*(eb_pair.second)))
1526 return eb_pair.first;
1531 const std::string & blockId)
const
1534 std::map<std::pair<std::string,std::string>,
SolutionFieldType*>::const_iterator
1539 "Solution field name \"" << fieldName <<
"\" in block ID \"" << blockId <<
"\" was not found");
1541 return iter->second;
1545 const std::string & blockId)
const
1548 std::map<std::pair<std::string,std::string>,
SolutionFieldType*>::const_iterator
1553 "Cell field named \"" << fieldName <<
"\" in block ID \"" << blockId <<
"\" was not found");
1555 return iter->second;
1559 const std::string & blockId)
const
1562 std::map<std::pair<std::string,std::string>,
SolutionFieldType*>::const_iterator
1567 "Edge field named \"" << fieldName <<
"\" in block ID \"" << blockId <<
"\" was not found");
1569 return iter->second;
1573 const std::string & blockId)
const
1576 std::map<std::pair<std::string,std::string>,
SolutionFieldType*>::const_iterator
1581 "Face field named \"" << fieldName <<
"\" in block ID \"" << blockId <<
"\" was not found");
1583 return iter->second;
1603 stk::mesh::Part * block =
metaData_->get_part(name);
1605 block = &
metaData_->declare_part_with_topology(name, stk::mesh::get_topology(shards::CellTopology(ctData),
dimension_));
1631 const std::string & edgeBlockName,
1632 const stk::topology & topology)
1636 stk::mesh::Part * edge_block =
metaData_->get_part(edgeBlockName);
1638 edge_block = &
metaData_->declare_part_with_topology(edgeBlockName, topology);
1644 stk::mesh::Part * elem_block =
metaData_->get_part(elemBlockName);
1645 metaData_->declare_part_subset(*elem_block, *edge_block);
1648 edgeBlocks_.insert(std::make_pair(edgeBlockName,edge_block));
1652 const std::string & edgeBlockName,
1653 const CellTopologyData * ctData)
1659 stk::mesh::get_topology(shards::CellTopology(ctData),
dimension_));
1676 const std::string & faceBlockName,
1677 const stk::topology & topology)
1681 stk::mesh::Part * face_block =
metaData_->get_part(faceBlockName);
1683 face_block = &
metaData_->declare_part_with_topology(faceBlockName, topology);
1689 stk::mesh::Part * elem_block =
metaData_->get_part(elemBlockName);
1690 metaData_->declare_part_subset(*elem_block, *face_block);
1693 faceBlocks_.insert(std::make_pair(faceBlockName,face_block));
1697 const std::string & faceBlockName,
1698 const CellTopologyData * ctData)
1704 stk::mesh::get_topology(shards::CellTopology(ctData),
dimension_));
1738 std::vector<stk::mesh::Entity> elements;
1741 for(std::size_t index=0;index<elements.size();++index) {
1742 stk::mesh::Entity element = elements[index];
1746 procId[0] = Teuchos::as<ProcIdData>(
procRank_);
1759 for(std::size_t index=0;index<elements.size();++index) {
1760 stk::mesh::Entity element = elements[index];
1764 procId[0] = Teuchos::as<ProcIdData>(
procRank_);
1776 std::vector<std::string> names;
1779 for(std::size_t b=0;b<names.size();b++) {
1781 std::map<std::string,double>::const_iterator bw_itr =
blockWeights_.find(names[b]);
1782 double blockWeight = (bw_itr!=
blockWeights_.end()) ? bw_itr->second : 1.0;
1784 std::vector<stk::mesh::Entity> elements;
1787 for(std::size_t index=0;index<elements.size();++index) {
1789 double * loadBal = stk::mesh::field_data(*
loadBalField_,elements[index]);
1790 loadBal[0] = blockWeight;
1802 std::vector<stk::mesh::Entity> edges;
1805 for(std::size_t index=0;index<edges.size();++index) {
1806 stk::mesh::Entity edge = edges[index];
1822 std::vector<stk::mesh::Entity> faces;
1825 for(std::size_t index=0;index<faces.size();++index) {
1826 stk::mesh::Entity face = faces[index];
1837 const std::string & fieldName,
1840 std::map<std::string,std::vector<std::string> >::const_iterator blkItr =
meshCoordFields_.find(eBlock);
1846 for(axis=0;axis<Teuchos::as<int>(blkItr->second.size());axis++) {
1847 if(blkItr->second[axis]==fieldName)
1851 if(axis>=Teuchos::as<int>(blkItr->second.size()))
1862 const std::vector<Teuchos::RCP<const PeriodicBC_MatcherBase> > & matchers =
getPeriodicBCVector();
1864 std::vector<std::vector<std::string> > matchedSides(3);
1867 for(std::size_t m=0;m<matchers.size();m++){
1869 if(matchers[m]->getType() ==
"coord")
1871 else if(matchers[m]->getType() ==
"edge")
1873 else if(matchers[m]->getType() ==
"face")
1877 #ifdef PANZER_HAVE_STKSEARCH
1879 if (useBBoxSearch) {
1880 vec = matchers[m]->getMatchedPair(*
this,matchedSides[type],vec);
1882 vec = matchers[m]->getMatchedPair(*
this,vec);
1886 "panzer::STK_Interface::getPeriodicNodePairing(): Requested bounding box search, but "
1887 "did not compile with STK_SEARCH enabled.");
1888 vec = matchers[m]->getMatchedPair(*
this,vec);
1890 type_vec->insert(type_vec->begin(),vec->size()-type_vec->size(),type);
1891 matchedSides[type].push_back(matchers[m]->getLeftSidesetName());
1894 return std::make_pair(vec,type_vec);
1899 std::map<std::string, stk::mesh::Part*>::const_iterator blkItr =
elementBlocks_.find(blockId);
1906 std::vector<std::string> blockNames, sidesetNames, nodesetNames;
1912 os <<
"STK Mesh data:\n";
1915 os <<
" Entity counts (Nodes, Edges, Cells) = ( "
1920 os <<
" Entity counts (Nodes, Edges, Faces, Cells) = ( "
1926 os <<
" Entity counts (Nodes, Cells) = ( "
1930 os <<
" Element blocks = ";
1931 for(std::size_t i=0;i<blockNames.size();i++)
1932 os <<
"\"" << blockNames[i] <<
"\" ";
1934 os <<
" Sidesets = ";
1935 for(std::size_t i=0;i<sidesetNames.size();i++)
1936 os <<
"\"" << sidesetNames[i] <<
"\" ";
1938 os <<
" Nodesets = ";
1939 for(std::size_t i=0;i<nodesetNames.size();i++)
1940 os <<
"\"" << nodesetNames[i] <<
"\" ";
1944 const std::vector<Teuchos::RCP<const PeriodicBC_MatcherBase> > & bcVector
1946 if(bcVector.size()!=0) {
1947 os <<
" Periodic BCs:\n";
1948 for(std::size_t i=0;i<bcVector.size();i++)
1949 os <<
" " << bcVector[i]->getString() <<
"\n";
1956 std::vector<std::string> blockNames, sidesetNames, nodesetNames;
1962 os <<
"STK Meta data:\n";
1963 os <<
" Element blocks = ";
1964 for(std::size_t i=0;i<blockNames.size();i++)
1965 os <<
"\"" << blockNames[i] <<
"\" ";
1967 os <<
" Sidesets = ";
1968 for(std::size_t i=0;i<sidesetNames.size();i++)
1969 os <<
"\"" << sidesetNames[i] <<
"\" ";
1971 os <<
" Nodesets = ";
1972 for(std::size_t i=0;i<nodesetNames.size();i++)
1973 os <<
"\"" << nodesetNames[i] <<
"\" ";
1977 const std::vector<Teuchos::RCP<const PeriodicBC_MatcherBase> > & bcVector
1979 if(bcVector.size()!=0) {
1980 os <<
" Periodic BCs:\n";
1981 for(std::size_t i=0;i<bcVector.size();i++)
1982 os <<
" " << bcVector[i]->getString() <<
"\n";
1988 const stk::mesh::FieldVector & fv =
metaData_->get_fields();
1989 for(std::size_t i=0;i<fv.size();i++)
1990 os <<
"\"" << fv[i]->name() <<
"\" ";
1996 std::map<std::string, Teuchos::RCP<shards::CellTopology> >::const_iterator itr;
2000 std::stringstream ss;
2003 "STK_Interface::getCellTopology: No such element block \"" +eBlock +
"\" available.\n\n"
2004 <<
"STK Meta Data follows: \n" << ss.str());
2013 const int err = MPI_Comm_dup (parallelMach, &newComm);
2015 "panzer::STK_Interface: MPI_Comm_dup failed with error \""
2016 << Teuchos::mpiErrorCodeToString (err) <<
"\".");
2028 stk::mesh::Selector selector(
getMetaData()->universal_part());
2029 stk::mesh::Selector owned_selector(
getMetaData()->locally_owned_part());
2037 if(params.begin()!=params.end())
2038 graph.
sublist(stk::rebalance::Zoltan::default_parameters_name()) = params;
2057 #ifdef PANZER_HAVE_PERCEPT
2059 "ERROR: Number of levels for uniform refinement must be greater than 0");
2063 refinedMesh_->setCoordinatesField();
2065 percept::UniformRefiner breaker(*refinedMesh_,*breakPattern_);
2066 breaker.setRemoveOldElements(deleteParentElements);
2068 for (
int i=0; i < numberOfLevels; ++i)
2073 "ERROR: Uniform refinement requested. This requires the Percept package to be enabled in Trilinos!");
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
RCP< const T > getConst() const
std::pair< Teuchos::RCP< std::vector< std::pair< std::size_t, std::size_t > > >, Teuchos::RCP< std::vector< unsigned int > > > getPeriodicNodePairing() const
const bool & useBoundingBoxSearch() const
Teuchos::RCP< std::vector< stk::mesh::Entity > > orderedEdgeVector_
void addNodeset(const std::string &name)
Teuchos::RCP< stk::mesh::BulkData > bulkData_
void getFaceBlockNames(std::vector< std::string > &names) const
void print(std::ostream &os) const
void getMyEdges(std::vector< stk::mesh::Entity > &edges) const
Teuchos::RCP< const std::vector< stk::mesh::Entity > > getElementsOrderedByLID() const
std::vector< stk::mesh::Part * > facesPartVec_
std::map< std::pair< std::string, std::string >, SolutionFieldType * > fieldNameToSolution_
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 getElementBlockNames(std::vector< std::string > &names) const
void getSubcellIndices(unsigned entityRank, stk::mesh::EntityId elementId, std::vector< stk::mesh::EntityId > &subcellIds) const
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 part
std::vector< stk::mesh::Part * > edgesPartVec_
bool isFaceLocal(stk::mesh::Entity face) const
std::map< std::string, double > blockWeights_
Teuchos::RCP< const std::vector< stk::mesh::Entity > > getEdgesOrderedByLID() const
VectorFieldType * coordinatesField_
basic_FancyOStream< char > FancyOStream
#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 addEntityToSideset(stk::mesh::Entity entity, stk::mesh::Part *sideset)
std::map< std::string, stk::mesh::Part * > faceBlocks_
stk::mesh::Part * nodesPart_
void addSolutionField(const std::string &fieldName, const std::string &blockId)
std::map< std::string, Teuchos::RCP< shards::CellTopology > > elementBlockCT_
void addEntityToFaceBlock(stk::mesh::Entity entity, stk::mesh::Part *faceblock)
stk::mesh::EntityId getMaxEntityId(unsigned entityRank) const
get max entity ID of type entityRank
std::size_t currentLocalId_
std::map< std::pair< std::string, std::string >, SolutionFieldType * > fieldNameToFaceField_
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 getEdgeBlockNames(std::vector< std::string > &names) const
stk::mesh::Part * getFaceBlock(const std::string &name) const
get the block part
void addInformationRecords(const std::vector< std::string > &info_records)
void getAllFaces(const std::string &faceBlockName, std::vector< stk::mesh::Entity > &faces) const
stk::mesh::Field< double > * getSolutionField(const std::string &fieldName, const std::string &blockId) const
SolutionFieldType * loadBalField_
void addEdgeBlock(const std::string &elemBlockName, const std::string &edgeBlockName, const stk::topology &topology)
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)
std::set< std::string > informationRecords_
void getMySides(const std::string &sideName, std::vector< stk::mesh::Entity > &sides) const
stk::mesh::Field< double > * getEdgeField(const std::string &fieldName, const std::string &blockId) const
std::size_t elementLocalId(stk::mesh::Entity elmt) 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_
void setupExodusFile(const std::string &filename, const bool append=false, const bool append_after_restart_time=false, const double restart_time=0.0)
Set up an output Exodus file for writing results.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
VectorFieldType * edgesField_
stk::mesh::EntityRank getSideRank() const
void getAllEdges(const std::string &edgeBlockName, std::vector< stk::mesh::Entity > &edges) const
void initialize(stk::ParallelMachine parallelMach, bool setupIO=true, const bool buildRefinementSupport=false)
static const std::string coordsString
Teuchos::RCP< stk::mesh::BulkData > getBulkData() const
std::map< std::string, stk::mesh::Part * > edgeBlocks_
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 edgeBlockString
static const std::string edgesString
basic_FancyOStream & setOutputToRootOnly(const int rootRank)
std::string containingBlockId(stk::mesh::Entity elmt) const
stk::mesh::EntityRank getFaceRank() const
std::size_t edgeLocalId(stk::mesh::Entity elmt) const
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 addEntitiesToEdgeBlock(std::vector< stk::mesh::Entity > entities, stk::mesh::Part *edgeblock)
void buildSubcells()
force the mesh to build subcells: edges and faces
Teuchos::RCP< Teuchos::MpiComm< int > > mpiComm_
Teuchos::RCP< stk::mesh::MetaData > metaData_
Teuchos::RCP< stk::mesh::MetaData > getMetaData() const
virtual ~ElementDescriptor()
Teuchos::RCP< std::vector< stk::mesh::Entity > > orderedElementVector_
bool isInitialized() const
Has initialize been called on this mesh object?
void writeToExodus(const std::string &filename, const bool append=false)
Write this mesh and associated fields to the given output file.
void getMyNodes(const std::string &sideName, const std::string &blockName, std::vector< stk::mesh::Entity > &nodes) const
bool nonnull(const boost::shared_ptr< T > &p)
void addEdgeField(const std::string &fieldName, const std::string &blockId)
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
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)
static const std::string faceBlockString
std::unordered_map< stk::mesh::EntityId, std::size_t > localFaceIDHash_
void addEntityToEdgeBlock(stk::mesh::Entity entity, stk::mesh::Part *edgeblock)
std::map< std::pair< std::string, std::string >, SolutionFieldType * > fieldNameToEdgeField_
stk::mesh::Part * getEdgeBlock(const std::string &name) const
get the block part
std::unordered_map< stk::mesh::EntityId, std::size_t > localEdgeIDHash_
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 addEntitiesToFaceBlock(std::vector< stk::mesh::Entity > entities, stk::mesh::Part *faceblock)
Teuchos::RCP< const Teuchos::Comm< int > > getComm() const
get the comm associated with this mesh
void initializeFieldsInSTK(const std::map< std::pair< std::string, std::string >, SolutionFieldType * > &nameToField, bool setupIO)
const std::vector< Teuchos::RCP< const PeriodicBC_MatcherBase > > & getPeriodicBCVector() const
void refineMesh(const int numberOfLevels, const bool deleteParentElements)
stk::mesh::Field< double > * getFaceField(const std::string &fieldName, const std::string &blockId) const
void buildLocalElementIDs()
std::size_t faceLocalId(stk::mesh::Entity elmt) const
bool isModifiable() const
void addFaceBlock(const std::string &elemBlockName, const std::string &faceBlockName, const stk::topology &topology)
Teuchos::RCP< std::vector< stk::mesh::Entity > > orderedFaceVector_
std::unordered_map< stk::mesh::EntityId, std::size_t > localIDHash_
ParameterList & sublist(const std::string &name, bool mustAlreadyExist=false, const std::string &docString="")
std::vector< stk::mesh::EntityId > maxEntityId_
void getElementsSharingNode(stk::mesh::EntityId nodeId, std::vector< stk::mesh::Entity > &elements) const
get a set of elements sharing a single node
void addFaceField(const std::string &fieldName, const std::string &blockId)
void getMyElements(std::vector< stk::mesh::Entity > &elements) const
#define TEUCHOS_ASSERT(assertion_test)
stk::mesh::EntityRank getNodeRank() const
void getMyFaces(std::vector< stk::mesh::Entity > &faces) 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
Teuchos::RCP< const std::vector< stk::mesh::Entity > > getFacesOrderedByLID() const
stk::mesh::Part * edgesPart_
stk::mesh::EntityRank getElementRank() const
stk::mesh::Part * facesPart_
ProcIdFieldType * processorIdField_
void addElementBlock(const std::string &name, const CellTopologyData *ctData)
stk::mesh::Field< double > * getCellField(const std::string &fieldName, const std::string &blockId) const
const VectorFieldType & getCoordinatesField() const
bool isEdgeLocal(stk::mesh::Entity edge) 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_