Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_STK_SetupUtilities.cpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Panzer: A partial differential equation assembly
4 // engine for strongly coupled complex multiphysics systems
5 //
6 // Copyright 2011 NTESS and the Panzer contributors.
7 // SPDX-License-Identifier: BSD-3-Clause
8 // *****************************************************************************
9 // @HEADER
10 
12 #include "Panzer_Workset_Builder.hpp"
13 #include "Teuchos_Assert.hpp"
14 
15 #include <stk_mesh/base/Selector.hpp>
16 #include <stk_mesh/base/GetEntities.hpp>
17 
18 namespace panzer_stk {
19 
22  const std::string & eBlock,
23  const panzer::WorksetNeeds & needs)
24 {
25  using namespace workset_utils;
26 
27  std::vector<std::string> element_blocks;
28 
29  std::vector<std::size_t> local_cell_ids;
30  Kokkos::DynRankView<double,PHX::Device> cell_node_coordinates;
31 
32  getIdsAndNodes(mesh, eBlock, local_cell_ids, cell_node_coordinates);
33 
34  // only build workset if there are elements to worry about
35  // this may be processor dependent, so an element block
36  // may not have elements and thus no contribution
37  // on this processor
38  return panzer::buildWorksets(needs, eBlock, local_cell_ids, cell_node_coordinates);
39 }
40 
43  const panzer::WorksetNeeds & needs,
44  const std::string & sideset,
45  const std::string & eBlock,
46  bool useCascade)
47 {
48  using namespace workset_utils;
49  using Teuchos::RCP;
50 
51  std::vector<stk::mesh::Entity> sideEntities;
52 
53  try {
54  // grab local entities on this side
55  // ...catch any failure...primarily wrong side set and element block info
56  if(!useCascade)
57  mesh.getMySides(sideset,eBlock,sideEntities);
58  else
59  mesh.getAllSides(sideset,eBlock,sideEntities);
60  }
62  std::stringstream ss;
63  std::vector<std::string> sideSets;
64  mesh.getSidesetNames(sideSets);
65 
66  // build an error message
67  ss << e.what() << "\nChoose one of:\n";
68  for(std::size_t i=0;i<sideSets.size();i++)
69  ss << "\"" << sideSets[i] << "\"\n";
70 
71  TEUCHOS_TEST_FOR_EXCEPTION_PURE_MSG(true,std::logic_error,ss.str());
72  }
74  std::stringstream ss;
75  std::vector<std::string> elementBlocks;
76  mesh.getElementBlockNames(elementBlocks);
77 
78  // build an error message
79  ss << e.what() << "\nChoose one of:\n";
80  for(std::size_t i=0;i<elementBlocks.size();i++)
81  ss << "\"" << elementBlocks[i] << "\"\n";
82 
83  TEUCHOS_TEST_FOR_EXCEPTION_PURE_MSG(true,std::logic_error,ss.str());
84  }
85  catch(std::logic_error & e) {
86  std::stringstream ss;
87  ss << e.what() << "\nUnrecognized logic error.\n";
88 
89  TEUCHOS_TEST_FOR_EXCEPTION_PURE_MSG(true,std::logic_error,ss.str());
90  }
91 
92  std::vector<stk::mesh::Entity> elements;
93  std::map<std::pair<unsigned,unsigned>,std::vector<std::size_t> > local_cell_ids;
94  if(!useCascade) {
95  unsigned subcell_dim = needs.cellData.baseCellDimension()-1;
96  std::vector<std::size_t> local_side_ids;
97  getSideElements(mesh, eBlock,
98  sideEntities,local_side_ids,elements);
99 
100  // build local cell_ids, mapped by local side id
101  for(std::size_t elm=0;elm<elements.size();++elm) {
102  stk::mesh::Entity element = elements[elm];
103 
104  local_cell_ids[std::make_pair(subcell_dim,local_side_ids[elm])].push_back(mesh.elementLocalId(element));
105  }
106  }
107  else {
108  std::vector<std::size_t> local_subcell_ids, subcell_dim;
109  getSideElementCascade(mesh, eBlock,
110  sideEntities,subcell_dim,local_subcell_ids,elements);
111 
112  // build local cell_ids, mapped by local side id
113  for(std::size_t elm=0;elm<elements.size();++elm) {
114  stk::mesh::Entity element = elements[elm];
115 
116  local_cell_ids[std::make_pair(subcell_dim[elm],local_subcell_ids[elm])].push_back(mesh.elementLocalId(element));
117  }
118  }
119 
120  // only build workset if there are elements to worry about
121  // this may be processor dependent, so a defined boundary
122  // condition may have not elements and thus no contribution
123  // on this processor
124  if(elements.size()!=0) {
126 
127  // worksets to be returned
128  Teuchos::RCP<std::vector<panzer::Workset> > worksets = Teuchos::rcp(new std::vector<panzer::Workset>);
129 
130  // loop over each side
131  for(std::map<std::pair<unsigned,unsigned>,std::vector<std::size_t> >::const_iterator itr=local_cell_ids.begin();
132  itr!=local_cell_ids.end();++itr) {
133 
134  if(itr->second.size()==0)
135  continue;
136 
137  Kokkos::DynRankView<double,PHX::Device> nodes;
138  mesh.getElementNodes(itr->second,eBlock,nodes);
139 
141  = panzer::buildWorksets(needs, eBlock, itr->second, nodes);
142 
143  // correct worksets so the sides are correct
144  for(std::size_t w=0;w<current->size();w++) {
145  (*current)[w].subcell_dim = itr->first.first;
146  (*current)[w].subcell_index = itr->first.second;
147  }
148 
149  // append new worksets
150  worksets->insert(worksets->end(),current->begin(),current->end());
151  }
152 
153  return worksets;
154  }
155 
156  // return Teuchos::null;
157  return Teuchos::rcp(new std::vector<panzer::Workset>());
158 }
159 
162  const panzer::WorksetNeeds & needs_a,
163  const std::string & blockid_a,
164  const panzer::WorksetNeeds & needs_b,
165  const std::string & blockid_b,
166  const std::string & sideset)
167 {
168  using namespace workset_utils;
169  using Teuchos::RCP;
170 
171  std::vector<stk::mesh::Entity> sideEntities; // we will reduce a_ and b_ to this vector
172 
173  try {
174  // grab local entities on this side
175  // ...catch any failure...primarily wrong side set and element block info
176 
177  // we can't use getMySides because it only returns locally owned sides
178  // this gurantees all the sides are extracted (element ownership is considered
179  // we we call getSideElements below)
180 
181  stk::mesh::Part * sidePart = mesh.getSideset(sideset);
182  TEUCHOS_TEST_FOR_EXCEPTION(sidePart==0,std::logic_error,
183  "Unknown side set \"" << sideset << "\"");
184 
185  stk::mesh::Selector side = *sidePart;
186  // stk::mesh::Selector ownedBlock = metaData_->locally_owned_part() & side;
187 
188  // grab elements
189  stk::mesh::get_selected_entities(side,mesh.getBulkData()->buckets(mesh.getSideRank()),sideEntities);
190  }
192  std::stringstream ss;
193  std::vector<std::string> elementBlocks;
194  mesh.getElementBlockNames(elementBlocks);
195 
196  // build an error message
197  ss << e.what() << "\nChoose one of:\n";
198  for(std::size_t i=0;i<elementBlocks.size();i++)
199  ss << "\"" << elementBlocks[i] << "\"\n";
200 
201  TEUCHOS_TEST_FOR_EXCEPTION_PURE_MSG(true,std::logic_error,ss.str());
202  }
203  catch(std::logic_error & e) {
204  std::stringstream ss;
205  ss << e.what() << "\nUnrecognized logic error.\n";
206 
207  TEUCHOS_TEST_FOR_EXCEPTION_PURE_MSG(true,std::logic_error,ss.str());
208  }
209 
210  std::vector<stk::mesh::Entity> elements_a, elements_b;
211  std::vector<std::size_t> local_cell_ids_a, local_cell_ids_b;
212  std::vector<std::size_t> local_side_ids_a, local_side_ids_b;
213 
214  // this enforces that "a" elements must be owned.
215  getSideElements(mesh, blockid_a,blockid_b, sideEntities,
216  local_side_ids_a,elements_a,
217  local_side_ids_b,elements_b);
218 
219  TEUCHOS_TEST_FOR_EXCEPTION(elements_a.size()!=elements_b.size(),std::logic_error,
220  "For a DG type boundary, the number of elements on the \"left\" and \"right\" is not the same.");
221 
222  // only build workset if there are elements to worry about
223  // this may be processor dependent, so a defined boundary
224  // condition may have not elements and thus no contribution
225  // on this processor
226  if(elements_a.size()==0)
227  return Teuchos::rcp(new std::map<unsigned,panzer::Workset>);
228 
229  // loop over elements of this block (note the assures that element_a and element_b
230  // are the same size, the ordering is the same because the order of sideEntities is
231  // the same
232  for(std::size_t elm=0;elm<elements_a.size();++elm) {
233  stk::mesh::Entity element_a = elements_a[elm];
234  stk::mesh::Entity element_b = elements_b[elm];
235 
236  local_cell_ids_a.push_back(mesh.elementLocalId(element_a));
237  local_cell_ids_b.push_back(mesh.elementLocalId(element_b));
238  }
239 
240  Kokkos::DynRankView<double,PHX::Device> node_coordinates_a, node_coordinates_b;
241  mesh.getElementNodes(local_cell_ids_a,blockid_a,node_coordinates_a);
242  mesh.getElementNodes(local_cell_ids_b,blockid_b,node_coordinates_b);
243 
244  // worksets to be returned
245  return buildBCWorkset(needs_a,blockid_a, local_cell_ids_a, local_side_ids_a, node_coordinates_a,
246  needs_b,blockid_b, local_cell_ids_b, local_side_ids_b, node_coordinates_b);
247 }
248 
251  const panzer::WorksetNeeds & needs,
252  const std::string & eblockID,
253  const std::string & sidesetID)
254 {
255  using namespace workset_utils;
256  using Teuchos::RCP;
257 
258  std::vector<stk::mesh::Entity> sideEntities;
259 
260  try {
261  // grab local entities on this side
262  // ...catch any failure...primarily wrong side set and element block info
263  mesh.getMySides(sidesetID,eblockID,sideEntities);
264  }
266  std::stringstream ss;
267  std::vector<std::string> sideSets;
268  mesh.getSidesetNames(sideSets);
269 
270  // build an error message
271  ss << e.what() << "\nChoose one of:\n";
272  for(std::size_t i=0;i<sideSets.size();i++)
273  ss << "\"" << sideSets[i] << "\"\n";
274 
275  TEUCHOS_TEST_FOR_EXCEPTION_PURE_MSG(true,std::logic_error,ss.str());
276  }
278  std::stringstream ss;
279  std::vector<std::string> elementBlocks;
280  mesh.getElementBlockNames(elementBlocks);
281 
282  // build an error message
283  ss << e.what() << "\nChoose one of:\n";
284  for(std::size_t i=0;i<elementBlocks.size();i++)
285  ss << "\"" << elementBlocks[i] << "\"\n";
286 
287  TEUCHOS_TEST_FOR_EXCEPTION_PURE_MSG(true,std::logic_error,ss.str());
288  }
289  catch(std::logic_error & e) {
290  std::stringstream ss;
291  ss << e.what() << "\nUnrecognized logic error.\n";
292 
293  TEUCHOS_TEST_FOR_EXCEPTION_PURE_MSG(true,std::logic_error,ss.str());
294  }
295 
296  std::vector<stk::mesh::Entity> elements;
297  std::vector<std::size_t> local_cell_ids;
298  std::vector<std::size_t> local_side_ids;
299  getSideElements(mesh, eblockID,
300  sideEntities,local_side_ids,elements);
301 
302  // loop over elements of this block
303  for(std::size_t elm=0;elm<elements.size();++elm) {
304  stk::mesh::Entity element = elements[elm];
305 
306  local_cell_ids.push_back(mesh.elementLocalId(element));
307  }
308 
309  // only build workset if there are elements to worry about
310  // this may be processor dependent, so a defined boundary
311  // condition may have not elements and thus no contribution
312  // on this processor
313  if(elements.size()!=0) {
315  = mesh.getCellTopology(eblockID);
316 
317  Kokkos::DynRankView<double,PHX::Device> nodes;
318  mesh.getElementNodes(local_cell_ids,eblockID,nodes);
319 
320  return panzer::buildBCWorkset(needs, eblockID, local_cell_ids, local_side_ids, nodes);
321  }
322 
323  return Teuchos::null;
324 }
325 
326 namespace workset_utils {
327 
329  const std::string & blockId,
330  const std::vector<stk::mesh::Entity> & entities,
331  std::vector<std::size_t> & localEntityIds,
332  std::vector<stk::mesh::Entity> & elements)
333 {
334  // for verifying that an element is in specified block
335  stk::mesh::Part * blockPart = mesh.getElementBlockPart(blockId);
336  stk::mesh::Part * ownedPart = mesh.getOwnedPart();
337  stk::mesh::BulkData& bulkData = *mesh.getBulkData();
338 
339  // loop over each entitiy extracting elements and local entity ID that
340  // are containted in specified block.
341  std::vector<stk::mesh::Entity>::const_iterator entityItr;
342  for(entityItr=entities.begin();entityItr!=entities.end();++entityItr) {
343  stk::mesh::Entity entity = *entityItr;
344 
345  const size_t num_rels = bulkData.num_elements(entity);
346  stk::mesh::Entity const* relations = bulkData.begin_elements(entity);
347  stk::mesh::ConnectivityOrdinal const* ordinals = bulkData.begin_element_ordinals(entity);
348  for(std::size_t e=0; e<num_rels; ++e) {
349  stk::mesh::Entity element = relations[e];
350  std::size_t entityId = ordinals[e];
351 
352  // is this element in requested block
353  stk::mesh::Bucket const& bucket = bulkData.bucket(element);
354  bool inBlock = bucket.member(*blockPart);
355  bool onProc = bucket.member(*ownedPart);
356  if(inBlock && onProc) {
357  // add element and Side ID to output vectors
358  elements.push_back(element);
359  localEntityIds.push_back(entityId);
360  }
361  }
362  }
363 }
364 
366  const std::string & blockId,
367  const std::vector<stk::mesh::Entity> & entities,
368  std::vector<std::size_t> & localEntityIds,
369  std::vector<stk::mesh::Entity> & elements,
370  std::vector<std::size_t> & missingElementIndices)
371 {
372  // for verifying that an element is in specified block
373  stk::mesh::Part * blockPart = mesh.getElementBlockPart(blockId);
374  stk::mesh::Part * universalPart = &mesh.getMetaData()->universal_part();
375  stk::mesh::BulkData& bulkData = *mesh.getBulkData();
376 
377  // loop over each entitiy extracting elements and local entity ID that
378  // are containted in specified block.
379  std::size_t entityIndex =-1;
380  std::vector<stk::mesh::Entity>::const_iterator entityItr;
381  for(entityItr=entities.begin();entityItr!=entities.end();++entityItr) {
382  stk::mesh::Entity entity = *entityItr;
383  entityIndex += 1;
384 
385  const size_t num_rels = bulkData.num_elements(entity);
386  stk::mesh::Entity const* element_rels = bulkData.begin_elements(entity);
387  stk::mesh::ConnectivityOrdinal const* ordinals = bulkData.begin_element_ordinals(entity);
388  for(std::size_t e=0; e<num_rels; ++e) {
389  stk::mesh::Entity element = element_rels[e];
390  std::size_t entityId = ordinals[e];
391 
392  // is this element in requested block
393  stk::mesh::Bucket const& bucket = bulkData.bucket(element);
394  bool inBlock = bucket.member(*blockPart);
395  bool onProc = bucket.member(*universalPart);
396  if(inBlock && onProc) {
397  // add element and Side ID to output vectors
398  elements.push_back(element);
399  localEntityIds.push_back(entityId);
400  } else if(!inBlock && (num_rels == 1)) {
401  // add index of side whose neighbor element in blockPart does not belong
402  // to the current processor
403  missingElementIndices.push_back(entityIndex);
404  }
405  }
406  }
407 }
408 
410  const std::string & blockId,
411  const std::vector<stk::mesh::Entity> & sides,
412  std::vector<std::size_t> & localSubcellDim,
413  std::vector<std::size_t> & localSubcellIds,
414  std::vector<stk::mesh::Entity> & elements)
415 {
416  // This is the alogrithm, for computing the side element
417  // cascade. The requirements are that for a particular set of sides
418  // we compute all elements and subcells where they touch the side. Note
419  // that elements can be and will be repeated within this list.
420 
421  std::vector<std::vector<stk::mesh::Entity> > subcells;
422  getSubcellEntities(mesh,sides,subcells);
423  subcells.push_back(sides);
424 
425  // subcells now contains a unique list of faces, edges and nodes that
426  // intersect with the sides
427 
428  for(std::size_t d=0;d<subcells.size();d++) {
429  std::vector<std::size_t> subcellIds;
430  std::vector<stk::mesh::Entity> subcellElements;
431 
432  // find elements connected to the subcells and their local subcell information
433  getSubcellElements(mesh,blockId,subcells[d],subcellIds,subcellElements);
434 
435  // sanity check
436  TEUCHOS_ASSERT(subcellIds.size()==subcellElements.size());
437 
438  // concatenate with found elements
439  localSubcellDim.insert(localSubcellDim.end(),subcellElements.size(),d);
440  localSubcellIds.insert(localSubcellIds.end(),subcellIds.begin(),subcellIds.end());
441  elements.insert(elements.end(),subcellElements.begin(),subcellElements.end());
442  }
443 }
444 
446  const std::string & blockId,
447  const std::vector<stk::mesh::Entity> & sides,
448  std::vector<std::size_t> & localSideIds,
449  std::vector<stk::mesh::Entity> & elements)
450 {
451  getSubcellElements(mesh,blockId,sides,localSideIds,elements);
452 }
453 
455  const std::string & blockId_a,
456  const std::string & blockId_b,
457  const std::vector<stk::mesh::Entity> & sides,
458  std::vector<std::size_t> & localSideIds_a,
459  std::vector<stk::mesh::Entity> & elements_a,
460  std::vector<std::size_t> & localSideIds_b,
461  std::vector<stk::mesh::Entity> & elements_b)
462 {
463  // for verifying that an element is in specified block
464  stk::mesh::Part * blockPart_a = mesh.getElementBlockPart(blockId_a);
465  stk::mesh::Part * blockPart_b = mesh.getElementBlockPart(blockId_b);
466  stk::mesh::Part * ownedPart = mesh.getOwnedPart();
467  stk::mesh::Part * universalPart = &mesh.getMetaData()->universal_part();
468  stk::mesh::BulkData& bulkData = *mesh.getBulkData();
469 
470  // loop over each entitiy extracting elements and local entity ID that
471  // are containted in specified block.
472  std::vector<stk::mesh::Entity>::const_iterator sidesItr;
473  for(sidesItr=sides.begin();sidesItr!=sides.end();++sidesItr) {
474  stk::mesh::Entity side = *sidesItr;
475 
476  // these are used below the loop to insert into the appropriate vectors
477  stk::mesh::Entity element_a = stk::mesh::Entity(), element_b = stk::mesh::Entity();
478  std::size_t entityId_a=0, entityId_b=0;
479 
480  const size_t num_rels = bulkData.num_elements(side);
481  stk::mesh::Entity const* element_rels = bulkData.begin_elements(side);
482  stk::mesh::ConnectivityOrdinal const* ordinals = bulkData.begin_element_ordinals(side);
483  for(std::size_t e=0; e<num_rels; ++e) {
484  stk::mesh::Entity element = element_rels[e];
485  std::size_t entityId = ordinals[e];
486 
487  // is this element in requested block
488  stk::mesh::Bucket const& bucket = bulkData.bucket(element);
489  bool inBlock_a = bucket.member(*blockPart_a);
490  bool inBlock_b = bucket.member(*blockPart_b);
491  bool onProc = bucket.member(*ownedPart);
492  bool unProc = bucket.member(*universalPart);
493 
494  if(inBlock_a && onProc) {
495  TEUCHOS_ASSERT(element_a==stk::mesh::Entity()); // sanity check
496  element_a = element;
497  entityId_a = entityId;
498  }
499  if(inBlock_b && unProc) {
500  TEUCHOS_ASSERT(element_b==stk::mesh::Entity()); // sanity check
501  element_b = element;
502  entityId_b = entityId;
503  }
504  }
505 
506  if(element_a!=stk::mesh::Entity() && element_b!=stk::mesh::Entity()) { // add element and Side ID to output vectors
507  elements_a.push_back(element_a);
508  localSideIds_a.push_back(entityId_a);
509 
510  // add element and Side ID to output vectors
511  elements_b.push_back(element_b);
512  localSideIds_b.push_back(entityId_b);
513  }
514  }
515 }
516 
518  const std::string & blockId,
519  const std::vector<stk::mesh::Entity> & nodes,
520  std::vector<std::size_t> & localNodeIds,
521  std::vector<stk::mesh::Entity> & elements)
522 {
523  getSubcellElements(mesh,blockId,nodes,localNodeIds,elements);
524 }
525 
527  const std::vector<stk::mesh::Entity> & entities,
528  std::vector<std::vector<stk::mesh::Entity> > & subcells)
529 {
530  // exit if there is no work to do
531  if(entities.size()==0) {
532  subcells.clear();
533  return;
534  }
535 
536  stk::mesh::BulkData& bulkData = *mesh.getBulkData();
537  stk::mesh::EntityRank master_rank = bulkData.entity_rank(entities[0]);
538 
539  std::vector<std::set<stk::mesh::Entity> > subcells_set(master_rank);
540 
541  // loop over each entitiy extracting elements and local entity ID that
542  // are containted in specified block.
543  std::vector<stk::mesh::Entity>::const_iterator entityItr;
544  for(entityItr=entities.begin();entityItr!=entities.end();++entityItr) {
545  stk::mesh::Entity entity = *entityItr;
546 
547  // sanity check, enforcing that there is only one rank
548  TEUCHOS_ASSERT(bulkData.entity_rank(entity)==master_rank);
549 
550  for(int i=0; i<static_cast<int>(master_rank); i++) {
551  stk::mesh::EntityRank const to_rank = static_cast<stk::mesh::EntityRank>(i);
552  const size_t num_rels = bulkData.num_connectivity(entity, to_rank);
553  stk::mesh::Entity const* relations = bulkData.begin(entity, to_rank);
554 
555  // for each relation insert the appropriate entity (into the set
556  // which gurantees uniqueness
557  for(std::size_t e=0; e<num_rels; ++e) {
558  stk::mesh::Entity subcell = relations[e];
559 
560  subcells_set[i].insert(subcell);
561  }
562  }
563  }
564 
565  // copy unique entities into vector
566  subcells.clear();
567  subcells.resize(subcells_set.size());
568  for(std::size_t i=0;i<subcells_set.size();i++)
569  subcells[i].assign(subcells_set[i].begin(),subcells_set[i].end());
570 }
571 
572 }
573 
574 }
void getSidesetNames(std::vector< std::string > &name) const
int baseCellDimension() const
Dimension of the base cell. NOT the dimension of the local side, even if the side() method returns tr...
void getElementBlockNames(std::vector< std::string > &names) const
stk::mesh::Part * getElementBlockPart(const std::string &name) const
get the block part
void getSubcellEntities(const panzer_stk::STK_Interface &mesh, const std::vector< stk::mesh::Entity > &entities, std::vector< std::vector< stk::mesh::Entity > > &subcells)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
void getElementNodes(const std::vector< std::size_t > &localIds, ArrayT &nodes) const
Teuchos::RCP< std::vector< Workset > > buildWorksets(const WorksetNeeds &needs, const std::string &elementBlock, const std::vector< std::size_t > &local_cell_ids, const ArrayT &node_coordinates)
Teuchos::RCP< std::vector< panzer::Workset > > buildWorksets(const panzer_stk::STK_Interface &mesh, const std::string &eBlock, const panzer::WorksetNeeds &needs)
void getIdsAndNodes(const panzer_stk::STK_Interface &mesh, std::string blockId, std::vector< std::size_t > &localIds, ArrayT &nodes)
void getSubcellElements(const panzer_stk::STK_Interface &mesh, const std::string &blockId, const std::vector< stk::mesh::Entity > &entities, std::vector< std::size_t > &localEntityIds, std::vector< stk::mesh::Entity > &elements)
Teuchos::RCP< std::map< unsigned, panzer::Workset > > buildBCWorksets(const panzer_stk::STK_Interface &mesh, const panzer::WorksetNeeds &needs_a, const std::string &blockid_a, const panzer::WorksetNeeds &needs_b, const std::string &blockid_b, const std::string &sideset)
stk::mesh::Part * getSideset(const std::string &name) const
void getMySides(const std::string &sideName, std::vector< stk::mesh::Entity > &sides) const
std::size_t elementLocalId(stk::mesh::Entity elmt) const
void getSideElements(const panzer_stk::STK_Interface &mesh, const std::string &blockId, const std::vector< stk::mesh::Entity > &sides, std::vector< std::size_t > &localSideIds, std::vector< stk::mesh::Entity > &elements)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
stk::mesh::EntityRank getSideRank() const
void getUniversalSubcellElements(const panzer_stk::STK_Interface &mesh, const std::string &blockId, const std::vector< stk::mesh::Entity > &entities, std::vector< std::size_t > &localEntityIds, std::vector< stk::mesh::Entity > &elements, std::vector< std::size_t > &missingElementIndices)
Teuchos::RCP< stk::mesh::BulkData > getBulkData() const
Teuchos::RCP< std::map< unsigned, Workset > > buildBCWorkset(const WorksetNeeds &needs, const std::string &elementBlock, const std::vector< std::size_t > &local_cell_ids, const std::vector< std::size_t > &local_side_ids, const ArrayT &node_coordinates, const bool populate_value_arrays=true)
Teuchos::RCP< stk::mesh::MetaData > getMetaData() const
void getAllSides(const std::string &sideName, std::vector< stk::mesh::Entity > &sides) const
#define TEUCHOS_ASSERT(assertion_test)
void getSideElementCascade(const panzer_stk::STK_Interface &mesh, const std::string &blockId, const std::vector< stk::mesh::Entity > &sides, std::vector< std::size_t > &localSubcellDim, std::vector< std::size_t > &localSubcellIds, std::vector< stk::mesh::Entity > &elements)
void getNodeElements(const panzer_stk::STK_Interface &mesh, const std::string &blockId, const std::vector< stk::mesh::Entity > &nodes, std::vector< std::size_t > &localNodeIds, std::vector< stk::mesh::Entity > &elements)
stk::mesh::Part * getOwnedPart() const
Get a pointer to the locally owned part.
Teuchos::RCP< const shards::CellTopology > getCellTopology(const std::string &eBlock) const
#define TEUCHOS_TEST_FOR_EXCEPTION_PURE_MSG(throw_exception_test, Exception, msg)