00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00053 #ifndef __vtkRungeKutta45_h
00054 #define __vtkRungeKutta45_h
00055
00056 #include "vtkInitialValueProblemSolver.h"
00057
00058 class VTK_COMMON_EXPORT vtkRungeKutta45 : public vtkInitialValueProblemSolver
00059 {
00060 public:
00061 vtkTypeRevisionMacro(vtkRungeKutta45,vtkInitialValueProblemSolver);
00062
00064 static vtkRungeKutta45 *New();
00065
00067
00082 virtual int ComputeNextStep(float* xprev, float* xnext, float t,
00083 float& delT, float maxError, float& error)
00084 {
00085 float minStep = delT;
00086 float maxStep = delT;
00087 float delTActual;
00088 return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00089 minStep, maxStep, maxError, error);
00090 }
00091 virtual int ComputeNextStep(float* xprev, float* dxprev, float* xnext,
00092 float t, float& delT,
00093 float maxError, float& error)
00094 {
00095 float minStep = delT;
00096 float maxStep = delT;
00097 float delTActual;
00098 return this->ComputeNextStep(xprev, dxprev, xnext, t, delT, delTActual,
00099 minStep, maxStep, maxError, error);
00100 }
00101 virtual int ComputeNextStep(float* xprev, float* xnext,
00102 float t, float& delT, float& delTActual,
00103 float minStep, float maxStep,
00104 float maxError, float& error)
00105 {
00106 return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00107 minStep, maxStep, maxError, error);
00108 }
00109 virtual int ComputeNextStep(float* xprev, float* dxprev, float* xnext,
00110 float t, float& delT, float& delTActual,
00111 float minStep, float maxStep,
00112 float maxError, float& error);
00114
00115 protected:
00116 vtkRungeKutta45();
00117 ~vtkRungeKutta45();
00118
00119 virtual void Initialize();
00120
00121
00122 static double A[5];
00123 static double B[5][5];
00124 static double C[6];
00125 static double DC[6];
00126
00127 float* NextDerivs[6];
00128
00129 int ComputeAStep(float* xprev, float* dxprev, float* xnext, float t,
00130 float& delT, float& error);
00131
00132 private:
00133 vtkRungeKutta45(const vtkRungeKutta45&);
00134 void operator=(const vtkRungeKutta45&);
00135 };
00136
00137 #endif
00138
00139
00140
00141
00142
00143
00144
00145