|
Panzer Version of the Day
|
A panzer::ClosureModelFactory decorator that provides evaluators for writing fields to exodus files. Wraps a user closure model factory. buildClosureModels() delegates to the wrapped factory for every evaluation type; the panzer::Traits::Residual specialization additionally builds the scatter evaluators needed to write selected nodal/cell fields out to the STK mesh for visualization/output, since output only needs to happen once per workset regardless of evaluation type. More...
#include <Panzer_STK_IOClosureModel_Factory_decl.hpp>

Public Member Functions | |
| IOClosureModelFactory (const Teuchos::RCP< const panzer::ClosureModelFactory< EvalT > > userCMF_, const Teuchos::RCP< STK_Interface > &mesh, const Teuchos::ParameterList &outputList) | |
| Construct with the fields to write specified via an output ParameterList (parsed with parseOutputList()). | |
| IOClosureModelFactory (const Teuchos::RCP< const panzer::ClosureModelFactory< EvalT > > userCMF_, const Teuchos::RCP< STK_Interface > &mesh, const std::map< std::string, std::vector< std::string > > &nodalFields, const std::map< std::string, std::vector< std::string > > &cellFields) | |
| Construct with the fields to write specified explicitly, split into nodal and cell fields per element block. | |
| Teuchos::RCP< std::vector< Teuchos::RCP< PHX::Evaluator< panzer::Traits > > > > | buildClosureModels (const std::string &model_id, const Teuchos::ParameterList &models, const panzer::FieldLayoutLibrary &fl, const Teuchos::RCP< panzer::IntegrationRule > &ir, const Teuchos::ParameterList &default_params, const Teuchos::ParameterList &user_data, const Teuchos::RCP< panzer::GlobalData > &global_data, PHX::FieldManager< panzer::Traits > &fm) const |
| Delegates to the wrapped factory's buildClosureModels() for the named model. | |
| Teuchos::RCP< std::vector< Teuchos::RCP< PHX::Evaluator< panzer::Traits > > > > | buildClosureModels (const std::string &model_id, const Teuchos::ParameterList &models, const panzer::FieldLayoutLibrary &fl, const Teuchos::RCP< panzer::IntegrationRule > &ir, const Teuchos::ParameterList &default_params, const Teuchos::ParameterList &user_data, const Teuchos::RCP< panzer::GlobalData > &global_data, PHX::FieldManager< panzer::Traits > &fm) const |
| Teuchos::RCP< std::vector< Teuchos::RCP< PHX::Evaluator< panzer::Traits > > > > | buildClosureModels (const std::string &model_id, const Teuchos::ParameterList &models, const panzer::FieldLayoutLibrary &fl, const Teuchos::RCP< panzer::IntegrationRule > &ir, const Teuchos::ParameterList &default_params, const Teuchos::ParameterList &user_data, const Teuchos::RCP< panzer::GlobalData > &global_data, PHX::FieldManager< panzer::Traits > &fm) const |
| Delegates to the wrapped factory's buildClosureModels() for the named model, then adds the scatter-to-mesh evaluators needed for the fields requested at construction. | |
Public Member Functions inherited from panzer::ClosureModelFactory< EvalT > | |
| ClosureModelFactory (bool throw_if_model_not_found=true) | |
| virtual | ~ClosureModelFactory () |
| virtual Teuchos::RCP< std::vector< Teuchos::RCP< PHX::Evaluator< panzer::Traits > > > > | buildClosureModels (const std::string &model_id, const Teuchos::ParameterList &models, const panzer::FieldLayoutLibrary &fl, const Teuchos::RCP< panzer::IntegrationRule > &ir, const Teuchos::ParameterList &equation_set_params, const Teuchos::ParameterList &user_data, const Teuchos::RCP< panzer::GlobalData > &global_data, PHX::FieldManager< panzer::Traits > &fm) const =0 |
| virtual void | registerEvaluators (const std::vector< Teuchos::RCP< PHX::Evaluator< panzer::Traits > > > &evaluators, PHX::FieldManager< panzer::Traits > &fm) const |
| virtual void | setThrowOnModelNotFound (bool do_throw) |
Public Member Functions inherited from panzer::ClosureModelFactoryBase | |
| ClosureModelFactoryBase () | |
| virtual | ~ClosureModelFactoryBase () |
Public Member Functions inherited from panzer::Base | |
| Base () | |
| virtual | ~Base () |
Public Member Functions inherited from panzer::EvaluatorsRegistrar | |
| int | setDetailsIndex (const int details_index) |
| int | getDetailsIndex () const |
| Get the WorksetDetails index. | |
Private Member Functions | |
| void | parseOutputList (const Teuchos::ParameterList &pl, std::map< std::string, std::vector< std::string > > &blockIdToFields) const |
Private Attributes | |
| Teuchos::RCP< STK_Interface > | mesh_ |
| Mesh pointer, will be passed around. | |
| std::map< std::string, std::vector< std::string > > | blockIdToCellAvgFields_ |
| Map showing which cell averaged fields need to be written out for each element block. | |
| std::map< std::string, std::vector< std::string > > | blockIdToCellAvgVectors_ |
| Map showing which cell averaged vector fields need to be written out for each element block. | |
| std::map< std::string, std::vector< std::string > > | blockIdToCellFields_ |
| Map showing which cell fields need to be written out for each element block. | |
| std::map< std::string, std::vector< std::string > > | blockIdToNodalFields_ |
| Map showing which nodal fields need to be written out for each element block. | |
| std::map< std::string, bool > | blockIdEvaluated_ |
| Teuchos::RCP< const panzer::ClosureModelFactory< EvalT > > | userCMF_ |
| we will reuse the drekar closure model factory | |
Additional Inherited Members | |
Protected Member Functions inherited from panzer::EvaluatorsRegistrar | |
| EvaluatorsRegistrar () | |
| Default ctor initializes WorksetDetails index to 0. | |
| virtual | ~EvaluatorsRegistrar () |
| template<typename EvalT > | |
| void | registerEvaluator (PHX::FieldManager< panzer::Traits > &fm, const Teuchos::RCP< PHX::Evaluator< panzer::Traits > > &op) const |
Protected Attributes inherited from panzer::ClosureModelFactory< EvalT > | |
| bool | m_throw_if_model_not_found |
A panzer::ClosureModelFactory decorator that provides evaluators for writing fields to exodus files. Wraps a user closure model factory. buildClosureModels() delegates to the wrapped factory for every evaluation type; the panzer::Traits::Residual specialization additionally builds the scatter evaluators needed to write selected nodal/cell fields out to the STK mesh for visualization/output, since output only needs to happen once per workset regardless of evaluation type.
Definition at line 39 of file Panzer_STK_IOClosureModel_Factory_decl.hpp.
| panzer_stk::IOClosureModelFactory< EvalT >::IOClosureModelFactory | ( | const Teuchos::RCP< const panzer::ClosureModelFactory< EvalT > > | userCMF_, |
| const Teuchos::RCP< STK_Interface > & | mesh, | ||
| const Teuchos::ParameterList & | outputList | ||
| ) |
Construct with the fields to write specified via an output ParameterList (parsed with parseOutputList()).
| [in] | userCMF_ | the wrapped closure model factory to delegate buildClosureModels() calls to. |
| [in] | mesh | the STK mesh to write output fields to. |
| [in] | outputList | ParameterList naming the fields to write out. |
Definition at line 22 of file Panzer_STK_IOClosureModel_Factory_impl.hpp.
| panzer_stk::IOClosureModelFactory< EvalT >::IOClosureModelFactory | ( | const Teuchos::RCP< const panzer::ClosureModelFactory< EvalT > > | userCMF_, |
| const Teuchos::RCP< STK_Interface > & | mesh, | ||
| const std::map< std::string, std::vector< std::string > > & | nodalFields, | ||
| const std::map< std::string, std::vector< std::string > > & | cellFields | ||
| ) |
Construct with the fields to write specified explicitly, split into nodal and cell fields per element block.
| [in] | userCMF_ | the wrapped closure model factory to delegate buildClosureModels() calls to. |
| [in] | mesh | the STK mesh to write output fields to. |
| [in] | nodalFields | nodal field names to write out, keyed by element block ID. |
| [in] | cellFields | cell (element-averaged) field names to write out, keyed by element block ID. |
Definition at line 37 of file Panzer_STK_IOClosureModel_Factory_impl.hpp.
| Teuchos::RCP< std::vector< Teuchos::RCP< PHX::Evaluator< panzer::Traits > > > > panzer_stk::IOClosureModelFactory< EvalT >::buildClosureModels | ( | const std::string & | model_id, |
| const Teuchos::ParameterList & | models, | ||
| const panzer::FieldLayoutLibrary & | fl, | ||
| const Teuchos::RCP< panzer::IntegrationRule > & | ir, | ||
| const Teuchos::ParameterList & | default_params, | ||
| const Teuchos::ParameterList & | user_data, | ||
| const Teuchos::RCP< panzer::GlobalData > & | global_data, | ||
| PHX::FieldManager< panzer::Traits > & | fm | ||
| ) | const |
Delegates to the wrapped factory's buildClosureModels() for the named model.
| [in] | model_id | the closure model ID to build; selects which sublist of models to use. |
| [in] | models | ParameterList of named closure model sublists, keyed by model ID. |
| [in] | fl | the field layouts available for the current physics block. |
| [in] | ir | the integration rule the built evaluators should evaluate on. |
| [in] | default_params | equation-set-level parameters used as defaults when building closures. |
| [in] | user_data | user-supplied parameters passed through to closures that need additional application data. |
| [in] | global_data | global data (parameter library, output stream) shared across the problem. |
| [in] | fm | the field manager the built evaluators will be registered into. |
Definition at line 79 of file Panzer_STK_IOClosureModel_Factory_impl.hpp.
|
private |
Definition at line 58 of file Panzer_STK_IOClosureModel_Factory_impl.hpp.
| Teuchos::RCP< std::vector< Teuchos::RCP< PHX::Evaluator< panzer::Traits > > > > panzer_stk::IOClosureModelFactory< panzer::Traits::Residual >::buildClosureModels | ( | const std::string & | model_id, |
| const Teuchos::ParameterList & | models, | ||
| const panzer::FieldLayoutLibrary & | fl, | ||
| const Teuchos::RCP< panzer::IntegrationRule > & | ir, | ||
| const Teuchos::ParameterList & | default_params, | ||
| const Teuchos::ParameterList & | user_data, | ||
| const Teuchos::RCP< panzer::GlobalData > & | global_data, | ||
| PHX::FieldManager< panzer::Traits > & | fm | ||
| ) | const |
Definition at line 21 of file Panzer_STK_IOClosureModel_Factory.cpp.
| Teuchos::RCP< std::vector< Teuchos::RCP< PHX::Evaluator< panzer::Traits > > > > panzer_stk::IOClosureModelFactory< panzer::Traits::Residual >::buildClosureModels | ( | const std::string & | model_id, |
| const Teuchos::ParameterList & | models, | ||
| const panzer::FieldLayoutLibrary & | fl, | ||
| const Teuchos::RCP< panzer::IntegrationRule > & | ir, | ||
| const Teuchos::ParameterList & | default_params, | ||
| const Teuchos::ParameterList & | user_data, | ||
| const Teuchos::RCP< panzer::GlobalData > & | global_data, | ||
| PHX::FieldManager< panzer::Traits > & | fm | ||
| ) | const |
Delegates to the wrapped factory's buildClosureModels() for the named model, then adds the scatter-to-mesh evaluators needed for the fields requested at construction.
| [in] | model_id | the closure model ID to build; selects which sublist of models to use. |
| [in] | models | ParameterList of named closure model sublists, keyed by model ID. |
| [in] | fl | the field layouts available for the current physics block. |
| [in] | ir | the integration rule the built evaluators should evaluate on. |
| [in] | default_params | equation-set-level parameters used as defaults when building closures. |
| [in] | user_data | user-supplied parameters passed through to closures that need additional application data. |
| [in] | global_data | global data (parameter library, output stream) shared across the problem. |
| [in] | fm | the field manager the built evaluators will be registered into. |
|
private |
Mesh pointer, will be passed around.
Definition at line 90 of file Panzer_STK_IOClosureModel_Factory_decl.hpp.
|
private |
Map showing which cell averaged fields need to be written out for each element block.
Definition at line 93 of file Panzer_STK_IOClosureModel_Factory_decl.hpp.
|
private |
Map showing which cell averaged vector fields need to be written out for each element block.
Definition at line 96 of file Panzer_STK_IOClosureModel_Factory_decl.hpp.
|
private |
Map showing which cell fields need to be written out for each element block.
Definition at line 99 of file Panzer_STK_IOClosureModel_Factory_decl.hpp.
|
private |
Map showing which nodal fields need to be written out for each element block.
Definition at line 102 of file Panzer_STK_IOClosureModel_Factory_decl.hpp.
|
mutableprivate |
Map stating if an evaluator for a particular block ID has been included.
This is a bit of hack that is done to gurantee only one evaluator is added to each field manager. However, if an instantiation of this closure model factory is used in multiple places then the appropriate evaluator will be added and required only once. So its likely that not every field manager will have (and require) the scatter cell evaluators.
Definition at line 112 of file Panzer_STK_IOClosureModel_Factory_decl.hpp.
|
private |
we will reuse the drekar closure model factory
Definition at line 115 of file Panzer_STK_IOClosureModel_Factory_decl.hpp.