Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DahlquistTestModel_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_TEST_DAHLQUIST_TEST_MODEL_DECL_HPP
10 #define TEMPUS_TEST_DAHLQUIST_TEST_MODEL_DECL_HPP
11 
12 #include "Thyra_ModelEvaluator.hpp" // Interface
13 #include "Thyra_StateFuncModelEvaluatorBase.hpp" // Implementation
14 
15 namespace Tempus_Test {
16 
33 template <class Scalar>
35  public:
36  // Default Constructor
38 
39  // Constructor
40  DahlquistTestModel(Scalar lambda, bool includeXDot);
41 
42  void constructDahlquistTestModel(Scalar lambda, bool includeXDot);
43 
45  ~DahlquistTestModel() = default;
46 
49 
50  Scalar getLambda() const { return lambda_; }
51 
60  get_W_factory() const;
62 
67 
68  private:
72  void evalModelImpl(
74  const Thyra::ModelEvaluatorBase::OutArgs<Scalar> &outArgs_bar) const;
76 
77  private:
78  int dim_;
79  int Np_;
80  int np_;
81  int Ng_;
82  int ng_;
83  bool haveIC_;
85  Scalar lambda_;
87 
88  mutable bool isInitialized_;
97 
98  Scalar xIC_;
99  Scalar xDotIC_;
100 };
101 
102 } // namespace Tempus_Test
103 #endif // TEMPUS_TEST_DAHLQUIST_TEST_MODEL_DECL_HPP
Thyra::ModelEvaluatorBase::InArgs< Scalar > getNominalValues() const
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > x_space_
void evalModelImpl(const Thyra::ModelEvaluatorBase::InArgs< Scalar > &inArgs_bar, const Thyra::ModelEvaluatorBase::OutArgs< Scalar > &outArgs_bar) const
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > p_space_
The classic Dahlquist Test Problem.
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > create_W_op() const
Scalar xIC_
Initial condition for x.
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > g_space_
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_x_space() const
Thyra::ModelEvaluatorBase::OutArgs< Scalar > createOutArgsImpl() const
Thyra::ModelEvaluatorBase::InArgs< Scalar > createInArgs() const
Thyra::ModelEvaluatorBase::InArgs< Scalar > inArgs_
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > f_space_
Thyra::ModelEvaluatorBase::InArgs< Scalar > getExactSolution(double t) const
Exact solution.
Scalar xDotIC_
Initial condition for xDot.
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_f_space() const
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > DxDp_space_
~DahlquistTestModel()=default
Default destructor.
Thyra::ModelEvaluatorBase::OutArgs< Scalar > outArgs_
Teuchos::RCP< const Thyra::LinearOpWithSolveFactoryBase< Scalar > > get_W_factory() const
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_g_space(int j) const
Teuchos::RCP< const Teuchos::Array< std::string > > get_p_names(int l) const
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_p_space(int l) const
Teuchos::RCP< Thyra::LinearOpWithSolveBase< Scalar > > create_W() const
void constructDahlquistTestModel(Scalar lambda, bool includeXDot)
Thyra::ModelEvaluatorBase::InArgs< Scalar > nominalValues_