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

Basic time integrator. More...

#include <Tempus_IntegratorBasic_decl.hpp>

Inheritance diagram for Tempus::IntegratorBasic< Scalar >:
Tempus::Integrator< Scalar >

Public Member Functions

 IntegratorBasic (Teuchos::RCP< Teuchos::ParameterList > pList, const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &model)
 Constructor with ParameterList and model, and will be fully initialized. More...
 
 IntegratorBasic (const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &model, std::string stepperType)
 Constructor with model and "Stepper Type" and is fully initialized with default settings. More...
 
 IntegratorBasic ()
 Constructor that requires a subsequent setParameterList, setStepper, and initialize calls. More...
 
 IntegratorBasic (Teuchos::RCP< Teuchos::ParameterList > pList, std::vector< Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > > models)
 Constructor with ParameterList and models, and will be fully initialized. More...
 
virtual ~IntegratorBasic ()
 Destructor. More...
 
void parseScreenOutput ()
 Parse when screen output should be executed. More...
 
Basic integrator methods
virtual bool advanceTime ()
 Advance the solution to timeMax, and return true if successful. More...
 
virtual bool advanceTime (const Scalar timeFinal) override
 Advance the solution to timeFinal, and return true if successful. More...
 
virtual void startIntegrator ()
 Perform tasks before start of integrator. More...
 
virtual void startTimeStep ()
 Start time step. More...
 
virtual void checkTimeStep ()
 Check if time step has passed or failed. More...
 
virtual void endIntegrator ()
 Perform tasks after end of integrator. More...
 
virtual Teuchos::RCP
< Teuchos::ParameterList > 
getTempusParameterList () override
 Return a copy of the Tempus ParameterList. More...
 
virtual void setTempusParameterList (Teuchos::RCP< Teuchos::ParameterList > pl) override
 
Accessor methods
virtual Scalar getTime () const override
 Get current time. More...
 
virtual int getIndex () const override
 Get current index. More...
 
virtual Status getStatus () const override
 Get Status. More...
 
virtual Teuchos::RCP< Stepper
< Scalar > > 
getStepper () const override
 Get the Stepper. More...
 
virtual void setStepper (Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > model)
 Set the Stepper. More...
 
virtual void setStepper (std::vector< Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > > models)
 Set the Stepper. More...
 
virtual void setStepperWStepper (Teuchos::RCP< Stepper< Scalar > > stepper)
 Set the Stepper. More...
 
virtual void initializeSolutionHistory (Teuchos::RCP< SolutionState< Scalar > > state=Teuchos::null)
 Set the initial state which has the initial conditions. More...
 
virtual void initializeSolutionHistory (Scalar t0, Teuchos::RCP< const Thyra::VectorBase< Scalar > > x0, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xdot0=Teuchos::null, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xdotdot0=Teuchos::null)
 Set the initial state from Thyra::VectorBase(s) More...
 
virtual Teuchos::RCP< const
SolutionHistory< Scalar > > 
getSolutionHistory () const override
 Get the SolutionHistory. More...
 
virtual void setSolutionHistory (Teuchos::RCP< SolutionHistory< Scalar > > sh=Teuchos::null)
 Set the SolutionHistory. More...
 
virtual Teuchos::RCP< const
TimeStepControl< Scalar > > 
getTimeStepControl () const override
 Get the TimeStepControl. More...
 
virtual Teuchos::RCP
< TimeStepControl< Scalar > > 
getNonConstTimeStepControl () override
 
virtual void setTimeStepControl (Teuchos::RCP< TimeStepControl< Scalar > > tsc=Teuchos::null)
 Set the TimeStepControl. More...
 
virtual Teuchos::RCP
< IntegratorObserverComposite
< Scalar > > 
getObserver ()
 Get the Observer. More...
 
virtual void setObserver (Teuchos::RCP< IntegratorObserver< Scalar > > obs=Teuchos::null)
 Set the Observer. More...
 
virtual void initialize ()
 Initializes the Integrator after set* function calls. More...
 
virtual Teuchos::RCP
< Teuchos::Time > 
getIntegratorTimer () const override
 Returns the IntegratorTimer_ for this Integrator. More...
 
