Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
Tempus_Test::DahlquistTestModel< Scalar > Class Template Reference

The classic Dahlquist Test Problem. More...

#include <DahlquistTestModel_decl.hpp>

Inheritance diagram for Tempus_Test::DahlquistTestModel< Scalar >:
Thyra::StateFuncModelEvaluatorBase< Scalar > Thyra::ModelEvaluatorDefaultBase< Scalar > Thyra::ModelEvaluator< class > Thyra::ModelEvaluatorBase Teuchos::Describable Teuchos::LabeledObject

Public Member Functions

 DahlquistTestModel ()
 
 DahlquistTestModel (Scalar lambda, bool includeXDot)
 
void constructDahlquistTestModel (Scalar lambda, bool includeXDot)
 
 ~DahlquistTestModel ()=default
 Default destructor. More...
 
Thyra::ModelEvaluatorBase::InArgs
< Scalar > 
getExactSolution (double t) const
 Exact solution. More...
 
Scalar getLambda () const
 
- Public Member Functions inherited from Thyra::StateFuncModelEvaluatorBase< Scalar >
RCP< const VectorSpaceBase
< Scalar > > 
get_p_space (int l) const
 
RCP< const Teuchos::Array
< std::string > > 
get_p_names (int l) const
 
RCP< const VectorSpaceBase
< Scalar > > 
get_g_space (int j) const
 
Teuchos::ArrayView< const
std::string > 
get_g_names (int j) const
 
ModelEvaluatorBase::InArgs
< Scalar > 
getNominalValues () const
 
ModelEvaluatorBase::InArgs
< Scalar > 
getLowerBounds () const
 
ModelEvaluatorBase::InArgs
< Scalar > 
getUpperBounds () const
 
RCP< LinearOpBase< Scalar > > create_W_op () const
 
RCP< PreconditionerBase< Scalar > > create_W_prec () const
 
RCP< const
LinearOpWithSolveFactoryBase
< Scalar > > 
get_W_factory () const
 
void reportFinalPoint (const ModelEvaluatorBase::InArgs< Scalar > &finalPoint, const bool wasSolved)
 
- Public Member Functions inherited from Thyra::ModelEvaluator< class >
virtual int Np () const =0
 
virtual int Ng () const =0
 
virtual RCP< const
VectorSpaceBase< Scalar > > 
get_f_multiplier_space () const =0
 
virtual RCP< const
VectorSpaceBase< Scalar > > 
get_g_multiplier_space (int j) const =0
 
virtual RCP< LinearOpBase
< Scalar > > 
create_DfDp_op (int l) const =0
 
virtual RCP< LinearOpBase
< Scalar > > 
create_DgDx_dot_op (int j) const =0
 
virtual RCP< LinearOpBase
< Scalar > > 
create_DgDx_op (int j) const =0
 
virtual RCP< LinearOpBase
< Scalar > > 
create_DgDp_op (int j, int l) const =0
 
virtual
ModelEvaluatorBase::OutArgs
< Scalar > 
createOutArgs () const =0
 
virtual void evalModel (const ModelEvaluatorBase::InArgs< Scalar > &inArgs, const ModelEvaluatorBase::OutArgs< Scalar > &outArgs) const =0
 
 ModelEvaluatorBase ()
 
std::string toString (ModelEvaluatorBase::EInArgsMembers)
 
std::string toString (ModelEvaluatorBase::EOutArgsMembers)
 
std::string toString (ModelEvaluatorBase::EDerivativeMultiVectorOrientation orientation)
 
ModelEvaluatorBase::EDerivativeMultiVectorOrientation getOtherDerivativeMultiVectorOrientation (ModelEvaluatorBase::EDerivativeMultiVectorOrientation orientation)
 
- Public Member Functions inherited from Teuchos::Describable
virtual std::string description () const
 
