00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00028 #ifndef __vtkRungeKutta2_h
00029 #define __vtkRungeKutta2_h
00030
00031 #include "vtkInitialValueProblemSolver.h"
00032
00033 class VTK_COMMON_EXPORT vtkRungeKutta2 : public vtkInitialValueProblemSolver
00034 {
00035 public:
00036 vtkTypeMacro(vtkRungeKutta2,vtkInitialValueProblemSolver);
00037
00039 static vtkRungeKutta2 *New();
00040
00042
00048 virtual int ComputeNextStep(double* xprev, double* xnext, double t,
00049 double& delT, double maxError, double& error)
00050 {
00051 double minStep = delT;
00052 double maxStep = delT;
00053 double delTActual;
00054 return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00055 minStep, maxStep, maxError, error);
00056 }
00057 virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext,
00058 double t, double& delT,
00059 double maxError, double& error)
00060 {
00061 double minStep = delT;
00062 double maxStep = delT;
00063 double delTActual;
00064 return this->ComputeNextStep(xprev, dxprev, xnext, t, delT, delTActual,
00065 minStep, maxStep, maxError, error);
00066 }
00067 virtual int ComputeNextStep(double* xprev, double* xnext,
00068 double t, double& delT, double& delTActual,
00069 double minStep, double maxStep,
00070 double maxError, double& error)
00071 {
00072 return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00073 minStep, maxStep, maxError, error);
00074 }
00075 virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext,
00076 double t, double& delT, double& delTActual,
00077 double minStep, double maxStep,
00078 double maxError, double& error);
00080
00081 protected:
00082 vtkRungeKutta2();
00083 ~vtkRungeKutta2();
00084 private:
00085 vtkRungeKutta2(const vtkRungeKutta2&);
00086 void operator=(const vtkRungeKutta2&);
00087 };
00088
00089 #endif
00090
00091
00092
00093
00094
00095
00096
00097