9 #ifndef Tempus_AdjointSensitivityModelEvaluator_decl_hpp
10 #define Tempus_AdjointSensitivityModelEvaluator_decl_hpp
12 #include "Thyra_StateFuncModelEvaluatorBase.hpp"
13 #include "Thyra_DefaultMultiVectorProductVectorSpace.hpp"
14 #include "Thyra_DefaultMultiVectorProductVector.hpp"
16 #include "Tempus_SolutionHistory.hpp"
52 template <
typename Scalar>
54 public Thyra::StateFuncModelEvaluatorBase<Scalar> {
56 typedef Thyra::VectorBase<Scalar>
Vector;
79 const Teuchos::RCP<
const Thyra::ModelEvaluator<Scalar> > & model,
80 const Scalar& t_final,
81 const bool is_pseudotransient,
82 const Teuchos::RCP<const Teuchos::ParameterList>& pList = Teuchos::null);
85 Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >
getModel()
const
95 Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> >
get_p_space(
int p)
const;
97 Teuchos::RCP<const Teuchos::Array<std::string> >
get_p_names(
int p)
const;
99 Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> >
get_x_space()
const;
101 Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> >
get_f_space()
const;
103 Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> >
get_g_space(
int j)
const;
105 Teuchos::RCP<Thyra::LinearOpBase<Scalar> >
create_W_op()
const;
107 Teuchos::RCP<const Thyra::LinearOpWithSolveFactoryBase<Scalar> >
110 Thyra::ModelEvaluatorBase::InArgs<Scalar>
createInArgs()
const;
120 typedef Thyra::DefaultMultiVectorProductVectorSpace<Scalar>
DMVPVS;
121 typedef Thyra::DefaultMultiVectorProductVector<Scalar>
DMVPV;
126 const Thyra::ModelEvaluatorBase::InArgs<Scalar> &inArgs,
127 const Thyra::ModelEvaluatorBase::OutArgs<Scalar> &outArgs)
const;
133 Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >
model_;
138 Teuchos::RCP<const Tempus::SolutionHistory<Scalar> >
sh_;
148 mutable Teuchos::RCP<Thyra::VectorBase<Scalar> >
my_x_dot_;
149 mutable Teuchos::RCP<Thyra::LinearOpBase<Scalar> >
my_dfdx_;
152 mutable Teuchos::RCP<Thyra::MultiVectorBase<Scalar> >
my_dfdp_mv_;
153 mutable Teuchos::RCP<Thyra::MultiVectorBase<Scalar> >
my_dgdx_mv_;
static Teuchos::RCP< const Teuchos::ParameterList > getValidParameters()
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > my_dfdx_
AdjointSensitivityModelEvaluator(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, const Scalar &t_final, const bool is_pseudotransient, const Teuchos::RCP< const Teuchos::ParameterList > &pList=Teuchos::null)
Constructor.
Teuchos::RCP< const DMVPVS > residual_space_
Teuchos::RCP< const DMVPVS > adjoint_space_
Thyra::MultiVectorBase< Scalar > MultiVector
Teuchos::RCP< const Tempus::SolutionHistory< Scalar > > sh_
bool mass_matrix_is_identity_
Thyra::ModelEvaluatorBase::InArgs< Scalar > createInArgs() const
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > getModel() const
Get the underlying model 'f'.
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_x_space() const
Teuchos::RCP< const Teuchos::Array< std::string > > get_p_names(int p) const
Teuchos::RCP< const DMVPVS > response_space_
Teuchos::RCP< const Thyra::LinearOpWithSolveFactoryBase< Scalar > > get_W_factory() const
bool mass_matrix_is_constant_
void evalModelImpl(const Thyra::ModelEvaluatorBase::InArgs< Scalar > &inArgs, const Thyra::ModelEvaluatorBase::OutArgs< Scalar > &outArgs) const
Thyra::ModelEvaluatorBase::OutArgs< Scalar > createOutArgsImpl() const
Thyra::ModelEvaluatorBase::InArgs< Scalar > prototypeInArgs_
Thyra::ModelEvaluatorBase::OutArgs< Scalar > prototypeOutArgs_
Teuchos::RCP< Thyra::VectorBase< Scalar > > my_x_dot_
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > my_dfdxdot_
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_f_space() const
Teuchos::RCP< Thyra::MultiVectorBase< Scalar > > my_dfdp_mv_
Thyra::DefaultMultiVectorProductVector< Scalar > DMVPV
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_g_space(int j) const
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > model_
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > my_dfdp_op_
void setForwardSolutionHistory(const Teuchos::RCP< const Tempus::SolutionHistory< Scalar > > &sh)
Set solution history from forward evaluation.
Thyra::ModelEvaluatorBase::InArgs< Scalar > getNominalValues() const
ModelEvaluator for forming adjoint sensitivity equations.
Thyra::DefaultMultiVectorProductVectorSpace< Scalar > DMVPVS
bool mass_matrix_is_computed_
Teuchos::RCP< Tempus::SolutionState< Scalar > > forward_state_
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > create_W_op() const
Thyra::VectorBase< Scalar > Vector
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_p_space(int p) const
Teuchos::RCP< Thyra::MultiVectorBase< Scalar > > my_dgdx_mv_