43 #ifndef PANZER_PHYSICS_BLOCK_HPP
44 #define PANZER_PHYSICS_BLOCK_HPP
51 #include "Phalanx_FieldManager.hpp"
71 class IntegrationRule;
72 struct EquationSetFactory;
83 void buildPhysicsBlocks(
const std::map<std::string,std::string>& block_ids_to_physics_ids,
86 const int default_integration_order,
87 const std::size_t workset_size,
90 const bool build_transient_support,
92 const std::vector<std::string>& tangent_param_names = std::vector<std::string>());
100 void readPhysicsBlocks(
const std::map<std::string,std::string>& block_ids_to_physics_ids,
113 bool throw_on_failure =
true);
122 { std::cout <<
"WARNING: Default constructor for panzer::PhysicsBlock is for testing purposes only!" << std::endl; }
127 const std::string & element_block_id,
128 const int default_integration_order,
132 const bool build_transient_support,
133 const std::vector<std::string>& tangent_param_names = std::vector<std::string>());
141 const std::string & element_block_id);
151 const std::string & physics_block_id,
152 const int integration_order,
160 void initialize(
const int default_integration_order,
161 const bool build_transient_support,
165 const std::vector<std::string>& tangent_param_names = std::vector<std::string>());
189 const std::string& model_name,
196 const std::string& model_name,
200 template<
typename EvalT>
204 template<
typename EvalT>
209 template<
typename EvalT>
214 template<
typename EvalT>
219 template<
typename EvalT>
225 template<
typename EvalT>
228 const std::string& model_name,
233 const std::vector<std::string>&
getDOFNames()
const;
246 const std::map<std::string,Teuchos::RCP<panzer::PureBasis> >&
getBases()
const;
278 const int& default_integration_order,
279 const std::string & element_block_id,
281 const bool build_transient_support,
282 const std::vector<std::string>& tangent_param_names = std::vector<std::string>());
299 std::map<std::string,Teuchos::RCP<panzer::PureBasis> >
m_bases;
303 std::vector< Teuchos::RCP<panzer::EquationSet_TemplateManager<panzer::Traits> > >
m_equation_sets;
314 template<
typename EvalT>
323 vector< RCP<EquationSet_TemplateManager<panzer::Traits> > >::const_iterator
335 template<
typename EvalT>
345 vector< RCP<EquationSet_TemplateManager<panzer::Traits> > >::const_iterator
346 eq_set = m_equation_sets.begin();
347 for (;eq_set != m_equation_sets.end(); ++eq_set) {
351 const int di = eqstm.getAsObject<EvalT>()->setDetailsIndex(this->getDetailsIndex());
352 eqstm.getAsObject<EvalT>()->buildAndRegisterGatherAndOrientationEvaluators(fm,*m_field_lib,lof,user_data);
353 eqstm.getAsObject<EvalT>()->setDetailsIndex(di);
357 template<
typename EvalT>
367 vector< RCP<EquationSet_TemplateManager<panzer::Traits> > >::const_iterator
368 eq_set = m_equation_sets.begin();
369 for (;eq_set != m_equation_sets.end(); ++eq_set) {
374 ir_iter != m_integration_rules.end(); ++ ir_iter) {
378 const int di = eqstm.getAsObject<EvalT>()->setDetailsIndex(this->getDetailsIndex());
379 eqstm.getAsObject<EvalT>()->buildAndRegisterDOFProjectionsToIPEvaluators(fm,*m_field_lib->buildFieldLayoutLibrary(*ir),ir,lof,user_data);
380 eqstm.getAsObject<EvalT>()->setDetailsIndex(di);
386 template<
typename EvalT>
396 vector< RCP<EquationSet_TemplateManager<panzer::Traits> > >::const_iterator
397 eq_set = m_equation_sets.begin();
398 for (;eq_set != m_equation_sets.end(); ++eq_set) {
402 const int di = eqstm.getAsObject<EvalT>()->setDetailsIndex(this->getDetailsIndex());
403 eqstm.getAsObject<EvalT>()->buildAndRegisterScatterEvaluators(fm,*m_field_lib,lof,user_data);
404 eqstm.getAsObject<EvalT>()->setDetailsIndex(di);
408 template<
typename EvalT>
419 vector< RCP<EquationSet_TemplateManager<panzer::Traits> > >::const_iterator
420 eq_set = m_equation_sets.begin();
421 for (;eq_set != m_equation_sets.end(); ++eq_set) {
427 ir_iter != m_integration_rules.end(); ++ ir_iter) {
431 const int di = eqstm.getAsObject<EvalT>()->setDetailsIndex(this->getDetailsIndex());
432 eqstm.getAsObject<EvalT>()->buildAndRegisterClosureModelEvaluators(fm,*m_field_lib->buildFieldLayoutLibrary(*ir),ir,factory,models,user_data);
433 eqstm.getAsObject<EvalT>()->setDetailsIndex(di);
439 template<
typename EvalT>
442 const std::string& model_name,
452 vector< RCP<EquationSet_TemplateManager<panzer::Traits> > >::const_iterator
453 eq_set = m_equation_sets.begin();
454 for (;eq_set != m_equation_sets.end(); ++eq_set) {
455 std::vector<StrBasisPair> providedDOFs;
459 const int di = eqstm.getAsObject<EvalT>()->setDetailsIndex(this->getDetailsIndex());
460 eqstm.getAsObject<EvalT>()->buildAndRegisterInitialConditionEvaluators(fm, *m_field_lib, factory, model_name, models, lof, user_data);
461 eqstm.getAsObject<EvalT>()->setDetailsIndex(di);
Teuchos::RCP< PhysicsBlock > copyWithCellData(const panzer::CellData &cell_data) const
const std::vector< std::string > & getDOFNames() const
std::vector< StrPureBasisPair > m_provided_dofs
Teuchos::RCP< panzer::GlobalData > m_global_data
Object that contains information on the physics and discretization of a block of elements with the SA...
const std::map< std::string, Teuchos::RCP< panzer::PureBasis > > & getBases() const
Returns the unique set of bases, key is the unique panzer::PureBasis::name() of the basis...
int setDetailsIndex(const int details_index)
Teuchos::RCP< const panzer::EquationSetFactory > m_eqset_factory
const panzer::CellData & cellData() const
void buildAndRegisterClosureModelEvaluators(PHX::FieldManager< panzer::Traits > &fm, const panzer::ClosureModelFactory_TemplateManager< panzer::Traits > &factory, const Teuchos::ParameterList &models, const Teuchos::ParameterList &user_data) const
void buildAndRegisterScatterEvaluators(PHX::FieldManager< panzer::Traits > &fm, const panzer::LinearObjFactory< panzer::Traits > &lof, const Teuchos::ParameterList &user_data) const
int getDetailsIndex() const
Get the WorksetDetails index.
void buildAndRegisterClosureModelEvaluatorsForType(PHX::FieldManager< panzer::Traits > &fm, const panzer::ClosureModelFactory_TemplateManager< panzer::Traits > &factory, const Teuchos::ParameterList &models, const Teuchos::ParameterList &user_data) const
std::string physicsBlockID() const
void buildAndRegisterInitialConditionEvaluators(PHX::FieldManager< panzer::Traits > &fm, const panzer::ClosureModelFactory_TemplateManager< panzer::Traits > &factory, const std::string &model_name, const Teuchos::ParameterList &models, const panzer::LinearObjFactory< panzer::Traits > &lof, const Teuchos::ParameterList &user_data) const
void buildAndRegisterGatherAndOrientationEvaluators(PHX::FieldManager< panzer::Traits > &fm, const panzer::LinearObjFactory< panzer::Traits > &lof, const Teuchos::ParameterList &user_data) const
Teuchos::RCP< panzer::GlobalData > globalData() const
int m_default_integration_order
std::vector< Teuchos::RCP< panzer::EquationSet_TemplateManager< panzer::Traits > > > m_equation_sets
void buildAndRegisterDOFProjectionsToIPEvaluators(PHX::FieldManager< panzer::Traits > &fm, const Teuchos::Ptr< const panzer::LinearObjFactory< panzer::Traits > > &lof, const Teuchos::ParameterList &user_data) const
std::vector< std::vector< std::string > > m_coordinate_dofs
Teuchos::RCP< const Teuchos::ParameterList > getParameterList() const
Data for determining cell topology and dimensionality.
panzer::CellData m_cell_data
std::string elementBlockID() const
const std::vector< std::vector< std::string > > & getCoordinateDOFs() const
std::map< std::string, Teuchos::RCP< panzer::PureBasis > > m_bases
map of unique bases, key is the panzer::PureBasis::name() corresponding to its value ...
void buildAndRegisterGatherAndOrientationEvaluatorsForType(PHX::FieldManager< panzer::Traits > &fm, const LinearObjFactory< panzer::Traits > &lof, const Teuchos::ParameterList &user_data) const
Teuchos::RCP< Teuchos::ParameterList > m_input_parameters
store the input parameter list for copy ctors
void buildAndRegisterEquationSetEvaluatorsForType(PHX::FieldManager< panzer::Traits > &fm, const Teuchos::ParameterList &user_data) const
std::map< int, Teuchos::RCP< panzer::IntegrationRule > > m_integration_rules
map of unique integration rules, key is panzer::IntegrationRule::order() corresponding to its value ...
void buildAndRegisterInitialConditionEvaluatorsForType(PHX::FieldManager< panzer::Traits > &fm, const panzer::ClosureModelFactory_TemplateManager< panzer::Traits > &factory, const std::string &model_name, const Teuchos::ParameterList &models, const panzer::LinearObjFactory< panzer::Traits > &lof, const Teuchos::ParameterList &user_data) const
const shards::CellTopology getBaseCellTopology() const
const std::vector< StrPureBasisPair > & getTangentFields() const
Returns list of tangent fields from DOFs and tangent param names.
Teuchos::RCP< const FieldLibrary > getFieldLibrary() const
WorksetNeeds getWorksetNeeds() const
Teuchos::RCP< const FieldLibraryBase > getFieldLibraryBase() const
const std::map< int, Teuchos::RCP< panzer::IntegrationRule > > & getIntegrationRules() const
Returns the unique set of point rules, key is the unique panzer::PointRule::name() ...
void initialize(const int default_integration_order, const bool build_transient_support, const panzer::CellData &cell_data, const Teuchos::RCP< const panzer::EquationSetFactory > &factory, const Teuchos::RCP< panzer::GlobalData > &global_data, const std::vector< std::string > &tangent_param_names=std::vector< std::string >())
bool m_build_transient_support
Teuchos::RCP< FieldLibrary > m_field_lib
std::string m_element_block_id
std::vector< std::string > m_dof_names
void buildAndRegisterDOFProjectionsToIPEvaluatorsForType(PHX::FieldManager< panzer::Traits > &fm, const Teuchos::Ptr< const panzer::LinearObjFactory< panzer::Traits > > &lof, const Teuchos::ParameterList &user_data) const
void buildAndRegisterScatterEvaluatorsForType(PHX::FieldManager< panzer::Traits > &fm, const LinearObjFactory< panzer::Traits > &lof, const Teuchos::ParameterList &user_data) const
std::vector< StrPureBasisPair > m_tangent_fields
void buildAndRegisterEquationSetEvaluators(PHX::FieldManager< panzer::Traits > &fm, const Teuchos::ParameterList &user_data) const
const std::vector< StrPureBasisPair > & getProvidedDOFs() const