Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_AdjointSensitivityModelEvaluator_decl.hpp
Go to the documentation of this file.
1 //@HEADER
2 // *****************************************************************************
3 // Tempus: Time Integration and Sensitivity Analysis Package
4 //
5 // Copyright 2017 NTESS and the Tempus contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 //@HEADER
9 
10 #ifndef Tempus_AdjointSensitivityModelEvaluator_decl_hpp
11 #define Tempus_AdjointSensitivityModelEvaluator_decl_hpp
12 
13 #include "Thyra_StateFuncModelEvaluatorBase.hpp"
14 #include "Thyra_DefaultMultiVectorProductVectorSpace.hpp"
15 #include "Thyra_DefaultMultiVectorProductVector.hpp"
16 
17 #include "Tempus_config.hpp"
18 #include "Tempus_SolutionHistory.hpp"
19 
20 namespace Tempus {
21 
54 template <typename Scalar>
56  : public Thyra::StateFuncModelEvaluatorBase<Scalar> {
57  public:
60 
62 
81  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& model,
83  adjoint_residual_model,
85  adjoint_solve_model,
86  const Scalar& t_init, const Scalar& t_final,
87  const bool is_pseudotransient,
88  const Teuchos::RCP<const Teuchos::ParameterList>& pList = Teuchos::null);
89 
92  {
93  return model_;
94  }
95 
98  const
99  {
101  }
102 
105  const
106  {
107  return adjoint_solve_model_;
108  }
109 
111  void setFinalTime(const Scalar t_final);
112 
116 
119 
121 
123 
125 
127 
129 
131 
133  get_W_factory() const;
134 
136 
138 
140 
142 
143  private:
146 
148 
149  void evalModelImpl(
151  const Thyra::ModelEvaluatorBase::OutArgs<Scalar>& outArgs) const;
152 
155 
159 
164  Scalar t_init_;
165  Scalar t_final_;
169  int p_index_;
170  int g_index_;
172 
183  mutable Scalar t_interp_;
184 };
185 
186 } // namespace Tempus
187 
188 #endif
static Teuchos::RCP< const Teuchos::ParameterList > getValidParameters()
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > adjoint_solve_model_
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > getAdjointResidualModel() const
Get the underlying adjoint residual model.
Teuchos::RCP< const Tempus::SolutionHistory< Scalar > > sh_
Thyra::ModelEvaluatorBase::InArgs< Scalar > createInArgs() const
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > getModel() const
Get the underlying model &#39;f&#39;.
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > adjoint_residual_model_
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 Thyra::LinearOpWithSolveFactoryBase< Scalar > > get_W_factory() const
void evalModelImpl(const Thyra::ModelEvaluatorBase::InArgs< Scalar > &inArgs, const Thyra::ModelEvaluatorBase::OutArgs< Scalar > &outArgs) const
Thyra::ModelEvaluatorBase::OutArgs< Scalar > createOutArgsImpl() const
Thyra::ModelEvaluatorBase::OutArgs< Scalar > prototypeOutArgs_
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_
AdjointSensitivityModelEvaluator(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &adjoint_residual_model, const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &adjoint_solve_model, const Scalar &t_init, const Scalar &t_final, const bool is_pseudotransient, const Teuchos::RCP< const Teuchos::ParameterList > &pList=Teuchos::null)
Constructor.
void setForwardSolutionHistory(const Teuchos::RCP< const Tempus::SolutionHistory< Scalar > > &sh)
Set solution history from forward evaluation.
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > getAdjointSolveModel() const
Get the underlying adjoint solve model.
Thyra::ModelEvaluatorBase::InArgs< Scalar > getNominalValues() const
void setFinalTime(const Scalar t_final)
Set the final time from the forward evaluation.
ModelEvaluator for forming adjoint sensitivity equations.
Thyra::DefaultMultiVectorProductVectorSpace< Scalar > DMVPVS
Teuchos::RCP< Tempus::SolutionState< Scalar > > forward_state_
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > create_W_op() const
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_p_space(int p) const
Teuchos::RCP< Thyra::MultiVectorBase< Scalar > > my_dgdx_mv_