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