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: Copyright (2017) Sandia Corporation
4 //
5 // Distributed under BSD 3-clause license (See accompanying file Copyright.txt)
6 // ****************************************************************************
7 // @HEADER
8 
9 #ifndef Tempus_AdjointSensitivityModelEvaluator_decl_hpp
10 #define Tempus_AdjointSensitivityModelEvaluator_decl_hpp
11 
12 #include "Thyra_StateFuncModelEvaluatorBase.hpp"
13 #include "Thyra_DefaultMultiVectorProductVectorSpace.hpp"
14 #include "Thyra_DefaultMultiVectorProductVector.hpp"
15 
16 #include "Tempus_config.hpp"
17 #include "Tempus_SolutionHistory.hpp"
18 
19 namespace Tempus {
20 
53 template <typename Scalar>
55  public Thyra::StateFuncModelEvaluatorBase<Scalar> {
56 public:
59 
61 
80  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> > & model,
81  const Scalar& t_final,
82  const bool is_pseudotransient,
83  const Teuchos::RCP<const Teuchos::ParameterList>& pList = Teuchos::null);
84 
87  { return model_; }
88 
92 
95 
97 
99 
101 
103 
105 
107 
109  get_W_factory() const;
110 
112 
114 
116 
118 
119 private:
120 
123 
125 
126  void evalModelImpl(
128  const Thyra::ModelEvaluatorBase::OutArgs<Scalar> &outArgs) const;
129 
130 
133 
135 
140  Scalar t_final_;
144  int p_index_;
145  int g_index_;
147 
156  mutable Scalar t_interp_;
157 };
158 
159 } // namespace Tempus
160 
161 #endif
static Teuchos::RCP< const Teuchos::ParameterList > getValidParameters()
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 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::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_
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
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_