Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus::StepperSubcycling< Scalar > Class Template Reference

Subcycling time stepper. More...

#include <Tempus_StepperSubcycling_decl.hpp>

Inheritance diagram for Tempus::StepperSubcycling< Scalar >:
Tempus::Stepper< Scalar >

Public Member Functions

 StepperSubcycling ()
 Default constructor. More...
 
 StepperSubcycling (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< StepperSubcyclingObserver< Scalar > > &obs, const Teuchos::RCP< IntegratorBasic< Scalar > > &integrator, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck)
 Constructor. More...
 
Teuchos::RCP< const
Teuchos::ParameterList > 
getValidParameters () const
 
Basic stepper methods
virtual void setModel (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel)
 
virtual void setNonConstModel (const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &appModel)
 
virtual Teuchos::RCP< const
Thyra::ModelEvaluator< Scalar > > 
getModel ()
 
virtual void setObserver (Teuchos::RCP< StepperObserver< Scalar > > obs=Teuchos::null)
 Set Observer. More...
 
virtual Teuchos::RCP
< StepperObserver< Scalar > > 
getObserver () const
 Get Observer. More...
 
virtual void initialize ()
 Initialize during construction and after changing input parameters. More...
 
virtual Scalar getInitTimeStep (const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory) const
 
virtual void setInitialConditions (const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
 Set the initial conditions, make them consistent, and set needed memory. More...
 
virtual void setInitialGuess (Teuchos::RCP< const Thyra::VectorBase< Scalar > > initial_guess)
 Pass initial guess to Newton solver (only relevant for implicit solvers) More...
 
virtual void setSolver (Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > solver=Teuchos::null)
 Set solver. More...
 
virtual Teuchos::RCP
< Thyra::NonlinearSolverBase
< Scalar > > 
getSolver () const
 Get solver. More...
 
virtual void takeStep (const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory)
 Take the specified timestep, dt, and return true if successful. More...
 
virtual Teuchos::RCP
< Tempus::StepperState< Scalar > > 
getDefaultStepperState ()
 Get a default (initial) StepperState. More...
 
virtual bool isExplicit () const
 
virtual bool isImplicit () const
 
virtual bool isExplicitImplicit () const
 
virtual bool isOneStepMethod () const
 
virtual bool isMultiStepMethod () const
 
virtual Scalar getOrder () const
 
virtual Scalar getOrderMin () const
 
virtual Scalar getOrderMax () const
 
virtual OrderODE getOrderODE () const
 
Overridden from Teuchos::Describable
virtual void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
 
Functions to set the subcycling stepper.
virtual void setSubcyclingStepper (Teuchos::RCP< Stepper< Scalar > > stepper)
 
virtual void setSubcyclingMinTimeStep (Scalar MinTimeStep)
 
virtual void setSubcyclingInitTimeStep (Scalar InitTimeStep)
 
virtual void setSubcyclingMaxTimeStep (Scalar MaxTimeStep)
 
virtual void setSubcyclingStepType (std::string StepType)
 
virtual void setSubcyclingMaxFailures (int MaxFailures)
 
virtual void setSubcyclingMaxConsecFailures (int MaxConsecFailures)
 
virtual void setSubcyclingScreenOutputIndexInterval (int i)
 
virtual void setSubcyclingTimeStepControlStrategy (Teuchos::RCP< TimeStepControlStrategy< Scalar > > tscs)
 
- Public Member Functions inherited from Tempus::Stepper< Scalar >
void setStepperType (std::string s)
 
std::string getStepperType () const
 
void setUseFSAL (bool a)
 
bool getUseFSAL () const
 
virtual bool getUseFSALDefault () const
 
void setICConsistency (std::string s)
 
std::string getICConsistency () const
 
virtual std::string getICConsistencyDefault () const
 
void setICConsistencyCheck (bool c)
 
bool getICConsistencyCheck () const
 
virtual bool getICConsistencyCheckDefault () const
 
virtual std::string description () const
 
virtual void createSubSteppers (std::vector< Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > >)
 

Public Attributes

bool isInitialized_ = false
 

Protected Attributes

Teuchos::RCP
< StepperSubcyclingObserver
< Scalar > > 
stepperSCObserver_
 
Teuchos::RCP< IntegratorBasic
< Scalar > > 
scIntegrator_
 

Detailed Description

template<class Scalar>
class Tempus::StepperSubcycling< Scalar >

Subcycling time stepper.

This stepper wraps an IntegratorBasic object to perform the subcycling, thus it has all the capbilities of an IntegratorBasic with the following specializations and defaults:

  • Main Integrator operates independently from subcycling Stepper, and can be driven by another physics.
  • Need separate TimeStepControl for the subcycling so it can be driven by the physics (e.g., variable time stepping).
  • Finish the subcycling exactly on the full timestep.
  • No solution I/O within the subcycling.
  • No restart capability within subcycling, but still have restart capability from the full timestep.
  • Do not need to keep a solution history of the subcycling.

Definition at line 36 of file Tempus_StepperSubcycling_decl.hpp.

Constructor & Destructor Documentation

template<class Scalar >
Tempus::StepperSubcycling< Scalar >::StepperSubcycling ( )

Default constructor.

Definition at line 25 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
Tempus::StepperSubcycling< Scalar >::StepperSubcycling ( const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &  appModel,
const Teuchos::RCP< StepperSubcyclingObserver< Scalar > > &  obs,
const Teuchos::RCP< IntegratorBasic< Scalar > > &  integrator,
bool  useFSAL,
std::string  ICConsistency,
bool  ICConsistencyCheck 
)

Constructor.

Definition at line 76 of file Tempus_StepperSubcycling_impl.hpp.

Member Function Documentation

template<class Scalar >
void Tempus::StepperSubcycling< Scalar >::describe ( Teuchos::FancyOStream &  out,
const Teuchos::EVerbosityLevel  verbLevel 
) const
virtual

Definition at line 445 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
Teuchos::RCP< Tempus::StepperState< Scalar > > Tempus::StepperSubcycling< Scalar >::getDefaultStepperState ( )
virtual

Get a default (initial) StepperState.

Provide a StepperState to the SolutionState. This Stepper does not have any special state data, so just provide the base class StepperState with the Stepper description. This can be checked to ensure that the input StepperState can be used by this Stepper.

Implements Tempus::Stepper< Scalar >.

Definition at line 436 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
Scalar Tempus::StepperSubcycling< Scalar >::getInitTimeStep ( const Teuchos::RCP< SolutionHistory< Scalar > > &  solutionHistory) const
virtual

Implements Tempus::Stepper< Scalar >.

Definition at line 304 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
virtual Teuchos::RCP<const Thyra::ModelEvaluator<Scalar> > Tempus::StepperSubcycling< Scalar >::getModel ( )
inlinevirtual

Implements Tempus::Stepper< Scalar >.

Definition at line 65 of file Tempus_StepperSubcycling_decl.hpp.

template<class Scalar >
Teuchos::RCP< StepperObserver< Scalar > > Tempus::StepperSubcycling< Scalar >::getObserver ( ) const
virtual

Get Observer.

Implements Tempus::Stepper< Scalar >.

Definition at line 223 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
Scalar Tempus::StepperSubcycling< Scalar >::getOrder ( ) const
virtual

Implements Tempus::Stepper< Scalar >.

Definition at line 284 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
Scalar Tempus::StepperSubcycling< Scalar >::getOrderMax ( ) const
virtual

Implements Tempus::Stepper< Scalar >.

Definition at line 294 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
Scalar Tempus::StepperSubcycling< Scalar >::getOrderMin ( ) const
virtual

Implements Tempus::Stepper< Scalar >.

Definition at line 289 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
OrderODE Tempus::StepperSubcycling< Scalar >::getOrderODE ( ) const
virtual

Implements Tempus::Stepper< Scalar >.

Definition at line 299 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > Tempus::StepperSubcycling< Scalar >::getSolver ( ) const
virtual

Get solver.

Implements Tempus::Stepper< Scalar >.

Definition at line 335 of file Tempus_StepperSubcycling_impl.hpp.

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

Implements Tempus::Stepper< Scalar >.

Definition at line 462 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
void Tempus::StepperSubcycling< Scalar >::initialize ( )
virtual

Initialize during construction and after changing input parameters.

Implements Tempus::Stepper< Scalar >.

Definition at line 228 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
bool Tempus::StepperSubcycling< Scalar >::isExplicit ( ) const
virtual

Implements Tempus::Stepper< Scalar >.

Definition at line 259 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
bool Tempus::StepperSubcycling< Scalar >::isExplicitImplicit ( ) const
virtual

Implements Tempus::Stepper< Scalar >.

Definition at line 269 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
bool Tempus::StepperSubcycling< Scalar >::isImplicit ( ) const
virtual

Implements Tempus::Stepper< Scalar >.

Definition at line 264 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
bool Tempus::StepperSubcycling< Scalar >::isMultiStepMethod ( ) const
virtual

Implements Tempus::Stepper< Scalar >.

Definition at line 279 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
bool Tempus::StepperSubcycling< Scalar >::isOneStepMethod ( ) const
virtual

Implements Tempus::Stepper< Scalar >.

Definition at line 274 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
void Tempus::StepperSubcycling< Scalar >::setInitialConditions ( const Teuchos::RCP< SolutionHistory< Scalar > > &  solutionHistory)
virtual

Set the initial conditions, make them consistent, and set needed memory.

Implements Tempus::Stepper< Scalar >.

Definition at line 319 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
void Tempus::StepperSubcycling< Scalar >::setInitialGuess ( Teuchos::RCP< const Thyra::VectorBase< Scalar > >  initial_guess)
virtual

Pass initial guess to Newton solver (only relevant for implicit solvers)

Implements Tempus::Stepper< Scalar >.

Definition at line 310 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
void Tempus::StepperSubcycling< Scalar >::setModel ( const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &  appModel)
virtual

Implements Tempus::Stepper< Scalar >.

Definition at line 190 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
void Tempus::StepperSubcycling< Scalar >::setNonConstModel ( const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &  appModel)
virtual

Implements Tempus::Stepper< Scalar >.

Definition at line 199 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
void Tempus::StepperSubcycling< Scalar >::setObserver ( Teuchos::RCP< StepperObserver< Scalar > >  obs = Teuchos::null)
virtual

Set Observer.

Implements Tempus::Stepper< Scalar >.

Definition at line 208 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
void Tempus::StepperSubcycling< Scalar >::setSolver ( Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > >  solver = Teuchos::null)
virtual

Set solver.

Implements Tempus::Stepper< Scalar >.

Definition at line 325 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
void Tempus::StepperSubcycling< Scalar >::setSubcyclingInitTimeStep ( Scalar  InitTimeStep)
virtual

Definition at line 117 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
void Tempus::StepperSubcycling< Scalar >::setSubcyclingMaxConsecFailures ( int  MaxConsecFailures)
virtual

Definition at line 162 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
void Tempus::StepperSubcycling< Scalar >::setSubcyclingMaxFailures ( int  MaxFailures)
virtual

Definition at line 153 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
void Tempus::StepperSubcycling< Scalar >::setSubcyclingMaxTimeStep ( Scalar  MaxTimeStep)
virtual

Definition at line 125 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
void Tempus::StepperSubcycling< Scalar >::setSubcyclingMinTimeStep ( Scalar  MinTimeStep)
virtual

Definition at line 109 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
void Tempus::StepperSubcycling< Scalar >::setSubcyclingScreenOutputIndexInterval ( int  i)
virtual

Definition at line 171 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
void Tempus::StepperSubcycling< Scalar >::setSubcyclingStepper ( Teuchos::RCP< Stepper< Scalar > >  stepper)
virtual

Definition at line 100 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
void Tempus::StepperSubcycling< Scalar >::setSubcyclingStepType ( std::string  StepType)
virtual

Definition at line 133 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
void Tempus::StepperSubcycling< Scalar >::setSubcyclingTimeStepControlStrategy ( Teuchos::RCP< TimeStepControlStrategy< Scalar > >  tscs)
virtual

Definition at line 180 of file Tempus_StepperSubcycling_impl.hpp.

template<class Scalar >
void Tempus::StepperSubcycling< Scalar >::takeStep ( const Teuchos::RCP< SolutionHistory< Scalar > > &  solutionHistory)
virtual

Take the specified timestep, dt, and return true if successful.

Implements Tempus::Stepper< Scalar >.

Definition at line 340 of file Tempus_StepperSubcycling_impl.hpp.

Member Data Documentation

template<class Scalar >
bool Tempus::StepperSubcycling< Scalar >::isInitialized_ = false

Definition at line 135 of file Tempus_StepperSubcycling_decl.hpp.

template<class Scalar >
Teuchos::RCP<IntegratorBasic<Scalar> > Tempus::StepperSubcycling< Scalar >::scIntegrator_
protected

Definition at line 140 of file Tempus_StepperSubcycling_decl.hpp.

template<class Scalar >
Teuchos::RCP<StepperSubcyclingObserver<Scalar> > Tempus::StepperSubcycling< Scalar >::stepperSCObserver_
protected

Definition at line 139 of file Tempus_StepperSubcycling_decl.hpp.


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