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 90 of file Panzer_ResponseLibrary.hpp.
typedef TraitsT::EvalTypes panzer::ResponseLibrary< TraitsT >::TypeSeq |
Definition at line 92 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 329 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 336 of file Panzer_ResponseLibrary.hpp.
panzer::ResponseLibrary< TraitsT >::ResponseLibrary | ( | ) |
Definition at line 61 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 68 of file Panzer_ResponseLibrary_impl.hpp.
panzer::ResponseLibrary< TraitsT >::ResponseLibrary | ( | const ResponseLibrary< TraitsT > & | rl | ) |
Definition at line 82 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 91 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 105 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 123 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 133 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 138 of file Panzer_ResponseLibrary.hpp.
|
inline |
Get the internally stored global indexer.
Definition at line 142 of file Panzer_ResponseLibrary.hpp.
|
inline |
Get the internally stored linear object factory.
Definition at line 146 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 206 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 232 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 277 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 347 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 363 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 206 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 218 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 515 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 245 of file Panzer_ResponseLibrary.hpp.
void panzer::ResponseLibrary< TraitsT >::addResponsesToInArgs | ( | panzer::AssemblyEngineInArgs & | input_args | ) | const |
Add response objects to assembly data.
Definition at line 557 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 737 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 744 of file Panzer_ResponseLibrary_impl.hpp.
|
inline |
Definition at line 262 of file Panzer_ResponseLibrary.hpp.
|
inline |
Definition at line 265 of file Panzer_ResponseLibrary.hpp.
|
inline |
Definition at line 268 of file Panzer_ResponseLibrary.hpp.
|
inline |
Definition at line 271 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 427 of file Panzer_ResponseLibrary_impl.hpp.
|
protected |
Add a residual response.
Definition at line 333 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 577 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 615 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 653 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 697 of file Panzer_ResponseLibrary_impl.hpp.
|
protected |
Add in a response (for internal use only) using a template manager.
Definition at line 314 of file Panzer_ResponseLibrary_impl.hpp.
|
private |
Definition at line 325 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 326 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 327 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 331 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 332 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 340 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 341 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 342 of file Panzer_ResponseLibrary.hpp.
|
private |
Store all the response objects.
Definition at line 345 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 346 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 347 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 348 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 349 of file Panzer_ResponseLibrary.hpp.
|
private |
Definition at line 351 of file Panzer_ResponseLibrary.hpp.
|
mutableprivate |
Definition at line 353 of file Panzer_ResponseLibrary.hpp.