virtual Teuchos::RCP
< Teuchos::Time > 
getStepperTimer () const override
 
virtual Teuchos::RCP
< Thyra::VectorBase< Scalar > > 
getX () const
 Get current the solution, x. More...
 
virtual Teuchos::RCP
< Thyra::VectorBase< Scalar > > 
getXdot () const
 Get current the time derivative of the solution, xdot. More...
 
virtual Teuchos::RCP
< Thyra::VectorBase< Scalar > > 
getXdotdot () const
 Get current the second time derivative of the solution, xdotdot. More...
 
virtual Teuchos::RCP
< SolutionState< Scalar > > 
getCurrentState ()
 Get current state. More...
 
Teuchos::RCP
< Teuchos::ParameterList > 
getIntegratorParameterList ()
 
virtual void setScreenOutputIndexInterval (int i)
 
virtual int getScreenOutputIndexInterval () const
 
virtual void setScreenOutputIndexList (std::string s)
 
virtual std::string getScreenOutputIndexList () const
 
Overridden from Teuchos::ParameterListAcceptor
void setParameterList (const Teuchos::RCP< Teuchos::ParameterList > &pl) override
 
Teuchos::RCP
< Teuchos::ParameterList > 
getNonconstParameterList () override
 
Teuchos::RCP
< Teuchos::ParameterList > 
unsetParameterList () override
 
Teuchos::RCP< const
Teuchos::ParameterList > 
getValidParameters () const override
 Create valid IntegratorBasic ParameterList. More...
 
Overridden from Teuchos::Describable
std::string description () const override
 
void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const override
 
Basic integrator methods

Protected Attributes

Teuchos::RCP
< Teuchos::ParameterList > 
tempusPL_
 
Teuchos::RCP
< Teuchos::ParameterList > 
integratorPL_
 
Teuchos::RCP< SolutionHistory
< Scalar > > 
solutionHistory_
 
Teuchos::RCP< TimeStepControl
< Scalar > > 
timeStepControl_
 
Teuchos::RCP
< IntegratorObserverComposite
< Scalar > > 
integratorObserver_
 
Teuchos::RCP< Stepper< Scalar > > stepper_
 
Teuchos::RCP< Teuchos::Time > integratorTimer_
 
Teuchos::RCP< Teuchos::Time > stepperTimer_
 
Scalar runtime_
 
std::vector< int > outputScreenIndices_
 Vector of screen output indices. More...
 
Status integratorStatus_
 
bool isInitialized_
 

Detailed Description

template<class Scalar>
class Tempus::IntegratorBasic< Scalar >

Basic time integrator.

Definition at line 35 of file Tempus_IntegratorBasic_decl.hpp.

Constructor & Destructor Documentation

template<class Scalar >
Tempus::IntegratorBasic< Scalar >::IntegratorBasic ( Teuchos::RCP< Teuchos::ParameterList >  pList,
const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &  model 
)

Constructor with ParameterList and model, and will be fully initialized.

Definition at line 22 of file Tempus_IntegratorBasic_impl.hpp.

template<class Scalar >
Tempus::IntegratorBasic< Scalar >::IntegratorBasic ( const Teuchos::RCP< Thyra::ModelEvaluator< Scalar > > &  model,
std::string  stepperType 
)

Constructor with model and "Stepper Type" and is fully initialized with default settings.

Definition at line 35 of file Tempus_IntegratorBasic_impl.hpp.

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

Constructor that requires a subsequent setParameterList, setStepper, and initialize calls.

Definition at line 52 of file Tempus_IntegratorBasic_impl.hpp.

template<class Scalar >
Tempus::IntegratorBasic< Scalar >::IntegratorBasic ( Teuchos::RCP< Teuchos::ParameterList >  pList,
std::vector< Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > >  models 
)

Constructor with ParameterList and models, and will be fully initialized.

Definition at line 61 of file Tempus_IntegratorBasic_impl.hpp.

template<class Scalar >
virtual Tempus::IntegratorBasic< Scalar >::~IntegratorBasic ( )
inlinevirtual

Destructor.

Definition at line 58 of file Tempus_IntegratorBasic_decl.hpp.

