Tempus
Version of the Day
Time Integration
|
Sine-Cosine model problem from Rythmos. This is a canonical Sine-Cosine differential equation
with a few enhancements. We start with the exact solution to the differential equation
then the form of the model is
where the default parameter values are , , and , and the initial conditions
determine the remaining coefficients
. More...
#include <SinCosModel_decl.hpp>
Public Member Functions | |
SinCosModel (Teuchos::RCP< Teuchos::ParameterList > pList=Teuchos::null) | |
Thyra::ModelEvaluatorBase::InArgs < Scalar > | getExactSolution (double t) const |
Thyra::ModelEvaluatorBase::InArgs < Scalar > | getExactSensSolution (int j, double t) 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 RCP< LinearOpBase < Scalar > > | create_hess_f_xx () const =0 |
virtual RCP< LinearOpBase < Scalar > > | create_hess_f_xp (int l) const =0 |
virtual RCP< LinearOpBase < Scalar > > | create_hess_f_pp (int l1, int l2) const =0 |
virtual RCP< LinearOpBase < Scalar > > | create_hess_g_xx (int j) const =0 |
virtual RCP< LinearOpBase < Scalar > > | create_hess_g_xp (int j, int l) const =0 |
virtual RCP< LinearOpBase < Scalar > > | create_hess_g_pp (int j, int l1, int l2) 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) |
Public Member Functions inherited from Teuchos::ParameterListAcceptorDefaultBase | |
RCP< ParameterList > | getNonconstParameterList () |
RCP< ParameterList > | unsetParameterList () |
RCP< const ParameterList > | getParameterList () const |
Private Member Functions | |
void | setupInOutArgs_ () const |
void | calculateCoeffFromIC_ () |
Private Attributes | |
int | dim_ |
Number of state unknowns (2) More... | |
int | Np_ |
Number of parameter vectors (1) More... | |
int | np_ |
Number of parameters in this vector (2) More... | |
int | Ng_ |
Number of observation functions (1) More... | |
int | ng_ |
Number of elements in this observation function (1) More... | |
bool | haveIC_ |
false => no nominal values are provided (default=true) More... | |
bool | acceptModelParams_ |
Changes inArgs to require parameters. More... | |
bool | useDfDpAsTangent_ |
Treat DfDp OutArg as tangent (df/dx*dx/dp+df/dp) More... | |
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 | a_ |
Model parameter. More... | |
Scalar | f_ |
Model parameter. More... | |
Scalar | L_ |
Model parameter. More... | |
Scalar | phi_ |
Parameter determined from the IC. More... | |
Scalar | b_ |
Parameter determined from the IC. More... | |
Scalar | t0_ic_ |
Time value where the initial condition is specified. More... | |
Scalar | x0_ic_ |
Initial condition for x0. More... | |
Scalar | x1_ic_ |
Initial condition for x1. 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 |
Public functions overridden from ParameterListAcceptor. | |
void | setParameterList (Teuchos::RCP< Teuchos::ParameterList > const ¶mList) |
Teuchos::RCP< const Teuchos::ParameterList > | getValidParameters () 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 | EOutArgs_hess_vec_prod_f_xx |
enum | EOutArgs_hess_vec_prod_f_xp |
enum | EOutArgs_hess_vec_prod_f_px |
enum | EOutArgs_hess_vec_prod_f_pp |
enum | EOutArgs_hess_vec_prod_g_xx |
enum | EOutArgs_hess_vec_prod_g_xp |
enum | EOutArgs_hess_vec_prod_g_px |
enum | EOutArgs_hess_vec_prod_g_pp |
enum | EOutArgs_hess_f_xx |
enum | EOutArgs_hess_f_xp |
enum | EOutArgs_hess_f_pp |
enum | EOutArgs_hess_g_xx |
enum | EOutArgs_hess_g_xp |
enum | EOutArgs_hess_g_pp |
enum | EOutArgs_H_xx |
enum | EOutArgs_H_xp |
enum | EOutArgs_H_pp |
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 |
Protected Member Functions inherited from Teuchos::ParameterListAcceptorDefaultBase | |
void | setMyParamList (const RCP< ParameterList > ¶mList) |
RCP< ParameterList > | getMyNonconstParamList () |
RCP< const ParameterList > | getMyParamList () const |
Sine-Cosine model problem from Rythmos. This is a canonical Sine-Cosine differential equation
with a few enhancements. We start with the exact solution to the differential equation
then the form of the model is
where the default parameter values are , , and , and the initial conditions
determine the remaining coefficients
.
Therefore this model has three model parameters and two initial conditions which effect the exact solution as above.
where
The exact sensitivities, , for the problem are specified as
and for the default initial conditions, and
The time differentiated sensitivities, are
Definition at line 91 of file SinCosModel_decl.hpp.
Tempus_Test::SinCosModel< Scalar >::SinCosModel | ( | Teuchos::RCP< Teuchos::ParameterList > | pList = Teuchos::null | ) |
Definition at line 31 of file SinCosModel_impl.hpp.
Thyra::ModelEvaluatorBase::InArgs< Scalar > Tempus_Test::SinCosModel< Scalar >::getExactSolution | ( | double | t | ) | const |
Definition at line 65 of file SinCosModel_impl.hpp.
Thyra::ModelEvaluatorBase::InArgs< Scalar > Tempus_Test::SinCosModel< Scalar >::getExactSensSolution | ( | int | j, |
double | t | ||
) | const |
Definition at line 98 of file SinCosModel_impl.hpp.
|
virtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 149 of file SinCosModel_impl.hpp.
|
virtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 158 of file SinCosModel_impl.hpp.
|
virtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 167 of file SinCosModel_impl.hpp.
|
virtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 178 of file SinCosModel_impl.hpp.
|
virtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 224 of file SinCosModel_impl.hpp.
|
virtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 234 of file SinCosModel_impl.hpp.
|
virtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 256 of file SinCosModel_impl.hpp.
|
virtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 445 of file SinCosModel_impl.hpp.
|
virtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 461 of file SinCosModel_impl.hpp.
|
virtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 484 of file SinCosModel_impl.hpp.
|
virtual |
Implements Teuchos::ParameterListAcceptor.
Definition at line 574 of file SinCosModel_impl.hpp.
|
virtual |
Reimplemented from Teuchos::ParameterListAcceptor.
Definition at line 607 of file SinCosModel_impl.hpp.
|
private |
Definition at line 495 of file SinCosModel_impl.hpp.
|
private |
Definition at line 269 of file SinCosModel_impl.hpp.
|
private |
Definition at line 279 of file SinCosModel_impl.hpp.
|
private |
Definition at line 638 of file SinCosModel_impl.hpp.
|
private |
Number of state unknowns (2)
Definition at line 145 of file SinCosModel_decl.hpp.
|
private |
Number of parameter vectors (1)
Definition at line 146 of file SinCosModel_decl.hpp.
|
private |
Number of parameters in this vector (2)
Definition at line 147 of file SinCosModel_decl.hpp.
|
private |
Number of observation functions (1)
Definition at line 148 of file SinCosModel_decl.hpp.
|
private |
Number of elements in this observation function (1)
Definition at line 149 of file SinCosModel_decl.hpp.
|
private |
false => no nominal values are provided (default=true)
Definition at line 150 of file SinCosModel_decl.hpp.
|
private |
Changes inArgs to require parameters.
Definition at line 151 of file SinCosModel_decl.hpp.
|
private |
Treat DfDp OutArg as tangent (df/dx*dx/dp+df/dp)
Definition at line 152 of file SinCosModel_decl.hpp.
|
mutableprivate |
Definition at line 153 of file SinCosModel_decl.hpp.
|
mutableprivate |
Definition at line 154 of file SinCosModel_decl.hpp.
|
mutableprivate |
Definition at line 155 of file SinCosModel_decl.hpp.
|
mutableprivate |
Definition at line 156 of file SinCosModel_decl.hpp.
|
private |
Definition at line 157 of file SinCosModel_decl.hpp.
|
private |
Definition at line 158 of file SinCosModel_decl.hpp.
|
private |
Definition at line 159 of file SinCosModel_decl.hpp.
|
private |
Definition at line 160 of file SinCosModel_decl.hpp.
|
private |
Definition at line 161 of file SinCosModel_decl.hpp.
|
private |
Model parameter.
Definition at line 165 of file SinCosModel_decl.hpp.
|
private |
Model parameter.
Definition at line 166 of file SinCosModel_decl.hpp.
|
private |
Model parameter.
Definition at line 167 of file SinCosModel_decl.hpp.
|
private |
Parameter determined from the IC.
Definition at line 168 of file SinCosModel_decl.hpp.
|
private |
Parameter determined from the IC.
Definition at line 169 of file SinCosModel_decl.hpp.
|
private |
Time value where the initial condition is specified.
Definition at line 170 of file SinCosModel_decl.hpp.
|
private |
Initial condition for x0.
Definition at line 171 of file SinCosModel_decl.hpp.
|
private |
Initial condition for x1.
Definition at line 172 of file SinCosModel_decl.hpp.