Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus::RKButcherTableau< Scalar > Class Template Referenceabstract

Runge-Kutta methods. More...

#include <Tempus_RKButcherTableau.hpp>

Inheritance diagram for Tempus::RKButcherTableau< Scalar >:
Tempus::BackwardEuler_RKBT< Scalar > Tempus::EDIRK2Stage3rdOrder_RKBT< Scalar > Tempus::EDIRK2StageTheta_RKBT< Scalar > Tempus::Explicit2Stage2ndOrderRunge_RKBT< Scalar > Tempus::Explicit3_8Rule_RKBT< Scalar > Tempus::Explicit3Stage3rdOrder_RKBT< Scalar > Tempus::Explicit3Stage3rdOrderHeun_RKBT< Scalar > Tempus::Explicit3Stage3rdOrderTVD_RKBT< Scalar > Tempus::Explicit4Stage3rdOrderRunge_RKBT< Scalar > Tempus::Explicit4Stage4thOrder_RKBT< Scalar > Tempus::Explicit5Stage3rdOrderKandG_RKBT< Scalar > Tempus::ExplicitBogackiShampine32_RKBT< Scalar > Tempus::ExplicitMerson45_RKBT< Scalar > Tempus::ExplicitTrapezoidal_RKBT< Scalar > Tempus::ForwardEuler_RKBT< Scalar > Tempus::General_RKButcherTableau< Scalar > Tempus::Implicit1Stage1stOrderRadauA_RKBT< Scalar > Tempus::Implicit1Stage1stOrderRadauB_RKBT< Scalar > Tempus::Implicit1Stage2ndOrderGauss_RKBT< Scalar > Tempus::Implicit2Stage2ndOrderLobattoA_RKBT< Scalar > Tempus::Implicit2Stage2ndOrderLobattoB_RKBT< Scalar > Tempus::Implicit2Stage2ndOrderLobattoC_RKBT< Scalar > Tempus::Implicit2Stage3rdOrderRadauA_RKBT< Scalar > Tempus::Implicit2Stage3rdOrderRadauB_RKBT< Scalar > Tempus::Implicit2Stage4thOrderGauss_RKBT< Scalar > Tempus::Implicit2Stage4thOrderHammerHollingsworth_RKBT< Scalar > Tempus::Implicit3Stage4thOrderLobattoA_RKBT< Scalar > Tempus::Implicit3Stage4thOrderLobattoB_RKBT< Scalar > Tempus::Implicit3Stage4thOrderLobattoC_RKBT< Scalar > Tempus::Implicit3Stage5thOrderRadauA_RKBT< Scalar > Tempus::Implicit3Stage5thOrderRadauB_RKBT< Scalar > Tempus::Implicit3Stage6thOrderGauss_RKBT< Scalar > Tempus::Implicit3Stage6thOrderKuntzmannButcher_RKBT< Scalar > Tempus::Implicit4Stage6thOrderLobattoA_RKBT< Scalar > Tempus::Implicit4Stage6thOrderLobattoB_RKBT< Scalar > Tempus::Implicit4Stage6thOrderLobattoC_RKBT< Scalar > Tempus::Implicit4Stage8thOrderKuntzmannButcher_RKBT< Scalar > Tempus::IRK1StageTheta_RKBT< Scalar > Tempus::SDIRK1Stage1stOrder_RKBT< Scalar > Tempus::SDIRK21_RKBT< Scalar > Tempus::SDIRK2Stage2ndOrder_RKBT< Scalar > Tempus::SDIRK2Stage3rdOrder_RKBT< Scalar > Tempus::SDIRK3Stage4thOrder_RKBT< Scalar > Tempus::SDIRK5Stage4thOrder_RKBT< Scalar > Tempus::SDIRK5Stage5thOrder_RKBT< Scalar >

Public Member Functions

virtual std::size_t numStages () const
 Return the number of stages. More...
 
virtual const
Teuchos::SerialDenseMatrix
< int, Scalar > & 
A () const
 Return the matrix coefficients. More...
 
virtual const
Teuchos::SerialDenseVector
< int, Scalar > & 
b () const
 Return the vector of quadrature weights. More...
 
virtual const
Teuchos::SerialDenseVector
< int, Scalar > & 
bstar () const
 Return the vector of quadrature weights for embedded methods. More...
 
virtual const
Teuchos::SerialDenseVector
< int, Scalar > & 
c () const
 Return the vector of stage positions. More...
 
virtual int order () const
 Return the order. More...
 
virtual int orderMin () const
 Return the minimum order. More...
 
virtual int orderMax () const
 Return the maximum order. More...
 
virtual bool isImplicit () const
 Return true if the RK method is implicit. More...
 
virtual bool isDIRK () const
 Return true if the RK method is Diagonally Implicit. More...
 
virtual bool isEmbedded () const
 Return true if the RK method has embedded capabilities. More...
 
