Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_CombinedForwardSensitivityModelEvaluator_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_CombinedForwardSensitivityModelEvaluator_decl_hpp
11 #define Tempus_CombinedForwardSensitivityModelEvaluator_decl_hpp
12 
13 #include "Tempus_config.hpp"
15 #include "Thyra_StateFuncModelEvaluatorBase.hpp"
16 #include "Thyra_DefaultMultiVectorProductVectorSpace.hpp"
17 #include "Thyra_DefaultMultiVectorProductVector.hpp"
18 
19 namespace Tempus {
20 
39 template <typename Scalar>
41  : public Thyra::StateFuncModelEvaluatorBase<Scalar>,
42  public SensitivityModelEvaluatorBase<Scalar> {
43  public:
46 
48 
75  const Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> >& model,
77  sens_residual_model,
79  sens_solve_model,
80  const Teuchos::RCP<const Teuchos::ParameterList>& pList = Teuchos::null,
81  const Teuchos::RCP<MultiVector>& dxdp_init = Teuchos::null,
82  const Teuchos::RCP<MultiVector>& dx_dotdp_init = Teuchos::null,
83  const Teuchos::RCP<MultiVector>& dx_dotdot_dp_init = Teuchos::null);
84 
87 
90  {
91  return model_;
92  }
93 
95 
97  int getSensitivityParamIndex() const { return p_index_; }
98 
101 
103 
105 
107 
109 
111 
113 
115 
117 
119 
121 
123  get_W_factory() const;
124 
126 
128 
130 
132 
133  private:
135 
137 
138  void evalModelImpl(
140  const Thyra::ModelEvaluatorBase::OutArgs<Scalar>& outArgs) const;
141 
144 
151  int p_index_;
152  int g_index_;
158 
167 
173 };
174 
175 } // namespace Tempus
176 
177 #endif
Transform a ModelEvaluator&#39;s sensitivity equations to its residual.
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_p_space(int p) const
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_g_space(int j) const
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > create_DgDx_dot_op(int j) const
Teuchos::RCP< const Teuchos::Array< std::string > > get_p_names(int p) const
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > create_DgDp_op(int j, int l) const
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_x_space() const
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > create_DgDx_op(int j) const
CombinedForwardSensitivityModelEvaluator(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &sens_residual_model, const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &sens_solve_model, const Teuchos::RCP< const Teuchos::ParameterList > &pList=Teuchos::null, const Teuchos::RCP< MultiVector > &dxdp_init=Teuchos::null, const Teuchos::RCP< MultiVector > &dx_dotdp_init=Teuchos::null, const Teuchos::RCP< MultiVector > &dx_dotdot_dp_init=Teuchos::null)
Constructor.
void evalModelImpl(const Thyra::ModelEvaluatorBase::InArgs< Scalar > &inArgs, const Thyra::ModelEvaluatorBase::OutArgs< Scalar > &outArgs) const
Teuchos::RCP< const Thyra::LinearOpWithSolveFactoryBase< Scalar > > get_W_factory() const
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_f_space() const
Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > getForwardModel() const
Get the underlying model &#39;f&#39;.
A ModelEvaluator decorator for sensitivity analysis.