Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SteadyQuadraticModel_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_TEST_STEADY_QUADRATIC_MODEL_DECL_HPP
11 #define TEMPUS_TEST_STEADY_QUADRATIC_MODEL_DECL_HPP
12 
13 #include "Thyra_ModelEvaluator.hpp" // Interface
14 #include "Thyra_StateFuncModelEvaluatorBase.hpp" // Implementation
15 
16 #include "Teuchos_ParameterListAcceptorDefaultBase.hpp"
18 
19 namespace Tempus_Test {
20 
32 template <class Scalar>
35  public:
36  // Constructor
38  Teuchos::RCP<Teuchos::ParameterList> pList = Teuchos::null);
39 
40  // Exact solution
41  Scalar getSteadyStateSolution() const;
42 
43  // Exact sensitivity solution
44  Scalar getSteadyStateSolutionSensitivity() const;
45 
48 
55  get_W_factory() const;
57 
61 
63 
69 
70  private:
71  void setupInOutArgs_() const;
72 
76  void evalModelImpl(
78  const Thyra::ModelEvaluatorBase::OutArgs<Scalar> &outArgs_bar) const;
80 
81  private:
82  int dim_;
83  int Np_;
84  int np_;
85  int Ng_;
86  int ng_;
88  mutable bool isInitialized_;
97 
98  // Parameters for the model
99  Scalar b_;
100 };
101 
102 } // namespace Tempus_Test
103 #endif // TEMPUS_TEST_STEADY_QUADRATIC_MODEL_DECL_HPP
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > create_W_op() const
void evalModelImpl(const Thyra::ModelEvaluatorBase::InArgs< Scalar > &inArgs_bar, const Thyra::ModelEvaluatorBase::OutArgs< Scalar > &outArgs_bar) const
int ng_
Number of elements in this observation function (1)
int Ng_
Number of observation functions (1)
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > x_space_
Thyra::ModelEvaluatorBase::InArgs< Scalar > inArgs_
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > g_space_
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_p_space(int l) const
int np_
Number of parameters in this vector (2)
Thyra::ModelEvaluatorBase::InArgs< Scalar > nominalValues_
Thyra::ModelEvaluatorBase::InArgs< Scalar > createInArgs() const
bool useDfDpAsTangent_
Treat DfDp OutArg as tangent (df/dx*dx/dp+df/dp)
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_g_space(int j) const
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > p_space_
int Np_
Number of parameter vectors (1)
Teuchos::RCP< const Teuchos::Array< std::string > > get_p_names(int l) const
void setParameterList(Teuchos::RCP< Teuchos::ParameterList > const &paramList)
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > f_space_
Teuchos::RCP< Thyra::LinearOpWithSolveBase< Scalar > > create_W() const
Thyra::ModelEvaluatorBase::InArgs< Scalar > getNominalValues() const
Thyra::ModelEvaluatorBase::OutArgs< Scalar > outArgs_
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_f_space() const
Simple quadratic equation with a stable steady-state.
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_x_space() const
Teuchos::RCP< const Thyra::LinearOpWithSolveFactoryBase< Scalar > > get_W_factory() const
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > DxDp_space_
Thyra::ModelEvaluatorBase::OutArgs< Scalar > createOutArgsImpl() const
SteadyQuadraticModel(Teuchos::RCP< Teuchos::ParameterList > pList=Teuchos::null)
int dim_
Number of state unknowns (2)