virtual void initialize (const Teuchos::SerialDenseMatrix< int, Scalar > &A, const Teuchos::SerialDenseVector< int, Scalar > &b, const Teuchos::SerialDenseVector< int, Scalar > &c, const int order, const std::string &longDescription, bool isEmbedded=false, const Teuchos::SerialDenseVector< int, Scalar > &bstar=Teuchos::SerialDenseVector< int, Scalar >())
 
virtual void initialize (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 std::string &longDescription, bool isEmbedded=false, const Teuchos::SerialDenseVector< int, Scalar > &bstar=Teuchos::SerialDenseVector< int, Scalar >())
 
virtual void setParameterList (Teuchos::RCP< Teuchos::ParameterList > const &pList)
 
virtual Teuchos::RCP< const
Teuchos::ParameterList > 
getValidParameters () const
 
virtual std::string description () const =0
 
virtual void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
 

Protected Member Functions

virtual void setDescription (std::string longD)
 
const std::string & getDescription () const
 
void set_A (const Teuchos::SerialDenseMatrix< int, Scalar > &A)
 
void set_b (const Teuchos::SerialDenseVector< int, Scalar > &b)
 
void set_c (const Teuchos::SerialDenseVector< int, Scalar > &c)
 
void set_order (const int &order)
 
void set_orderMin (const int &order)
 
void set_orderMax (const int &order)
 
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. More...
 

Protected Attributes

Teuchos::RCP
< Teuchos::ParameterList > 
rkbtPL_
 

Private Attributes

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_
 
std::string longDescription_
 
bool isEmbedded_ = false
 
Teuchos::SerialDenseVector
< int, Scalar > 
bstar_
 

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 specied 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 53 of file Tempus_RKButcherTableau.hpp.

Member Function Documentation

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

Return the matrix coefficients.

Definition at line 62 of file Tempus_RKButcherTableau.hpp.

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

Return the vector of quadrature weights.

Definition at line 65 of file Tempus_RKButcherTableau.hpp.

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 68 of file Tempus_RKButcherTableau.hpp.

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

Return the vector of stage positions.

Definition at line 71 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 172 of file Tempus_RKButcherTableau.hpp.

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

Implemented in Tempus::SDIRK21_RKBT< Scalar >, Tempus::SDIRK3Stage4thOrder_RKBT< Scalar >, Tempus::SDIRK5Stage4thOrder_RKBT< Scalar >, Tempus::SDIRK5Stage5thOrder_RKBT< Scalar >, Tempus::Implicit4Stage6thOrderLobattoC_RKBT< Scalar >, Tempus::Implicit3Stage4thOrderLobattoC_RKBT< Scalar >, Tempus::Implicit2Stage2ndOrderLobattoC_RKBT< Scalar >, Tempus::Implicit4Stage6thOrderLobattoB_RKBT< Scalar >, Tempus::Implicit3Stage4thOrderLobattoB_RKBT< Scalar >, Tempus::Implicit2Stage2ndOrderLobattoB_RKBT< Scalar >, Tempus::Implicit4Stage6thOrderLobattoA_RKBT< Scalar >, Tempus::Implicit3Stage4thOrderLobattoA_RKBT< Scalar >, Tempus::Implicit2Stage2ndOrderLobattoA_RKBT< Scalar >, Tempus::Implicit3Stage5thOrderRadauB_RKBT< Scalar >, Tempus::Implicit2Stage3rdOrderRadauB_RKBT< Scalar >, Tempus::Implicit1Stage1stOrderRadauB_RKBT< Scalar >, Tempus::Implicit3Stage5thOrderRadauA_RKBT< Scalar >, Tempus::Implicit2Stage3rdOrderRadauA_RKBT< Scalar >, Tempus::Implicit1Stage1stOrderRadauA_RKBT< Scalar >, Tempus::Implicit3Stage6thOrderGauss_RKBT< Scalar >, Tempus::Implicit2Stage4thOrderGauss_RKBT< Scalar >, Tempus::Implicit1Stage2ndOrderGauss_RKBT< Scalar >, Tempus::EDIRK2StageTheta_RKBT< Scalar >, Tempus::IRK1StageTheta_RKBT< Scalar >, Tempus::Implicit2Stage4thOrderHammerHollingsworth_RKBT< Scalar >, Tempus::Implicit4Stage8thOrderKuntzmannButcher_RKBT< Scalar >, Tempus::Implicit3Stage6thOrderKuntzmannButcher_RKBT< Scalar >, Tempus::EDIRK2Stage3rdOrder_RKBT< Scalar >, Tempus::SDIRK2Stage3rdOrder_RKBT< Scalar >, Tempus::SDIRK2Stage2ndOrder_RKBT< Scalar >, Tempus::SDIRK1Stage1stOrder_RKBT< Scalar >, Tempus::GeneralDIRK_RKBT< Scalar >, Tempus::ExplicitTrapezoidal_RKBT< Scalar >, Tempus::Explicit2Stage2ndOrderRunge_RKBT< Scalar >, Tempus::Explicit3Stage3rdOrderHeun_RKBT< Scalar >, Tempus::Explicit3Stage3rdOrderTVD_RKBT< Scalar >, Tempus::Explicit3Stage3rdOrder_RKBT< Scalar >, Tempus::Explicit5Stage3rdOrderKandG_RKBT< Scalar >, Tempus::Explicit4Stage3rdOrderRunge_RKBT< Scalar >, Tempus::Explicit3_8Rule_RKBT< Scalar >, Tempus::ExplicitMerson45_RKBT< Scalar >, Tempus::ExplicitBogackiShampine32_RKBT< Scalar >, Tempus::Explicit4Stage4thOrder_RKBT< Scalar >, Tempus::ForwardEuler_RKBT< Scalar >, Tempus::BackwardEuler_RKBT< Scalar >, and Tempus::GeneralExplicit_RKBT< Scalar >.