Member Function Documentation

template<class Scalar >
bool Tempus::IntegratorBasic< Scalar >::advanceTime ( )
virtual

Advance the solution to timeMax, and return true if successful.

Definition at line 428 of file Tempus_IntegratorBasic_impl.hpp.

template<class Scalar >
bool Tempus::IntegratorBasic< Scalar >::advanceTime ( const Scalar  timeFinal)
overridevirtual

Advance the solution to timeFinal, and return true if successful.

Implements Tempus::Integrator< Scalar >.

Definition at line 397 of file Tempus_IntegratorBasic_impl.hpp.

template<class Scalar >
void Tempus::IntegratorBasic< Scalar >::checkTimeStep ( )
virtual

Check if time step has passed or failed.

Definition at line 501 of file Tempus_IntegratorBasic_impl.hpp.

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

Definition at line 375 of file Tempus_IntegratorBasic_impl.hpp.

template<class Scalar >
std::string Tempus::IntegratorBasic< Scalar >::description ( ) const
override

Definition at line 367 of file Tempus_IntegratorBasic_impl.hpp.

template<class Scalar >
void Tempus::IntegratorBasic< Scalar >::endIntegrator ( )
virtual

Perform tasks after end of integrator.

Definition at line 570 of file Tempus_IntegratorBasic_impl.hpp.

template<class Scalar >
virtual Teuchos::RCP<SolutionState<Scalar> > Tempus::IntegratorBasic< Scalar >::getCurrentState ( )
inlinevirtual

Get current state.

Definition at line 155 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
virtual int Tempus::IntegratorBasic< Scalar >::getIndex ( ) const
inlineoverridevirtual

Get current index.

Implements Tempus::Integrator< Scalar >.

Definition at line 92 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
Teuchos::RCP<Teuchos::ParameterList> Tempus::IntegratorBasic< Scalar >::getIntegratorParameterList ( )
inline

Definition at line 158 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
virtual Teuchos::RCP<Teuchos::Time> Tempus::IntegratorBasic< Scalar >::getIntegratorTimer ( ) const
inlineoverridevirtual

Returns the IntegratorTimer_ for this Integrator.

Implements Tempus::Integrator< Scalar >.

Definition at line 139 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
Teuchos::RCP< Teuchos::ParameterList > Tempus::IntegratorBasic< Scalar >::getNonconstParameterList ( )
override

Definition at line 690 of file Tempus_IntegratorBasic_impl.hpp.

template<class Scalar >
virtual Teuchos::RCP<TimeStepControl<Scalar> > Tempus::IntegratorBasic< Scalar >::getNonConstTimeStepControl ( )
inlineoverridevirtual

Implements Tempus::Integrator< Scalar >.

Definition at line 124 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
virtual Teuchos::RCP<IntegratorObserverComposite<Scalar> > Tempus::IntegratorBasic< Scalar >::getObserver ( )
inlinevirtual

Get the Observer.

Definition at line 130 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
virtual int Tempus::IntegratorBasic< Scalar >::getScreenOutputIndexInterval ( ) const
inlinevirtual

Definition at line 167 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
virtual std::string Tempus::IntegratorBasic< Scalar >::getScreenOutputIndexList ( ) const
inlinevirtual

Definition at line 173 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
virtual Teuchos::RCP<const SolutionHistory<Scalar> > Tempus::IntegratorBasic< Scalar >::getSolutionHistory ( ) const
inlineoverridevirtual

Get the SolutionHistory.

Implements Tempus::Integrator< Scalar >.

Definition at line 116 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
virtual Status Tempus::IntegratorBasic< Scalar >::getStatus ( ) const
inlineoverridevirtual

Get Status.

Implements Tempus::Integrator< Scalar >.

Definition at line 95 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
virtual Teuchos::RCP<Stepper<Scalar> > Tempus::IntegratorBasic< Scalar >::getStepper ( ) const
inlineoverridevirtual

Get the Stepper.

Implements Tempus::Integrator< Scalar >.

Definition at line 98 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
virtual Teuchos::RCP<Teuchos::Time> Tempus::IntegratorBasic< Scalar >::getStepperTimer ( ) const
inlineoverridevirtual

