Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_FieldManagerBuilder.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 
11 #include <vector>
12 #include <string>
13 #include <sstream>
14 #include <fstream>
15 
17 
18 #include "Phalanx_DataLayout_MDALayout.hpp"
19 #include "Phalanx_FieldManager.hpp"
20 
21 #include "Teuchos_FancyOStream.hpp"
22 
23 #include "Shards_CellTopology.hpp"
24 
25 #include "Panzer_Traits.hpp"
26 #include "Panzer_Workset.hpp"
27 #include "Panzer_Workset_Builder.hpp"
28 #include "Panzer_PhysicsBlock.hpp"
32 #include "Panzer_CellData.hpp"
36 #include "Panzer_GlobalIndexer.hpp"
37 
38 //#include "EpetraExt_BlockMapOut.h"
39 
40 //=======================================================================
41 //=======================================================================
42 void panzer::FieldManagerBuilder::print(std::ostream& os) const
43 {
44  os << "panzer::FieldManagerBuilder output: Not implemented yet!";
45 }
46 
47 //=======================================================================
49 FieldManagerBuilder(bool disablePhysicsBlockScatter,
50  bool disablePhysicsBlockGather)
51  : disablePhysicsBlockScatter_(disablePhysicsBlockScatter)
52  , disablePhysicsBlockGather_(disablePhysicsBlockGather)
53  , active_evaluation_types_(Sacado::mpl::size<panzer::Traits::EvalTypes>::value, true)
54 {}
55 
56 //=======================================================================
57 namespace {
58  struct PostRegistrationFunctor {
59 
60  const std::vector<bool>& active_;
62  panzer::Traits::SD& setup_data_;
63 
64  PostRegistrationFunctor(const std::vector<bool>& active,
66  panzer::Traits::SD& setup_data)
67  : active_(active),fm_(fm),setup_data_(setup_data) {}
68 
69  template<typename T>
70  void operator()(T) const {
71  auto index = Sacado::mpl::find<panzer::Traits::EvalTypes,T>::value;
72  if (active_[index])
73  fm_.postRegistrationSetupForType<T>(setup_data_);
74  }
75  };
76 }
77 
78 //=======================================================================
80  const std::vector<Teuchos::RCP<panzer::PhysicsBlock> >& physicsBlocks,
81  const std::vector<WorksetDescriptor> & wkstDesc,
83  const Teuchos::ParameterList& closure_models,
85  const Teuchos::ParameterList& user_data,
86  const GenericEvaluatorFactory & gEvalFact,
87  bool closureModelByEBlock)
88 {
89  using Teuchos::RCP;
90  using Teuchos::rcp;
91 
92  PANZER_FUNC_TIME_MONITOR_DIFF("panzer::FieldManagerBuilder::setupVolumeFieldManagers",setup_field_managers);
93 
94  TEUCHOS_TEST_FOR_EXCEPTION(getWorksetContainer()==Teuchos::null,std::logic_error,
95  "panzer::FMB::setupVolumeFieldManagers: method function getWorksetContainer() returns null. "
96  "Plase call setWorksetContainer() before calling this method");
97  TEUCHOS_TEST_FOR_EXCEPTION(physicsBlocks.size()!=wkstDesc.size(),std::runtime_error,
98  "panzer::FMB::setupVolumeFieldManagers: physics block count must match workset descriptor count.");
99 
100  phx_volume_field_managers_.clear();
101 
103 
104  for (std::size_t blkInd=0;blkInd<physicsBlocks.size();++blkInd) {
105  RCP<panzer::PhysicsBlock> pb = physicsBlocks[blkInd];
106  const WorksetDescriptor wd = wkstDesc[blkInd];
107 
108  Traits::SD setupData;
109  {
110  PANZER_FUNC_TIME_MONITOR_DIFF("getWorksets()",get_worksets);
111  { setupData.worksets_ = getWorksetContainer()->getWorksets(wd); }
112  }
113  {
114  PANZER_FUNC_TIME_MONITOR_DIFF("getOrientations()",get_orientations);
115  { setupData.orientations_ = getWorksetContainer()->getOrientations(); }
116  }
117  if(setupData.worksets_->size()==0)
118  continue;
119 
120  // sanity check
122 
123  // build a field manager object
126 
127  // use the physics block to register active evaluators
128  pb->setActiveEvaluationTypes(active_evaluation_types_);
129 
130  {
131  PANZER_FUNC_TIME_MONITOR_DIFF("pb->buildAndRegisterEquationSetEvaluators()",build_and_reg_eq_set_eval);
132  { pb->buildAndRegisterEquationSetEvaluators(*fm, user_data); }
133  }
134 
135  if(!physicsBlockGatherDisabled()) {
136  PANZER_FUNC_TIME_MONITOR_DIFF("pb->buildAndRegisterGatherAndOrientationEvaluators()",build_and_reg_gath_and_orient_eval);
137  pb->buildAndRegisterGatherAndOrientationEvaluators(*fm,lo_factory,user_data);
138  }
139 
140  {
141  PANZER_FUNC_TIME_MONITOR_DIFF("pb->buildAndRegisterDOFProjectionsToIPEvaluators()",build_and_reg_dof_proj_eval);
142  pb->buildAndRegisterDOFProjectionsToIPEvaluators(*fm,Teuchos::ptrFromRef(lo_factory),user_data);
143  }
144 
145  if(!physicsBlockScatterDisabled()) {
146  PANZER_FUNC_TIME_MONITOR_DIFF("pb->buildAndRegisterScatterEvaluators()",build_and_reg_scatter_eval);
147  pb->buildAndRegisterScatterEvaluators(*fm,lo_factory,user_data);
148  }
149 
150  if(closureModelByEBlock) {
151  PANZER_FUNC_TIME_MONITOR_DIFF("pb->buildAndRegisterClosureModelEvaluators(): closureModelByEBlock==true",build_and_reg_closure_model_eval_if);
152  pb->buildAndRegisterClosureModelEvaluators(*fm,cm_factory,pb->elementBlockID(),closure_models,user_data);
153  }
154  else {
155  PANZER_FUNC_TIME_MONITOR_DIFF("pb->buildAndRegisterClosureModelEvaluators(): closureModelByEBlock==false",build_and_reg_closure_model_eval_else);
156  pb->buildAndRegisterClosureModelEvaluators(*fm,cm_factory,closure_models,user_data);
157  }
158 
159  // Reset active evaluation types
161 
162  // register additional model evaluator from the generic evaluator factory
163  gEvalFact.registerEvaluators(*fm,wd,*pb);
164 
165  // setup derivative information
166  setKokkosExtendedDataTypeDimensions(wd.getElementBlock(),*globalIndexer,user_data,*fm);
167 
168  // call postRegistrationSetup() for each active type
169  Sacado::mpl::for_each_no_kokkos<panzer::Traits::EvalTypes>(PostRegistrationFunctor(active_evaluation_types_,*fm,setupData));
170 
171  // make sure to add the field manager & workset to the list
172  volume_workset_desc_.push_back(wd);
173  phx_volume_field_managers_.push_back(fm);
174  }
175 }
176 
177 //=======================================================================
179  const std::vector<Teuchos::RCP<panzer::PhysicsBlock> >& physicsBlocks,
181  const Teuchos::ParameterList& closure_models,
182  const panzer::LinearObjFactory<panzer::Traits> & lo_factory,
183  const Teuchos::ParameterList& user_data)
184 {
185  std::vector<WorksetDescriptor> wkstDesc;
186  for(std::size_t i=0;i<physicsBlocks.size();i++)
187  wkstDesc.push_back(blockDescriptor(physicsBlocks[i]->elementBlockID()));
188 
190  setupVolumeFieldManagers(physicsBlocks,wkstDesc,cm_factory,closure_models,lo_factory,user_data,eef);
191 }
192 
193 //=======================================================================
194 //=======================================================================
196 setupBCFieldManagers(const std::vector<panzer::BC> & bcs,
197  const std::vector<Teuchos::RCP<panzer::PhysicsBlock> >& physicsBlocks,
198  const Teuchos::Ptr<const panzer::EquationSetFactory>& /* eqset_factory */,
200  const panzer::BCStrategyFactory& bc_factory,
201  const Teuchos::ParameterList& closure_models,
202  const panzer::LinearObjFactory<panzer::Traits> & lo_factory,
203  const Teuchos::ParameterList& user_data)
204 {
205  TEUCHOS_TEST_FOR_EXCEPTION(getWorksetContainer()==Teuchos::null,std::logic_error,
206  "panzer::FMB::setupBCFieldManagers: method function getWorksetContainer() returns null. "
207  "Plase call setWorksetContainer() before calling this method");
208 
210 
211  // for convenience build a map (element block id => physics block)
212  std::map<std::string,Teuchos::RCP<panzer::PhysicsBlock> > physicsBlocks_map;
213  {
214  std::vector<Teuchos::RCP<panzer::PhysicsBlock> >::const_iterator blkItr;
215  for(blkItr=physicsBlocks.begin();blkItr!=physicsBlocks.end();++blkItr) {
217  std::string blockId = pb->elementBlockID();
218 
219  // add block id, physics block pair to the map
220  physicsBlocks_map.insert(std::make_pair(blockId,pb));
221  }
222  }
223 
224  // ***************************
225  // BCs
226  // ***************************
227  std::vector<panzer::BC>::const_iterator bc;
228  for (bc=bcs.begin(); bc != bcs.end(); ++bc) {
231  currentWkst = getWorksetContainer()->getSideWorksets(wd);
232  if (currentWkst.is_null()) continue;
233 
234  BCType bc_type = bc->bcType();
235 
236  if (bc_type == BCT_Interface) {
237  // Loop over local face indices and setup each field manager
238  for (std::map<unsigned,panzer::Workset>::const_iterator wkst = currentWkst->begin();
239  wkst != currentWkst->end(); ++wkst) {
240  // Build one FieldManager for each local side workset for each bc
241  std::map<unsigned,PHX::FieldManager<panzer::Traits> >& field_managers =
242  bc_field_managers_[*bc];
243 
244  PHX::FieldManager<panzer::Traits>& fm = field_managers[wkst->first];
245 
246  int gid_count = 0;
247  for (int block_id_index = 0; block_id_index < 2; ++block_id_index) {
248  const std::string element_block_id = block_id_index == 0 ? bc->elementBlockID() : bc->elementBlockID2();
249 
250  std::map<std::string,Teuchos::RCP<panzer::PhysicsBlock> >::const_iterator
251  volume_pb_itr = physicsBlocks_map.find(element_block_id);
252 
253  TEUCHOS_TEST_FOR_EXCEPTION(volume_pb_itr == physicsBlocks_map.end(), std::logic_error,
254  "panzer::FMB::setupBCFieldManagers: Cannot find physics block corresponding to element block \""
255  << element_block_id << "\"");
256 
257  const Teuchos::RCP<const panzer::PhysicsBlock> volume_pb = physicsBlocks_map.find(element_block_id)->second;
258  const Teuchos::RCP<const shards::CellTopology> volume_cell_topology = volume_pb->cellData().getCellTopology();
259 
260  // register evaluators from strategy
261  const panzer::CellData side_cell_data(wkst->second.num_cells,
262  wkst->second.details(block_id_index).subcell_index,
263  volume_cell_topology);
264 
265  // Copy the physics block for side integrations
266  Teuchos::RCP<panzer::PhysicsBlock> side_pb = volume_pb->copyWithCellData(side_cell_data);
267 
269  bcstm = bc_factory.buildBCStrategy(*bc, side_pb->globalData());
270 
271  // Iterate over evaluation types
272  int i=0;
274  bcs_type = bcstm->begin(); bcs_type != bcstm->end(); ++bcs_type,++i) {
275  if (active_evaluation_types_[i]) {
276  bcs_type->setDetailsIndex(block_id_index);
277  side_pb->setDetailsIndex(block_id_index);
278  bcs_type->setup(*side_pb, user_data);
279  bcs_type->buildAndRegisterEvaluators(fm, *side_pb, cm_factory, closure_models, user_data);
280  bcs_type->buildAndRegisterGatherAndOrientationEvaluators(fm, *side_pb, lo_factory, user_data);
281  if ( ! physicsBlockScatterDisabled())
282  bcs_type->buildAndRegisterScatterEvaluators(fm, *side_pb, lo_factory, user_data);
283  }
284  }
285 
286  gid_count += globalIndexer->getElementBlockGIDCount(element_block_id);
287  }
288 
289  { // Use gid_count to set up the derivative information.
290  std::vector<PHX::index_size_type> derivative_dimensions;
291  derivative_dimensions.push_back(gid_count);
292  fm.setKokkosExtendedDataTypeDimensions<panzer::Traits::Jacobian>(derivative_dimensions);
293 
294  #ifdef Panzer_BUILD_HESSIAN_SUPPORT
295  fm.setKokkosExtendedDataTypeDimensions<panzer::Traits::Hessian>(derivative_dimensions);
296  #endif
297 
298  derivative_dimensions[0] = 1;
299  if (user_data.isType<int>("Tangent Dimension"))
300  derivative_dimensions[0] = user_data.get<int>("Tangent Dimension");
301  fm.setKokkosExtendedDataTypeDimensions<panzer::Traits::Tangent>(derivative_dimensions);
302  }
303 
304  // Set up the field manager
305  Traits::SD setupData;
306  Teuchos::RCP<std::vector<panzer::Workset> > worksets = Teuchos::rcp(new std::vector<panzer::Workset>);
307  worksets->push_back(wkst->second);
308  setupData.worksets_ = worksets;
309  setupData.orientations_ = getWorksetContainer()->getOrientations();
310 
311  Sacado::mpl::for_each_no_kokkos<panzer::Traits::EvalTypes>(PostRegistrationFunctor(active_evaluation_types_,fm,setupData));
312 
313  }
314  } else {
315  const std::string element_block_id = bc->elementBlockID();
316 
317  std::map<std::string,Teuchos::RCP<panzer::PhysicsBlock> >::const_iterator volume_pb_itr
318  = physicsBlocks_map.find(element_block_id);
319 
320  TEUCHOS_TEST_FOR_EXCEPTION(volume_pb_itr==physicsBlocks_map.end(),std::logic_error,
321  "panzer::FMB::setupBCFieldManagers: Cannot find physics block corresponding to element block \"" << element_block_id << "\"");
322 
323  Teuchos::RCP<const panzer::PhysicsBlock> volume_pb = physicsBlocks_map.find(element_block_id)->second;
324  Teuchos::RCP<const shards::CellTopology> volume_cell_topology = volume_pb->cellData().getCellTopology();
325 
326  // Build one FieldManager for each local side workset for each dirichlet bc
327  std::map<unsigned,PHX::FieldManager<panzer::Traits> >& field_managers =
328  bc_field_managers_[*bc];
329 
330  // Loop over local face indices and setup each field manager
331  for (std::map<unsigned,panzer::Workset>::const_iterator wkst =
332  currentWkst->begin(); wkst != currentWkst->end();
333  ++wkst) {
334 
335  PHX::FieldManager<panzer::Traits>& fm = field_managers[wkst->first];
336 
337  // register evaluators from strategy
338  const panzer::CellData side_cell_data(wkst->second.num_cells,
339  wkst->first,volume_cell_topology);
340 
341  // Copy the physics block for side integrations
342  Teuchos::RCP<panzer::PhysicsBlock> side_pb = volume_pb->copyWithCellData(side_cell_data);
343 
345  bc_factory.buildBCStrategy(*bc,side_pb->globalData());
346 
347  // Iterate over evaluation types
348  int i=0;
350  bcs_type = bcstm->begin(); bcs_type != bcstm->end(); ++bcs_type,++i) {
351  if (active_evaluation_types_[i]) {
352  bcs_type->setup(*side_pb,user_data);
353  bcs_type->buildAndRegisterEvaluators(fm,*side_pb,cm_factory,closure_models,user_data);
354  bcs_type->buildAndRegisterGatherAndOrientationEvaluators(fm,*side_pb,lo_factory,user_data);
355  if(!physicsBlockScatterDisabled())
356  bcs_type->buildAndRegisterScatterEvaluators(fm,*side_pb,lo_factory,user_data);
357  }
358  }
359 
360  // Setup the fieldmanager
361  Traits::SD setupData;
363  Teuchos::rcp(new(std::vector<panzer::Workset>));
364  worksets->push_back(wkst->second);
365  setupData.worksets_ = worksets;
366  setupData.orientations_ = getWorksetContainer()->getOrientations();
367 
368  // setup derivative information
369  setKokkosExtendedDataTypeDimensions(element_block_id,*globalIndexer,user_data,fm);
370 
371  Sacado::mpl::for_each_no_kokkos<panzer::Traits::EvalTypes>(PostRegistrationFunctor(active_evaluation_types_,fm,setupData));
372  }
373  }
374  }
375 }
376 
377 //=======================================================================
378 //=======================================================================
380 writeVolumeGraphvizDependencyFiles(std::string filename_prefix,
381  const std::vector<Teuchos::RCP<panzer::PhysicsBlock> >& physicsBlocks) const
382 {
383  if(phx_volume_field_managers_.size()<1)
384  return; // nothing to see here folks
385 
386  TEUCHOS_ASSERT(phx_volume_field_managers_.size()==physicsBlocks.size());
387 
388  std::vector<Teuchos::RCP<panzer::PhysicsBlock> >::const_iterator blkItr;
389  int index = 0;
390  for (blkItr=physicsBlocks.begin();blkItr!=physicsBlocks.end();++blkItr,++index) {
391  std::string blockId = (*blkItr)->elementBlockID();
392  phx_volume_field_managers_[index]->writeGraphvizFile(filename_prefix+"_VOLUME_"+blockId);
393  }
394 
395 }
396 
397 //=======================================================================
398 //=======================================================================
400 writeBCGraphvizDependencyFiles(std::string filename_prefix) const
401 {
402  typedef std::map<panzer::BC,std::map<unsigned,PHX::FieldManager<panzer::Traits> >,panzer::LessBC> FMMap;
403 
404  FMMap::const_iterator blkItr;
405  int bc_index = 0;
406  for (blkItr=bc_field_managers_.begin();blkItr!=bc_field_managers_.end();++blkItr,++bc_index) {
407  panzer::BC bc = blkItr->first;
408  const PHX::FieldManager<panzer::Traits> & fm = blkItr->second.begin()->second; // get the first field manager
409 
410  BCType bc_type = bc.bcType();
411  std::string type;
412  if (bc_type == BCT_Dirichlet)
413  type = "_Dirichlet_";
414  else if (bc_type == BCT_Neumann)
415  type = "_Neumann_";
416  else if (bc_type == BCT_Interface)
417  type = "_Interface_";
418  else
419  TEUCHOS_ASSERT(false);
420 
421  std::string blockId = bc.elementBlockID();
422  std::string sideId = bc.sidesetID();
423  fm.writeGraphvizFile(filename_prefix+"_BC_"+std::to_string(bc_index)+type+sideId+"_"+blockId);
424  }
425 
426 }
427 
428 //=======================================================================
429 //=======================================================================
431 writeVolumeTextDependencyFiles(std::string filename_prefix,
432  const std::vector<Teuchos::RCP<panzer::PhysicsBlock> >& physicsBlocks) const
433 {
434  if(phx_volume_field_managers_.size()<1)
435  return; // nothing to see here folks
436 
437  TEUCHOS_ASSERT(phx_volume_field_managers_.size()==physicsBlocks.size());
438 
439  std::vector<Teuchos::RCP<panzer::PhysicsBlock> >::const_iterator blkItr;
440  int index = 0;
441  for (blkItr=physicsBlocks.begin();blkItr!=physicsBlocks.end();++blkItr,++index) {
442 
443  std::string blockId = (*blkItr)->elementBlockID();
444 
445  std::string filename = filename_prefix+"_VOLUME_"+blockId+".txt";
446  std::ofstream ofs;
447  ofs.open(filename.c_str());
448 
449  ofs << *(phx_volume_field_managers_[index]) << std::endl;
450 
451  ofs.close();
452  }
453 
454 }
455 
456 //=======================================================================
457 //=======================================================================
459 writeBCTextDependencyFiles(std::string filename_prefix) const
460 {
461  typedef std::map<panzer::BC,std::map<unsigned,PHX::FieldManager<panzer::Traits> >,panzer::LessBC> FMMap;
462 
463  FMMap::const_iterator blkItr;
464  int bc_index = 0;
465  for (blkItr=bc_field_managers_.begin();blkItr!=bc_field_managers_.end();++blkItr,++bc_index) {
466  panzer::BC bc = blkItr->first;
467  const PHX::FieldManager<panzer::Traits> & fm = blkItr->second.begin()->second; // get the first field manager
468 
469  BCType bc_type = bc.bcType();
470  std::string type;
471  if (bc_type == BCT_Dirichlet)
472  type = "_Dirichlet_";
473  else if (bc_type == BCT_Neumann)
474  type = "_Neumann_";
475  else if (bc_type == BCT_Interface)
476  type = "_Interface_";
477  else
478  TEUCHOS_ASSERT(false);
479 
480  std::string blockId = bc.elementBlockID();
481  std::string sideId = bc.sidesetID();
482 
483  std::string filename = filename_prefix+"_BC_"+std::to_string(bc_index)+type+sideId+"_"+blockId+".txt";
484  std::ofstream ofs;
485  ofs.open(filename.c_str());
486 
487  ofs << fm << std::endl;
488 
489  ofs.close();
490  }
491 
492 }
493 
494 //=======================================================================
495 //=======================================================================
497 setKokkosExtendedDataTypeDimensions(const std::string & eblock,
498  const panzer::GlobalIndexer & globalIndexer,
499  const Teuchos::ParameterList& user_data,
501 {
502  // setup Jacobian derivative terms
503  {
504  std::vector<PHX::index_size_type> derivative_dimensions;
505  derivative_dimensions.push_back(globalIndexer.getElementBlockGIDCount(eblock));
506 
507  fm.setKokkosExtendedDataTypeDimensions<panzer::Traits::Jacobian>(derivative_dimensions);
508 
509  }
510 
511  #ifdef Panzer_BUILD_HESSIAN_SUPPORT
512  {
513  std::vector<PHX::index_size_type> derivative_dimensions;
514  derivative_dimensions.push_back(globalIndexer.getElementBlockGIDCount(eblock));
515 
516  fm.setKokkosExtendedDataTypeDimensions<panzer::Traits::Hessian>(derivative_dimensions);
517  }
518  #endif
519 
520  {
521  std::vector<PHX::index_size_type> derivative_dimensions;
522  derivative_dimensions.push_back(1);
523  if (user_data.isType<int>("Tangent Dimension"))
524  derivative_dimensions[0] = user_data.get<int>("Tangent Dimension");
525  fm.setKokkosExtendedDataTypeDimensions<panzer::Traits::Tangent>(derivative_dimensions);
526  }
527 }
528 
530 {active_evaluation_types_ = aet;}
531 
532 //=======================================================================
533 //=======================================================================
535 {
536  phx_volume_field_managers_.clear();
537  volume_workset_desc_.clear();
538  if (clearVolumeWorksets)
539  worksetContainer_->clearVolumeWorksets();
540 }
541 
542 //=======================================================================
543 //=======================================================================
544 std::ostream& panzer::operator<<(std::ostream& os, const panzer::FieldManagerBuilder& rfd)
545 {
546  rfd.print(os);
547  return os;
548 }
Interface for constructing a BCStrategy_TemplateManager.
void setupVolumeFieldManagers(const std::vector< Teuchos::RCP< panzer::PhysicsBlock > > &physicsBlocks, const panzer::ClosureModelFactory_TemplateManager< panzer::Traits > &cm_factory, const Teuchos::ParameterList &closure_models, const LinearObjFactory< panzer::Traits > &lo_factory, const Teuchos::ParameterList &user_data)
Teuchos::RCP< const std::vector< Intrepid2::Orientation > > orientations_
BCType
Type of boundary condition.
Definition: Panzer_BC.hpp:41
std::string elementBlockID() const
Returns the element block id associated with this sideset.
Definition: Panzer_BC.cpp:168
virtual Teuchos::RCP< const panzer::GlobalIndexer > getRangeGlobalIndexer() const =0
Get the range global indexer object associated with this factory.
T & get(const std::string &name, T def_value)
FieldManager::iterator begin()
void writeVolumeGraphvizDependencyFiles(std::string filename_prefix, const std::vector< Teuchos::RCP< panzer::PhysicsBlock > > &physicsBlocks) const
virtual int getElementBlockGIDCount(const std::size_t &blockIndex) const =0
How any GIDs are associate with each element in a particular element block.
void buildAndRegisterClosureModelEvaluators(PHX::FieldManager< panzer::Traits > &fm, const panzer::ClosureModelFactory_TemplateManager< panzer::Traits > &factory, const Teuchos::ParameterList &models, const Teuchos::ParameterList &user_data) const
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
void buildAndRegisterScatterEvaluators(PHX::FieldManager< panzer::Traits > &fm, const panzer::LinearObjFactory< panzer::Traits > &lof, const Teuchos::ParameterList &user_data) const
const std::string & getElementBlock(const int block=0) const
Get element block name.
void writeBCGraphvizDependencyFiles(std::string filename_prefix) const
void writeGraphvizFile(const std::string filename="graph.dot", bool writeEvaluatedFields=true, bool writeDependentFields=true, bool debugRegisteredEvaluators=false) const
void clearVolumeFieldManagers(bool clearVolumeWorksets=true)
Delete all volume field managers, retaining the BC ones.
void setKokkosExtendedDataTypeDimensions(const std::string &eblock, const panzer::GlobalIndexer &globalIndexer, const Teuchos::ParameterList &user_data, PHX::FieldManager< panzer::Traits > &fm) const
void buildAndRegisterGatherAndOrientationEvaluators(PHX::FieldManager< panzer::Traits > &fm, const panzer::LinearObjFactory< panzer::Traits > &lof, const Teuchos::ParameterList &user_data) const
virtual Teuchos::RCP< panzer::BCStrategy_TemplateManager< panzer::Traits > > buildBCStrategy(const panzer::BC &bc, const Teuchos::RCP< panzer::GlobalData > &global_data) const =0
void writeBCTextDependencyFiles(std::string filename_prefix) const
Teuchos::RCP< panzer::GlobalData > globalData() const
void setActiveEvaluationTypes(const std::vector< bool > &aet)
Used to save memory by disabling unneeded evaluation types.
void buildAndRegisterDOFProjectionsToIPEvaluators(PHX::FieldManager< panzer::Traits > &fm, const Teuchos::Ptr< const panzer::LinearObjFactory< panzer::Traits > > &lof, const Teuchos::ParameterList &user_data) const
void print(std::ostream &os) const
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Data for determining cell topology and dimensionality.
void writeVolumeTextDependencyFiles(std::string filename_prefix, const std::vector< Teuchos::RCP< panzer::PhysicsBlock > > &physicsBlocks) const
std::string elementBlockID() const
BCType bcType() const
Returns the boundary condition type (Dirichlet or Neumann or Interface).
Definition: Panzer_BC.cpp:154
virtual bool registerEvaluators(PHX::FieldManager< panzer::Traits > &fm, const WorksetDescriptor &wd, const PhysicsBlock &pb) const =0
void activateAllEvaluationTypes()
Used to reactivate all evaluation types if some were temporarily disabled with a call to setActiveEva...
std::string sidesetID() const
Returns the set id.
Definition: Panzer_BC.cpp:161
std::ostream & operator<<(std::ostream &os, const AssemblyEngineInArgs &in)
bool isType(const std::string &name) const
FieldManagerBuilder(bool disablePhysicsBlockScatter=false, bool disablePhysicsBlockGather=false)
WorksetDescriptor blockDescriptor(const std::string &eBlock)
WorksetDescriptor bcDescriptor(const panzer::BC &bc)
Definition: Panzer_BC.cpp:300
Stores input information for a boundary condition.
Definition: Panzer_BC.hpp:48
void setupBCFieldManagers(const std::vector< panzer::BC > &bcs, const std::vector< Teuchos::RCP< panzer::PhysicsBlock > > &physicsBlocks, const panzer::EquationSetFactory &eqset_factory, const panzer::ClosureModelFactory_TemplateManager< panzer::Traits > &cm_factory, const panzer::BCStrategyFactory &bc_factory, const Teuchos::ParameterList &closure_models, const LinearObjFactory< panzer::Traits > &lo_factory, const Teuchos::ParameterList &user_data)
#define TEUCHOS_ASSERT(assertion_test)
void setActiveEvaluationTypes(const std::vector< bool > &aet)
Set a vector of active evaluation types to allocate.
void buildAndRegisterEquationSetEvaluators(PHX::FieldManager< panzer::Traits > &fm, const Teuchos::ParameterList &user_data) const
Teuchos::RCP< const std::vector< panzer::Workset > > worksets_
bool is_null() const