Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 >:
Teuchos::Describable Teuchos::VerboseObject< RKButcherTableau< Scalar > > Teuchos::LabeledObject Teuchos::VerboseObjectBase

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. 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 bool isTVD () const
 Return true if the RK method is TVD. More...
 
virtual Scalar getTVDCoeff () const
 Return TVD coefficient of RK method. More...
 
virtual void setTVDCoeff (const Scalar a)
 set TVD coefficient of RK method More...
 
virtual void setTVD (bool a)
 
virtual void setEmbedded (bool a)
 
bool operator== (const RKButcherTableau &t) const
 
bool operator!= (const RKButcherTableau &t) const
 
- Public Member Functions inherited from Teuchos::Describable
void describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 
virtual ~Describable ()
 
 LabeledObject ()
 
virtual ~LabeledObject ()
 
virtual void setObjectLabel (const std::string &objectLabel)
 
virtual std::string getObjectLabel () const
 
DescribableStreamManipulatorState describe (const Describable &describable, const EVerbosityLevel verbLevel=Describable::verbLevel_default)
 
std::ostream & operator<< (std::ostream &os, const DescribableStreamManipulatorState &d)
 
- Public Member Functions inherited from Teuchos::VerboseObject< RKButcherTableau< Scalar > >
 VerboseObject (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null)
 
virtual const VerboseObjectsetVerbLevel (const EVerbosityLevel verbLevel) const
 
virtual const VerboseObjectsetOverridingVerbLevel (const EVerbosityLevel verbLevel) const
 
virtual EVerbosityLevel getVerbLevel () const
 
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
RCP< const ParameterList
getValidVerboseObjectSublist ()
 
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
void 
setupVerboseObjectSublist (ParameterList *paramList)
 
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
void 
readVerboseObjectSublist (ParameterList *paramList, RCP< FancyOStream > *oStream, EVerbosityLevel *verbLevel)
 
void readVerboseObjectSublist (ParameterList *paramList, VerboseObject< ObjectType > *verboseObject)
 
- Public Member Functions inherited from Teuchos::VerboseObjectBase
virtual ~VerboseObjectBase ()
 
 VerboseObjectBase (const RCP< FancyOStream > &oStream=Teuchos::null)
 
virtual const VerboseObjectBasesetOStream (const RCP< FancyOStream > &oStream) const
 
virtual const VerboseObjectBasesetOverridingOStream (const RCP< FancyOStream > &oStream) const
 
virtual VerboseObjectBasesetLinePrefix (const std::string &linePrefix)
 
virtual RCP< FancyOStreamgetOStream () const
 
virtual RCP< FancyOStreamgetOverridingOStream () const
 
virtual std::string getLinePrefix () const
 
virtual OSTab getOSTab (const int tabs=1, const std::string &linePrefix="") 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. More...
 
- Protected Member Functions inherited from Teuchos::VerboseObject< RKButcherTableau< Scalar > >
void initializeVerboseObject (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null)
 
- Protected Member Functions inherited from Teuchos::VerboseObjectBase
void initializeVerboseObjectBase (const RCP< FancyOStream > &oStream=Teuchos::null)
 
virtual void informUpdatedVerbosityState () const
 

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 ()
 
virtual std::string description () const
 
virtual void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const
 

Additional Inherited Members

- Static Public Member Functions inherited from Teuchos::VerboseObject< RKButcherTableau< Scalar > >
static void setDefaultVerbLevel (const EVerbosityLevel defaultVerbLevel)
 
static EVerbosityLevel getDefaultVerbLevel ()
 
- Static Public Member Functions inherited from Teuchos::VerboseObjectBase
static void setDefaultOStream (const RCP< FancyOStream > &defaultOStream)
 
static RCP< FancyOStreamgetDefaultOStream ()
 
- Static Public Attributes inherited from Teuchos::Describable
static const EVerbosityLevel verbLevel_default
 

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

Constructor & Destructor Documentation

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

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

Member Function Documentation

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

Return the number of stages.

Definition at line 115 of file Tempus_RKButcherTableau.hpp.

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

Return the matrix coefficients.

Definition at line 117 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 122 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 127 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 132 of file Tempus_RKButcherTableau.hpp.

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

Return the order.

Definition at line 137 of file Tempus_RKButcherTableau.hpp.

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

Return the minimum order.

Definition at line 139 of file Tempus_RKButcherTableau.hpp.

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

Return the maximum order.

Definition at line 141 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 143 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 145 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 147 of file Tempus_RKButcherTableau.hpp.

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

Return true if the RK method is TVD.

Definition at line 149 of file Tempus_RKButcherTableau.hpp.

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

Return TVD coefficient of RK method.

Definition at line 151 of file Tempus_RKButcherTableau.hpp.

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

set TVD coefficient of RK method

Definition at line 153 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 154 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 155 of file Tempus_RKButcherTableau.hpp.

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

Reimplemented from Teuchos::Describable.

Definition at line 159 of file Tempus_RKButcherTableau.hpp.

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

Reimplemented from Teuchos::Describable.

Definition at line 161 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 185 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 217 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 223 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 232 of file Tempus_RKButcherTableau.hpp.

Member Data Documentation

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

Definition at line 244 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 246 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 247 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 248 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 249 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 250 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 251 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 252 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 253 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 254 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 255 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 256 of file Tempus_RKButcherTableau.hpp.

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

Definition at line 257 of file Tempus_RKButcherTableau.hpp.


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