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

Thyra Base interface for time steppers. More...

#include <Tempus_Integrator.hpp>

Inheritance diagram for Tempus::Stepper< Scalar >:
Teuchos::Describable Teuchos::VerboseObject< Stepper< Scalar > > Teuchos::LabeledObject Teuchos::VerboseObjectBase Tempus::StepperExplicit< Scalar > Tempus::StepperImplicit< Scalar > Tempus::StepperOperatorSplit< Scalar > Tempus::StepperRKBase< Scalar > Tempus::StepperStaggeredForwardSensitivity< Scalar > Tempus::StepperSubcycling< Scalar > Tempus::StepperExplicitRK< Scalar > Tempus::StepperForwardEuler< Scalar > Tempus::StepperLeapfrog< Scalar > Tempus::StepperNewmarkExplicitAForm< Scalar > Tempus_Test::StepperPhysicsStateTest< Scalar > Tempus::StepperBackwardEuler< Scalar > Tempus::StepperBDF2< Scalar > Tempus::StepperDIRK< Scalar > Tempus::StepperHHTAlpha< Scalar > Tempus::StepperIMEX_RK< Scalar > Tempus::StepperIMEX_RK_Partition< Scalar > Tempus::StepperNewmarkImplicitAForm< Scalar > Tempus::StepperNewmarkImplicitDForm< Scalar > Tempus::StepperTrapezoidal< Scalar > Tempus::StepperDIRK< Scalar > Tempus::StepperExplicitRK< Scalar > Tempus::StepperIMEX_RK< Scalar > Tempus::StepperIMEX_RK_Partition< Scalar >

Public Member Functions

virtual bool isValidSetup (Teuchos::FancyOStream &out) const
 
void setStepperValues (const Teuchos::RCP< Teuchos::ParameterList > pl)
 Set Stepper member data from ParameterList. More...
 
virtual Teuchos::RCP< const
Teuchos::ParameterList
getValidParameters () const
 
Teuchos::RCP
< Teuchos::ParameterList
getValidParametersBasic () const
 Add basic parameters to Steppers ParameterList. More...
 
- Public Member Functions inherited from Teuchos::Describable
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::VerboseObject< Stepper< Scalar > >
 VerboseObject (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null)
 
virtual const VerboseObjectsetVerbLevel (const EVerbosityLevel verbLevel) const
 
virtual const VerboseObjectsetOverridingVerbLevel (const EVerbosityLevel verbLevel) const
 
virtual EVerbosityLevel getVerbLevel () const
 
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
RCP< const ParameterList
getValidVerboseObjectSublist ()
 
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
void 
setupVerboseObjectSublist (ParameterList *paramList)
 
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
void 
readVerboseObjectSublist (ParameterList *paramList, RCP< FancyOStream > *oStream, EVerbosityLevel *verbLevel)
 
void readVerboseObjectSublist (ParameterList *paramList, VerboseObject< ObjectType > *verboseObject)
 
- Public Member Functions inherited from Teuchos::VerboseObjectBase
virtual ~VerboseObjectBase ()
 
 VerboseObjectBase (const RCP< FancyOStream > &oStream=Teuchos::null)
 
virtual const VerboseObjectBasesetOStream (const RCP< FancyOStream > &oStream) const
 
virtual const VerboseObjectBasesetOverridingOStream (const RCP< FancyOStream > &oStream) const
 
virtual VerboseObjectBasesetLinePrefix (const std::string &linePrefix)
 
virtual RCP< FancyOStreamgetOStream () const
 
virtual RCP< FancyOStreamgetOverridingOStream () const
 
virtual std::string getLinePrefix () const
 
virtual OSTab getOSTab (const int tabs=1, const std::string &linePrefix="") const
 

Protected Member Functions

virtual void setStepperX (Teuchos::RCP< Thyra::VectorBase< Scalar > > x)
 Set x for Stepper storage. More...
 
virtual void setStepperXDot (Teuchos::RCP< Thyra::VectorBase< Scalar > > xDot)
 Set xDot for Stepper storage. More...
 
virtual void setStepperXDotDot (Teuchos::RCP< Thyra::VectorBase< Scalar > > xDotDot)
 Set x for Stepper storage. More...
 
