RungeKutta.h File Reference


Detailed Description

Runge-Kutta integrator.

Author:
Author
nilspace
Version:
Revision
1.3
Date:
Date
2003/04/23 16:30:59
////////////////////////////////////////////////////////////////////////////////////////////////
Todo:
Add test cases

Definition in file RungeKutta.h.

#include <Matrix.h>

Go to the source code of this file.

Typedefs

typedef Vector(* ptr2RKFunc )(const double &_time, const Vector &_states, const Matrix &_params)

Functions

Matrix RungeKuttaSolve (Vector(*odeFunc)(const double &timeInput, const Vector &stateInput, const Matrix &constantsInput), const Vector &_initialConditions, const Matrix &_constants, const double &_timeInitial, const double &_timeFinal, const int &_numSteps)
 Integrate an equation of the form using the Runge-Kutta integration method.


Typedef Documentation

typedef Vector(* ptr2RKFunc)(const double &_time, const Vector &_states, const Matrix &_params)
 

defines a pointer to a Runge-Kutta right-hand side (RHS) function

Definition at line 18 of file RungeKutta.h.


Function Documentation

Matrix RungeKuttaSolve Vector(*  odeFunc)(const double &timeInput, const Vector &stateInput, const Matrix &constantsInput),
const Vector _initialConditions,
const Matrix _constants,
const double &  _timeInitial,
const double &  _timeFinal,
const int &  _numSteps
 

Integrate an equation of the form using the Runge-Kutta integration method.

The Runge-Kutta integrator uses a right-hand side equation, to compute the integration of the function over the specified time interval, given initial conditions, constants of integration, and number of steps desired (since this is a fixed step integrator).

Parameters:
odeFunc Pointer to the right-hand side (RHS) equation
timeInput time of current step to RHS file function
stateInput vector of state inputs at current step to RHS file function
constantsInput vector of constants that are not integrated and passed to the RHS function
_initialConditions vector of initial conditions of the state
_constants matrix of constants that should be passed to the RHS function
_timeInitial initial time of integration
_timeFinal final time of integration
_numSteps number of steps to integrate over (therefore timeStep = _timeFinal - _timeInitial / _numSteps)
Returns:
matrix of integrated state outputs from the initial to final times. Format: /f[ {bmatrix} t_0 & x_{1,0} & x_{2,0} & ...\ t_1 & x_{1,1} & x_{2,1} & ...\ t_2 & x_{1,2} & x_{2,2} & ...\ . & . & . & . \ t_final & x_{1,f} & x_{2,f} & ... {bmatrix} /f] where /f$t_T/f$ is the time at step T, and /f$x_{i,T}/f$ is the state value of element i, at time step T.

Definition at line 44 of file RungeKutta.h.


Generated on Wed Aug 6 12:58:57 2003 for Open-Sessame Framework by doxygen1.3