Files Classes Functions Hierarchy
#include <nintegration.h>
Public Member Functions | |
| nintegrationTrapezoidEuler (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 47 of file nintegration.h.
| nintegrationTrapezoidEuler< D, T >::nintegrationTrapezoidEuler | ( | T * | xi_, | |
| T * | yi_ | |||
| ) | [inline] |
The clients equation needs to see the variables.
Definition at line 55 of file nintegration.h.
00056 : yDorder(xi_,yi_) {}
| void nintegrationTrapezoidEuler< 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 64 of file nintegration.h.
References nintegrationTrapezoidEuler< D, T >::yDorder.
00070 { 00071 // Estimate the implicit variable y[n+1] by Eulers method. 00072 // w1 is y[n+1] interpolated: y[n+1] = y[n]+h*y'[n] 00073 00074 T yD; 00075 yDorder(yD,y,x); 00076 T w1 = y + h*yD; 00077 00078 T x1 = x+h; 00079 T y1D; 00080 yDorder(y1D,w1,x1); 00081 00082 dy = (y1D+yD)*h/2.0; 00083 }
| void nintegrationTrapezoidEuler< D, T >::operator++ | ( | ) | [inline] |
Increment to the next equation.
Definition at line 59 of file nintegration.h.
References nintegrationTrapezoidEuler< D, T >::yDorder.
00060 { ++yDorder; }
| D nintegrationTrapezoidEuler< D, T >::yDorder |
The equation of the system as a 1st order derivative.
Definition at line 52 of file nintegration.h.
Referenced by nintegrationTrapezoidEuler< D, T >::eval(), and nintegrationTrapezoidEuler< D, T >::operator++().
1.5.8