11 #ifndef __Panzer_ResponseLibrary_hpp__
12 #define __Panzer_ResponseLibrary_hpp__
19 #include <unordered_map>
23 #include "Phalanx_FieldManager.hpp"
25 #include "PanzerDiscFE_config.hpp"
43 class LinearObjContainer;
57 template <
typename TraitsT>
60 typedef typename TraitsT::EvalTypes
TypeSeq;
72 bool residualType=
false);
123 template <
typename ResponseEvaluatorFactory_BuilderT>
125 const std::vector<std::string> & blocks,
126 const ResponseEvaluatorFactory_BuilderT & builder);
135 template <
typename ResponseEvaluatorFactory_BuilderT>
137 const std::vector<std::pair<std::string,std::string> > & sideset_blocks,
138 const ResponseEvaluatorFactory_BuilderT & builder);
148 template <
typename ResponseEvaluatorFactory_BuilderT>
150 const std::vector<WorksetDescriptor> & wkst_desc,
151 const ResponseEvaluatorFactory_BuilderT & builder);
160 template <
typename EvalT>
168 template <
typename EvalT>
179 const bool write_graphviz_file=
false,
180 const std::string& graphviz_file_prefix=
"")
181 {
buildResponseEvaluators(physicsBlocks,Teuchos::null,cm_factory,closure_models,user_data,write_graphviz_file,graphviz_file_prefix); }
192 const bool write_graphviz_file=
false,
193 const std::string& graphviz_file_prefix=
"")
194 {
buildResponseEvaluators(physicsBlocks,Teuchos::ptrFromRef(eqset_factory),cm_factory,closure_models,user_data,write_graphviz_file,graphviz_file_prefix); }
202 const std::vector<BC> & bcs,
207 const bool write_graphviz_file=
false,
208 const std::string& graphviz_file_prefix=
"");
218 template <
typename EvalT>
223 template <
typename EvalT>
228 void print(std::ostream & os)
const;
253 const bool write_graphviz_file,
254 const std::string& graphviz_file_prefix);
281 #ifdef Panzer_BUILD_HESSIAN_SUPPORT
288 const std::vector<WorksetDescriptor> & wkst_desc,
308 std::vector<std::pair<std::string,Teuchos::RCP<ResponseEvaluatorFactory_TemplateManager<TraitsT> > > > >
respFactories_;
329 if(
tm_.
get<T>()!=Teuchos::null)
Teuchos::RCP< LinearObjContainer > ghostedContainer_
Interface for constructing a BCStrategy_TemplateManager.
void addResponse(const std::string &responseName, const std::vector< std::string > &blocks, const ResponseEvaluatorFactory_BuilderT &builder)
Allocates and initializes an equation set template manager.
void getResponses(std::vector< Teuchos::RCP< ResponseBase > > &responses) const
void addResponsesToInArgs(panzer::AssemblyEngineInArgs &input_args) const
void disableGather(bool value)
bool isResidualType() const
void disableScatter(bool value)
void buildResponseEvaluators(const std::vector< Teuchos::RCP< panzer::PhysicsBlock > > &physicsBlocks, const panzer::EquationSetFactory &eqset_factory, const panzer::ClosureModelFactory_TemplateManager< panzer::Traits > &cm_factory, const Teuchos::ParameterList &closure_models, const Teuchos::ParameterList &user_data, const bool write_graphviz_file=false, const std::string &graphviz_file_prefix="")
TraitsT::EvalTypes TypeSeq
std::unordered_map< WorksetDescriptor, std::vector< std::pair< std::string, Teuchos::RCP< ResponseEvaluatorFactory_TemplateManager< TraitsT > > > > > respFactories_
bool responseEvaluatorsBuilt() const
Printer(const Response_TemplateManager &tm, std::ostream &os)
const Response_TemplateManager & tm_
bool responseEvaluatorsBuilt_
Teuchos::RCP< WorksetContainer > getWorksetContainer() const
ValueType get() const
Access routine.
Teuchos::RCP< const LinearObjFactory< TraitsT > > getLinearObjFactory() const
Get the internally stored linear object factory.
void evaluate(const panzer::AssemblyEngineInArgs &input_args)
void buildResidualResponseEvaluators(const std::vector< Teuchos::RCP< panzer::PhysicsBlock > > &physicsBlocks, const panzer::EquationSetFactory &eqset_factory, const std::vector< BC > &bcs, const panzer::BCStrategyFactory &bc_factory, const panzer::ClosureModelFactory_TemplateManager< panzer::Traits > &cm_factory, const Teuchos::ParameterList &closure_models, const Teuchos::ParameterList &user_data, const bool write_graphviz_file=false, const std::string &graphviz_file_prefix="")
Teuchos::RCP< FieldManagerBuilder > fmb2_
void buildResponseEvaluators(const std::vector< Teuchos::RCP< panzer::PhysicsBlock > > &physicsBlocks, const panzer::ClosureModelFactory_TemplateManager< panzer::Traits > &cm_factory, const Teuchos::ParameterList &closure_models, const Teuchos::ParameterList &user_data, const bool write_graphviz_file=false, const std::string &graphviz_file_prefix="")
void copyResponses(const ResponseLibrary &rl)
Teuchos::RCP< const GlobalIndexer > globalIndexer_
Teuchos::RCP< ResponseBase > getResponse(const std::string &responseName) const
Teuchos::RCP< WorksetContainer > wkstContainer_
TypeAssocMap< panzer::Traits::EvalTypes, Teuchos::RCP< ResponseBase > > Response_TemplateManager
std::unordered_map< std::string, Response_TemplateManager > responseObjects_
Store all the response objects.
std::unordered_map< panzer::BC, Teuchos::RCP< std::vector< std::pair< std::string, Teuchos::RCP< ResponseEvaluatorFactory_TemplateManager< TraitsT > > > > >, BC::BCHash, BC::BCEquality > BCHashMap
bool closureModelByEBlock_
void initialize(const Teuchos::RCP< WorksetContainer > &wc, const Teuchos::RCP< const GlobalIndexer > &ugi, const Teuchos::RCP< const LinearObjFactory< TraitsT > > &lof)
void print(std::ostream &os) const
AssemblyEngine_TemplateManager< panzer::Traits > ae_tm2_
void initializeResidualType(const Teuchos::RCP< WorksetContainer > &wc, const Teuchos::RCP< const GlobalIndexer > &ugi, const Teuchos::RCP< const LinearObjFactory< TraitsT > > &lof)
BCHashMap respBCFactories_
Teuchos::RCP< const LinearObjFactory< TraitsT > > linObjFactory_
Stores input information for a boundary condition.
void addResidualResponse()
Teuchos::RCP< const GlobalIndexer > getGlobalIndexer() const
Get the internally stored global indexer.
void addResidualResponsesToInArgs(Overloader< typename TraitsT::Residual >, panzer::AssemblyEngineInArgs &input_args) const
A struct for handling function overloading.
void useClosureModelByEBlockInResponse(bool value)