00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00034 #ifndef __vtkRungeKutta4_h
00035 #define __vtkRungeKutta4_h
00036
00037 #include "vtkInitialValueProblemSolver.h"
00038
00039 class VTK_COMMON_EXPORT vtkRungeKutta4 : public vtkInitialValueProblemSolver
00040 {
00041 public:
00042 vtkTypeMacro(vtkRungeKutta4,vtkInitialValueProblemSolver);
00043 virtual void PrintSelf(ostream& os, vtkIndent indent);
00044
00046 static vtkRungeKutta4 *New();
00047
00048
00050
00056 virtual int ComputeNextStep(double* xprev, double* xnext, double t,
00057 double& delT, double maxError, double& error)
00058 {
00059 double minStep = delT;
00060 double maxStep = delT;
00061 double delTActual;
00062 return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00063 minStep, maxStep, maxError, error);
00064 }
00065 virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext,
00066 double t, double& delT,
00067 double maxError, double& error)
00068 {
00069 double minStep = delT;
00070 double maxStep = delT;
00071 double delTActual;
00072 return this->ComputeNextStep(xprev, dxprev, xnext, t, delT, delTActual,
00073 minStep, maxStep, maxError, error);
00074 }
00075 virtual int ComputeNextStep(double* xprev, double* xnext,
00076 double t, double& delT, double& delTActual,
00077 double minStep, double maxStep,
00078 double maxError, double& error)
00079 {
00080 return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00081 minStep, maxStep, maxError, error);
00082 }
00083 virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext,
00084 double t, double& delT, double& delTActual,
00085 double minStep, double maxStep,
00086 double maxError, double& error);
00088
00089 protected:
00090 vtkRungeKutta4();
00091 ~vtkRungeKutta4();
00092
00093 virtual void Initialize();
00094
00095 double* NextDerivs[3];
00096 private:
00097 vtkRungeKutta4(const vtkRungeKutta4&);
00098 void operator=(const vtkRungeKutta4&);
00099 };
00100
00101 #endif
00102
00103
00104
00105
00106
00107
00108
00109