- Protected Member Functions inherited from Teuchos::VerboseObject< Stepper< Scalar > >
void initializeVerboseObject (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null)
 
- Protected Member Functions inherited from Teuchos::VerboseObjectBase
void initializeVerboseObjectBase (const RCP< FancyOStream > &oStream=Teuchos::null)
 
virtual void informUpdatedVerbosityState () const
 

Protected Attributes

bool useFSAL_ = false
 Use First-Same-As-Last (FSAL) principle. More...
 
bool isInitialized_ = false
 True if stepper's member data is initialized. More...
 

Private Attributes

std::string stepperName_
 Name used for output and ParameterLists. More...
 
std::string stepperType_
 Name of stepper type. More...
 
std::string ICConsistency_ = std::string("None")
 Type of consistency to apply to ICs. More...
 
bool ICConsistencyCheck_ = false
 Check if the initial condition is consistent. More...
 
Teuchos::RCP
< Thyra::VectorBase< Scalar > > 
stepperX_
 
Teuchos::RCP
< Thyra::VectorBase< Scalar > > 
stepperXDot_
 
Teuchos::RCP
< Thyra::VectorBase< Scalar > > 
stepperXDotDot_
 

Basic stepper methods

virtual void setModel (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel)
 
virtual Teuchos::RCP< const
Thyra::ModelEvaluator< Scalar > > 
getModel () const
 
virtual void setSolver (Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > solver)
 Set solver. More...
 
virtual Teuchos::RCP
< Thyra::NonlinearSolverBase
< Scalar > > 
getSolver () const
 Get solver. More...
 
virtual void initialize ()
 Initialize after construction and changing input parameters. More...
 
virtual bool isInitialized ()
 True if stepper's member data is initialized. More...
 
virtual void checkInitialized ()
 Check initialization, and error out on failure. More...
 
virtual void setInitialConditions (const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)=0
 Set initial conditions, make them consistent, and set stepper memory. More...
 
virtual void takeStep (const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)=0
 Take the specified timestep, dt, and return true if successful. More...
 
virtual void setInitialGuess (Teuchos::RCP< const Thyra::VectorBase< Scalar > > initialGuess=Teuchos::null)=0
 Pass initial guess to Newton solver (for implicit schemes) More...
 
virtual Teuchos::RCP
< Tempus::StepperState< Scalar > > 
getDefaultStepperState ()=0
 
virtual Scalar getOrder () const =0
 
virtual Scalar getOrderMin () const =0
 
virtual Scalar getOrderMax () const =0
 
virtual Scalar getInitTimeStep (const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory) const =0
 
virtual bool isExplicit () const =0
 
virtual bool isImplicit () const =0
 
virtual bool isExplicitImplicit () const =0
 
virtual bool isOneStepMethod () const =0
 
virtual bool isMultiStepMethod () const =0
 
void setStepperName (std::string s)
 Set the stepper name. More...
 
std::string getStepperName () const
 Get the stepper name. More...
 
std::string getStepperType () const
 Get the stepper type. The stepper type is used as an identifier for the stepper, and can only be set by the derived Stepper class. More...
 
virtual void setUseFSAL (bool a)
 
void setUseFSALTrueOnly (bool a)
 
void setUseFSALFalseOnly (bool a)
 
bool getUseFSAL () const
 
void setICConsistency (std::string s)
 
std::string getICConsistency () const
 
void setICConsistencyCheck (bool c)
 
bool getICConsistencyCheck () const
 
virtual OrderODE getOrderODE () const =0
 
virtual Teuchos::RCP
< Thyra::VectorBase< Scalar > > 
getStepperX ()
 Get Stepper x. More...
 
virtual Teuchos::RCP
< Thyra::VectorBase< Scalar > > 
getStepperXDot ()
 Get Stepper xDot. More...
 
virtual Teuchos::RCP
< Thyra::VectorBase< Scalar > > 
getStepperXDotDot ()
 Get Stepper xDotDot. More...
 
virtual Teuchos::RCP
< Thyra::VectorBase< Scalar > > 
getStepperXDotDot (Teuchos::RCP< SolutionState< Scalar > > state)
 Get xDotDot from SolutionState or Stepper storage. More...
 
