Panzer
Version of the Day
|
#include <Panzer_ResponseLibrary.hpp>
Classes | |
struct | Overloader |
A struct for handling function overloading. More... | |
struct | Printer |
Public Types | |
typedef TraitsT::EvalTypes | TypeSeq |
Public Member Functions | |
ResponseLibrary () | |
ResponseLibrary (const Teuchos::RCP< WorksetContainer > &wc, const Teuchos::RCP< const GlobalIndexer > &ugi, const Teuchos::RCP< const LinearObjFactory< TraitsT > > &lof, bool residualType=false) | |
ResponseLibrary (const ResponseLibrary &rl) | |
void | initialize (const Teuchos::RCP< WorksetContainer > &wc, const Teuchos::RCP< const GlobalIndexer > &ugi, const Teuchos::RCP< const LinearObjFactory< TraitsT > > &lof) |
void | initializeResidualType (const Teuchos::RCP< WorksetContainer > &wc, const Teuchos::RCP< const GlobalIndexer > &ugi, const Teuchos::RCP< const LinearObjFactory< TraitsT > > &lof) |
void | initialize (const ResponseLibrary &rl) |
void | copyResponses (const ResponseLibrary &rl) |
Teuchos::RCP< WorksetContainer > | getWorksetContainer () const |
Teuchos::RCP< const GlobalIndexer > | getGlobalIndexer () const |
Get the internally stored global indexer. More... | |
Teuchos::RCP< const LinearObjFactory< TraitsT > > | getLinearObjFactory () const |
Get the internally stored linear object factory. More... | |
template<typename ResponseEvaluatorFactory_BuilderT > | |
void | addResponse (const std::string &responseName, const std::vector< std::string > &blocks, const ResponseEvaluatorFactory_BuilderT &builder) |
template<typename ResponseEvaluatorFactory_BuilderT > | |
void | addResponse (const std::string &responseName, const std::vector< std::pair< std::string, std::string > > &sideset_blocks, const ResponseEvaluatorFactory_BuilderT &builder) |
template<typename ResponseEvaluatorFactory_BuilderT > | |
void | addResponse (const std::string &responseName, const std::vector< WorksetDescriptor > &wkst_desc, const ResponseEvaluatorFactory_BuilderT &builder) |
template<typename EvalT > | |
Teuchos::RCP< ResponseBase > | getResponse (const std::string &responseName) const |
template<typename EvalT > | |
void | getResponses (std::vector< Teuchos::RCP< ResponseBase > > &responses) const |
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 | 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="") |
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="") |
bool | responseEvaluatorsBuilt () const |
template<typename EvalT > | |
void | addResponsesToInArgs (panzer::AssemblyEngineInArgs &input_args) const |
template<typename EvalT > | |
void | evaluate (const panzer::AssemblyEngineInArgs &input_args) |
void | print (std::ostream &os) const |
void | useClosureModelByEBlockInResponse (bool value) |
void | disableGather (bool value) |
void | disableScatter (bool value) |
bool | isResidualType () const |
Private Types | |
typedef TypeAssocMap < panzer::Traits::EvalTypes, Teuchos::RCP< ResponseBase > > | Response_TemplateManager |
typedef std::unordered_map < panzer::BC, Teuchos::RCP < std::vector< std::pair < std::string, Teuchos::RCP < ResponseEvaluatorFactory_TemplateManager < TraitsT > > > > >, BC::BCHash, BC::BCEquality > | BCHashMap |
Private Attributes | |
Teuchos::RCP< WorksetContainer > | wkstContainer_ |
Teuchos::RCP< const GlobalIndexer > | globalIndexer_ |
Teuchos::RCP< const LinearObjFactory< TraitsT > > | linObjFactory_ |
Teuchos::RCP< FieldManagerBuilder > | fmb2_ |
AssemblyEngine_TemplateManager < panzer::Traits > | ae_tm2_ |
std::unordered_map < WorksetDescriptor, std::vector< std::pair < std::string, Teuchos::RCP < ResponseEvaluatorFactory_TemplateManager < TraitsT > > > > > | respFactories_ |
BCHashMap | respBCFactories_ |
std::size_t | nextBC_id |
std::unordered_map < std::string, Response_TemplateManager > | responseObjects_ |
Store all the response objects. More... | |
bool | closureModelByEBlock_ |
bool | disableGather_ |
bool | disableScatter_ |
bool | residualType_ |
bool | responseEvaluatorsBuilt_ |
Teuchos::RCP< LinearObjContainer > | ghostedContainer_ |
This contains, collects and serves as a resource for responses computed by panzer. This functions as a library where there are many "responses" maintained (as many as a user adds). When a response is maintained that simply means there is a mechansim to "reserve" it. A response is not required by any field manager until a user "reserves" it. The reservation process is done by response name and the element block or BC it is associated with. The field tag specified in the addResponse
is used only for the "name" field, however that use of PHX::FieldTag
reminds the user that something better be in the evaluation tree.
Definition at line 58 of file Panzer_ResponseLibrary.hpp.
typedef TraitsT::EvalTypes panzer::ResponseLibrary< TraitsT >::TypeSeq |
Definition at line 60 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 297 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 304 of file Panzer_ResponseLibrary.hpp.
panzer::ResponseLibrary< TraitsT >::ResponseLibrary | ( | ) |
Definition at line 29 of file Panzer_ResponseLibrary_impl.hpp.
panzer::ResponseLibrary< TraitsT >::ResponseLibrary | ( | const Teuchos::RCP< WorksetContainer > & | wc, |
const Teuchos::RCP< const GlobalIndexer > & | ugi, | ||
const Teuchos::RCP< const LinearObjFactory< TraitsT > > & | lof, | ||
bool | residualType = false |
||
) |
Build an initialized response library. By default this method does not initialize the response library to be a residual type. This can be set at runtime to build only residual responses by setting the residualType
argument to true.
Definition at line 36 of file Panzer_ResponseLibrary_impl.hpp.
panzer::ResponseLibrary< TraitsT >::ResponseLibrary | ( | const ResponseLibrary< TraitsT > & | rl | ) |
Definition at line 50 of file Panzer_ResponseLibrary_impl.hpp.
void panzer::ResponseLibrary< TraitsT >::initialize | ( | const Teuchos::RCP< WorksetContainer > & | wc, |
const Teuchos::RCP< const GlobalIndexer > & | ugi, | ||
const Teuchos::RCP< const LinearObjFactory< TraitsT > > & | lof | ||
) |
Initialize the response library with the appropriate objects.
Definition at line 59 of file Panzer_ResponseLibrary_impl.hpp.
void panzer::ResponseLibrary< TraitsT >::initializeResidualType | ( | const Teuchos::RCP< WorksetContainer > & | wc, |
const Teuchos::RCP< const GlobalIndexer > & | ugi, | ||
const Teuchos::RCP< const LinearObjFactory< TraitsT > > & | lof | ||
) |
Initialize the response library with the appropriate objects. This is in the case that no respones will be added an only a residual is desired. If addResponse
is called then an exception will be raised.
Definition at line 73 of file Panzer_ResponseLibrary_impl.hpp.
void panzer::ResponseLibrary< TraitsT >::initialize | ( | const ResponseLibrary< TraitsT > & | rl | ) |
Initialize the response library from a previously construct response library.
Definition at line 91 of file Panzer_ResponseLibrary_impl.hpp.
void panzer::ResponseLibrary< TraitsT >::copyResponses | ( | const ResponseLibrary< TraitsT > & | rl | ) |
Copy all the responses from another response library. This is a different from initialize
. This method only copies the responses leaving the parameters set by initialize
alone. This must be called before buildResponseEvaluators
.
Definition at line 101 of file Panzer_ResponseLibrary_impl.hpp.
|
inline |
Get the internally stored workset container, note this is non-const because the workset container is mostly a non-const object (uses lots of lazy evaluation).
Definition at line 106 of file Panzer_ResponseLibrary.hpp.
|
inline |
Get the internally stored global indexer.
Definition at line 110 of file Panzer_ResponseLibrary.hpp.
|
inline |
Get the internally stored linear object factory.
Definition at line 114 of file Panzer_ResponseLibrary.hpp.
void panzer::ResponseLibrary< TraitsT >::addResponse | ( | const std::string & | responseName, |
const std::vector< std::string > & | blocks, | ||
const ResponseEvaluatorFactory_BuilderT & | builder | ||
) |
Add a volumetric response using the response factory builder.
[in] | responseName | Name of the response to be added. |
[in] | blocks | Element blocks to evaluate the response over |
[in] | builder | Builder that builds the correct response object. |
Definition at line 174 of file Panzer_ResponseLibrary_impl.hpp.
void panzer::ResponseLibrary< TraitsT >::addResponse | ( | const std::string & | responseName, |
const std::vector< std::pair< std::string, std::string > > & | sideset_blocks, | ||
const ResponseEvaluatorFactory_BuilderT & | builder | ||
) |
Add a surface response using the response factory builder.
[in] | responseName | Name of the response to be added. |
[in] | sideset_blocks | Side set and element blocks to evaluate the response over (sideset name is first followed by element block id) |
[in] | builder | Builder that builds the correct response object. |
Definition at line 200 of file Panzer_ResponseLibrary_impl.hpp.
void panzer::ResponseLibrary< TraitsT >::addResponse | ( | const std::string & | responseName, |
const std::vector< WorksetDescriptor > & | wkst_desc, | ||
const ResponseEvaluatorFactory_BuilderT & | builder | ||
) |
Add a response specified by a list of WorksetDescriptor objects. The specifics of the response are specified by the response factory builder.
[in] | responseName | Name of the response to be added. |
[in] | wkst_desc | A vector of descriptors describing the types of elements that make up the response. |
[in] | builder | Builder that builds the correct response object. |
Definition at line 245 of file Panzer_ResponseLibrary_impl.hpp.
Teuchos::RCP< ResponseBase > panzer::ResponseLibrary< TraitsT >::getResponse | ( | const std::string & | responseName | ) | const |
Access a response by name and evaluation type.
[in] | responseName | Name of the response to be retrieved. |
Definition at line 315 of file Panzer_ResponseLibrary_impl.hpp.
void panzer::ResponseLibrary< TraitsT >::getResponses | ( | std::vector< Teuchos::RCP< ResponseBase > > & | responses | ) | const |
Get the set of responses corresponding to a particular evaluation type. This will overwrite (clear
) the vector.
[in,out] | responses | Vector over the responses, the responses know their own names! |
Definition at line 331 of file Panzer_ResponseLibrary_impl.hpp.
|
inline |
Setup up field managers for all responses. Once this method is called no other responses can be added. An exception is thrown if they are.
Definition at line 174 of file Panzer_ResponseLibrary.hpp.
|
inline |
Setup up field managers for all responses. Once this method is called no other responses can be added. An exception is thrown if they are.
Definition at line 186 of file Panzer_ResponseLibrary.hpp.
void panzer::ResponseLibrary< TraitsT >::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 = "" |
||
) |
Setup up field managers for a residual response. This method can only be called if the residual response has been setup.
Definition at line 483 of file Panzer_ResponseLibrary_impl.hpp.
|
inline |
Have the response evaluators been built? True only if buildResponseEvaluators
has been called and run to completion.
Definition at line 213 of file Panzer_ResponseLibrary.hpp.
void panzer::ResponseLibrary< TraitsT >::addResponsesToInArgs | ( | panzer::AssemblyEngineInArgs & | input_args | ) | const |
Add response objects to assembly data.
Definition at line 525 of file Panzer_ResponseLibrary_impl.hpp.
void panzer::ResponseLibrary< TraitsT >::evaluate | ( | const panzer::AssemblyEngineInArgs & | input_args | ) |
Evaluate response library for a particular evaluation type.
Definition at line 705 of file Panzer_ResponseLibrary_impl.hpp.
void panzer::ResponseLibrary< TraitsT >::print | ( | std::ostream & | os | ) | const |
Print the contents of this response library.
Definition at line 712 of file Panzer_ResponseLibrary_impl.hpp.
|
inline |
Definition at line 230 of file Panzer_ResponseLibrary.hpp.
|
inline |
Definition at line 233 of file Panzer_ResponseLibrary.hpp.
|
inline |
Definition at line 236 of file Panzer_ResponseLibrary.hpp.
|
inline |
Definition at line 239 of file Panzer_ResponseLibrary.hpp.
|
protected |
Setup up field managers for all responses. Once this method is called no other responses can be added. An exception is thrown if they are.
Definition at line 395 of file Panzer_ResponseLibrary_impl.hpp.
|
protected |
Add a residual response.
Definition at line 301 of file Panzer_ResponseLibrary_impl.hpp.
|
protected |
Add in the residual responses to the input arguments. Note only residual and Jacobian calls currently work!
Definition at line 545 of file Panzer_ResponseLibrary_impl.hpp.
|
protected |
Add in the residual responses to the input arguments. Note only residual and Jacobian calls currently work!
Definition at line 583 of file Panzer_ResponseLibrary_impl.hpp.
|
protected |
Add in the residual responses to the input arguments. Note only residual and Jacobian calls currently work!
Definition at line 621 of file Panzer_ResponseLibrary_impl.hpp.
|
protected |
Add in the residual responses to the input arguments. Note only residual and Jacobian calls currently work!
Definition at line 665 of file Panzer_ResponseLibrary_impl.hpp.
|
protected |
Add in a response (for internal use only) using a template manager.
Definition at line 282 of file Panzer_ResponseLibrary_impl.hpp.
|
private |
Definition at line 293 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 294 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 295 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 299 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 300 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 308 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 309 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 310 of file Panzer_ResponseLibrary.hpp.
|
private |
Store all the response objects.
Definition at line 313 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 314 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 315 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 316 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 317 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 319 of file Panzer_ResponseLibrary.hpp.
|
mutableprivate |
Definition at line 321 of file Panzer_ResponseLibrary.hpp.