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 using std::runtime_error;
654 using stk::io::StkMeshIoBroker;
655 using stk::mesh::FieldVector;
656 using stk::ParallelMachine;
658 PANZER_FUNC_TIME_MONITOR(
"STK_Interface::setupExodusFile(filename)");
659 #ifdef PANZER_HAVE_IOSS
662 ParallelMachine comm = *
mpiComm_->getRawMpiComm();
663 meshData_ =
rcp(
new StkMeshIoBroker(comm));
664 meshData_->set_bulk_data(Teuchos::get_shared_ptr(
bulkData_));
665 Ioss::PropertyManager props;
666 props.add(Ioss::Property(
"LOWER_CASE_VARIABLE_NAMES",
"FALSE"));
668 if (append_after_restart_time) {
669 meshIndex_ = meshData_->create_output_mesh(filename, stk::io::APPEND_RESULTS,
670 props, restart_time);
673 meshIndex_ = meshData_->create_output_mesh(filename, stk::io::APPEND_RESULTS, props);
676 meshIndex_ = meshData_->create_output_mesh(filename, stk::io::WRITE_RESULTS, props);
677 const FieldVector& fields =
metaData_->get_fields();
678 for (
size_t i(0); i < fields.size(); ++i) {
684 auto role = stk::io::get_field_role(*fields[i]);
685 if (role !=
nullptr) {
686 if (*role != Ioss::Field::MESH)
687 meshData_->add_field(meshIndex_, *fields[i]);
689 meshData_->add_field(meshIndex_, *fields[i]);
695 meshData_->add_info_records(meshIndex_, deduped_info_records);
714 using Teuchos::rcpFromRef;
715 PANZER_FUNC_TIME_MONITOR(
"STK_Interface::writeToExodus(timestep)");
716 #ifdef PANZER_HAVE_IOSS
717 if (not meshData_.is_null())
720 globalToExodus(GlobalVariable::ADD);
722 meshData_->write_defined_output_fields(meshIndex_);
723 globalToExodus(GlobalVariable::WRITE);
724 meshData_->end_output_step(meshIndex_);
729 out.setOutputToRootOnly(0);
730 out <<
"WARNING: Exodus I/O has been disabled or not setup properly; "
731 <<
"not writing to Exodus." << endl;
746 const GlobalVariable& flag)
748 using std::invalid_argument;
755 for (
auto i = globalData_.begin(); i != globalData_.end(); ++i)
757 const string& name = globalData_.name(i);
760 if (globalData_.isType<
int>(name))
762 const auto& value = globalData_.get<
int>(name);
763 if (flag == GlobalVariable::ADD)
767 meshData_->add_global(meshIndex_, name, value,
768 stk::util::ParameterType::INTEGER);
776 meshData_->write_global(meshIndex_, name, value,
777 stk::util::ParameterType::INTEGER);
781 else if (globalData_.isType<
double>(name))
783 const auto& value = globalData_.get<
double>(name);
784 if (flag == GlobalVariable::ADD)
788 meshData_->add_global(meshIndex_, name, value,
789 stk::util::ParameterType::DOUBLE);
797 meshData_->write_global(meshIndex_, name, value,
798 stk::util::ParameterType::DOUBLE);
802 else if (globalData_.isType<Array<int>>(name))
804 const auto& value = globalData_.get<Array<int>>(name).toVector();
805 if (flag == GlobalVariable::ADD)
809 meshData_->add_global(meshIndex_, name, value,
810 stk::util::ParameterType::INTEGERVECTOR);
818 meshData_->write_global(meshIndex_, name, value,
819 stk::util::ParameterType::INTEGERVECTOR);
823 else if (globalData_.isType<Array<double>>(name))
825 const auto& value = globalData_.get<Array<double>>(name).toVector();
826 if (flag == GlobalVariable::ADD)
830 meshData_->add_global(meshIndex_, name, value,
831 stk::util::ParameterType::DOUBLEVECTOR);
839 meshData_->write_global(meshIndex_, name, value,
840 stk::util::ParameterType::DOUBLEVECTOR);
846 "STK_Interface::globalToExodus(): The global variable to be added " \
847 "to the Exodus output file is of an invalid type. Valid types are " \
848 "int and double, along with std::vectors of those types.")
860 const std::string& key,
863 globalData_.set(key, value);
874 const std::string& key,
877 globalData_.set(key, value);
888 const std::string& key,
889 const std::vector<int>& value)
892 globalData_.set(key, Array<int>(value));
903 const std::string& key,
904 const std::vector<double>& value)
907 globalData_.set(key, Array<double>(value));
912 #ifdef PANZER_HAVE_IOSS
924 stk::mesh::Entity node =
bulkData_->get_entity(nodeRank,nodeId);
925 const size_t numElements =
bulkData_->num_elements(node);
926 stk::mesh::Entity
const* relations =
bulkData_->begin_elements(node);
929 elements.insert(elements.end(), relations, relations + numElements);
933 std::vector<int> & relIds)
const
936 const size_t numElements =
bulkData_->num_elements(node);
937 stk::mesh::Entity
const* relations =
bulkData_->begin_elements(node);
938 stk::mesh::ConnectivityOrdinal
const* rel_ids =
bulkData_->begin_element_ordinals(node);
941 for (
size_t i = 0; i < numElements; ++i) {
942 stk::mesh::Entity element = relations[i];
946 elements.push_back(element);
947 relIds.push_back(rel_ids[i]);
953 std::vector<int> & relIds,
unsigned int matchType)
const
955 stk::mesh::EntityRank rank;
958 else if(matchType == 1)
960 else if(matchType == 2)
965 stk::mesh::Entity node =
bulkData_->get_entity(rank,nodeId);
972 std::vector<stk::mesh::Entity> current;
975 std::sort(current.begin(),current.end());
978 for(std::size_t n=1;n<nodeIds.size();++n) {
980 std::vector<stk::mesh::Entity> nextNode;
982 std::sort(nextNode.begin(),nextNode.end());
985 std::vector<stk::mesh::Entity> intersection(std::min(nextNode.size(),current.size()));
986 std::vector<stk::mesh::Entity>::const_iterator endItr
987 = std::set_intersection(current.begin(),current.end(),
988 nextNode.begin(),nextNode.end(),
989 intersection.begin());
990 std::size_t newLength = endItr-intersection.begin();
991 intersection.resize(newLength);
995 current = intersection;
1004 stk::mesh::Entity
const* nodeRel =
getBulkData()->begin_nodes(element);
1005 const size_t numNodes =
getBulkData()->num_nodes(element);
1007 nodeIds.reserve(numNodes);
1008 for(
size_t i = 0; i < numNodes; ++i) {
1023 const auto entityRankCount =
metaData_->entity_rank_count();
1024 const size_t commCount = 10;
1029 stk::ParallelMachine mach = *
mpiComm_->getRawMpiComm();
1031 std::vector<stk::mesh::EntityId> local(commCount,0);
1034 stk::mesh::Selector ownedPart =
metaData_->locally_owned_part();
1035 for(stk::mesh::EntityRank i=stk::topology::NODE_RANK;
1036 i < static_cast<stk::mesh::EntityRank>(entityRankCount); ++i) {
1037 std::vector<stk::mesh::Entity> entities;
1039 stk::mesh::get_selected_entities(ownedPart,
bulkData_->buckets(i),entities);
1042 std::vector<stk::mesh::Entity>::const_iterator itr;
1043 for(itr=entities.begin();itr!=entities.end();++itr) {
1044 stk::mesh::EntityId
id =
bulkData_->identifier(*itr);
1051 stk::all_reduce(mach,stk::ReduceMax<10>(&local[0]));
1052 maxEntityId_.assign(local.begin(),local.begin()+entityRankCount+1);
1058 "STK_Interface::getEntityCounts: Entity counts do not include rank: " << entityRank);
1066 "STK_Interface::getMaxEntityId: Max entity ids do not include rank: " << entityRank);
1073 stk::mesh::PartVector emptyPartVector;
1074 stk::mesh::create_adjacent_entities(*
bulkData_,emptyPartVector);
1096 std::vector<stk::mesh::EntityId> & subcellIds)
const
1099 stk::mesh::Entity cell =
bulkData_->get_entity(elementRank,elementId);
1102 "STK_Interface::getSubcellIndices: could not find element requested (GID = " << elementId <<
")");
1104 const size_t numSubcells =
bulkData_->num_connectivity(cell, static_cast<stk::mesh::EntityRank>(entityRank));
1105 stk::mesh::Entity
const* subcells =
bulkData_->begin(cell, static_cast<stk::mesh::EntityRank>(entityRank));
1107 subcellIds.resize(numSubcells,0);
1110 for(
size_t i = 0; i < numSubcells; ++i) {
1111 stk::mesh::Entity subcell = subcells[i];
1112 subcellIds[i] =
bulkData_->identifier(subcell);
1119 stk::mesh::Selector ownedPart =
metaData_->locally_owned_part();
1123 stk::mesh::get_selected_entities(ownedPart,
bulkData_->buckets(elementRank),elements);
1134 stk::mesh::Selector ownedBlock =
metaData_->locally_owned_part() & (*elementBlock);
1138 stk::mesh::get_selected_entities(ownedBlock,
bulkData_->buckets(elementRank),elements);
1144 stk::mesh::Selector neighborBlock = (!
metaData_->locally_owned_part());
1148 stk::mesh::get_selected_entities(neighborBlock,
bulkData_->buckets(elementRank),elements);
1158 stk::mesh::Selector neighborBlock = (!
metaData_->locally_owned_part()) & (*elementBlock);
1162 stk::mesh::get_selected_entities(neighborBlock,
bulkData_->buckets(elementRank),elements);
1168 stk::mesh::Selector ownedPart =
metaData_->locally_owned_part();
1176 stk::mesh::Part * edgeBlockPart =
getEdgeBlock(edgeBlockName);
1178 "Unknown edge block \"" << edgeBlockName <<
"\"");
1180 stk::mesh::Selector edge_block = *edgeBlockPart;
1181 stk::mesh::Selector owned_block =
metaData_->locally_owned_part() & edge_block;
1187 void STK_Interface::getMyEdges(
const std::string & edgeBlockName,
const std::string & blockName,std::vector<stk::mesh::Entity> & edges)
const
1189 stk::mesh::Part * edgeBlockPart =
getEdgeBlock(edgeBlockName);
1192 "Unknown edge block \"" << edgeBlockName <<
"\"");
1194 "Unknown element block \"" << blockName <<
"\"");
1196 stk::mesh::Selector edge_block = *edgeBlockPart;
1197 stk::mesh::Selector element_block = *elmtPart;
1198 stk::mesh::Selector owned_block =
metaData_->locally_owned_part() & element_block & edge_block;
1206 stk::mesh::Part * edgeBlockPart =
getEdgeBlock(edgeBlockName);
1208 "Unknown edge block \"" << edgeBlockName <<
"\"");
1210 stk::mesh::Selector edge_block = *edgeBlockPart;
1218 stk::mesh::Part * edgeBlockPart =
getEdgeBlock(edgeBlockName);
1221 "Unknown edge block \"" << edgeBlockName <<
"\"");
1223 "Unknown element block \"" << blockName <<
"\"");
1225 stk::mesh::Selector edge_block = *edgeBlockPart;
1226 stk::mesh::Selector element_block = *elmtPart;
1227 stk::mesh::Selector element_edge_block = element_block & edge_block;
1236 stk::mesh::Selector ownedPart =
metaData_->locally_owned_part();
1240 stk::mesh::get_selected_entities(ownedPart,
bulkData_->buckets(faceRank),faces);
1245 stk::mesh::Part * faceBlockPart =
getFaceBlock(faceBlockName);
1247 "Unknown face block \"" << faceBlockName <<
"\"");
1249 stk::mesh::Selector face_block = *faceBlockPart;
1250 stk::mesh::Selector owned_block =
metaData_->locally_owned_part() & face_block;
1256 void STK_Interface::getMyFaces(
const std::string & faceBlockName,
const std::string & blockName,std::vector<stk::mesh::Entity> & faces)
const
1258 stk::mesh::Part * faceBlockPart =
getFaceBlock(faceBlockName);
1261 "Unknown face block \"" << faceBlockName <<
"\"");
1263 "Unknown element block \"" << blockName <<
"\"");
1265 stk::mesh::Selector face_block = *faceBlockPart;
1266 stk::mesh::Selector element_block = *elmtPart;
1267 stk::mesh::Selector owned_block =
metaData_->locally_owned_part() & element_block & face_block;
1275 stk::mesh::Part * faceBlockPart =
getFaceBlock(faceBlockName);
1277 "Unknown face block \"" << faceBlockName <<
"\"");
1279 stk::mesh::Selector face_block = *faceBlockPart;
1287 stk::mesh::Part * faceBlockPart =
getFaceBlock(faceBlockName);
1290 "Unknown face block \"" << faceBlockName <<
"\"");
1292 "Unknown element block \"" << blockName <<
"\"");
1294 stk::mesh::Selector face_block = *faceBlockPart;
1295 stk::mesh::Selector element_block = *elmtPart;
1296 stk::mesh::Selector element_face_block = element_block & face_block;
1304 stk::mesh::Part * sidePart =
getSideset(sideName);
1306 "Unknown side set \"" << sideName <<
"\"");
1308 stk::mesh::Selector side = *sidePart;
1309 stk::mesh::Selector ownedBlock =
metaData_->locally_owned_part() & side;
1317 stk::mesh::Part * sidePart =
getSideset(sideName);
1320 "Unknown side set \"" << sideName <<
"\"");
1322 "Unknown element block \"" << blockName <<
"\"");
1324 stk::mesh::Selector side = *sidePart;
1325 stk::mesh::Selector block = *elmtPart;
1326 stk::mesh::Selector ownedBlock =
metaData_->locally_owned_part() & block & side;
1334 stk::mesh::Part * sidePart =
getSideset(sideName);
1336 "Unknown side set \"" << sideName <<
"\"");
1338 stk::mesh::Selector side = *sidePart;
1346 stk::mesh::Part * sidePart =
getSideset(sideName);
1349 "Unknown side set \"" << sideName <<
"\"");
1351 "Unknown element block \"" << blockName <<
"\"");
1353 stk::mesh::Selector side = *sidePart;
1354 stk::mesh::Selector block = *elmtPart;
1355 stk::mesh::Selector sideBlock = block & side;
1363 stk::mesh::Part * nodePart =
getNodeset(nodesetName);
1366 "Unknown node set \"" << nodesetName <<
"\"");
1368 "Unknown element block \"" << blockName <<
"\"");
1370 stk::mesh::Selector nodeset = *nodePart;
1371 stk::mesh::Selector block = *elmtPart;
1372 stk::mesh::Selector ownedBlock =
metaData_->locally_owned_part() & block & nodeset;
1385 std::map<std::string, stk::mesh::Part*>::const_iterator blkItr;
1387 names.push_back(blkItr->first);
1397 std::map<std::string, stk::mesh::Part*>::const_iterator sideItr;
1399 names.push_back(sideItr->first);
1407 std::map<std::string, stk::mesh::Part*>::const_iterator nodeItr;
1409 names.push_back(nodeItr->first);
1417 std::map<std::string, stk::mesh::Part*>::const_iterator edgeBlockItr;
1419 names.push_back(edgeBlockItr->first);
1427 std::map<std::string, stk::mesh::Part*>::const_iterator faceBlockItr;
1429 names.push_back(faceBlockItr->first);
1445 std::unordered_map<stk::mesh::EntityId,std::size_t>::const_iterator itr =
localIDHash_.find(gid);
1457 std::unordered_map<stk::mesh::EntityId,std::size_t>::const_iterator itr =
localEdgeIDHash_.find(gid);
1471 std::unordered_map<stk::mesh::EntityId,std::size_t>::const_iterator itr =
localEdgeIDHash_.find(gid);
1483 std::unordered_map<stk::mesh::EntityId,std::size_t>::const_iterator itr =
localFaceIDHash_.find(gid);
1497 std::unordered_map<stk::mesh::EntityId,std::size_t>::const_iterator itr =
localFaceIDHash_.find(gid);
1506 if(
bulkData_->bucket(elmt).member(*(eb_pair.second)))
1507 return eb_pair.first;
1512 const std::string & blockId)
const
1515 std::map<std::pair<std::string,std::string>,
SolutionFieldType*>::const_iterator
1520 "Solution field name \"" << fieldName <<
"\" in block ID \"" << blockId <<
"\" was not found");
1522 return iter->second;
1526 const std::string & blockId)
const
1529 std::map<std::pair<std::string,std::string>,
SolutionFieldType*>::const_iterator
1534 "Cell field named \"" << fieldName <<
"\" in block ID \"" << blockId <<
"\" was not found");
1536 return iter->second;
1540 const std::string & blockId)
const
1543 std::map<std::pair<std::string,std::string>,
SolutionFieldType*>::const_iterator
1548 "Edge field named \"" << fieldName <<
"\" in block ID \"" << blockId <<
"\" was not found");
1550 return iter->second;
1554 const std::string & blockId)
const
1557 std::map<std::pair<std::string,std::string>,
SolutionFieldType*>::const_iterator
1562 "Face field named \"" << fieldName <<
"\" in block ID \"" << blockId <<
"\" was not found");
1564 return iter->second;
1584 stk::mesh::Part * block =
metaData_->get_part(name);
1586 block = &
metaData_->declare_part_with_topology(name, stk::mesh::get_topology(shards::CellTopology(ctData),
dimension_));
1612 const std::string & edgeBlockName,
1613 const stk::topology & topology)
1617 stk::mesh::Part * edge_block =
metaData_->get_part(edgeBlockName);
1619 edge_block = &
metaData_->declare_part_with_topology(edgeBlockName, topology);
1625 stk::mesh::Part * elem_block =
metaData_->get_part(elemBlockName);
1626 metaData_->declare_part_subset(*elem_block, *edge_block);
1629 edgeBlocks_.insert(std::make_pair(edgeBlockName,edge_block));
1633 const std::string & edgeBlockName,
1634 const CellTopologyData * ctData)
1640 stk::mesh::get_topology(shards::CellTopology(ctData),
dimension_));
1657 const std::string & faceBlockName,
1658 const stk::topology & topology)
1662 stk::mesh::Part * face_block =
metaData_->get_part(faceBlockName);
1664 face_block = &
metaData_->declare_part_with_topology(faceBlockName, topology);
1670 stk::mesh::Part * elem_block =
metaData_->get_part(elemBlockName);
1671 metaData_->declare_part_subset(*elem_block, *face_block);
1674 faceBlocks_.insert(std::make_pair(faceBlockName,face_block));
1678 const std::string & faceBlockName,
1679 const CellTopologyData * ctData)
1685 stk::mesh::get_topology(shards::CellTopology(ctData),
dimension_));
1719 std::vector<stk::mesh::Entity> elements;
1722 for(std::size_t index=0;index<elements.size();++index) {
1723 stk::mesh::Entity element = elements[index];
1727 procId[0] = Teuchos::as<ProcIdData>(
procRank_);
1740 for(std::size_t index=0;index<elements.size();++index) {
1741 stk::mesh::Entity element = elements[index];
1745 procId[0] = Teuchos::as<ProcIdData>(
procRank_);
1757 std::vector<std::string> names;
1760 for(std::size_t b=0;b<names.size();b++) {
1762 std::map<std::string,double>::const_iterator bw_itr =
blockWeights_.find(names[b]);
1763 double blockWeight = (bw_itr!=
blockWeights_.end()) ? bw_itr->second : 1.0;
1765 std::vector<stk::mesh::Entity> elements;
1768 for(std::size_t index=0;index<elements.size();++index) {
1770 double * loadBal = stk::mesh::field_data(*
loadBalField_,elements[index]);
1771 loadBal[0] = blockWeight;
1783 std::vector<stk::mesh::Entity> edges;
1786 for(std::size_t index=0;index<edges.size();++index) {
1787 stk::mesh::Entity edge = edges[index];
1803 std::vector<stk::mesh::Entity> faces;
1806 for(std::size_t index=0;index<faces.size();++index) {
1807 stk::mesh::Entity face = faces[index];
1818 const std::string & fieldName,
1821 std::map<std::string,std::vector<std::string> >::const_iterator blkItr =
meshCoordFields_.find(eBlock);
1827 for(axis=0;axis<Teuchos::as<int>(blkItr->second.size());axis++) {
1828 if(blkItr->second[axis]==fieldName)
1832 if(axis>=Teuchos::as<int>(blkItr->second.size()))
1843 const std::vector<Teuchos::RCP<const PeriodicBC_MatcherBase> > & matchers =
getPeriodicBCVector();
1845 std::vector<std::vector<std::string> > matchedSides(3);
1848 for(std::size_t m=0;m<matchers.size();m++){
1850 if(matchers[m]->getType() ==
"coord")
1852 else if(matchers[m]->getType() ==
"edge")
1854 else if(matchers[m]->getType() ==
"face")
1858 #ifdef PANZER_HAVE_STKSEARCH
1860 if (useBBoxSearch) {
1861 vec = matchers[m]->getMatchedPair(*
this,matchedSides[type],vec);
1863 vec = matchers[m]->getMatchedPair(*
this,vec);
1867 "panzer::STK_Interface::getPeriodicNodePairing(): Requested bounding box search, but "
1868 "did not compile with STK_SEARCH enabled.");
1869 vec = matchers[m]->getMatchedPair(*
this,vec);
1871 type_vec->insert(type_vec->begin(),vec->size()-type_vec->size(),type);
1872 matchedSides[type].push_back(matchers[m]->getLeftSidesetName());
1875 return std::make_pair(vec,type_vec);
1880 std::map<std::string, stk::mesh::Part*>::const_iterator blkItr =
elementBlocks_.find(blockId);
1887 std::vector<std::string> blockNames, sidesetNames, nodesetNames;
1893 os <<
"STK Mesh data:\n";
1896 os <<
" Entity counts (Nodes, Edges, Cells) = ( "
1901 os <<
" Entity counts (Nodes, Edges, Faces, Cells) = ( "
1907 os <<
" Entity counts (Nodes, Cells) = ( "
1911 os <<
" Element blocks = ";
1912 for(std::size_t i=0;i<blockNames.size();i++)
1913 os <<
"\"" << blockNames[i] <<
"\" ";
1915 os <<
" Sidesets = ";
1916 for(std::size_t i=0;i<sidesetNames.size();i++)
1917 os <<
"\"" << sidesetNames[i] <<
"\" ";
1919 os <<
" Nodesets = ";
1920 for(std::size_t i=0;i<nodesetNames.size();i++)
1921 os <<
"\"" << nodesetNames[i] <<
"\" ";
1925 const std::vector<Teuchos::RCP<const PeriodicBC_MatcherBase> > & bcVector
1927 if(bcVector.size()!=0) {
1928 os <<
" Periodic BCs:\n";
1929 for(std::size_t i=0;i<bcVector.size();i++)
1930 os <<
" " << bcVector[i]->getString() <<
"\n";
1937 std::vector<std::string> blockNames, sidesetNames, nodesetNames;
1943 os <<
"STK Meta data:\n";
1944 os <<
" Element blocks = ";
1945 for(std::size_t i=0;i<blockNames.size();i++)
1946 os <<
"\"" << blockNames[i] <<
"\" ";
1948 os <<
" Sidesets = ";
1949 for(std::size_t i=0;i<sidesetNames.size();i++)
1950 os <<
"\"" << sidesetNames[i] <<
"\" ";
1952 os <<
" Nodesets = ";
1953 for(std::size_t i=0;i<nodesetNames.size();i++)
1954 os <<
"\"" << nodesetNames[i] <<
"\" ";
1958 const std::vector<Teuchos::RCP<const PeriodicBC_MatcherBase> > & bcVector
1960 if(bcVector.size()!=0) {
1961 os <<
" Periodic BCs:\n";
1962 for(std::size_t i=0;i<bcVector.size();i++)
1963 os <<
" " << bcVector[i]->getString() <<
"\n";
1969 const stk::mesh::FieldVector & fv =
metaData_->get_fields();
1970 for(std::size_t i=0;i<fv.size();i++)
1971 os <<
"\"" << fv[i]->name() <<
"\" ";
1977 std::map<std::string, Teuchos::RCP<shards::CellTopology> >::const_iterator itr;
1981 std::stringstream ss;
1984 "STK_Interface::getCellTopology: No such element block \"" +eBlock +
"\" available.\n\n"
1985 <<
"STK Meta Data follows: \n" << ss.str());
1994 const int err = MPI_Comm_dup (parallelMach, &newComm);
1996 "panzer::STK_Interface: MPI_Comm_dup failed with error \""
1997 << Teuchos::mpiErrorCodeToString (err) <<
"\".");
2009 stk::mesh::Selector selector(
getMetaData()->universal_part());
2010 stk::mesh::Selector owned_selector(
getMetaData()->locally_owned_part());
2018 if(params.begin()!=params.end())
2019 graph.
sublist(stk::rebalance::Zoltan::default_parameters_name()) = params;
2038 #ifdef PANZER_HAVE_PERCEPT
2040 "ERROR: Number of levels for uniform refinement must be greater than 0");
2044 refinedMesh_->setCoordinatesField();
2046 percept::UniformRefiner breaker(*refinedMesh_,*breakPattern_);
2047 breaker.setRemoveOldElements(deleteParentElements);
2049 for (
int i=0; i < numberOfLevels; ++i)
2054 "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_