Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_AdjointAuxSensitivityModelEvaluator_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_AdjointAuxSensitivityModelEvaluator_decl_hpp
11 #define Tempus_AdjointAuxSensitivityModelEvaluator_decl_hpp
12 
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"
18 
19 #include "Tempus_config.hpp"
20 #include "Tempus_SolutionHistory.hpp"
21 
22 namespace Tempus {
23 
57 template <typename Scalar>
59  : public Thyra::StateFuncModelEvaluatorBase<Scalar> {
60  public:
63 
65 
84  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& model,
85  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& adjoint_model,
86  const Scalar& t_init, const Scalar& t_final,
87  const Teuchos::RCP<const Teuchos::ParameterList>& pList = Teuchos::null);
88 
91  {
92  return model_;
93  }
94 
97  {
98  return adjoint_model_;
99  }
100 
102  void setFinalTime(const Scalar t_final);
103 
107 
110 
112 
114 
116 
118 
120 
122  get_W_factory() const;
123 
125 
127 
129 
131 
132  private:
137 
139 
140  void evalModelImpl(
142  const Thyra::ModelEvaluatorBase::OutArgs<Scalar>& outArgs) const;
143 
146 
149 
156  Scalar t_init_;
157  Scalar t_final_;
160  int p_index_;
161  int g_index_;
163 
170  mutable Scalar t_interp_;
171 };
172 
173 } // namespace Tempus
174 
175 #endif
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > getAdjointModel() const
Get the underlying adjoint model.
Thyra::DefaultMultiVectorProductVectorSpace< Scalar > DMVPVS
Teuchos::RCP< const Thyra::LinearOpWithSolveFactoryBase< Scalar > > get_W_factory() const
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > adjoint_model_
void evalModelImpl(const Thyra::ModelEvaluatorBase::InArgs< Scalar > &inArgs, const Thyra::ModelEvaluatorBase::OutArgs< Scalar > &outArgs) const
static Teuchos::RCP< const Teuchos::ParameterList > getValidParameters()
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > create_W_op() const
ModelEvaluator for forming adjoint sensitivity equations.
Thyra::ModelEvaluatorBase::InArgs< Scalar > createInArgs() const
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_x_space() const
Teuchos::RCP< const Teuchos::Array< std::string > > get_p_names(int p) const
Thyra::ModelEvaluatorBase::InArgs< Scalar > getNominalValues() const
Thyra::ModelEvaluatorBase::OutArgs< Scalar > createOutArgsImpl() const
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_f_space() const
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > getModel() const
Get the underlying model &#39;f&#39;.
void setForwardSolutionHistory(const Teuchos::RCP< const Tempus::SolutionHistory< Scalar > > &sh)
Set solution history from forward evaluation.
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_p_space(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.
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > model_
void setFinalTime(const Scalar t_final)
Set the final time from the forward evaluation.
Teuchos::RCP< const Tempus::SolutionHistory< Scalar > > sh_