00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00037 #ifndef __vtkRungeKutta45_h
00038 #define __vtkRungeKutta45_h
00039
00040 #include "vtkInitialValueProblemSolver.h"
00041
00042 class VTK_COMMON_EXPORT vtkRungeKutta45 : public vtkInitialValueProblemSolver
00043 {
00044 public:
00045 vtkTypeRevisionMacro(vtkRungeKutta45,vtkInitialValueProblemSolver);
00046 void PrintSelf(ostream& os, vtkIndent indent);
00047
00049 static vtkRungeKutta45 *New();
00050
00052
00067 virtual int ComputeNextStep(double* xprev, double* xnext, double t,
00068 double& delT, double maxError, double& error)
00069 {
00070 double minStep = delT;
00071 double maxStep = delT;
00072 double delTActual;
00073 return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00074 minStep, maxStep, maxError, error);
00075 }
00076 virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext,
00077 double t, double& delT,
00078 double maxError, double& error)
00079 {
00080 double minStep = delT;
00081 double maxStep = delT;
00082 double delTActual;
00083 return this->ComputeNextStep(xprev, dxprev, xnext, t, delT, delTActual,
00084 minStep, maxStep, maxError, error);
00085 }
00086 virtual int ComputeNextStep(double* xprev, double* xnext,
00087 double t, double& delT, double& delTActual,
00088 double minStep, double maxStep,
00089 double maxError, double& error)
00090 {
00091 return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00092 minStep, maxStep, maxError, error);
00093 }
00094 virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext,
00095 double t, double& delT, double& delTActual,
00096 double minStep, double maxStep,
00097 double maxError, double& error);
00099
00100 protected:
00101 vtkRungeKutta45();
00102 ~vtkRungeKutta45();
00103
00104 virtual void Initialize();
00105
00106
00107 static double A[5];
00108 static double B[5][5];
00109 static double C[6];
00110 static double DC[6];
00111
00112 double* NextDerivs[6];
00113
00114 int ComputeAStep(double* xprev, double* dxprev, double* xnext, double t,
00115 double& delT, double& error);
00116
00117 private:
00118 vtkRungeKutta45(const vtkRungeKutta45&);
00119 void operator=(const vtkRungeKutta45&);
00120 };
00121
00122 #endif
00123
00124
00125
00126
00127
00128
00129
00130