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 | Private Attributes | List of all members
Tempus::StepperSDIRK_2Stage2ndOrder< Scalar > Class Template Reference

SDIRK 2 Stage 2nd order. More...

#include <Tempus_StepperRKButcherTableau.hpp>

Inheritance diagram for Tempus::StepperSDIRK_2Stage2ndOrder< Scalar >:
Tempus::StepperDIRK< Scalar > Tempus::StepperImplicit< Scalar > Tempus::StepperRKBase< Scalar > Tempus::Stepper< Scalar > Tempus::Stepper< Scalar > Teuchos::Describable Teuchos::VerboseObject< Stepper< Scalar > > Teuchos::Describable Teuchos::VerboseObject< Stepper< Scalar > > Teuchos::LabeledObject Teuchos::VerboseObjectBase Teuchos::LabeledObject Teuchos::VerboseObjectBase

Public Member Functions

 StepperSDIRK_2Stage2ndOrder ()
 Default constructor. More...
 
 StepperSDIRK_2Stage2ndOrder (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction, Scalar gamma=Scalar(0.2928932188134524))
 
void setGamma (Scalar gamma)
 
Scalar getGamma () const
 
std::string getDescription () const
 
Teuchos::RCP< const
Teuchos::ParameterList
getValidParameters () const
 
- Public Member Functions inherited from Tempus::StepperDIRK< Scalar >
std::vector< Teuchos::RCP
< Thyra::VectorBase< Scalar > > > & 
getStageXDot ()
 
Teuchos::RCP
< Thyra::VectorBase< Scalar > > & 
getXTilde ()
 
virtual Scalar getAlpha (const Scalar dt) const override
 Return alpha = d(xDot)/dx. More...
 
virtual Scalar getBeta (const Scalar) const override
 Return beta = d(x)/dx. More...
 
virtual Scalar getAlpha (const Scalar dt, int i) const
 Return alpha = d(xDot)/dx for stage i. More...
 
Teuchos::RCP
< Teuchos::ParameterList
getValidParametersBasicDIRK () const
 
virtual bool isValidSetup (Teuchos::FancyOStream &out) const override
 
virtual void setStepperDIRKValues (Teuchos::RCP< Teuchos::ParameterList > pl)
 Set StepperDIRK member data from the ParameterList. More...
 
virtual void initialize () override
 Initialize after construction and changing input parameters. More...
 
virtual void setModel (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &appModel) override
 Set the model. More...
 
virtual void setInitialConditions (const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory) override
 Set the initial conditions and make them consistent. More...
 
virtual void setResetInitialGuess (bool reset_guess)
 
virtual bool getResetInitialGuess () const
 
virtual void takeStep (const Teuchos::RCP< SolutionHistory< Scalar > > &solutionHistory) override
 Take the specified timestep, dt, and return true if successful. More...
 
virtual Teuchos::RCP
< Tempus::StepperState< Scalar > > 
getDefaultStepperState () override
 Get a default (initial) StepperState. More...
 
virtual bool isExplicit () const override
 
virtual bool isImplicit () const override
 
virtual bool isExplicitImplicit () const override
 
virtual bool isOneStepMethod () const override
 
virtual bool isMultiStepMethod () const override
 
virtual OrderODE getOrderODE () const override
 
virtual void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const override
 
- Public Member Functions inherited from Tempus::StepperImplicit< Scalar >
Teuchos::RCP
< Teuchos::ParameterList
getValidParametersBasicImplicit () const
 
void setStepperImplicitValues (Teuchos::RCP< Teuchos::ParameterList > pl)
 Set StepperImplicit member data from the ParameterList. More...
 
void setStepperSolverValues (Teuchos::RCP< Teuchos::ParameterList > pl)
 Set solver from ParameterList. More...
 
void setSolverName (std::string i)
 Set the Solver Name. More...
 
std::string getSolverName () const
 Get the Solver Name. More...
 
virtual Teuchos::RCP< const
Thyra::ModelEvaluator< Scalar > > 
getModel () const override
 
virtual Teuchos::RCP< const
WrapperModelEvaluator< Scalar > > 
getWrapperModel ()
 
virtual void setDefaultSolver ()
 
virtual void setSolver (Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > solver) override
 Set solver. More...
 
virtual Teuchos::RCP
< Thyra::NonlinearSolverBase
< Scalar > > 
getSolver () const override
 Get solver. More...
 