virtual void describe (FancyOStream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 
void describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 
virtual ~Describable ()
 
 LabeledObject ()
 
virtual ~LabeledObject ()
 
virtual void setObjectLabel (const std::string &objectLabel)
 
virtual std::string getObjectLabel () const
 
DescribableStreamManipulatorState describe (const Describable &describable, const EVerbosityLevel verbLevel=Describable::verbLevel_default)
 
std::ostream & operator<< (std::ostream &os, const DescribableStreamManipulatorState &d)
 

Private Attributes

int dim_
 
int Np_
 
int np_
 
int Ng_
 
int ng_
 
bool haveIC_
 
bool acceptModelParams_
 
Scalar lambda_
 
bool includeXDot_
 
bool isInitialized_
 
Thyra::ModelEvaluatorBase::InArgs
< Scalar > 
inArgs_
 
Thyra::ModelEvaluatorBase::OutArgs
< Scalar > 
outArgs_
 
Thyra::ModelEvaluatorBase::InArgs
< Scalar > 
nominalValues_
 
Teuchos::RCP< const
Thyra::VectorSpaceBase< Scalar > > 
x_space_
 
Teuchos::RCP< const
Thyra::VectorSpaceBase< Scalar > > 
f_space_
 
Teuchos::RCP< const
Thyra::VectorSpaceBase< Scalar > > 
p_space_
 
Teuchos::RCP< const
Thyra::VectorSpaceBase< Scalar > > 
g_space_
 
Teuchos::RCP< const
Thyra::VectorSpaceBase< Scalar > > 
DxDp_space_
 
Scalar xIC_
 Initial condition for x. More...
 
Scalar xDotIC_
 Initial condition for xDot. More...
 

Public functions overridden from ModelEvaluator.

Teuchos::RCP< const
Thyra::VectorSpaceBase< Scalar > > 
get_x_space () const
 
Teuchos::RCP< const
Thyra::VectorSpaceBase< Scalar > > 
get_f_space () const
 
Thyra::ModelEvaluatorBase::InArgs
< Scalar > 
getNominalValues () const
 
Teuchos::RCP
< Thyra::LinearOpWithSolveBase
< Scalar > > 
create_W () const
 
Teuchos::RCP
< Thyra::LinearOpBase< Scalar > > 
create_W_op () const
 
Teuchos::RCP< const
Thyra::LinearOpWithSolveFactoryBase
< Scalar > > 
get_W_factory () const
 
Thyra::ModelEvaluatorBase::InArgs
< Scalar > 
createInArgs () const
 
Teuchos::RCP< const
Thyra::VectorSpaceBase< Scalar > > 
get_p_space (int l) const
 
Teuchos::RCP< const
Teuchos::Array< std::string > > 
get_p_names (int l) const
 
Teuchos::RCP< const
Thyra::VectorSpaceBase< Scalar > > 
get_g_space (int j) const
 

Private functions overridden from ModelEvaluatorDefaultBase.

Thyra::ModelEvaluatorBase::OutArgs
< Scalar > 
createOutArgsImpl () const
 
void evalModelImpl (const Thyra::ModelEvaluatorBase::InArgs< Scalar > &inArgs_bar, const Thyra::ModelEvaluatorBase::OutArgs< Scalar > &outArgs_bar) const
 

Additional Inherited Members

- Public Types inherited from Thyra::ModelEvaluator< class >
enum  EInArgsMembers
 
enum  EInArgs_p_mp
 
enum  EEvalType
 
enum  EDerivativeMultiVectorOrientation
 
enum  EDerivativeLinearOp
 
enum  EDerivativeLinearity
 
enum  ERankStatus
 
enum  EOutArgsMembers
 
enum  EOutArgsDfDp
 
enum  EOutArgsDgDx_dot
 
enum  EOutArgsDgDx
 
enum  EOutArgsDgDp
 
enum  EOutArgsDfDp_mp
 
enum  EOutArgs_g_mp
 
enum  EOutArgsDgDx_dot_mp
 
enum  EOutArgsDgDx_mp
 
enum  EOutArgsDgDp_mp
 
typedef Teuchos::ScalarTraits
< Scalar >::magnitudeType 
ScalarMag
 
- Static Public Attributes inherited from Thyra::ModelEvaluator< class >
static const int NUM_E_IN_ARGS_MEMBERS
 
static const int NUM_E_OUT_ARGS_MEMBERS
 
- Static Public Attributes inherited from Teuchos::Describable
static const EVerbosityLevel verbLevel_default
 

Detailed Description

template<class Scalar>
class Tempus_Test::DahlquistTestModel< Scalar >

The classic Dahlquist Test Problem.

This is the canonical Dahlquist test equation

\[ \mathbf{\dot{x}} = \lambda \mathbf{x}. \]

where $\lambda \in \mathbf{C}$ with the initial condition $\mathbf{x}(0) = 1$. The exact solution is

\[ \mathbf{x}(t) = \exp{\lambda t}. \]

When $\mathbf{R}(\lambda) < 0$, $ \mathbf{x} \rightarrow 0$ as $t \rightarrow \infty$. Numerical methods that exhibit this property are said to be A-stable.

Definition at line 35 of file DahlquistTestModel_decl.hpp.

Constructor & Destructor Documentation

template<class Scalar >
Tempus_Test::DahlquistTestModel< Scalar >::DahlquistTestModel ( )

Definition at line 28 of file DahlquistTestModel_impl.hpp.

template<class Scalar >
Tempus_Test::DahlquistTestModel< Scalar >::DahlquistTestModel ( Scalar  lambda,
bool  includeXDot 
)

Definition at line 34 of file DahlquistTestModel_impl.hpp.

template<class Scalar >
Tempus_Test::DahlquistTestModel< Scalar >::~DahlquistTestModel ( )
default

Default destructor.

Member Function Documentation

template<class Scalar >
void Tempus_Test::DahlquistTestModel< Scalar >::constructDahlquistTestModel ( Scalar  lambda,
bool  includeXDot 
)

Definition at line 40 of file DahlquistTestModel_impl.hpp.

template<class Scalar >
Thyra::ModelEvaluatorBase::InArgs< Scalar > Tempus_Test::DahlquistTestModel< Scalar >::getExactSolution ( double  t) const

Exact solution.

Definition at line 119 of file DahlquistTestModel_impl.hpp.

template<class Scalar >
Scalar Tempus_Test::DahlquistTestModel< Scalar >::getLambda ( ) const
inline

Definition at line 51 of file DahlquistTestModel_decl.hpp.

template<class Scalar >
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > Tempus_Test::DahlquistTestModel< Scalar >::get_x_space ( ) const
virtual

Implements Thyra::ModelEvaluator< class >.

Definition at line 149 of file DahlquistTestModel_impl.hpp.

template<class Scalar >
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > Tempus_Test::DahlquistTestModel< Scalar >::get_f_space ( ) const
virtual

Implements Thyra::ModelEvaluator< class >.

Definition at line 156 of file DahlquistTestModel_impl.hpp.

template<class Scalar >
Thyra::ModelEvaluatorBase::InArgs< Scalar > Tempus_Test::DahlquistTestModel< Scalar >::getNominalValues ( ) const
virtual

Implements Thyra::ModelEvaluator< class >.

Definition at line 163 of file DahlquistTestModel_impl.hpp.

template<class Scalar >
Teuchos::RCP< Thyra::LinearOpWithSolveBase< Scalar > > Tempus_Test::DahlquistTestModel< Scalar >::create_W ( ) const
virtual

Implements Thyra::ModelEvaluator< class >.

Definition at line 245 of file DahlquistTestModel_impl.hpp.

template<class Scalar >
Teuchos::RCP< Thyra::LinearOpBase< Scalar > > Tempus_Test::DahlquistTestModel< Scalar >::create_W_op ( ) const
virtual

Implements Thyra::ModelEvaluator< class >.

Definition at line 271 of file DahlquistTestModel_impl.hpp.

template<class Scalar >
Teuchos::RCP< const Thyra::LinearOpWithSolveFactoryBase< Scalar > > Tempus_Test::DahlquistTestModel< Scalar >::get_W_factory ( ) const
virtual

Implements Thyra::ModelEvaluator< class >.

Definition at line 281 of file DahlquistTestModel_impl.hpp.

template<class Scalar >
Thyra::ModelEvaluatorBase::InArgs< Scalar > Tempus_Test::DahlquistTestModel< Scalar >::createInArgs ( ) const
virtual

Implements Thyra::ModelEvaluator< class >.

Definition at line 170 of file DahlquistTestModel_impl.hpp.

template<class Scalar >
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > Tempus_Test::DahlquistTestModel< Scalar >::get_p_space ( int  l) const
virtual

Implements Thyra::ModelEvaluator< class >.

Definition at line 290 of file DahlquistTestModel_impl.hpp.

template<class Scalar >
Teuchos::RCP< const Teuchos::Array< std::string > > Tempus_Test::DahlquistTestModel< Scalar >::get_p_names ( int  l) const
virtual

Implements Thyra::ModelEvaluator< class >.

Definition at line 305 of file DahlquistTestModel_impl.hpp.

template<class Scalar >
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > Tempus_Test::DahlquistTestModel< Scalar >::get_g_space ( int  j) const
virtual

Implements Thyra::ModelEvaluator< class >.

Definition at line 327 of file DahlquistTestModel_impl.hpp.

template<class Scalar >
Thyra::ModelEvaluatorBase::OutArgs< Scalar > Tempus_Test::DahlquistTestModel< Scalar >::createOutArgsImpl ( ) const
private

Definition at line 177 of file DahlquistTestModel_impl.hpp.

template<class Scalar >
void Tempus_Test::DahlquistTestModel< Scalar >::evalModelImpl ( const Thyra::ModelEvaluatorBase::InArgs< Scalar > &  inArgs_bar,
const Thyra::ModelEvaluatorBase::OutArgs< Scalar > &  outArgs_bar 
) const
private

Definition at line 183 of file DahlquistTestModel_impl.hpp.

Member Data Documentation

template<class Scalar >
int Tempus_Test::DahlquistTestModel< Scalar >::dim_
private

Definition at line 79 of file DahlquistTestModel_decl.hpp.

template<class Scalar >
int Tempus_Test::DahlquistTestModel< Scalar >::Np_
private

Definition at line 80 of file DahlquistTestModel_decl.hpp.

template<class Scalar >
int Tempus_Test::DahlquistTestModel< Scalar >::np_
private

Definition at line 81 of file DahlquistTestModel_decl.hpp.

template<class Scalar >
int Tempus_Test::DahlquistTestModel< Scalar >::Ng_
private

Definition at line 82 of file DahlquistTestModel_decl.hpp.

template<class Scalar >
int Tempus_Test::DahlquistTestModel< Scalar >::ng_
private

Definition at line 83 of file DahlquistTestModel_decl.hpp.

template<class Scalar >
bool Tempus_Test::DahlquistTestModel< Scalar >::haveIC_
private

Definition at line 84 of file DahlquistTestModel_decl.hpp.

template<class Scalar >
bool Tempus_Test::DahlquistTestModel< Scalar >::acceptModelParams_
private

Definition at line 85 of file DahlquistTestModel_decl.hpp.

template<class Scalar >
Scalar Tempus_Test::DahlquistTestModel< Scalar >::lambda_
private

Definition at line 86 of file DahlquistTestModel_decl.hpp.

template<class Scalar >
bool Tempus_Test::DahlquistTestModel< Scalar >::includeXDot_
private

Definition at line 87 of file DahlquistTestModel_decl.hpp.

template<class Scalar >
bool Tempus_Test::DahlquistTestModel< Scalar >::isInitialized_
mutableprivate

Definition at line 89 of file DahlquistTestModel_decl.hpp.

template<class Scalar >
Thyra::ModelEvaluatorBase::InArgs<Scalar> Tempus_Test::DahlquistTestModel< Scalar >::inArgs_
mutableprivate

Definition at line 90 of file DahlquistTestModel_decl.hpp.

template<class Scalar >
Thyra::ModelEvaluatorBase::OutArgs<Scalar> Tempus_Test::DahlquistTestModel< Scalar >::outArgs_
mutableprivate

Definition at line 91 of file DahlquistTestModel_decl.hpp.

template<class Scalar >
Thyra::ModelEvaluatorBase::InArgs<Scalar> Tempus_Test::DahlquistTestModel< Scalar >::nominalValues_
mutableprivate

Definition at line 92 of file DahlquistTestModel_decl.hpp.

template<class Scalar >
Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> > Tempus_Test::DahlquistTestModel< Scalar >::x_space_
private

Definition at line 93 of file DahlquistTestModel_decl.hpp.

template<class Scalar >
Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> > Tempus_Test::DahlquistTestModel< Scalar >::f_space_
private

Definition at line 94 of file DahlquistTestModel_decl.hpp.

template<class Scalar >
Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> > Tempus_Test::DahlquistTestModel< Scalar >::p_space_
private

Definition at line 95 of file DahlquistTestModel_decl.hpp.

template<class Scalar >
Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> > Tempus_Test::DahlquistTestModel< Scalar >::g_space_
private

Definition at line 96 of file DahlquistTestModel_decl.hpp.

template<class Scalar >
Teuchos::RCP<const Thyra::VectorSpaceBase<Scalar> > Tempus_Test::DahlquistTestModel< Scalar >::DxDp_space_
private

Definition at line 97 of file DahlquistTestModel_decl.hpp.

template<class Scalar >
Scalar Tempus_Test::DahlquistTestModel< Scalar >::xIC_
private

Initial condition for x.

Definition at line 99 of file DahlquistTestModel_decl.hpp.

template<class Scalar >
Scalar Tempus_Test::DahlquistTestModel< Scalar >::xDotIC_
private

Initial condition for xDot.

Definition at line 100 of file DahlquistTestModel_decl.hpp.


The documentation for this class was generated from the following files: