Tempus Version of the Day
Time Integration
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
Tempus::RKButcherTableau< Scalar > Class Template Reference

Runge-Kutta methods. More...

#include <Tempus_RKButcherTableau.hpp>

Inheritance diagram for Tempus::RKButcherTableau< Scalar >:

Public Member Functions

 RKButcherTableau (std::string stepperType, const Teuchos::SerialDenseMatrix< int, Scalar > &A, const Teuchos::SerialDenseVector< int, Scalar > &b, const Teuchos::SerialDenseVector< int, Scalar > &c, const int order, const int orderMin, const int orderMax, const Teuchos::SerialDenseVector< int, Scalar > &bstar=Teuchos::SerialDenseVector< int, Scalar >(), bool checkC=true)
 
virtual std::size_t numStages () const
 Return the number of stages.
 
virtual const Teuchos::SerialDenseMatrix< int, Scalar > & A () const
 Return the matrix coefficients.
 
virtual const Teuchos::SerialDenseVector< int, Scalar > & b () const
 Return the vector of quadrature weights.
 
virtual const Teuchos::SerialDenseVector< int, Scalar > & bstar () const
 Return the vector of quadrature weights for embedded methods.
 
virtual const Teuchos::SerialDenseVector< int, Scalar > & c () const
 Return the vector of stage positions.
 
virtual int order () const
 Return the order.
 
virtual int orderMin () const
 Return the minimum order.
 
virtual int orderMax () const
 Return the maximum order.
 
virtual bool isImplicit () const
 Return true if the RK method is implicit.
 
virtual bool isDIRK () const
 Return true if the RK method is Diagonally Implicit.
 
virtual bool isEmbedded () const
 Return true if the RK method has embedded capabilities.
 
virtual bool isTVD () const
 Return true if the RK method is TVD.
 
virtual Scalar getTVDCoeff () const
 Return TVD coefficient of RK method.
 
virtual void setTVDCoeff (const Scalar a)
 set TVD coefficient of RK method
 
virtual void setTVD (bool a)
 
virtual void setEmbedded (bool a)
 
virtual std::string description () const
 
virtual void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
 
bool operator== (const RKButcherTableau &t) const
 
bool operator!= (const RKButcherTableau &t) const
 

Protected Member Functions

void set_isImplicit ()
 
void set_isDIRK ()
 DIRK is defined as if a_ij = 0 for j>i and a_ii != 0 for at least one i.
 

Protected Attributes

std::string description_
 
Teuchos::SerialDenseMatrix< int, Scalar > A_
 
Teuchos::SerialDenseVector< int, Scalar > b_
 
Teuchos::SerialDenseVector< int, Scalar > c_
 
int order_
 
int orderMin_
 
int orderMax_
 
bool isImplicit_
 
bool isDIRK_
 
bool isEmbedded_
 
bool isTVD_ = false
 
Teuchos::SerialDenseVector< int, Scalar > bstar_
 
Scalar tvdCoeff_ = 0
 

Private Member Functions

 RKButcherTableau ()
 

Detailed Description

template<class Scalar>
class Tempus::RKButcherTableau< Scalar >

Runge-Kutta methods.

This base class specifies the Butcher tableau which defines the Runge-Kutta (RK) method. Both explicit and implicit RK methods can be specified here, and of arbitrary number of stages and orders. Embedded methods are also supported.

Since this is a generic RK class, no low-storage methods are incorporated here, however any RK method with a Butcher tableau can be created with the base class.

There are over 40 derived RK methods that have been implemented, ranging from first order and eight order, and from single stage to 5 stages.

This class was taken and modified from Rythmos' RKButcherTableau class.

Definition at line 45 of file Tempus_RKButcherTableau.hpp.

Constructor & Destructor Documentation

◆ RKButcherTableau() [1/2]

template<class Scalar >
Tempus::RKButcherTableau< Scalar >::RKButcherTableau ( std::string  stepperType,
const Teuchos::SerialDenseMatrix< int, Scalar > &  A,
const Teuchos::SerialDenseVector< int, Scalar > &  b,
const Teuchos::SerialDenseVector< int, Scalar > &  c,
const int  order,
const int  orderMin,
const int  orderMax,
const Teuchos::SerialDenseVector< int, Scalar > &  bstar = Teuchos::SerialDenseVector<int,Scalar>(),
bool  checkC = true 
)
inline

Definition at line 51 of file Tempus_RKButcherTableau.hpp.

◆ RKButcherTableau() [2/2]

template<class Scalar >
Tempus::RKButcherTableau< Scalar >::RKButcherTableau ( )
private

Member Function Documentation

◆ numStages()

template<class Scalar >
virtual std::size_t Tempus::RKButcherTableau< Scalar >::numStages ( ) const
inlinevirtual

Return the number of stages.

Definition at line 119 of file Tempus_RKButcherTableau.hpp.

◆ A()

template<class Scalar >
virtual const Teuchos::SerialDenseMatrix< int, Scalar > & Tempus::RKButcherTableau< Scalar >::A ( ) const
inlinevirtual

Return the matrix coefficients.

Definition at line 121 of file Tempus_RKButcherTableau.hpp.

◆ b()

template<class Scalar >
virtual const Teuchos::SerialDenseVector< int, Scalar > & Tempus::RKButcherTableau< Scalar >::b ( ) const
inlinevirtual

Return the vector of quadrature weights.

Definition at line 124 of file Tempus_RKButcherTableau.hpp.

◆ bstar()

template<class Scalar >
virtual const Teuchos::SerialDenseVector< int, Scalar > & Tempus::RKButcherTableau< Scalar >::bstar ( ) const
inlinevirtual

Return the vector of quadrature weights for embedded methods.

Definition at line 127 of file Tempus_RKButcherTableau.hpp.

◆ c()

template<class Scalar >
virtual const Teuchos::SerialDenseVector< int, Scalar > & Tempus::RKButcherTableau< Scalar >::c ( ) const
inlinevirtual

Return the vector of stage positions.

Definition at line 130 of file Tempus_RKButcherTableau.hpp.

◆ order()

template<class Scalar >
virtual int Tempus::RKButcherTableau< Scalar >::order ( ) const
inlinevirtual

Return the order.

Definition at line 133 of file Tempus_RKButcherTableau.hpp.

◆ orderMin()

template<class Scalar >
virtual int Tempus::RKButcherTableau< Scalar >::orderMin ( ) const
inlinevirtual

Return the minimum order.

Definition at line 135 of file Tempus_RKButcherTableau.hpp.

◆ orderMax()

template<class Scalar >
virtual int Tempus::RKButcherTableau< Scalar >::orderMax ( ) const
inlinevirtual

Return the maximum order.

Definition at line 137 of file Tempus_RKButcherTableau.hpp.

◆ isImplicit()

template<class Scalar >
virtual bool Tempus::RKButcherTableau< Scalar >::isImplicit ( ) const
inlinevirtual

Return true if the RK method is implicit.

Definition at line 139 of file Tempus_RKButcherTableau.hpp.

◆ isDIRK()

template<class Scalar >
virtual bool Tempus::RKButcherTableau< Scalar >::isDIRK ( ) const
inlinevirtual

Return true if the RK method is Diagonally Implicit.

Definition at line 141 of file Tempus_RKButcherTableau.hpp.

◆ isEmbedded()

template<class Scalar >
virtual bool Tempus::RKButcherTableau< Scalar >::isEmbedded ( ) const
inlinevirtual

Return true if the RK method has embedded capabilities.

Definition at line 143 of file Tempus_RKButcherTableau.hpp.

◆ isTVD()

template<class Scalar >
virtual bool Tempus::RKButcherTableau< Scalar >::isTVD ( ) const
inlinevirtual

Return true if the RK method is TVD.

Definition at line 145 of file Tempus_RKButcherTableau.hpp.

◆ getTVDCoeff()

template<class Scalar >
virtual Scalar Tempus::RKButcherTableau< Scalar >::getTVDCoeff ( ) const
inlinevirtual

Return TVD coefficient of RK method.

Definition at line 147 of file Tempus_RKButcherTableau.hpp.

◆ setTVDCoeff()

template<class Scalar >
virtual void Tempus::RKButcherTableau< Scalar >::setTVDCoeff ( const Scalar  a)
inlinevirtual

set TVD coefficient of RK method

Definition at line 149 of file Tempus_RKButcherTableau.hpp.

◆ setTVD()

template<class Scalar >
virtual void Tempus::RKButcherTableau< Scalar >::setTVD ( bool  a)
inlinevirtual

Definition at line 150 of file Tempus_RKButcherTableau.hpp.

◆ setEmbedded()

template<class Scalar >
virtual void Tempus::RKButcherTableau< Scalar >::setEmbedded ( bool  a)
inlinevirtual

