Geomi
Public Member Functions | Private Attributes | List of all members
RKMK::Integrator< T_LIE_ALGEBRA, T_N_INTERNAL_STAGES, T_M > Class Template Reference

#include <Abstract_Integrator.hpp>

Inheritance diagram for RKMK::Integrator< T_LIE_ALGEBRA, T_N_INTERNAL_STAGES, T_M >:
Inheritance graph
[legend]
Collaboration diagram for RKMK::Integrator< T_LIE_ALGEBRA, T_N_INTERNAL_STAGES, T_M >:
Collaboration graph
[legend]

Public Member Functions

 Integrator (RKMK::Abstract::Problem< T_LIE_ALGEBRA, T_M > &problem, RKMK::Abstract::Step< T_LIE_ALGEBRA, T_N_INTERNAL_STAGES, T_M > &step)
 
void setCoeffs (std::vector< double > va, std::vector< double > vb)
 
bool integrate (void)
 

Private Attributes

RKMK::Abstract::Problem< T_LIE_ALGEBRA, T_M > & m_problem
 
RKMK::Abstract::Step< T_LIE_ALGEBRA, T_N_INTERNAL_STAGES, T_M > & m_step
 

Detailed Description

template<typename T_LIE_ALGEBRA, int T_N_INTERNAL_STAGES, typename T_M = double>
class RKMK::Integrator< T_LIE_ALGEBRA, T_N_INTERNAL_STAGES, T_M >

Template class for RKMK integrators. This class should not be instatiated explicitely by the user, but used through RKMK::Factory instead. If RKMK::Factory does not provide the appropriate integrator, here is a code snippet for the classical RK 4 method to help you create your own.

// Instance of class MyProblem implementing Abstract::Problem<T_M,T_Q,T_LIE_ALGEBRA>
MyProblem problem;
// Butcher tableau coefficients
double a[] = { 0.0,0.0,0.0,0.0, 0.5,0.0,0.0,0.0, 0.0,0.5,0.0,0.0, 0.0,0.0,1.0,0.0 };
double b[] = { 1.0/6.0,2.0/6.0,2.0/6.0,1.0/6.0 };
std::vector<double> va(a,a+sizeof(a)/sizeof(double));
std::vector<double> vb(b,b+sizeof(b)/sizeof(double));
// Define the appropriate step
// Create the integrator form the problem and the step
integrator.setCoeffs(va,vb);

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