Implements Tempus::Integrator< Scalar >.

Definition at line 141 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
virtual Teuchos::RCP<Teuchos::ParameterList> Tempus::IntegratorBasic< Scalar >::getTempusParameterList ( )
inlineoverridevirtual

Return a copy of the Tempus ParameterList.

Implements Tempus::Integrator< Scalar >.

Definition at line 75 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
virtual Scalar Tempus::IntegratorBasic< Scalar >::getTime ( ) const
inlineoverridevirtual

Get current time.

Implements Tempus::Integrator< Scalar >.

Definition at line 89 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
virtual Teuchos::RCP<const TimeStepControl<Scalar> > Tempus::IntegratorBasic< Scalar >::getTimeStepControl ( ) const
inlineoverridevirtual

Get the TimeStepControl.

Implements Tempus::Integrator< Scalar >.

Definition at line 122 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
Teuchos::RCP< const Teuchos::ParameterList > Tempus::IntegratorBasic< Scalar >::getValidParameters ( ) const
override

Create valid IntegratorBasic ParameterList.

Definition at line 658 of file Tempus_IntegratorBasic_impl.hpp.

template<class Scalar >
virtual Teuchos::RCP<Thyra::VectorBase<Scalar> > Tempus::IntegratorBasic< Scalar >::getX ( ) const
inlinevirtual

Get current the solution, x.

Definition at line 145 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
virtual Teuchos::RCP<Thyra::VectorBase<Scalar> > Tempus::IntegratorBasic< Scalar >::getXdot ( ) const
inlinevirtual

Get current the time derivative of the solution, xdot.

Definition at line 148 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
virtual Teuchos::RCP<Thyra::VectorBase<Scalar> > Tempus::IntegratorBasic< Scalar >::getXdotdot ( ) const
inlinevirtual

Get current the second time derivative of the solution, xdotdot.

Definition at line 151 of file Tempus_IntegratorBasic_decl.hpp.

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

Initializes the Integrator after set* function calls.

Definition at line 303 of file Tempus_IntegratorBasic_impl.hpp.

template<class Scalar >
void Tempus::IntegratorBasic< Scalar >::initializeSolutionHistory ( Teuchos::RCP< SolutionState< Scalar > >  state = Teuchos::null)
virtual

Set the initial state which has the initial conditions.

This resets the SolutionHistory and sets the first SolutionState as the IC.

Definition at line 123 of file Tempus_IntegratorBasic_impl.hpp.

template<class Scalar >
void Tempus::IntegratorBasic< Scalar >::initializeSolutionHistory ( Scalar  t0,
Teuchos::RCP< const Thyra::VectorBase< Scalar > >  x0,
Teuchos::RCP< const Thyra::VectorBase< Scalar > >  xdot0 = Teuchos::null,
Teuchos::RCP< const Thyra::VectorBase< Scalar > >  xdotdot0 = Teuchos::null 
)
virtual

Set the initial state from Thyra::VectorBase(s)

Definition at line 165 of file Tempus_IntegratorBasic_impl.hpp.

template<class Scalar >
void Tempus::IntegratorBasic< Scalar >::parseScreenOutput ( )

Parse when screen output should be executed.

Definition at line 587 of file Tempus_IntegratorBasic_impl.hpp.

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

Set the Observer.

Definition at line 277 of file Tempus_IntegratorBasic_impl.hpp.

template<class Scalar >
void Tempus::IntegratorBasic< Scalar >::setParameterList ( const Teuchos::RCP< Teuchos::ParameterList > &  pl)
override

Definition at line 618 of file Tempus_IntegratorBasic_impl.hpp.

template<class Scalar >
virtual void Tempus::IntegratorBasic< Scalar >::setScreenOutputIndexInterval ( int  i)
inlinevirtual

Definition at line 164 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
virtual void Tempus::IntegratorBasic< Scalar >::setScreenOutputIndexList ( std::string  s)
inlinevirtual

Definition at line 170 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
void Tempus::IntegratorBasic< Scalar >::setSolutionHistory ( Teuchos::RCP< SolutionHistory< Scalar > >  sh = Teuchos::null)
virtual

Set the SolutionHistory.

