Files Classes Functions Hierarchy
#include <nintegration.h>
Public Member Functions | |
| nintegrationRK (T *xi_, T *yi_) | |
| The clients equation needs to see the variables. | |
| void | operator++ () |
| Increment to the next equation. | |
| void | eval (T &dy, T const h, T const y, T const x) |
| Evaluate the infinitesimal and the highest derivative. | |
Public Attributes | |
| D | yDorder |
| The equation of the system as a 1st order derivative. | |
Definition at line 94 of file nintegration.h.
| nintegrationRK< D, T >::nintegrationRK | ( | T * | xi_, | |
| T * | yi_ | |||
| ) | [inline] |
The clients equation needs to see the variables.
Definition at line 102 of file nintegration.h.
00103 : yDorder(xi_,yi_) {}
| void nintegrationRK< D, T >::eval | ( | T & | dy, | |
| T const | h, | |||
| T const | y, | |||
| T const | x | |||
| ) | [inline] |
Evaluate the infinitesimal and the highest derivative.
Definition at line 111 of file nintegration.h.
References nintegrationRK< D, T >::yDorder.
00117 { 00118 T c1; 00119 yDorder(c1,y,x); 00120 c1 *= h; 00121 00122 T x1 = x + h*0.5; 00123 T y1 = y + c1*0.5; 00124 00125 T c2; 00126 yDorder(c2,y1,x1); 00127 c2 *= h; 00128 00129 T y2 = y+c2*0.5; 00130 T c3; 00131 yDorder(c3,y2,x1); 00132 c3 *= h; 00133 00134 T x2 = x + h; 00135 T y3 = y + c3; 00136 T c4; 00137 yDorder(c4,y3,x2); 00138 c4 *= h; 00139 00140 dy = (c1+c2*2.0+c3*2.0+c4)/6.0; 00141 }
| void nintegrationRK< D, T >::operator++ | ( | ) | [inline] |
Increment to the next equation.
Definition at line 106 of file nintegration.h.
References nintegrationRK< D, T >::yDorder.
00107 { ++yDorder; }
| D nintegrationRK< D, T >::yDorder |
The equation of the system as a 1st order derivative.
Definition at line 99 of file nintegration.h.
Referenced by nintegrationRK< D, T >::eval(), and nintegrationRK< D, T >::operator++().
1.5.8