00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00049 #ifndef __vtkRungeKutta4_h
00050 #define __vtkRungeKutta4_h
00051
00052 #include "vtkInitialValueProblemSolver.h"
00053
00054 class VTK_COMMON_EXPORT vtkRungeKutta4 : public vtkInitialValueProblemSolver
00055 {
00056 public:
00057 vtkTypeRevisionMacro(vtkRungeKutta4,vtkInitialValueProblemSolver);
00058 virtual void PrintSelf(ostream& os, vtkIndent indent);
00059
00061 static vtkRungeKutta4 *New();
00062
00063
00065
00071 virtual int ComputeNextStep(float* xprev, float* xnext, float t,
00072 float& delT, float maxError, float& error)
00073 {
00074 float minStep = delT;
00075 float maxStep = delT;
00076 float delTActual;
00077 return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00078 minStep, maxStep, maxError, error);
00079 }
00080 virtual int ComputeNextStep(float* xprev, float* dxprev, float* xnext,
00081 float t, float& delT,
00082 float maxError, float& error)
00083 {
00084 float minStep = delT;
00085 float maxStep = delT;
00086 float delTActual;
00087 return this->ComputeNextStep(xprev, dxprev, xnext, t, delT, delTActual,
00088 minStep, maxStep, maxError, error);
00089 }
00090 virtual int ComputeNextStep(float* xprev, float* xnext,
00091 float t, float& delT, float& delTActual,
00092 float minStep, float maxStep,
00093 float maxError, float& error)
00094 {
00095 return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00096 minStep, maxStep, maxError, error);
00097 }
00098 virtual int ComputeNextStep(float* xprev, float* dxprev, float* xnext,
00099 float t, float& delT, float& delTActual,
00100 float minStep, float maxStep,
00101 float maxError, float& error);
00103
00104 protected:
00105 vtkRungeKutta4();
00106 ~vtkRungeKutta4();
00107
00108 virtual void Initialize();
00109
00110 float* NextDerivs[3];
00111 private:
00112 vtkRungeKutta4(const vtkRungeKutta4&);
00113 void operator=(const vtkRungeKutta4&);
00114 };
00115
00116 #endif
00117
00118
00119
00120
00121
00122
00123
00124