const Thyra::SolveStatus< Scalar > solveImplicitODE (const Teuchos::RCP< Thyra::VectorBase< Scalar > > &x, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &xDot, const Scalar time, const Teuchos::RCP< ImplicitODEParameters< Scalar > > &p, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &y=Teuchos::null, const int index=-1)
 Solve implicit ODE, f(x, xDot, t, p) = 0. More...
 
void evaluateImplicitODE (Teuchos::RCP< Thyra::VectorBase< Scalar > > &f, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &x, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &xDot, const Scalar time, const Teuchos::RCP< ImplicitODEParameters< Scalar > > &p)
 Evaluate implicit ODE residual, f(x, xDot, t, p). More...
 
virtual void setInitialGuess (Teuchos::RCP< const Thyra::VectorBase< Scalar > > initialGuess) override
 Pass initial guess to Newton solver (only relevant for implicit solvers) More...
 
virtual void setZeroInitialGuess (bool zIG)
 
virtual bool getZeroInitialGuess () const
 
virtual Scalar getInitTimeStep (const Teuchos::RCP< SolutionHistory< Scalar > > &) const override
 
- Public Member Functions inherited from Tempus::Stepper< Scalar >
void setStepperValues (const Teuchos::RCP< Teuchos::ParameterList > pl)
 Set Stepper member data from ParameterList. More...
 
Teuchos::RCP
< Teuchos::ParameterList
getValidParametersBasic () const
 Add basic parameters to Steppers ParameterList. More...
 
virtual bool isInitialized ()
 True if stepper's member data is initialized. More...
 
virtual void checkInitialized ()
 Check initialization, and error out on failure. More...
 
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 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...
 
virtual std::string description () const
 
- 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
 
- Public Member Functions inherited from Tempus::StepperRKBase< Scalar >
virtual Teuchos::RCP< const
RKButcherTableau< Scalar > > 
getTableau () const
 
virtual Scalar getOrder () const
 
virtual Scalar getOrderMin () const
 
virtual Scalar getOrderMax () const
 
virtual int getNumberOfStages () const
 
virtual int getStageNumber () const
 
virtual void setStageNumber (int s)
 
virtual void setUseEmbedded (bool a)
 
virtual bool getUseEmbedded () const
 
virtual void setErrorNorm (const Teuchos::RCP< Stepper_ErrorNorm< Scalar >> &errCalculator=Teuchos::null)
 
virtual void setAppAction (Teuchos::RCP< StepperRKAppAction< Scalar >> appAction)
 
virtual Teuchos::RCP
< StepperRKAppAction< Scalar > > 
getAppAction () const
 
virtual void setStepperRKValues (Teuchos::RCP< Teuchos::ParameterList > pl)
 Set StepperRK member data from the ParameterList. More...
 
virtual Teuchos::RCP
< RKButcherTableau< Scalar > > 
createTableau (Teuchos::RCP< Teuchos::ParameterList > pl)
 

Protected Member Functions

void setupTableau ()
 
- Protected Member Functions inherited from Tempus::StepperDIRK< Scalar >
virtual void setupDefault ()
 Default setup for constructor. More...
 
virtual void setup (const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &wrapperModel, const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &solver, bool useFSAL, std::string ICConsistency, bool ICConsistencyCheck, bool useEmbedded, bool zeroInitialGuess, const Teuchos::RCP< StepperRKAppAction< Scalar > > &stepperRKAppAction)
 Setup for constructor. More...
 
virtual void setEmbeddedMemory () override
 
- Protected Member Functions inherited from Tempus::Stepper< Scalar >
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...
 
void setStepperType (std::string s)
 Set the stepper type. 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
 

Private Attributes

Scalar gammaDefault_
 
Scalar gamma_
 

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
 
- Protected Attributes inherited from Tempus::StepperDIRK< Scalar >
std::vector< Teuchos::RCP
< Thyra::VectorBase< Scalar > > > 
stageXDot_
 
Teuchos::RCP
< Thyra::VectorBase< Scalar > > 
xTilde_
 
bool resetGuess_ = true
 
- Protected Attributes inherited from Tempus::StepperImplicit< Scalar >
Teuchos::RCP
< WrapperModelEvaluator
< Scalar > > 
wrapperModel_
 
Teuchos::RCP
< Thyra::NonlinearSolverBase
< Scalar > > 
solver_
 
Teuchos::RCP< const
Thyra::VectorBase< Scalar > > 
initialGuess_
 
bool zeroInitialGuess_
 
std::string solverName_
 
- Protected Attributes inherited from Tempus::Stepper< Scalar >
bool useFSAL_ = false
 Use First-Same-As-Last (FSAL) principle. More...
 
bool isInitialized_
 True if stepper's member data is initialized. More...
 
- Protected Attributes inherited from Tempus::StepperRKBase< Scalar >
Teuchos::RCP< RKButcherTableau
< Scalar > > 
tableau_
 
bool useEmbedded_
 
Teuchos::RCP
< Thyra::VectorBase< Scalar > > 
ee_
 
Teuchos::RCP
< Thyra::VectorBase< Scalar > > 
abs_u0
 
Teuchos::RCP
< Thyra::VectorBase< Scalar > > 
abs_u
 
Teuchos::RCP
< Thyra::VectorBase< Scalar > > 
sc
 
Teuchos::RCP
< Stepper_ErrorNorm< Scalar > > 
stepperErrorNormCalculator_
 
int stageNumber_
 
Teuchos::RCP
< StepperRKAppAction< Scalar > > 
stepperRKAppAction_
 

Detailed Description

template<class Scalar>
class Tempus::StepperSDIRK_2Stage2ndOrder< Scalar >

SDIRK 2 Stage 2nd order.

The tableau (order=1 or 2) is

\[ \begin{array}{c|c} c & A \\ \hline & b^T \end{array} \;\;\;\;\mbox{ where }\;\;\;\; \begin{array}{c|cc} \gamma & \gamma & \\ 1 & 1-\gamma & \gamma \\ \hline & 1-\gamma & \gamma \end{array} \]

The default value is $\gamma = (2 - \sqrt{2})/2$. This will produce an L-stable 2nd order method with the stage times within the timestep. Other values of gamma will still produce an L-stable scheme, but will only be 1st order accurate. L-stability is guaranteed because $A_{sj} = b_j$.

Reference: U. M. Ascher and L. R. Petzold, Computer Methods for ODEs and DAEs, p. 106.

See StepperDIRK for additional details.

Definition at line 2332 of file Tempus_StepperRKButcherTableau.hpp.

Constructor & Destructor Documentation

template<class Scalar >
Tempus::StepperSDIRK_2Stage2ndOrder< Scalar >::StepperSDIRK_2Stage2ndOrder ( )
inline

Default constructor.

Requires subsequent setModel() and initialize() calls before calling takestep().

Definition at line 2339 of file Tempus_StepperRKButcherTableau.hpp.

template<class Scalar >
Tempus::StepperSDIRK_2Stage2ndOrder< Scalar >::StepperSDIRK_2Stage2ndOrder ( const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &  appModel,
const Teuchos::RCP< Thyra::NonlinearSolverBase< Scalar > > &  solver,
bool  useFSAL,
std::string  ICConsistency,
bool  ICConsistencyCheck,
bool  useEmbedded,
bool  zeroInitialGuess,
const Teuchos::RCP< StepperRKAppAction< Scalar > > &  stepperRKAppAction,
Scalar  gamma = Scalar(0.2928932188134524) 
)
inline

Definition at line 2356 of file Tempus_StepperRKButcherTableau.hpp.

Member Function Documentation

template<class Scalar >
void Tempus::StepperSDIRK_2Stage2ndOrder< Scalar >::setGamma ( Scalar  gamma)
inline

Definition at line 2377 of file Tempus_StepperRKButcherTableau.hpp.

template<class Scalar >
Scalar Tempus::StepperSDIRK_2Stage2ndOrder< Scalar >::getGamma ( ) const
inline

Definition at line 2384 of file Tempus_StepperRKButcherTableau.hpp.

template<class Scalar >
std::string Tempus::StepperSDIRK_2Stage2ndOrder< Scalar >::getDescription ( ) const
inlinevirtual
template<class Scalar >
Teuchos::RCP<const Teuchos::ParameterList> Tempus::StepperSDIRK_2Stage2ndOrder< Scalar >::getValidParameters ( ) const
inlinevirtual

Reimplemented from Tempus::StepperDIRK< Scalar >.

Definition at line 2401 of file Tempus_StepperRKButcherTableau.hpp.

template<class Scalar >
void Tempus::StepperSDIRK_2Stage2ndOrder< Scalar >::setupTableau ( )
inlineprotectedvirtual

Member Data Documentation

template<class Scalar >
Scalar Tempus::StepperSDIRK_2Stage2ndOrder< Scalar >::gammaDefault_
private

Definition at line 2448 of file Tempus_StepperRKButcherTableau.hpp.

template<class Scalar >
Scalar Tempus::StepperSDIRK_2Stage2ndOrder< Scalar >::gamma_
private

Definition at line 2449 of file Tempus_StepperRKButcherTableau.hpp.


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