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 
233  if (currentWkst.is_null()) continue;
234 
235  BCType bc_type = bc->bcType();
236 
237  if (bc_type == BCT_Interface) {
238  // Loop over local face indices and setup each field manager
239  for (std::map<unsigned,panzer::Workset>::const_iterator wkst = currentWkst->begin();
240  wkst != currentWkst->end(); ++wkst) {
241  // Build one FieldManager for each local side workset for each bc
242  std::map<unsigned,PHX::FieldManager<panzer::Traits> >& field_managers =
243  bc_field_managers_[*bc];
244 
245  PHX::FieldManager<panzer::Traits>& fm = field_managers[wkst->first];
246 
247  int gid_count = 0;
248  for (int block_id_index = 0; block_id_index < 2; ++block_id_index) {
249  const std::string element_block_id = block_id_index == 0 ? bc->elementBlockID() : bc->elementBlockID2();
250 
251  std::map<std::string,Teuchos::RCP<panzer::PhysicsBlock> >::const_iterator
252  volume_pb_itr = physicsBlocks_map.find(element_block_id);
253 
254  TEUCHOS_TEST_FOR_EXCEPTION(volume_pb_itr == physicsBlocks_map.end(), std::logic_error,
255  "panzer::FMB::setupBCFieldManagers: Cannot find physics block corresponding to element block \""
256  << element_block_id << "\"");
257 
258  const Teuchos::RCP<const panzer::PhysicsBlock> volume_pb = physicsBlocks_map.find(element_block_id)->second;
259  const Teuchos::RCP<const shards::CellTopology> volume_cell_topology = volume_pb->cellData().getCellTopology();
260 
261  // register evaluators from strategy
262  const panzer::CellData side_cell_data(wkst->second.num_cells,
263  wkst->second.details(block_id_index).subcell_index,
264  volume_cell_topology);
265 
266  // Copy the physics block for side integrations
267  Teuchos::RCP<panzer::PhysicsBlock> side_pb = volume_pb->copyWithCellData(side_cell_data);
268 
270  bcstm = bc_factory.buildBCStrategy(*bc, side_pb->globalData());
271 
272  // Iterate over evaluation types
273  int i=0;
275  bcs_type = bcstm->begin(); bcs_type != bcstm->end(); ++bcs_type,++i) {
276  if (active_evaluation_types_[i]) {
277  bcs_type->setDetailsIndex(block_id_index);
278  side_pb->setDetailsIndex(block_id_index);
279  bcs_type->setup(*side_pb, user_data);
280  bcs_type->buildAndRegisterEvaluators(fm, *side_pb, cm_factory, closure_models, user_data);
281  bcs_type->buildAndRegisterGatherAndOrientationEvaluators(fm, *side_pb, lo_factory, user_data);
282  if ( ! physicsBlockScatterDisabled())
283  bcs_type->buildAndRegisterScatterEvaluators(fm, *side_pb, lo_factory, user_data);
284  }
285  }
286 
287  gid_count += globalIndexer->getElementBlockGIDCount(element_block_id);
288  }
289 
290  { // Use gid_count to set up the derivative information.
291  std::vector<PHX::index_size_type> derivative_dimensions;
292  derivative_dimensions.push_back(gid_count);
293  fm.setKokkosExtendedDataTypeDimensions<panzer::Traits::Jacobian>(derivative_dimensions);
294 
295  #ifdef Panzer_BUILD_HESSIAN_SUPPORT
296  fm.setKokkosExtendedDataTypeDimensions<panzer::Traits::Hessian>(derivative_dimensions);
297  #endif
298 
299  derivative_dimensions[0] = 1;
300  if (user_data.isType<int>("Tangent Dimension"))
301  derivative_dimensions[0] = user_data.get<int>("Tangent Dimension");
302  fm.setKokkosExtendedDataTypeDimensions<panzer::Traits::Tangent>(derivative_dimensions);
303  }
304 
305  // Set up the field manager
306  Traits::SD setupData;
307  Teuchos::RCP<std::vector<panzer::Workset> > worksets = Teuchos::rcp(new std::vector<panzer::Workset>);
308  worksets->push_back(wkst->second);
309  setupData.worksets_ = worksets;
310  setupData.orientations_ = getWorksetContainer()->getOrientations();
311 
312  Sacado::mpl::for_each_no_kokkos<panzer::Traits::EvalTypes>(PostRegistrationFunctor(active_evaluation_types_,fm,setupData));
313 
314  }
315  } else {
316  const std::string element_block_id = bc->elementBlockID();
317 
318  std::map<std::string,Teuchos::RCP<panzer::PhysicsBlock> >::const_iterator volume_pb_itr
319  = physicsBlocks_map.find(element_block_id);
320 
321  TEUCHOS_TEST_FOR_EXCEPTION(volume_pb_itr==physicsBlocks_map.end(),std::logic_error,
322  "panzer::FMB::setupBCFieldManagers: Cannot find physics block corresponding to element block \"" << element_block_id << "\"");
323 
324  Teuchos::RCP<const panzer::PhysicsBlock> volume_pb = physicsBlocks_map.find(element_block_id)->second;
325  Teuchos::RCP<const shards::CellTopology> volume_cell_topology = volume_pb->cellData().getCellTopology();
326 
327  // Build one FieldManager for each local side workset for each dirichlet bc
328  std::map<unsigned,PHX::FieldManager<panzer::Traits> >& field_managers =
329  bc_field_managers_[*bc];
330 
331  // Loop over local face indices and setup each field manager
332  for (std::map<unsigned,panzer::Workset>::const_iterator wkst =
333  currentWkst->begin(); wkst != currentWkst->end();
334  ++wkst) {
335 
336  PHX::FieldManager<panzer::Traits>& fm = field_managers[wkst->first];
337 
338  // register evaluators from strategy
339  const panzer::CellData side_cell_data(wkst->second.num_cells,
340  wkst->first,volume_cell_topology);
341 
342  // Copy the physics block for side integrations
343  Teuchos::RCP<panzer::PhysicsBlock> side_pb = volume_pb->copyWithCellData(side_cell_data);
344 
346  bc_factory.buildBCStrategy(*bc,side_pb->globalData());
347 
348  // Iterate over evaluation types
349  int i=0;
351  bcs_type = bcstm->begin(); bcs_type != bcstm->end(); ++bcs_type,++i) {
352  if (active_evaluation_types_[i]) {
353  bcs_type->setup(*side_pb,user_data);
354  bcs_type->buildAndRegisterEvaluators(fm,*side_pb,cm_factory,closure_models,user_data);
355  bcs_type->buildAndRegisterGatherAndOrientationEvaluators(fm,*side_pb,lo_factory,user_data);
356  if(!physicsBlockScatterDisabled())
357  bcs_type->buildAndRegisterScatterEvaluators(fm,*side_pb,lo_factory,user_data);
358  }
359  }
360 
361  // Setup the fieldmanager
362  Traits::SD setupData;
364  Teuchos::rcp(new(std::vector<panzer::Workset>));
365  worksets->push_back(wkst->second);
366  setupData.worksets_ = worksets;
367  setupData.orientations_ = getWorksetContainer()->getOrientations();
368 
369  // setup derivative information
370  setKokkosExtendedDataTypeDimensions(element_block_id,*globalIndexer,user_data,fm);
371 
372  Sacado::mpl::for_each_no_kokkos<panzer::Traits::EvalTypes>(PostRegistrationFunctor(active_evaluation_types_,fm,setupData));
373  }
374  }
375  }
376 }
377 
378 //=======================================================================
379 //=======================================================================
381 writeVolumeGraphvizDependencyFiles(std::string filename_prefix,
382  const std::vector<Teuchos::RCP<panzer::PhysicsBlock> >& physicsBlocks) const
383 {
384  if(phx_volume_field_managers_.size()<1)
385  return; // nothing to see here folks
386 
387  TEUCHOS_ASSERT(phx_volume_field_managers_.size()==physicsBlocks.size());
388 
389  std::vector<Teuchos::RCP<panzer::PhysicsBlock> >::const_iterator blkItr;
390  int index = 0;
391  for (blkItr=physicsBlocks.begin();blkItr!=physicsBlocks.end();++blkItr,++index) {
392  std::string blockId = (*blkItr)->elementBlockID();
393  phx_volume_field_managers_[index]->writeGraphvizFile(filename_prefix+"_VOLUME_"+blockId);
394  }
395 
396 }
397 
398 //=======================================================================
399 //=======================================================================
401 writeBCGraphvizDependencyFiles(std::string filename_prefix) const
402 {
403  typedef std::map<panzer::BC,std::map<unsigned,PHX::FieldManager<panzer::Traits> >,panzer::LessBC> FMMap;
404 
405  FMMap::const_iterator blkItr;
406  int bc_index = 0;
407  for (blkItr=bc_field_managers_.begin();blkItr!=bc_field_managers_.end();++blkItr,++bc_index) {
408  panzer::BC bc = blkItr->first;
409  const PHX::FieldManager<panzer::Traits> & fm = blkItr->second.begin()->second; // get the first field manager
410 
411  BCType bc_type = bc.bcType();
412  std::string type;
413  if (bc_type == BCT_Dirichlet)
414  type = "_Dirichlet_";
415  else if (bc_type == BCT_Neumann)
416  type = "_Neumann_";
417  else if (bc_type == BCT_Interface)
418  type = "_Interface_";
419  else
420  TEUCHOS_ASSERT(false);
421 
422  std::string blockId = bc.elementBlockID();
423  std::string sideId = bc.sidesetID();
424  fm.writeGraphvizFile(filename_prefix+"_BC_"+std::to_string(bc_index)+type+sideId+"_"+blockId);
425  }
426 
427 }
428 
429 //=======================================================================
430 //=======================================================================
432 writeVolumeTextDependencyFiles(std::string filename_prefix,
433  const std::vector<Teuchos::RCP<panzer::PhysicsBlock> >& physicsBlocks) const
434 {
435  if(phx_volume_field_managers_.size()<1)
436  return; // nothing to see here folks
437 
438  TEUCHOS_ASSERT(phx_volume_field_managers_.size()==physicsBlocks.size());
439 
440  std::vector<Teuchos::RCP<panzer::PhysicsBlock> >::const_iterator blkItr;
441  int index = 0;
442  for (blkItr=physicsBlocks.begin();blkItr!=physicsBlocks.end();++blkItr,++index) {
443 
444  std::string blockId = (*blkItr)->elementBlockID();
445 
446  std::string filename = filename_prefix+"_VOLUME_"+blockId+".txt";
447  std::ofstream ofs;
448  ofs.open(filename.c_str());
449 
450  ofs << *(phx_volume_field_managers_[index]) << std::endl;
451 
452  ofs.close();
453  }
454 
455 }
456 
457 //=======================================================================
458 //=======================================================================
460 writeBCTextDependencyFiles(std::string filename_prefix) const
461 {
462  typedef std::map<panzer::BC,std::map<unsigned,PHX::FieldManager<panzer::Traits> >,panzer::LessBC> FMMap;
463 
464  FMMap::const_iterator blkItr;
465  int bc_index = 0;
466  for (blkItr=bc_field_managers_.begin();blkItr!=bc_field_managers_.end();++blkItr,++bc_index) {
467  panzer::BC bc = blkItr->first;
468  const PHX::FieldManager<panzer::Traits> & fm = blkItr->second.begin()->second; // get the first field manager
469 
470  BCType bc_type = bc.bcType();
471  std::string type;
472  if (bc_type == BCT_Dirichlet)
473  type = "_Dirichlet_";
474  else if (bc_type == BCT_Neumann)
475  type = "_Neumann_";
476  else if (bc_type == BCT_Interface)
477  type = "_Interface_";
478  else
479  TEUCHOS_ASSERT(false);
480 
481  std::string blockId = bc.elementBlockID();
482  std::string sideId = bc.sidesetID();
483 
484  std::string filename = filename_prefix+"_BC_"+std::to_string(bc_index)+type+sideId+"_"+blockId+".txt";
485  std::ofstream ofs;
486  ofs.open(filename.c_str());
487 
488  ofs << fm << std::endl;
489 
490  ofs.close();
491  }
492 
493 }
494 
495 //=======================================================================
496 //=======================================================================
498 setKokkosExtendedDataTypeDimensions(const std::string & eblock,
499  const panzer::GlobalIndexer & globalIndexer,
500  const Teuchos::ParameterList& user_data,
502 {
503  // setup Jacobian derivative terms
504  {
505  std::vector<PHX::index_size_type> derivative_dimensions;
506  derivative_dimensions.push_back(globalIndexer.getElementBlockGIDCount(eblock));
507 
508  fm.setKokkosExtendedDataTypeDimensions<panzer::Traits::Jacobian>(derivative_dimensions);
509 
510  }
511 
512  #ifdef Panzer_BUILD_HESSIAN_SUPPORT
513  {
514  std::vector<PHX::index_size_type> derivative_dimensions;
515  derivative_dimensions.push_back(globalIndexer.getElementBlockGIDCount(eblock));
516 
517  fm.setKokkosExtendedDataTypeDimensions<panzer::Traits::Hessian>(derivative_dimensions);
518  }
519  #endif
520 
521  {
522  std::vector<PHX::index_size_type> derivative_dimensions;
523  derivative_dimensions.push_back(1);
524  if (user_data.isType<int>("Tangent Dimension"))
525  derivative_dimensions[0] = user_data.get<int>("Tangent Dimension");
526  fm.setKokkosExtendedDataTypeDimensions<panzer::Traits::Tangent>(derivative_dimensions);
527  }
528 }
529 
531 {active_evaluation_types_ = aet;}
532 
533 //=======================================================================
534 //=======================================================================
536 {
537  phx_volume_field_managers_.clear();
538  volume_workset_desc_.clear();
539  if (clearVolumeWorksets)
540  worksetContainer_->clearVolumeWorksets();
541 }
542 
543 //=======================================================================
544 //=======================================================================
545 std::ostream& panzer::operator<<(std::ostream& os, const panzer::FieldManagerBuilder& rfd)
546 {
547  rfd.print(os);
548  return os;
549 }
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