43 #ifndef __Panzer_ResponseLibrary_hpp__
44 #define __Panzer_ResponseLibrary_hpp__
51 #include <unordered_map>
55 #include "Phalanx_FieldManager.hpp"
57 #include "PanzerDiscFE_config.hpp"
75 class LinearObjContainer;
89 template <
typename TraitsT>
92 typedef typename TraitsT::EvalTypes
TypeSeq;
104 bool residualType=
false);
155 template <
typename ResponseEvaluatorFactory_BuilderT>
157 const std::vector<std::string> & blocks,
158 const ResponseEvaluatorFactory_BuilderT & builder);
167 template <
typename ResponseEvaluatorFactory_BuilderT>
169 const std::vector<std::pair<std::string,std::string> > & sideset_blocks,
170 const ResponseEvaluatorFactory_BuilderT & builder);
180 template <
typename ResponseEvaluatorFactory_BuilderT>
182 const std::vector<WorksetDescriptor> & wkst_desc,
183 const ResponseEvaluatorFactory_BuilderT & builder);
192 template <
typename EvalT>
200 template <
typename EvalT>
211 const bool write_graphviz_file=
false,
212 const std::string& graphviz_file_prefix=
"")
213 {
buildResponseEvaluators(physicsBlocks,Teuchos::null,cm_factory,closure_models,user_data,write_graphviz_file,graphviz_file_prefix); }
224 const bool write_graphviz_file=
false,
225 const std::string& graphviz_file_prefix=
"")
226 {
buildResponseEvaluators(physicsBlocks,Teuchos::ptrFromRef(eqset_factory),cm_factory,closure_models,user_data,write_graphviz_file,graphviz_file_prefix); }
234 const std::vector<BC> & bcs,
239 const bool write_graphviz_file=
false,
240 const std::string& graphviz_file_prefix=
"");
250 template <
typename EvalT>
255 template <
typename EvalT>
260 void print(std::ostream & os)
const;
285 const bool write_graphviz_file,
286 const std::string& graphviz_file_prefix);
313 #ifdef Panzer_BUILD_HESSIAN_SUPPORT
320 const std::vector<WorksetDescriptor> & wkst_desc,
340 std::vector<std::pair<std::string,Teuchos::RCP<ResponseEvaluatorFactory_TemplateManager<TraitsT> > > > >
respFactories_;
361 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)