10#ifndef Tempus_AdjointAuxSensitivityModelEvaluator_decl_hpp
11#define Tempus_AdjointAuxSensitivityModelEvaluator_decl_hpp
13#include "Thyra_StateFuncModelEvaluatorBase.hpp"
14#include "Thyra_DefaultProductVectorSpace.hpp"
15#include "Thyra_DefaultProductVector.hpp"
16#include "Thyra_DefaultMultiVectorProductVectorSpace.hpp"
17#include "Thyra_DefaultMultiVectorProductVector.hpp"
19#include "Tempus_config.hpp"
20#include "Tempus_SolutionHistory.hpp"
70template <
typename Scalar>
72 :
public Thyra::StateFuncModelEvaluatorBase<Scalar> {
111 const Scalar& t_init,
const Scalar& t_final,
112 const Teuchos::RCP<const Teuchos::ParameterList>& pList = Teuchos::null);
115 Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >
getModel()
const
136 Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> >
get_p_space(
int p)
const;
138 Teuchos::RCP<const Teuchos::Array<std::string> >
get_p_names(
int p)
const;
140 Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> >
get_x_space()
const;
142 Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> >
get_f_space()
const;
144 Teuchos::RCP<Thyra::LinearOpBase<Scalar> >
create_W_op()
const;
146 Teuchos::RCP<const Thyra::LinearOpWithSolveFactoryBase<Scalar> >
149 Thyra::ModelEvaluatorBase::InArgs<Scalar>
createInArgs()
const;
158 typedef Thyra::DefaultProductVectorSpace<Scalar>
DPVS;
159 typedef Thyra::DefaultProductVector<Scalar>
DPV;
160 typedef Thyra::DefaultMultiVectorProductVectorSpace<Scalar>
DMVPVS;
161 typedef Thyra::DefaultMultiVectorProductVector<Scalar>
DMVPV;
166 const Thyra::ModelEvaluatorBase::InArgs<Scalar>& inArgs,
167 const Thyra::ModelEvaluatorBase::OutArgs<Scalar>& outArgs)
const;
171 const Thyra::ModelEvaluatorBase::InArgs<Scalar>& me_inArgs)
const;
176 Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >
model_;
184 Teuchos::RCP<const Tempus::SolutionHistory<Scalar> >
sh_;
197 mutable Teuchos::RCP<Thyra::LinearOpBase<Scalar> >
my_dfdx_;
200 mutable Teuchos::RCP<Thyra::MultiVectorBase<Scalar> >
my_dfdp_mv_;
201 mutable Teuchos::RCP<Thyra::MultiVectorBase<Scalar> >
my_dgdx_mv_;
202 mutable Teuchos::RCP<Thyra::MultiVectorBase<Scalar> >
my_dgdp_mv_;
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > my_dfdp_op_
Teuchos::RCP< const DMVPVS > residual_space_
Teuchos::RCP< const DPVS > x_prod_space_
Thyra::ModelEvaluatorBase::InArgs< Scalar > responseInArgs(const Thyra::ModelEvaluatorBase::InArgs< Scalar > &me_inArgs) const
InArgs for evaluating the response derivatives at the forward state.
void evalModelImpl(const Thyra::ModelEvaluatorBase::InArgs< Scalar > &inArgs, const Thyra::ModelEvaluatorBase::OutArgs< Scalar > &outArgs) const
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_p_space(int p) const
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_x_space() const
Teuchos::RCP< const DMVPVS > adjoint_space_
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > adjoint_model_
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > create_W_op() const
Thyra::DefaultMultiVectorProductVectorSpace< Scalar > DMVPVS
Teuchos::RCP< const DPVS > f_prod_space_
Teuchos::RCP< const DMVPVS > response_space_
static Teuchos::RCP< const Teuchos::ParameterList > getValidParameters()
Teuchos::RCP< Thyra::MultiVectorBase< Scalar > > my_dfdp_mv_
bool mass_matrix_is_identity_
void setFinalTime(const Scalar t_final)
Set the final time from the forward evaluation.
Thyra::ModelEvaluatorBase::InArgs< Scalar > createInArgs() const
Thyra::ModelEvaluatorBase::InArgs< Scalar > getNominalValues() const
Thyra::DefaultProductVector< Scalar > DPV
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > getAdjointModel() const
Get the underlying adjoint model.
Teuchos::RCP< Thyra::MultiVectorBase< Scalar > > my_dgdp_mv_
Teuchos::RCP< const Tempus::SolutionHistory< Scalar > > sh_
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > getModel() const
Get the underlying model 'f'.
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > my_dfdxdot_
Thyra::ModelEvaluatorBase::OutArgs< Scalar > createOutArgsImpl() const
void setForwardSolutionHistory(const Teuchos::RCP< const Tempus::SolutionHistory< Scalar > > &sh)
Set solution history from forward evaluation.
Thyra::DefaultMultiVectorProductVector< Scalar > DMVPV
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_f_space() const
Teuchos::RCP< const Thyra::LinearOpWithSolveFactoryBase< Scalar > > get_W_factory() const
AdjointResponseType response_type_
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > model_
Thyra::VectorBase< Scalar > Vector
Thyra::DefaultProductVectorSpace< Scalar > DPVS
Teuchos::RCP< const Teuchos::Array< std::string > > get_p_names(int p) const
AdjointAuxSensitivityModelEvaluator(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &adjoint_model, const Scalar &t_init, const Scalar &t_final, const Teuchos::RCP< const Teuchos::ParameterList > &pList=Teuchos::null)
Constructor.
bool mass_matrix_is_computed_
Thyra::ModelEvaluatorBase::OutArgs< Scalar > prototypeOutArgs_
Teuchos::RCP< Tempus::SolutionState< Scalar > > forward_state_
bool mass_matrix_is_constant_
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > my_dfdx_
Teuchos::RCP< Thyra::MultiVectorBase< Scalar > > my_dgdx_mv_
Thyra::MultiVectorBase< Scalar > MultiVector
Thyra::ModelEvaluatorBase::InArgs< Scalar > prototypeInArgs_
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
AdjointResponseType
Type of response for transient adjoint sensitivities.