List of all members | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends
utl::RK5Iterator< DerivativeFunctor, VectorType > Class Template Reference

#include "utl/RK5ODEIntegrator.h"

Public Member Functions

bool Advance (const double dx, const VectorType &dYdX)
 
bool Advance (const double dx)
 
void ClearStatus ()
 
DerivativeFunctor & GetDerivativeFunctor ()
 
double GetX () const
 
VectorType & GetY ()
 
const VectorType & GetY () const
 
const VectorType & GetYError () const
 
 operator bool () const
 
RK5Iteratoroperator+= (const double dx)
 
RK5Iteratoroperator-= (const double dx)
 
 RK5Iterator (const double x, const VectorType &y, DerivativeFunctor &d)
 

Private Member Functions

bool Step (const double dx, VectorType &yNew, const VectorType &dYdX)
 

Static Private Member Functions

static void Clear (const unsigned int n, VectorType &b)
 
static void Copy (const unsigned int n, const VectorType &a, VectorType &b)
 

Private Attributes

DerivativeFunctor & fDerivativeFunctor
 
bool fStatus
 
double fX
 
VectorType fY
 
VectorType fYError
 

Static Private Attributes

static const double fA [6]
 
static const double fB [5][5]
 
static const double fC [5]
 
static const double fD [5]
 

Friends

template<class A , class B , class C >
class AdaptiveRK5Iterator
 

Detailed Description

template<class DerivativeFunctor, class VectorType>
class utl::RK5Iterator< DerivativeFunctor, VectorType >

This iterator class will advance the solution for the current point. See class RK5ODEIntegrator for details.

Author
Darko Veberic
Date
20 Jun 2008

Definition at line 36 of file RK5ODEIntegrator.h.

Constructor & Destructor Documentation

template<class DerivativeFunctor, class VectorType>
utl::RK5Iterator< DerivativeFunctor, VectorType >::RK5Iterator ( const double  x,
const VectorType &  y,
DerivativeFunctor &  d 
)
inline

Member Function Documentation

template<class DerivativeFunctor, class VectorType>
bool utl::RK5Iterator< DerivativeFunctor, VectorType >::Advance ( const double  dx,
const VectorType &  dYdX 
)
inline
template<class DerivativeFunctor, class VectorType>
bool utl::RK5Iterator< DerivativeFunctor, VectorType >::Advance ( const double  dx)
inline
template<class DerivativeFunctor, class VectorType>
static void utl::RK5Iterator< DerivativeFunctor, VectorType >::Clear ( const unsigned int  n,
VectorType &  b 
)
inlinestaticprivate
template<class DerivativeFunctor, class VectorType>
void utl::RK5Iterator< DerivativeFunctor, VectorType >::ClearStatus ( )
inline
template<class DerivativeFunctor, class VectorType>
static void utl::RK5Iterator< DerivativeFunctor, VectorType >::Copy ( const unsigned int  n,
const VectorType &  a,
VectorType &  b 
)
inlinestaticprivate
template<class DerivativeFunctor, class VectorType>
DerivativeFunctor& utl::RK5Iterator< DerivativeFunctor, VectorType >::GetDerivativeFunctor ( )
inline
template<class DerivativeFunctor, class VectorType>
double utl::RK5Iterator< DerivativeFunctor, VectorType >::GetX ( ) const
inline
template<class DerivativeFunctor, class VectorType>
VectorType& utl::RK5Iterator< DerivativeFunctor, VectorType >::GetY ( )
inline
template<class DerivativeFunctor, class VectorType>
const VectorType& utl::RK5Iterator< DerivativeFunctor, VectorType >::GetY ( ) const
inline
template<class DerivativeFunctor, class VectorType>
const VectorType& utl::RK5Iterator< DerivativeFunctor, VectorType >::GetYError ( ) const
inline
template<class DerivativeFunctor, class VectorType>
utl::RK5Iterator< DerivativeFunctor, VectorType >::operator bool ( ) const
inlineexplicit
template<class DerivativeFunctor, class VectorType>
RK5Iterator& utl::RK5Iterator< DerivativeFunctor, VectorType >::operator+= ( const double  dx)
inline
template<class DerivativeFunctor, class VectorType>
RK5Iterator& utl::RK5Iterator< DerivativeFunctor, VectorType >::operator-= ( const double  dx)
inline
template<class DerivativeFunctor, class VectorType>
bool utl::RK5Iterator< DerivativeFunctor, VectorType >::Step ( const double  dx,
VectorType &  yNew,
const VectorType &  dYdX 
)
inlineprivate

Friends And Related Function Documentation

template<class DerivativeFunctor, class VectorType>
template<class A , class B , class C >
friend class AdaptiveRK5Iterator
friend

Definition at line 144 of file RK5ODEIntegrator.h.

Member Data Documentation

template<class DerivativeFunctor, class VectorType>
const double utl::RK5Iterator< DerivativeFunctor, VectorType >::fA
staticprivate
Initial value:
= {
0.2, 0.3, 0.6, 1, 0.875
}

Definition at line 138 of file RK5ODEIntegrator.h.

Referenced by utl::RK5Iterator< DerivativeFunctor, VectorType >::Step().

template<class DerivativeFunctor, class VectorType>
const double utl::RK5Iterator< DerivativeFunctor, VectorType >::fB
staticprivate
Initial value:
= {
{ 0.2 },
{ 0.075, 0.225 },
{ 0.3, -0.9, 1.2 },
{ -11./54, 2.5, -70./27, 35./27 },
{ 1631./55296, 175./512, 575./13824, 44275./110592, 253./4096 }
}

Definition at line 139 of file RK5ODEIntegrator.h.

Referenced by utl::RK5Iterator< DerivativeFunctor, VectorType >::Step().

template<class DerivativeFunctor, class VectorType>
const double utl::RK5Iterator< DerivativeFunctor, VectorType >::fC
staticprivate
Initial value:
= {
37./378, 250./621, 125./594, 0, 512./1771
}

Definition at line 140 of file RK5ODEIntegrator.h.

Referenced by utl::RK5Iterator< DerivativeFunctor, VectorType >::Step().

template<class DerivativeFunctor, class VectorType>
const double utl::RK5Iterator< DerivativeFunctor, VectorType >::fD
staticprivate
Initial value:
= {
RK5Iterator<DerivativeFunctor, VectorType>::fC[0] - 2825./27648,
RK5Iterator<DerivativeFunctor, VectorType>::fC[1] - 18575./48384,
RK5Iterator<DerivativeFunctor, VectorType>::fC[2] - 13525./55296,
RK5Iterator<DerivativeFunctor, VectorType>::fC[3] - 277./14336,
RK5Iterator<DerivativeFunctor, VectorType>::fC[4] - 0.25
}

Definition at line 141 of file RK5ODEIntegrator.h.

Referenced by utl::RK5Iterator< DerivativeFunctor, VectorType >::Step().

template<class DerivativeFunctor, class VectorType>
DerivativeFunctor& utl::RK5Iterator< DerivativeFunctor, VectorType >::fDerivativeFunctor
private
template<class DerivativeFunctor, class VectorType>
bool utl::RK5Iterator< DerivativeFunctor, VectorType >::fStatus
private
template<class DerivativeFunctor, class VectorType>
double utl::RK5Iterator< DerivativeFunctor, VectorType >::fX
private
template<class DerivativeFunctor, class VectorType>
VectorType utl::RK5Iterator< DerivativeFunctor, VectorType >::fY
private
template<class DerivativeFunctor, class VectorType>
VectorType utl::RK5Iterator< DerivativeFunctor, VectorType >::fYError
private

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

, generated on Tue Sep 26 2023.