Tempus
Version of the Day
Time Integration
Toggle main menu visibility
Loading...
Searching...
No Matches
test
TestModels
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
33
34
template
<
class
Scalar>
35
class
DahlquistTestModel
36
:
public
Thyra::StateFuncModelEvaluatorBase<Scalar>
37
{
38
public
:
39
40
// Default Constructor
41
DahlquistTestModel
();
42
43
// Constructor
44
DahlquistTestModel
(Scalar lambda,
bool
includeXDot);
45
46
void
constructDahlquistTestModel
(Scalar lambda,
bool
includeXDot);
47
49
~DahlquistTestModel
() =
default
;
50
52
Thyra::ModelEvaluatorBase::InArgs<Scalar>
getExactSolution
(
double
t)
const
;
53
54
Scalar
getLambda
()
const
{
return
lambda_
; }
55
58
Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> >
get_x_space
()
const
;
59
Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> >
get_f_space
()
const
;
60
Thyra::ModelEvaluatorBase::InArgs<Scalar>
getNominalValues
()
const
;
61
Teuchos::RCP<Thyra::LinearOpWithSolveBase<Scalar> >
create_W
()
const
;
62
Teuchos::RCP<Thyra::LinearOpBase<Scalar> >
create_W_op
()
const
;
63
Teuchos::RCP<const Thyra::LinearOpWithSolveFactoryBase<Scalar> >
get_W_factory
()
const
;
64
Thyra::ModelEvaluatorBase::InArgs<Scalar>
createInArgs
()
const
;
65
66
Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> >
get_p_space
(
int
l)
const
;
67
Teuchos::RCP<const Teuchos::Array<std::string> >
get_p_names
(
int
l)
const
;
68
Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> >
get_g_space
(
int
j)
const
;
70
71
private
:
72
75
Thyra::ModelEvaluatorBase::OutArgs<Scalar>
createOutArgsImpl
()
const
;
76
void
evalModelImpl
(
77
const
Thyra::ModelEvaluatorBase::InArgs<Scalar> &inArgs_bar,
78
const
Thyra::ModelEvaluatorBase::OutArgs<Scalar> &outArgs_bar
79
)
const
;
81
82
private
:
83
int
dim_
;
84
int
Np_
;
85
int
np_
;
86
int
Ng_
;
87
int
ng_
;
88
bool
haveIC_
;
89
bool
acceptModelParams_
;
90
Scalar
lambda_
;
91
bool
includeXDot_
;
92
93
mutable
bool
isInitialized_
;
94
mutable
Thyra::ModelEvaluatorBase::InArgs<Scalar>
inArgs_
;
95
mutable
Thyra::ModelEvaluatorBase::OutArgs<Scalar>
outArgs_
;
96
mutable
Thyra::ModelEvaluatorBase::InArgs<Scalar>
nominalValues_
;
97
Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> >
x_space_
;
98
Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> >
f_space_
;
99
Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> >
p_space_
;
100
Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> >
g_space_
;
101
Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> >
DxDp_space_
;
102
103
Scalar
xIC_
;
104
Scalar
xDotIC_
;
105
};
106
107
108
}
// namespace Tempus_Test
109
#endif
// TEMPUS_TEST_DAHLQUIST_TEST_MODEL_DECL_HPP
Tempus_Test::DahlquistTestModel::get_g_space
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_g_space(int j) const
Definition
DahlquistTestModel_impl.hpp:352
Tempus_Test::DahlquistTestModel::createOutArgsImpl
Thyra::ModelEvaluatorBase::OutArgs< Scalar > createOutArgsImpl() const
Definition
DahlquistTestModel_impl.hpp:191
Tempus_Test::DahlquistTestModel::np_
int np_
Definition
DahlquistTestModel_decl.hpp:85
Tempus_Test::DahlquistTestModel::get_f_space
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_f_space() const
Definition
DahlquistTestModel_impl.hpp:164
Tempus_Test::DahlquistTestModel::isInitialized_
bool isInitialized_
Definition
DahlquistTestModel_decl.hpp:93
Tempus_Test::DahlquistTestModel::DxDp_space_
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > DxDp_space_
Definition
DahlquistTestModel_decl.hpp:101
Tempus_Test::DahlquistTestModel::constructDahlquistTestModel
void constructDahlquistTestModel(Scalar lambda, bool includeXDot)
Definition
DahlquistTestModel_impl.hpp:41
Tempus_Test::DahlquistTestModel::includeXDot_
bool includeXDot_
Definition
DahlquistTestModel_decl.hpp:91
Tempus_Test::DahlquistTestModel::lambda_
Scalar lambda_
Definition
DahlquistTestModel_decl.hpp:90
Tempus_Test::DahlquistTestModel::dim_
int dim_
Definition
DahlquistTestModel_decl.hpp:83
Tempus_Test::DahlquistTestModel::Ng_
int Ng_
Definition
DahlquistTestModel_decl.hpp:86
Tempus_Test::DahlquistTestModel::haveIC_
bool haveIC_
Definition
DahlquistTestModel_decl.hpp:88
Tempus_Test::DahlquistTestModel::create_W
Teuchos::RCP< Thyra::LinearOpWithSolveBase< Scalar > > create_W() const
Definition
DahlquistTestModel_impl.hpp:264
Tempus_Test::DahlquistTestModel::get_x_space
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_x_space() const
Definition
DahlquistTestModel_impl.hpp:155
Tempus_Test::DahlquistTestModel::create_W_op
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > create_W_op() const
Definition
DahlquistTestModel_impl.hpp:291
Tempus_Test::DahlquistTestModel::getExactSolution
Thyra::ModelEvaluatorBase::InArgs< Scalar > getExactSolution(double t) const
Exact solution.
Definition
DahlquistTestModel_impl.hpp:124
Tempus_Test::DahlquistTestModel::x_space_
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > x_space_
Definition
DahlquistTestModel_decl.hpp:97
Tempus_Test::DahlquistTestModel::outArgs_
Thyra::ModelEvaluatorBase::OutArgs< Scalar > outArgs_
Definition
DahlquistTestModel_decl.hpp:95
Tempus_Test::DahlquistTestModel::get_W_factory
Teuchos::RCP< const Thyra::LinearOpWithSolveFactoryBase< Scalar > > get_W_factory() const
Definition
DahlquistTestModel_impl.hpp:302
Tempus_Test::DahlquistTestModel::inArgs_
Thyra::ModelEvaluatorBase::InArgs< Scalar > inArgs_
Definition
DahlquistTestModel_decl.hpp:94
Tempus_Test::DahlquistTestModel::~DahlquistTestModel
~DahlquistTestModel()=default
Default destructor.
Tempus_Test::DahlquistTestModel::xIC_
Scalar xIC_
Initial condition for x.
Definition
DahlquistTestModel_decl.hpp:103
Tempus_Test::DahlquistTestModel::get_p_space
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > get_p_space(int l) const
Definition
DahlquistTestModel_impl.hpp:312
Tempus_Test::DahlquistTestModel::evalModelImpl
void evalModelImpl(const Thyra::ModelEvaluatorBase::InArgs< Scalar > &inArgs_bar, const Thyra::ModelEvaluatorBase::OutArgs< Scalar > &outArgs_bar) const
Definition
DahlquistTestModel_impl.hpp:200
Tempus_Test::DahlquistTestModel::xDotIC_
Scalar xDotIC_
Initial condition for xDot.
Definition
DahlquistTestModel_decl.hpp:104
Tempus_Test::DahlquistTestModel::nominalValues_
Thyra::ModelEvaluatorBase::InArgs< Scalar > nominalValues_
Definition
DahlquistTestModel_decl.hpp:96
Tempus_Test::DahlquistTestModel::createInArgs
Thyra::ModelEvaluatorBase::InArgs< Scalar > createInArgs() const
Definition
DahlquistTestModel_impl.hpp:182
Tempus_Test::DahlquistTestModel::p_space_
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > p_space_
Definition
DahlquistTestModel_decl.hpp:99
Tempus_Test::DahlquistTestModel::getNominalValues
Thyra::ModelEvaluatorBase::InArgs< Scalar > getNominalValues() const
Definition
DahlquistTestModel_impl.hpp:173
Tempus_Test::DahlquistTestModel::getLambda
Scalar getLambda() const
Definition
DahlquistTestModel_decl.hpp:54
Tempus_Test::DahlquistTestModel::acceptModelParams_
bool acceptModelParams_
Definition
DahlquistTestModel_decl.hpp:89
Tempus_Test::DahlquistTestModel::f_space_
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > f_space_
Definition
DahlquistTestModel_decl.hpp:98
Tempus_Test::DahlquistTestModel::get_p_names
Teuchos::RCP< const Teuchos::Array< std::string > > get_p_names(int l) const
Definition
DahlquistTestModel_impl.hpp:329
Tempus_Test::DahlquistTestModel::DahlquistTestModel
DahlquistTestModel()
Definition
DahlquistTestModel_impl.hpp:28
Tempus_Test::DahlquistTestModel::g_space_
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > g_space_
Definition
DahlquistTestModel_decl.hpp:100
Tempus_Test::DahlquistTestModel::Np_
int Np_
Definition
DahlquistTestModel_decl.hpp:84
Tempus_Test::DahlquistTestModel::ng_
int ng_
Definition
DahlquistTestModel_decl.hpp:87
Tempus_Test
Definition
Tempus_BackwardEuler_ASA.cpp:34
Generated by
1.17.0