Definition at line 214 of file Tempus_IntegratorBasic_impl.hpp.

template<class Scalar >
void Tempus::IntegratorBasic< Scalar >::setStepper ( Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > >  model)
virtual

Set the Stepper.

Definition at line 74 of file Tempus_IntegratorBasic_impl.hpp.

template<class Scalar >
void Tempus::IntegratorBasic< Scalar >::setStepper ( std::vector< Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > >  models)
virtual

Set the Stepper.

Definition at line 94 of file Tempus_IntegratorBasic_impl.hpp.

template<class Scalar >
void Tempus::IntegratorBasic< Scalar >::setStepperWStepper ( Teuchos::RCP< Stepper< Scalar > >  stepper)
virtual

Set the Stepper.

Definition at line 114 of file Tempus_IntegratorBasic_impl.hpp.

template<class Scalar >
virtual void Tempus::IntegratorBasic< Scalar >::setTempusParameterList ( Teuchos::RCP< Teuchos::ParameterList >  pl)
inlineoverridevirtual

Implements Tempus::Integrator< Scalar >.

Definition at line 77 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
void Tempus::IntegratorBasic< Scalar >::setTimeStepControl ( Teuchos::RCP< TimeStepControl< Scalar > >  tsc = Teuchos::null)
virtual

Set the TimeStepControl.

Definition at line 242 of file Tempus_IntegratorBasic_impl.hpp.

template<class Scalar >
void Tempus::IntegratorBasic< Scalar >::startIntegrator ( )
virtual

Perform tasks before start of integrator.

Definition at line 407 of file Tempus_IntegratorBasic_impl.hpp.

template<class Scalar >
void Tempus::IntegratorBasic< Scalar >::startTimeStep ( )
virtual

Start time step.

Definition at line 475 of file Tempus_IntegratorBasic_impl.hpp.

template<class Scalar >
Teuchos::RCP< Teuchos::ParameterList > Tempus::IntegratorBasic< Scalar >::unsetParameterList ( )
override

Definition at line 698 of file Tempus_IntegratorBasic_impl.hpp.

Member Data Documentation

template<class Scalar >
Teuchos::RCP<IntegratorObserverComposite<Scalar> > Tempus::IntegratorBasic< Scalar >::integratorObserver_
protected

Definition at line 203 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
Teuchos::RCP<Teuchos::ParameterList> Tempus::IntegratorBasic< Scalar >::integratorPL_
protected

Definition at line 200 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
Status Tempus::IntegratorBasic< Scalar >::integratorStatus_
protected

The integratorStatus is primarily in the WORKING Status, and PASSED/FAILED are noted at the end of the run. A FAILED value is used to jump out of the time-integration loop.

Definition at line 216 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
Teuchos::RCP<Teuchos::Time> Tempus::IntegratorBasic< Scalar >::integratorTimer_
protected

Definition at line 206 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
bool Tempus::IntegratorBasic< Scalar >::isInitialized_
protected

Definition at line 217 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
std::vector<int> Tempus::IntegratorBasic< Scalar >::outputScreenIndices_
protected

Vector of screen output indices.

Definition at line 210 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
Scalar Tempus::IntegratorBasic< Scalar >::runtime_
protected

Definition at line 208 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
Teuchos::RCP<SolutionHistory<Scalar> > Tempus::IntegratorBasic< Scalar >::solutionHistory_
protected

Definition at line 201 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
Teuchos::RCP<Stepper<Scalar> > Tempus::IntegratorBasic< Scalar >::stepper_
protected

Definition at line 204 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
Teuchos::RCP<Teuchos::Time> Tempus::IntegratorBasic< Scalar >::stepperTimer_
protected

Definition at line 207 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
Teuchos::RCP<Teuchos::ParameterList> Tempus::IntegratorBasic< Scalar >::tempusPL_
protected

Definition at line 199 of file Tempus_IntegratorBasic_decl.hpp.

template<class Scalar >
Teuchos::RCP<TimeStepControl<Scalar> > Tempus::IntegratorBasic< Scalar >::timeStepControl_
protected

Definition at line 202 of file Tempus_IntegratorBasic_decl.hpp.


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