template<class Scalar >
const std::string& Tempus::RKButcherTableau< Scalar >::getDescription ( ) const
inlineprotected

Definition at line 195 of file Tempus_RKButcherTableau.hpp.

template<class Scalar >
virtual void Tempus::RKButcherTableau< Scalar >::initialize ( const Teuchos::SerialDenseMatrix< int, Scalar > &  A,
const Teuchos::SerialDenseVector< int, Scalar > &  b,
const Teuchos::SerialDenseVector< int, Scalar > &  c,
const int  order,
const std::string &  longDescription,
bool  isEmbedded = false,
const Teuchos::SerialDenseVector< int, Scalar > &  bstar = Teuchos::SerialDenseVector<int,Scalar>() 
)
inlinevirtual

Definition at line 86 of file Tempus_RKButcherTableau.hpp.

template<class Scalar >
virtual void Tempus::RKButcherTableau< Scalar >::initialize ( 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 std::string &  longDescription,
bool  isEmbedded = false,
const Teuchos::SerialDenseVector< int, Scalar > &  bstar = Teuchos::SerialDenseVector<int,Scalar>() 
)
inlinevirtual

Definition at line 100 of file Tempus_RKButcherTableau.hpp.

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

Return true if the RK method is Diagonally Implicit.

Definition at line 82 of file Tempus_RKButcherTableau.hpp.

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

Return true if the RK method has embedded capabilities.

Definition at line 84 of file Tempus_RKButcherTableau.hpp.

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

Return true if the RK method is implicit.

Definition at line 80 of file Tempus_RKButcherTableau.hpp.

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

Return the number of stages.

Definition at line 60 of file Tempus_RKButcherTableau.hpp.

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

Return the order.

Definition at line 74 of file Tempus_RKButcherTableau.hpp.

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

Return the maximum order.

Definition at line 78 of file Tempus_RKButcherTableau.hpp.

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

Return the minimum order.

Definition at line 76 of file Tempus_RKButcherTableau.hpp.

template<class Scalar >
void Tempus::RKButcherTableau< Scalar >::set_A ( const Teuchos::SerialDenseMatrix< int, Scalar > &  A)
inlineprotected

Definition at line 197 of file Tempus_RKButcherTableau.hpp.

template<class Scalar >
void Tempus::RKButcherTableau< Scalar >::set_b ( const Teuchos::SerialDenseVector< int, Scalar > &  b)
inlineprotected

Definition at line 198 of file Tempus_RKButcherTableau.hpp.

template<class Scalar >
void Tempus::RKButcherTableau< Scalar >::set_c ( const Teuchos::SerialDenseVector< int, Scalar > &  c)
inlineprotected

Definition at line 199 of file Tempus_RKButcherTableau.hpp.

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 210 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 203 of file Tempus_RKButcherTableau.hpp.

template<class Scalar >
void Tempus::RKButcherTableau< Scalar >::set_order ( const int &  order)
inlineprotected

Definition at line 200 of file Tempus_RKButcherTableau.hpp.

template<class Scalar >
void Tempus::RKButcherTableau< Scalar >::set_orderMax ( const int &  order)
inlineprotected

Definition at line 202 of file Tempus_RKButcherTableau.hpp.

template<class Scalar >
void Tempus::RKButcherTableau< Scalar >::set_orderMin ( const int &  order)
inlineprotected

Definition at line 201 of file Tempus_RKButcherTableau.hpp.

template<class Scalar >
virtual void Tempus::RKButcherTableau< Scalar >::setDescription ( std::string  longD)
inlineprotectedvirtual

Definition at line 194 of file Tempus_RKButcherTableau.hpp.

Member Data Documentation

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

Definition at line 222 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 223 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 233 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 224 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 229 of file Tempus_RKButcherTableau.hpp.

template<class Scalar >
bool Tempus::RKButcherTableau< Scalar >::isEmbedded_ = false
private

Definition at line 232 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 228 of file Tempus_RKButcherTableau.hpp.

template<class Scalar >
std::string Tempus::RKButcherTableau< Scalar >::longDescription_
private

Definition at line 230 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 225 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 227 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 226 of file Tempus_RKButcherTableau.hpp.

template<class Scalar >
Teuchos::RCP<Teuchos::ParameterList> Tempus::RKButcherTableau< Scalar >::rkbtPL_
protected

Definition at line 236 of file Tempus_RKButcherTableau.hpp.


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