11 #ifndef PANZER_PHYSICS_BLOCK_HPP
12 #define PANZER_PHYSICS_BLOCK_HPP
19 #include "Phalanx_FieldManager.hpp"
39 class IntegrationRule;
40 struct EquationSetFactory;
51 void buildPhysicsBlocks(
const std::map<std::string,std::string>& block_ids_to_physics_ids,
54 const int default_integration_order,
55 const std::size_t workset_size,
58 const bool build_transient_support,
60 const std::vector<std::string>& tangent_param_names = std::vector<std::string>());
68 void readPhysicsBlocks(
const std::map<std::string,std::string>& block_ids_to_physics_ids,
81 bool throw_on_failure =
true);
91 { std::cout <<
"WARNING: Default constructor for panzer::PhysicsBlock is for testing purposes only!" << std::endl; }
96 const std::string & element_block_id,
97 const int default_integration_order,
101 const bool build_transient_support,
102 const std::vector<std::string>& tangent_param_names = std::vector<std::string>());
110 const std::string & element_block_id);
120 const std::string & physics_block_id,
121 const int integration_order,
129 void initialize(
const int default_integration_order,
130 const bool build_transient_support,
134 const std::vector<std::string>& tangent_param_names = std::vector<std::string>());
164 const std::string& model_name,
171 const std::string& model_name,
175 template<
typename EvalT>
179 template<
typename EvalT>
184 template<
typename EvalT>
189 template<
typename EvalT>
194 template<
typename EvalT>
200 template<
typename EvalT>
203 const std::string& model_name,
208 const std::vector<std::string>&
getDOFNames()
const;
221 const std::map<std::string,Teuchos::RCP<panzer::PureBasis> >&
getBases()
const;
253 const int& default_integration_order,
254 const std::string & element_block_id,
256 const bool build_transient_support,
257 const std::vector<std::string>& tangent_param_names = std::vector<std::string>());
274 std::map<std::string,Teuchos::RCP<panzer::PureBasis> >
m_bases;
278 std::vector< Teuchos::RCP<panzer::EquationSet_TemplateManager<panzer::Traits> > >
m_equation_sets;
292 template<
typename EvalT>
301 vector< RCP<EquationSet_TemplateManager<panzer::Traits> > >::const_iterator
315 template<
typename EvalT>
325 vector< RCP<EquationSet_TemplateManager<panzer::Traits> > >::const_iterator
326 eq_set = m_equation_sets.
begin();
328 for (;eq_set != m_equation_sets.end(); ++eq_set,++idx) {
329 if (m_active_evaluation_types[idx]) {
333 const int di = eqstm.
getAsObject<EvalT>()->setDetailsIndex(this->getDetailsIndex());
334 eqstm.
getAsObject<EvalT>()->buildAndRegisterGatherAndOrientationEvaluators(fm,*m_field_lib,lof,user_data);
340 template<
typename EvalT>
350 vector< RCP<EquationSet_TemplateManager<panzer::Traits> > >::const_iterator
351 eq_set = m_equation_sets.
begin();
352 for (;eq_set != m_equation_sets.end(); ++eq_set) {
357 ir_iter != m_integration_rules.end(); ++ ir_iter) {
361 const int di = eqstm.
getAsObject<EvalT>()->setDetailsIndex(this->getDetailsIndex());
362 eqstm.
getAsObject<EvalT>()->buildAndRegisterDOFProjectionsToIPEvaluators(fm,*m_field_lib->buildFieldLayoutLibrary(*ir),ir,lof,user_data);
369 template<
typename EvalT>
379 vector< RCP<EquationSet_TemplateManager<panzer::Traits> > >::const_iterator
380 eq_set = m_equation_sets.
begin();
381 for (;eq_set != m_equation_sets.end(); ++eq_set) {
385 const int di = eqstm.
getAsObject<EvalT>()->setDetailsIndex(this->getDetailsIndex());
386 eqstm.
getAsObject<EvalT>()->buildAndRegisterScatterEvaluators(fm,*m_field_lib,lof,user_data);
391 template<
typename EvalT>
402 vector< RCP<EquationSet_TemplateManager<panzer::Traits> > >::const_iterator
403 eq_set = m_equation_sets.
begin();
404 for (;eq_set != m_equation_sets.end(); ++eq_set) {
410 ir_iter != m_integration_rules.end(); ++ ir_iter) {
414 const int di = eqstm.
getAsObject<EvalT>()->setDetailsIndex(this->getDetailsIndex());
415 eqstm.
getAsObject<EvalT>()->buildAndRegisterClosureModelEvaluators(fm,*m_field_lib->buildFieldLayoutLibrary(*ir),ir,factory,models,user_data);
422 template<
typename EvalT>
425 const std::string& model_name,
435 vector< RCP<EquationSet_TemplateManager<panzer::Traits> > >::const_iterator
436 eq_set = m_equation_sets.
begin();
437 for (;eq_set != m_equation_sets.end(); ++eq_set) {
438 std::vector<StrBasisPair> providedDOFs;
442 const int di = eqstm.
getAsObject<EvalT>()->setDetailsIndex(this->getDetailsIndex());
443 eqstm.
getAsObject<EvalT>()->buildAndRegisterInitialConditionEvaluators(fm, *m_field_lib, factory, model_name, models, lof, user_data);
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...
Teuchos::RCP< typename Sacado::mpl::apply< panzer::EquationSet< _ >, ScalarT >::type > getAsObject()
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
PHX::TemplateManager< TypeSeq, BaseT, ObjectT >::iterator begin()
Teuchos::RCP< panzer::GlobalData > globalData() const
int m_default_integration_order
void setActiveEvaluationTypes(const std::vector< bool > &aet)
Used to save memory by disabling unneeded evaluation types.
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
void activateAllEvaluationTypes()
Used to reactivate all evaluation types if some were temporarily disabled with a call to setActiveEva...
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::vector< bool > m_active_evaluation_types
Returns true for evaluation types that are active.
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