Definition at line 151 of file Tempus_RKButcherTableau.hpp.

◆ description()

template<class Scalar >
virtual std::string Tempus::RKButcherTableau< Scalar >::description ( ) const
inlinevirtual

Definition at line 156 of file Tempus_RKButcherTableau.hpp.

◆ describe()

template<class Scalar >
virtual void Tempus::RKButcherTableau< Scalar >::describe ( Teuchos::FancyOStream &  out,
const Teuchos::EVerbosityLevel  verbLevel 
) const
inlinevirtual

Definition at line 158 of file Tempus_RKButcherTableau.hpp.

◆ operator==()

template<class Scalar >
bool Tempus::RKButcherTableau< Scalar >::operator== ( const RKButcherTableau< Scalar > &  t) const
inline

Definition at line 182 of file Tempus_RKButcherTableau.hpp.

◆ operator!=()

template<class Scalar >
bool Tempus::RKButcherTableau< Scalar >::operator!= ( const RKButcherTableau< Scalar > &  t) const
inline

Definition at line 211 of file Tempus_RKButcherTableau.hpp.

◆ set_isImplicit()

template<class Scalar >
void Tempus::RKButcherTableau< Scalar >::set_isImplicit ( )
inlineprotected

Definition at line 221 of file Tempus_RKButcherTableau.hpp.

◆ set_isDIRK()

template<class Scalar >
void Tempus::RKButcherTableau< Scalar >::set_isDIRK ( )
inlineprotected

DIRK is defined as if a_ij = 0 for j>i and a_ii != 0 for at least one i.

Definition at line 229 of file Tempus_RKButcherTableau.hpp.

Member Data Documentation

◆ description_

template<class Scalar >
std::string Tempus::RKButcherTableau< Scalar >::description_
protected

Definition at line 240 of file Tempus_RKButcherTableau.hpp.

◆ A_

template<class Scalar >
Teuchos::SerialDenseMatrix<int,Scalar> Tempus::RKButcherTableau< Scalar >::A_
protected

Definition at line 242 of file Tempus_RKButcherTableau.hpp.

◆ b_

template<class Scalar >
Teuchos::SerialDenseVector<int,Scalar> Tempus::RKButcherTableau< Scalar >::b_
protected

Definition at line 243 of file Tempus_RKButcherTableau.hpp.

◆ c_

template<class Scalar >
Teuchos::SerialDenseVector<int,Scalar> Tempus::RKButcherTableau< Scalar >::c_
protected

Definition at line 244 of file Tempus_RKButcherTableau.hpp.

◆ order_

template<class Scalar >
int Tempus::RKButcherTableau< Scalar >::order_
protected

Definition at line 245 of file Tempus_RKButcherTableau.hpp.

◆ orderMin_

template<class Scalar >
int Tempus::RKButcherTableau< Scalar >::orderMin_
protected

Definition at line 246 of file Tempus_RKButcherTableau.hpp.

◆ orderMax_

template<class Scalar >
int Tempus::RKButcherTableau< Scalar >::orderMax_
protected

Definition at line 247 of file Tempus_RKButcherTableau.hpp.

◆ isImplicit_

template<class Scalar >
bool Tempus::RKButcherTableau< Scalar >::isImplicit_
protected

Definition at line 248 of file Tempus_RKButcherTableau.hpp.

◆ isDIRK_

template<class Scalar >
bool Tempus::RKButcherTableau< Scalar >::isDIRK_
protected

Definition at line 249 of file Tempus_RKButcherTableau.hpp.

◆ isEmbedded_

template<class Scalar >
bool Tempus::RKButcherTableau< Scalar >::isEmbedded_
protected

Definition at line 250 of file Tempus_RKButcherTableau.hpp.

◆ isTVD_

template<class Scalar >
bool Tempus::RKButcherTableau< Scalar >::isTVD_ = false
protected

Definition at line 251 of file Tempus_RKButcherTableau.hpp.

◆ bstar_

template<class Scalar >
Teuchos::SerialDenseVector<int,Scalar> Tempus::RKButcherTableau< Scalar >::bstar_
protected

Definition at line 252 of file Tempus_RKButcherTableau.hpp.

◆ tvdCoeff_

template<class Scalar >
Scalar Tempus::RKButcherTableau< Scalar >::tvdCoeff_ = 0
protected

Definition at line 253 of file Tempus_RKButcherTableau.hpp.


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