Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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_n$, compute the BDF2 time-derivative,

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

where

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

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

Definition at line 160 of file Tempus_StepperBDF2_decl.hpp.

Constructor & Destructor Documentation

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 166 of file Tempus_StepperBDF2_decl.hpp.

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

Destructor.

Definition at line 172 of file Tempus_StepperBDF2_decl.hpp.

Member Function Documentation

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 175 of file Tempus_StepperBDF2_decl.hpp.

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 189 of file Tempus_StepperBDF2_decl.hpp.

Member Data Documentation

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

Definition at line 198 of file Tempus_StepperBDF2_decl.hpp.

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

Definition at line 199 of file Tempus_StepperBDF2_decl.hpp.

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

Definition at line 196 of file Tempus_StepperBDF2_decl.hpp.

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

Definition at line 197 of file Tempus_StepperBDF2_decl.hpp.


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