#include <Panzer_ModelEvaluator_Epetra.hpp>
Inherits ModelEvaluator.
|
| ModelEvaluator_Epetra (const Teuchos::RCP< panzer::FieldManagerBuilder > &fmb, const Teuchos::RCP< panzer::ResponseLibrary< panzer::Traits > > &rLibrary, const Teuchos::RCP< panzer::LinearObjFactory< panzer::Traits > > &lof, const std::vector< Teuchos::RCP< Teuchos::Array< std::string > > > &p_names, const std::vector< Teuchos::RCP< Teuchos::Array< double > > > &p_values, const Teuchos::RCP< panzer::GlobalData > &global_data, bool build_transient_support) |
|
| ModelEvaluator_Epetra (const Teuchos::RCP< panzer::FieldManagerBuilder > &fmb, const Teuchos::RCP< panzer::ResponseLibrary< panzer::Traits > > &rLibrary, const Teuchos::RCP< panzer::EpetraLinearObjFactory< panzer::Traits, int > > &lof, const std::vector< Teuchos::RCP< Teuchos::Array< std::string > > > &p_names, const std::vector< Teuchos::RCP< Teuchos::Array< double > > > &p_values, const Teuchos::RCP< panzer::GlobalData > &global_data, bool build_transient_support) |
|
void | set_t_init (double t) |
| Set initial time value. More...
|
|
Teuchos::RCP< panzer::ResponseLibrary< panzer::Traits > > | getResponseLibrary () const |
| Get the response library used by this evaluator. More...
|
|
void | setOneTimeDirichletBeta (const double &beta) const |
|
void | applyDirichletBCs (const Teuchos::RCP< Thyra::VectorBase< double > > &x, const Teuchos::RCP< Thyra::VectorBase< double > > &f) const |
|
|
void | initializeEpetraObjs (panzer::EpetraLinearObjFactory< panzer::Traits, int > &lof) |
|
void | initializeParameterVector (const std::vector< Teuchos::RCP< Teuchos::Array< std::string > > > &p_names, const std::vector< Teuchos::RCP< Teuchos::Array< double > > > &p_values, const Teuchos::RCP< panzer::ParamLib > ¶meter_library) |
|
void | evalModel_basic (const InArgs &inArgs, const OutArgs &outArgs) const |
| for evaluation and handling of normal quantities, x,f,W, etc More...
|
|
void | evalModel_basic_g (AssemblyEngineInArgs ae_inargs, const InArgs &inArgs, const OutArgs &outArgs) const |
|
void | evalModel_basic_dgdx (AssemblyEngineInArgs ae_inargs, const InArgs &inArgs, const OutArgs &outArgs) const |
|
void | evalModel_basic_dfdp (AssemblyEngineInArgs ae_inargs, const InArgs &inArgs, const OutArgs &outArgs) const |
|
bool | required_basic_g (const OutArgs &outArgs) const |
| Are their required responses in the out args? g and DgDx. More...
|
|
bool | required_basic_dgdx (const OutArgs &outArgs) const |
| Are their required responses in the out args? DgDx. More...
|
|
bool | required_basic_dfdp (const OutArgs &outArgs) const |
| Are derivatives of the residual with respect to the parameters in the out args? DfDp. More...
|
|
void | copyEpetraIntoThyra (const Epetra_MultiVector &x, const Teuchos::Ptr< Thyra::VectorBase< double > > &thyraVec) const |
|
void | copyThyraIntoEpetra (const Thyra::VectorBase< double > &thyraVec, Epetra_MultiVector &x) const |
|
|
int | addDistributedParameter (const std::string name, const Teuchos::RCP< Epetra_Map > &global_map, const Teuchos::RCP< Epetra_Import > &importer, const Teuchos::RCP< Epetra_Vector > &ghosted_vector) |
|
template<typename ResponseEvaluatorFactory_BuilderT > |
int | addResponse (const std::string &responseName, const std::vector< WorksetDescriptor > &wkst_desc, const ResponseEvaluatorFactory_BuilderT &builder) |
|
void | buildResponses (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 | buildResponses (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="") |
|
◆ ModelEvaluator_Epetra() [1/2]
◆ ModelEvaluator_Epetra() [2/2]
◆ get_x_map()
Teuchos::RCP< const Epetra_Map > panzer::ModelEvaluator_Epetra::get_x_map |
( |
| ) |
const |
◆ get_f_map()
Teuchos::RCP< const Epetra_Map > panzer::ModelEvaluator_Epetra::get_f_map |
( |
| ) |
const |
◆ get_x_init()
Teuchos::RCP< const Epetra_Vector > panzer::ModelEvaluator_Epetra::get_x_init |
( |
| ) |
const |
◆ get_x_dot_init()
Teuchos::RCP< const Epetra_Vector > panzer::ModelEvaluator_Epetra::get_x_dot_init |
( |
| ) |
const |
◆ get_t_init()
double panzer::ModelEvaluator_Epetra::get_t_init |
( |
| ) |
const |
◆ create_W()
Teuchos::RCP< Epetra_Operator > panzer::ModelEvaluator_Epetra::create_W |
( |
| ) |
const |
◆ get_p_map()
Teuchos::RCP< const Epetra_Map > panzer::ModelEvaluator_Epetra::get_p_map |
( |
int |
l | ) |
const |
◆ get_p_names()
◆ get_p_init()
Teuchos::RCP< const Epetra_Vector > panzer::ModelEvaluator_Epetra::get_p_init |
( |
int |
l | ) |
const |
◆ get_g_map()
Teuchos::RCP< const Epetra_Map > panzer::ModelEvaluator_Epetra::get_g_map |
( |
int |
l | ) |
const |
◆ createInArgs()
EpetraExt::ModelEvaluator::InArgs panzer::ModelEvaluator_Epetra::createInArgs |
( |
| ) |
const |
◆ createOutArgs()
EpetraExt::ModelEvaluator::OutArgs panzer::ModelEvaluator_Epetra::createOutArgs |
( |
| ) |
const |
◆ evalModel()
void panzer::ModelEvaluator_Epetra::evalModel |
( |
const InArgs & |
inArgs, |
|
|
const OutArgs & |
outArgs |
|
) |
| const |
◆ set_t_init()
void panzer::ModelEvaluator_Epetra::set_t_init |
( |
double |
t | ) |
|
◆ getResponseLibrary()
◆ addDistributedParameter()
int panzer::ModelEvaluator_Epetra::addDistributedParameter |
( |
const std::string |
name, |
|
|
const Teuchos::RCP< Epetra_Map > & |
global_map, |
|
|
const Teuchos::RCP< Epetra_Import > & |
importer, |
|
|
const Teuchos::RCP< Epetra_Vector > & |
ghosted_vector |
|
) |
| |
Add a distributed parameter to the model evaluator
Distributed parameters are special in that they most likely will require a global to ghost call before being used in the evaluator. This function registers the parameter and any needed machinery to perform the global to ghost call.
NOTE: We can't use the LinearObjFactory and LinearObjContainers here because those objects require a unique global indexer to build. In general, the distributed parameters may NOT be coming from an object that has an associated unique global indexer. An example of this is multiphysics coupling. The parameters will be coming form another code that may not have a PDE discretization. Generalizing this function to hide the linear algebra type may not be possible unless we refactor the linear object support or write new wrapper objects. Also note that Thyra has no concept of an import/export object so we can't use Thyra here to abstract the objects.
- Parameters
-
[in] | name | Name of the distributed parameter |
[in] | global_map | RCP to Epetra_Map used to construct the global parameter vector. |
[in] | importer | RCP to a Epetra_Import object used for the global to ghost. If set to null, then no global to ghost will be performed.
|
[in] | ghosted_vector | RCP to the ghosted vector that is the target of the global to ghost. If set to null, then no global to ghost will be performed.
|
- Returns
- The index associated with this parameter for accessing it through the ModelEvaluator interface.
Definition at line 219 of file Panzer_ModelEvaluator_Epetra.cpp.
◆ addResponse()
template<typename ResponseEvaluatorFactory_BuilderT >
int panzer::ModelEvaluator_Epetra::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.
NOTE: Response factories must use a response of type ResponseMESupportBase
. This is how the model evaluator parses and puts responses in the right location. If this condition is violated the evalModel
call will fail. Furthermore, this method cannot be called after buildRespones
has been called.
- Parameters
-
[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. |
- Returns
- The index associated with this response for accessing it through the ModelEvaluator interface.
Definition at line 331 of file Panzer_ModelEvaluator_Epetra.hpp.
◆ buildResponses() [1/2]
Build all the responses set on the model evaluator. Once this method is called no other responses can be added. An exception is thrown if they are.
Definition at line 179 of file Panzer_ModelEvaluator_Epetra.hpp.
◆ buildResponses() [2/2]
Build all the responses set on the model evaluator. Once this method is called no other responses can be added. An exception is thrown if they are.
Definition at line 192 of file Panzer_ModelEvaluator_Epetra.hpp.
◆ setOneTimeDirichletBeta()
void panzer::ModelEvaluator_Epetra::setOneTimeDirichletBeta |
( |
const double & |
beta | ) |
const |
This function is intended for experts only, it allows for a beta to be set for the dirichlet conditions only. This allows the dirichlet condition to be propagated to the mass matrix. The reason it is one time only is that it breaks encapsulation, and should be only used if absolutely neccessary.
- Parameters
-
[in] | beta | Value of beta to use. |
Definition at line 940 of file Panzer_ModelEvaluator_Epetra.cpp.
◆ applyDirichletBCs()
◆ initializeEpetraObjs()
◆ initializeParameterVector()
◆ evalModel_basic()
void panzer::ModelEvaluator_Epetra::evalModel_basic |
( |
const InArgs & |
inArgs, |
|
|
const OutArgs & |
outArgs |
|
) |
| const |
|
private |
◆ evalModel_basic_g()
void panzer::ModelEvaluator_Epetra::evalModel_basic_g |
( |
AssemblyEngineInArgs |
ae_inargs, |
|
|
const InArgs & |
inArgs, |
|
|
const OutArgs & |
outArgs |
|
) |
| const |
|
private |
handles evaluation of responses g, dgdx
- Note
- This method should (basically) be a no-op if
required_basic_g(outArgs)==false
. However, for efficiency this is not checked.
Definition at line 653 of file Panzer_ModelEvaluator_Epetra.cpp.
◆ evalModel_basic_dgdx()
void panzer::ModelEvaluator_Epetra::evalModel_basic_dgdx |
( |
AssemblyEngineInArgs |
ae_inargs, |
|
|
const InArgs & |
inArgs, |
|
|
const OutArgs & |
outArgs |
|
) |
| const |
|
private |
handles evaluation of responses dgdx
- Note
- This method should (basically) be a no-op if
required_basic_dgdx(outArgs)==false
. However, for efficiency this is not checked.
Definition at line 675 of file Panzer_ModelEvaluator_Epetra.cpp.
◆ evalModel_basic_dfdp()
void panzer::ModelEvaluator_Epetra::evalModel_basic_dfdp |
( |
AssemblyEngineInArgs |
ae_inargs, |
|
|
const InArgs & |
inArgs, |
|
|
const OutArgs & |
outArgs |
|
) |
| const |
|
private |
handles evaluation of residual derivatives dfdp
- Note
- This method should (basically) be a no-op if
required_basic_dfdp(outArgs)==false
. However, for efficiency this is not checked.
Definition at line 703 of file Panzer_ModelEvaluator_Epetra.cpp.
◆ required_basic_g()
bool panzer::ModelEvaluator_Epetra::required_basic_g |
( |
const OutArgs & |
outArgs | ) |
const |
|
private |
◆ required_basic_dgdx()
bool panzer::ModelEvaluator_Epetra::required_basic_dgdx |
( |
const OutArgs & |
outArgs | ) |
const |
|
private |
◆ required_basic_dfdp()
bool panzer::ModelEvaluator_Epetra::required_basic_dfdp |
( |
const OutArgs & |
outArgs | ) |
const |
|
private |
◆ copyEpetraIntoThyra()
void panzer::ModelEvaluator_Epetra::copyEpetraIntoThyra |
( |
const Epetra_MultiVector & |
x, |
|
|
const Teuchos::Ptr< Thyra::VectorBase< double > > & |
thyraVec |
|
) |
| const |
|
private |
◆ copyThyraIntoEpetra()
void panzer::ModelEvaluator_Epetra::copyThyraIntoEpetra |
( |
const Thyra::VectorBase< double > & |
thyraVec, |
|
|
Epetra_MultiVector & |
x |
|
) |
| const |
|
private |
◆ fmb_
◆ ae_tm_
◆ responseLibrary_
◆ g_map_
std::vector<Teuchos::RCP<const Epetra_Map> > panzer::ModelEvaluator_Epetra::g_map_ |
|
private |
◆ g_names_
std::vector<std::string> panzer::ModelEvaluator_Epetra::g_names_ |
|
private |
◆ p_map_
std::vector<Teuchos::RCP<Epetra_Map> > panzer::ModelEvaluator_Epetra::p_map_ |
|
private |
◆ p_init_
std::vector<Teuchos::RCP<Epetra_Vector> > panzer::ModelEvaluator_Epetra::p_init_ |
|
private |
◆ p_names_
◆ parameter_vector_
◆ global_data_
◆ build_transient_support_
bool panzer::ModelEvaluator_Epetra::build_transient_support_ |
|
private |
◆ is_distributed_parameter_
std::vector<bool> panzer::ModelEvaluator_Epetra::is_distributed_parameter_ |
|
private |
Returns true if this is a distributed vector and false if it is a locally replicated scalar parameter. This is used to determine when to call a global to ghost method which is required for distributed parameters only.
Definition at line 307 of file Panzer_ModelEvaluator_Epetra.hpp.
◆ distributed_parameter_container_
std::vector<std::tuple<std::string,int,Teuchos::RCP<Epetra_Import>,Teuchos::RCP<Epetra_Vector> > > panzer::ModelEvaluator_Epetra::distributed_parameter_container_ |
|
private |
Vector of tuples that contains objects needed for the global to ghost method for distributed parameters.
Tuple index 0: the string name for the parameter in the model evaluator. Tuple index 1: the integer index for the parameter in the model evaluator. Tuple index 2: an RCP to the linear object factory that performs the global to ghost operation. Tuple index 3: an RCP to the GHOSTED vector that is the target of the global to ghost operation.
Definition at line 316 of file Panzer_ModelEvaluator_Epetra.hpp.
◆ lof_
◆ ghostedContainer_
◆ epetraOperatorFactory_
◆ oneTimeDirichletBeta_on_
bool panzer::ModelEvaluator_Epetra::oneTimeDirichletBeta_on_ |
|
mutableprivate |
◆ oneTimeDirichletBeta_
double panzer::ModelEvaluator_Epetra::oneTimeDirichletBeta_ |
|
mutableprivate |
The documentation for this class was generated from the following files: