Tempus  Version of the Day
Time Integration
Tempus::StepperBDF2TimeDerivative< Scalar > Class Template Reference

Time-derivative interface for BDF2. More...

#include <Tempus_StepperBDF2_decl.hpp>

Inheritance diagram for Tempus::StepperBDF2TimeDerivative< Scalar >:
Tempus::TimeDerivative< Scalar >

Public Member Functions

 StepperBDF2TimeDerivative (Scalar dt, Scalar dtOld, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xOld, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xOldOld)
 Constructor. More...
 
virtual ~StepperBDF2TimeDerivative ()
 Destructor. More...
 
virtual void compute (Teuchos::RCP< const Thyra::VectorBase< Scalar > > x, Teuchos::RCP< Thyra::VectorBase< Scalar > > xDot, Teuchos::RCP< Thyra::VectorBase< Scalar > > xDotDot=Teuchos::null)
 Compute the time derivative. More...
 
virtual void initialize (Scalar dt, Scalar dtOld, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xOld, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xOldOld)
 

Private Attributes

Teuchos::RCP< const Thyra::VectorBase< Scalar > > xOld_
 
Teuchos::RCP< const Thyra::VectorBase< Scalar > > xOldOld_
 
Scalar dt_
 
Scalar dtOld_
 

Detailed Description

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

Time-derivative interface for BDF2.

Given the state $x$, compute the BDF2 time-derivative,

\[ \dot{x}_{n} = \frac{x_{n-1}-x_{n-2}}{\tau_{n-1}} + \left(\frac{1}{\tau_{n-1}-\tau_n} \right) \left(\frac{x_n-x_{n-1}}{\tau_{n-1} + \tau_n} - \frac{x_{n-1}-x_{n-2}}{\tau_{n-1}}\right) (2\tau_n + \tau_{n-1}) \]

where

\[ \tau_n = t_n - t_{n-1}. \]

$\ddot{x}$ is not used and set to null.

Definition at line 146 of file Tempus_StepperBDF2_decl.hpp.

Constructor & Destructor Documentation

◆ StepperBDF2TimeDerivative()

template<typename Scalar >
Tempus::StepperBDF2TimeDerivative< Scalar >::StepperBDF2TimeDerivative ( Scalar  dt,
Scalar  dtOld,
Teuchos::RCP< const Thyra::VectorBase< Scalar > >  xOld,
Teuchos::RCP< const Thyra::VectorBase< Scalar > >  xOldOld 
)
inline

Constructor.

Definition at line 152 of file Tempus_StepperBDF2_decl.hpp.

◆ ~StepperBDF2TimeDerivative()

template<typename Scalar >
virtual Tempus::StepperBDF2TimeDerivative< Scalar >::~StepperBDF2TimeDerivative ( )
inlinevirtual

Destructor.

Definition at line 158 of file Tempus_StepperBDF2_decl.hpp.

Member Function Documentation

◆ compute()

template<typename Scalar >
virtual void Tempus::StepperBDF2TimeDerivative< Scalar >::compute ( Teuchos::RCP< const Thyra::VectorBase< Scalar > >  x,
Teuchos::RCP< Thyra::VectorBase< Scalar > >  xDot,
Teuchos::RCP< Thyra::VectorBase< Scalar > >  xDotDot = Teuchos::null 
)
inlinevirtual

Compute the time derivative.

Implements Tempus::TimeDerivative< Scalar >.

Definition at line 161 of file Tempus_StepperBDF2_decl.hpp.

◆ initialize()

template<typename Scalar >
virtual void Tempus::StepperBDF2TimeDerivative< Scalar >::initialize ( Scalar  dt,
Scalar  dtOld,
Teuchos::RCP< const Thyra::VectorBase< Scalar > >  xOld,
Teuchos::RCP< const Thyra::VectorBase< Scalar > >  xOldOld 
)
inlinevirtual

Definition at line 180 of file Tempus_StepperBDF2_decl.hpp.

Member Data Documentation

◆ dt_

template<typename Scalar >
Scalar Tempus::StepperBDF2TimeDerivative< Scalar >::dt_
private

Definition at line 189 of file Tempus_StepperBDF2_decl.hpp.

◆ dtOld_

template<typename Scalar >
Scalar Tempus::StepperBDF2TimeDerivative< Scalar >::dtOld_
private

Definition at line 190 of file Tempus_StepperBDF2_decl.hpp.

◆ xOld_

template<typename Scalar >
Teuchos::RCP<const Thyra::VectorBase<Scalar> > Tempus::StepperBDF2TimeDerivative< Scalar >::xOld_
private

Definition at line 187 of file Tempus_StepperBDF2_decl.hpp.

◆ xOldOld_

template<typename Scalar >
Teuchos::RCP<const Thyra::VectorBase<Scalar> > Tempus::StepperBDF2TimeDerivative< Scalar >::xOldOld_
private

Definition at line 188 of file Tempus_StepperBDF2_decl.hpp.


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