void setStepperType (std::string s)
 Set the stepper type. More...
 

Overridden from Teuchos::Describable

virtual std::string description () const
 
virtual void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
 

Additional Inherited Members

- Static Public Member Functions inherited from Teuchos::VerboseObject< Stepper< Scalar > >
static void setDefaultVerbLevel (const EVerbosityLevel defaultVerbLevel)
 
static EVerbosityLevel getDefaultVerbLevel ()
 
- Static Public Member Functions inherited from Teuchos::VerboseObjectBase
static void setDefaultOStream (const RCP< FancyOStream > &defaultOStream)
 
static RCP< FancyOStreamgetDefaultOStream ()
 
- Static Public Attributes inherited from Teuchos::Describable
static const EVerbosityLevel verbLevel_default
 

Detailed Description

template<typename Scalar>
class Tempus::Stepper< Scalar >

Thyra Base interface for time steppers.

Design Considerations

Definition at line 24 of file Tempus_Integrator.hpp.

Member Function Documentation

template<typename Scalar >
virtual void Tempus::Stepper< Scalar >::setModel ( const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &  appModel)
inlinevirtual
template<typename Scalar >
virtual Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> > Tempus::Stepper< Scalar >::getModel ( ) const
inlinevirtual
template<typename Scalar >
virtual void Tempus::Stepper< Scalar >::setSolver ( Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > >  solver)
inlinevirtual
template<typename Scalar >
virtual Teuchos::RCP<Thyra::NonlinearSolverBase<Scalar> > Tempus::Stepper< Scalar >::getSolver ( ) const
inlinevirtual
template<class Scalar >
void Tempus::Stepper< Scalar >::initialize ( )
virtual
template<typename Scalar >
virtual bool Tempus::Stepper< Scalar >::isInitialized ( )
inlinevirtual

True if stepper's member data is initialized.

Definition at line 83 of file Tempus_Stepper_decl.hpp.

template<class Scalar >
void Tempus::Stepper< Scalar >::checkInitialized ( )
virtual

Check initialization, and error out on failure.

Definition at line 34 of file Tempus_Stepper_impl.hpp.

template<typename Scalar >
virtual void Tempus::Stepper< Scalar >::setInitialConditions ( const Teuchos::RCP< SolutionHistory< Scalar > > &  solutionHistory)
pure virtual
template<typename Scalar >
virtual void Tempus::Stepper< Scalar >::takeStep ( const Teuchos::RCP< SolutionHistory< Scalar > > &  solutionHistory)
pure virtual
template<typename Scalar >
virtual void Tempus::Stepper< Scalar >::setInitialGuess ( Teuchos::RCP< const Thyra::VectorBase< Scalar > >  initialGuess = Teuchos::null)
pure virtual
template<typename Scalar >
virtual Teuchos::RCP<Tempus::StepperState<Scalar> > Tempus::Stepper< Scalar >::getDefaultStepperState ( )
pure virtual
template<typename Scalar >
virtual Scalar Tempus::Stepper< Scalar >::getOrder ( ) const
pure virtual
template<typename Scalar >
virtual Scalar Tempus::Stepper< Scalar >::getOrderMin ( ) const
pure virtual
template<typename Scalar >
virtual Scalar Tempus::Stepper< Scalar >::getOrderMax ( ) const
pure virtual
template<typename Scalar >
virtual Scalar Tempus::Stepper< Scalar >::getInitTimeStep ( const Teuchos::RCP< SolutionHistory< Scalar > > &  solutionHistory) const
pure virtual
template<typename Scalar >
virtual bool Tempus::Stepper< Scalar >::isExplicit ( ) const
pure virtual
template<typename Scalar >
virtual bool Tempus::Stepper< Scalar >::isImplicit ( ) const
pure virtual
template<typename Scalar >
virtual bool Tempus::Stepper< Scalar >::isExplicitImplicit ( ) const
pure virtual
template<typename Scalar >
virtual bool Tempus::Stepper< Scalar >::isOneStepMethod ( ) const
pure virtual
template<typename Scalar >
virtual bool Tempus::Stepper< Scalar >::isMultiStepMethod ( ) const
pure virtual
template<typename Scalar >
void Tempus::Stepper< Scalar >::setStepperName ( std::string  s)
inline

Set the stepper name.

Definition at line 116 of file Tempus_Stepper_decl.hpp.

template<typename Scalar >
std::string Tempus::Stepper< Scalar >::getStepperName ( ) const
inline

Get the stepper name.

The stepper name is just a name used to distinguish it during I/O and in ParameterLists, and can be anything the user would like. One example is when two steppers of the same type (see getStepperType()) are being used during the same simulation. The user can name one as "Stepper with settings 1" and the other as "Stepper with settings 2". The default name is the stepper type (e.g., "BDF2" or "Bogacki-Shampine 3(2) Pair").

Definition at line 129 of file Tempus_Stepper_decl.hpp.

template<typename Scalar >
void Tempus::Stepper< Scalar >::setStepperType ( std::string  s)
inlineprotected

Set the stepper type.

Definition at line 133 of file Tempus_Stepper_decl.hpp.

template<typename Scalar >
std::string Tempus::Stepper< Scalar >::getStepperType ( ) const
inline

Get the stepper type. The stepper type is used as an identifier for the stepper, and can only be set by the derived Stepper class.

Definition at line 141 of file Tempus_Stepper_decl.hpp.

template<typename Scalar >
virtual void Tempus::Stepper< Scalar >::setUseFSAL ( bool  a)
inlinevirtual
template<class Scalar >
void Tempus::Stepper< Scalar >::setUseFSALTrueOnly ( bool  a)

Definition at line 45 of file Tempus_Stepper_impl.hpp.

template<class Scalar >
void Tempus::Stepper< Scalar >::setUseFSALFalseOnly ( bool  a)

Definition at line 59 of file Tempus_Stepper_impl.hpp.

template<typename Scalar >
bool Tempus::Stepper< Scalar >::getUseFSAL ( ) const
inline

Definition at line 146 of file Tempus_Stepper_decl.hpp.

template<typename Scalar >
void Tempus::Stepper< Scalar >::setICConsistency ( std::string  s)
inline

Definition at line 148 of file Tempus_Stepper_decl.hpp.

template<typename Scalar >
std::string Tempus::Stepper< Scalar >::getICConsistency ( ) const
inline

Definition at line 150 of file Tempus_Stepper_decl.hpp.

template<typename Scalar >
void Tempus::Stepper< Scalar >::setICConsistencyCheck ( bool  c)
inline

Definition at line 152 of file Tempus_Stepper_decl.hpp.

template<typename Scalar >
bool Tempus::Stepper< Scalar >::getICConsistencyCheck ( ) const
inline

Definition at line 154 of file Tempus_Stepper_decl.hpp.

template<typename Scalar >
virtual OrderODE Tempus::Stepper< Scalar >::getOrderODE ( ) const
pure virtual
template<class Scalar >
Teuchos::RCP< Thyra::VectorBase< Scalar > > Tempus::Stepper< Scalar >::getStepperX ( )
virtual

Get Stepper x.

Definition at line 74 of file Tempus_Stepper_impl.hpp.

template<class Scalar >
Teuchos::RCP< Thyra::VectorBase< Scalar > > Tempus::Stepper< Scalar >::getStepperXDot ( )
virtual

Get Stepper xDot.

Definition at line 85 of file Tempus_Stepper_impl.hpp.

template<class Scalar >
Teuchos::RCP< Thyra::VectorBase< Scalar > > Tempus::Stepper< Scalar >::getStepperXDotDot ( )
virtual

Get Stepper xDotDot.

Definition at line 96 of file Tempus_Stepper_impl.hpp.

template<class Scalar >
Teuchos::RCP< Thyra::VectorBase< Scalar > > Tempus::Stepper< Scalar >::getStepperXDotDot ( Teuchos::RCP< SolutionState< Scalar > >  state)
virtual

Get xDotDot from SolutionState or Stepper storage.

Definition at line 108 of file Tempus_Stepper_impl.hpp.

template<typename Scalar >
virtual std::string Tempus::Stepper< Scalar >::description ( ) const
inlinevirtual

Reimplemented from Teuchos::Describable.

Reimplemented in Tempus::StepperStaggeredForwardSensitivity< Scalar >.

Definition at line 174 of file Tempus_Stepper_decl.hpp.

template<class Scalar >
void Tempus::Stepper< Scalar >::describe ( Teuchos::FancyOStream out,
const Teuchos::EVerbosityLevel  verbLevel 
) const
virtual
template<class Scalar >
bool Tempus::Stepper< Scalar >::isValidSetup ( Teuchos::FancyOStream out) const
virtual
template<class Scalar >
void Tempus::Stepper< Scalar >::setStepperValues ( const Teuchos::RCP< Teuchos::ParameterList pl)

Set Stepper member data from ParameterList.

Definition at line 165 of file Tempus_Stepper_impl.hpp.

template<class Scalar >
Teuchos::RCP< const Teuchos::ParameterList > Tempus::Stepper< Scalar >::getValidParameters ( ) const
virtual
template<class Scalar >
Teuchos::RCP< Teuchos::ParameterList > Tempus::Stepper< Scalar >::getValidParametersBasic ( ) const

Add basic parameters to Steppers ParameterList.

Definition at line 199 of file Tempus_Stepper_impl.hpp.

template<typename Scalar >
virtual void Tempus::Stepper< Scalar >::setStepperX ( Teuchos::RCP< Thyra::VectorBase< Scalar > >  x)
inlineprotectedvirtual

Set x for Stepper storage.

Definition at line 208 of file Tempus_Stepper_decl.hpp.

template<typename Scalar >
virtual void Tempus::Stepper< Scalar >::setStepperXDot ( Teuchos::RCP< Thyra::VectorBase< Scalar > >  xDot)
inlineprotectedvirtual

Set xDot for Stepper storage.

Definition at line 212 of file Tempus_Stepper_decl.hpp.

template<typename Scalar >
virtual void Tempus::Stepper< Scalar >::setStepperXDotDot ( Teuchos::RCP< Thyra::VectorBase< Scalar > >  xDotDot)
inlineprotectedvirtual

Set x for Stepper storage.

Definition at line 216 of file Tempus_Stepper_decl.hpp.

Member Data Documentation

template<typename Scalar >
std::string Tempus::Stepper< Scalar >::stepperName_
private

Name used for output and ParameterLists.

Definition at line 195 of file Tempus_Stepper_decl.hpp.

template<typename Scalar >
std::string Tempus::Stepper< Scalar >::stepperType_
private

Name of stepper type.

Definition at line 196 of file Tempus_Stepper_decl.hpp.

template<typename Scalar >
std::string Tempus::Stepper< Scalar >::ICConsistency_ = std::string("None")
private

Type of consistency to apply to ICs.

Definition at line 197 of file Tempus_Stepper_decl.hpp.

template<typename Scalar >
bool Tempus::Stepper< Scalar >::ICConsistencyCheck_ = false
private

Check if the initial condition is consistent.

Definition at line 198 of file Tempus_Stepper_decl.hpp.

template<typename Scalar >
Teuchos::RCP<Thyra::VectorBase<Scalar> > Tempus::Stepper< Scalar >::stepperX_
private

Definition at line 201 of file Tempus_Stepper_decl.hpp.

template<typename Scalar >
Teuchos::RCP<Thyra::VectorBase<Scalar> > Tempus::Stepper< Scalar >::stepperXDot_
private

Definition at line 202 of file Tempus_Stepper_decl.hpp.

template<typename Scalar >
Teuchos::RCP<Thyra::VectorBase<Scalar> > Tempus::Stepper< Scalar >::stepperXDotDot_
private

Definition at line 203 of file Tempus_Stepper_decl.hpp.

template<typename Scalar >
bool Tempus::Stepper< Scalar >::useFSAL_ = false
protected

Use First-Same-As-Last (FSAL) principle.

Definition at line 219 of file Tempus_Stepper_decl.hpp.

template<typename Scalar >
bool Tempus::Stepper< Scalar >::isInitialized_ = false
protected

True if stepper's member data is initialized.

Definition at line 220 of file Tempus_Stepper_decl.hpp.


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