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 
16 namespace Tempus_Test {
17 
34 template<class Scalar>
36  : public Thyra::StateFuncModelEvaluatorBase<Scalar>
37 {
38  public:
39 
40  // Default Constructor
42 
43  // Constructor
44  DahlquistTestModel(Scalar lambda, bool includeXDot);
45 
46  void constructDahlquistTestModel(Scalar lambda, bool includeXDot);
47 
49  ~DahlquistTestModel() = default;
50 
53 
54  Scalar getLambda() const { return lambda_; }
55 
65 
70 
71 private:
72 
76  void evalModelImpl(
79  ) const;
81 
82 private:
83  int dim_;
84  int Np_;
85  int np_;
86  int Ng_;
87  int ng_;
88  bool haveIC_;
90  Scalar lambda_;
92 
93  mutable bool isInitialized_;
102 
103  Scalar xIC_;
104  Scalar xDotIC_;
105 };
106 
107 
108 } // namespace Tempus_Test
109 #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_