Tempus Version of the Day
Time Integration
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
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.
 
virtual ~StepperBDF2TimeDerivative ()
 Destructor.
 
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.
 
virtual void initialize (Scalar dt, Scalar dtOld, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xOld, Teuchos::RCP< const Thyra::VectorBase< Scalar > > xOldOld)
 
virtual void compute (Teuchos::RCP< const Thyra::VectorBase< Scalar > > x, Teuchos::RCP< Thyra::VectorBase< Scalar > > xDot, Teuchos::RCP< Thyra::VectorBase< Scalar > > xDotDot=Teuchos::null)=0
 Set the underlying application ModelEvaluator.
 

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

◆ ~StepperBDF2TimeDerivative()

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

Destructor.

Definition at line 218 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 221 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 235 of file Tempus_StepperBDF2_decl.hpp.

Member Data Documentation

◆ xOld_

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

Definition at line 242 of file Tempus_StepperBDF2_decl.hpp.

◆ xOldOld_

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

Definition at line 243 of file Tempus_StepperBDF2_decl.hpp.

◆ dt_

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

Definition at line 244 of file Tempus_StepperBDF2_decl.hpp.

◆ dtOld_

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

Definition at line 245 of file Tempus_StepperBDF2_decl.hpp.


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