Tempus
Version of the Day
Time Integration
|
ModelEvaluator implementation for the example van der Pol Problem. More...
#include <VanDerPol_ModelEvaluator_02.hpp>
Public Member Functions | |
VanDerPol_ModelEvaluator_02 () | |
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 < LinearOpWithSolveBase < Scalar > > | create_W () 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 | |
Thyra::ModelEvaluatorBase::InArgs < Scalar > | prototypicalInArgs_ |
Thyra::ModelEvaluatorBase::OutArgs < Scalar > | prototypicalOutArgs_ |
Prototypical OutArgs that just supports the evaluation vector (OUT_ARG_f) More... | |
Thyra::ModelEvaluatorBase::InArgs < Scalar > | nominalValues_ |
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > | x_space_ |
Solution vector space (a defaultSpmdVectorSpace of dimension 2) More... | |
Teuchos::RCP< const Thyra::VectorSpaceBase< Scalar > > | f_space_ |
Function evaluation vector space (a defaultSpmdVectorSpace of dimension 2) More... | |
int | dim_ |
Number of state unknowns (2) More... | |
Scalar | t0_ic_ |
initial time = 0 More... | |
Scalar | epsilon_ |
This is a model parameter ( ) More... | |
Scalar | x0_ic_ |
initial condition for More... | |
Scalar | x1_ic_ |
initial condition for 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 |
Thyra::ModelEvaluatorBase::InArgs < Scalar > | createInArgs () 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 |
ModelEvaluator implementation for the example van der Pol Problem.
This is a trimmed down version of the ModelEvaluator used in Tempus testing, Tempus_Test::VanDerPolModel, which exercises additional functionalities. In this ModelEvaluator, we are just trying to demonstrate the mechanisms needed for the simple time integration, e.g., explicit and implicit ODEs for the van der Pol Problem.
Definition at line 26 of file VanDerPol_ModelEvaluator_02.hpp.
VanDerPol_ModelEvaluator_02< Scalar >::VanDerPol_ModelEvaluator_02 | ( | ) |
Default Constructor sets the van der Pol Problem
constructs
Definition at line 25 of file VanDerPol_ModelEvaluator_02.cpp.
|
inlinevirtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 53 of file VanDerPol_ModelEvaluator_02.hpp.
|
inlinevirtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 55 of file VanDerPol_ModelEvaluator_02.hpp.
|
inlinevirtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 57 of file VanDerPol_ModelEvaluator_02.hpp.
|
inlinevirtual |
Implements Thyra::ModelEvaluator< class >.
Definition at line 59 of file VanDerPol_ModelEvaluator_02.hpp.
|
inlineprivate |
Definition at line 67 of file VanDerPol_ModelEvaluator_02.hpp.
|
private |
Evaluate the model based on if the InArgs.get_x_dot() is null or not. If it is null, evaluate the explicit ODE form of the model ( ),
otherwise, evaluate the implicit ODE form, ,
Both return their result through the OutArgs.get_f().
Definition at line 82 of file VanDerPol_ModelEvaluator_02.cpp.
|
mutableprivate |
Prototypical InArgs that just supports
Definition at line 95 of file VanDerPol_ModelEvaluator_02.hpp.
|
mutableprivate |
Prototypical OutArgs that just supports the evaluation vector (OUT_ARG_f)
Definition at line 97 of file VanDerPol_ModelEvaluator_02.hpp.
|
private |
Nominal values (a.k.a. initial conditions for transient problems), and simply the prototypical InArgs with the initial condition vectors.
Definition at line 101 of file VanDerPol_ModelEvaluator_02.hpp.
|
private |
Solution vector space (a defaultSpmdVectorSpace of dimension 2)
Definition at line 103 of file VanDerPol_ModelEvaluator_02.hpp.
|
private |
Function evaluation vector space (a defaultSpmdVectorSpace of dimension 2)
Definition at line 105 of file VanDerPol_ModelEvaluator_02.hpp.
|
private |
Number of state unknowns (2)
Definition at line 107 of file VanDerPol_ModelEvaluator_02.hpp.
|
private |
initial time = 0
Definition at line 108 of file VanDerPol_ModelEvaluator_02.hpp.
|
private |
This is a model parameter ( )
Definition at line 109 of file VanDerPol_ModelEvaluator_02.hpp.
|
private |
initial condition for
Definition at line 110 of file VanDerPol_ModelEvaluator_02.hpp.
|
private |
initial condition for
Definition at line 111 of file VanDerPol_ModelEvaluator_02.hpp.