00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00040 #ifndef __vtkRungeKutta2_h
00041 #define __vtkRungeKutta2_h
00042
00043 #include "vtkInitialValueProblemSolver.h"
00044
00045 class VTK_COMMON_EXPORT vtkRungeKutta2 : public vtkInitialValueProblemSolver
00046 {
00047 public:
00048 vtkTypeRevisionMacro(vtkRungeKutta2,vtkInitialValueProblemSolver);
00049
00051 static vtkRungeKutta2 *New();
00052
00054
00060 virtual int ComputeNextStep(double* xprev, double* xnext, double t,
00061 double& delT, double maxError, double& error)
00062 {
00063 double minStep = delT;
00064 double maxStep = delT;
00065 double delTActual;
00066 return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00067 minStep, maxStep, maxError, error);
00068 }
00069 virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext,
00070 double t, double& delT,
00071 double maxError, double& error)
00072 {
00073 double minStep = delT;
00074 double maxStep = delT;
00075 double delTActual;
00076 return this->ComputeNextStep(xprev, dxprev, xnext, t, delT, delTActual,
00077 minStep, maxStep, maxError, error);
00078 }
00079 virtual int ComputeNextStep(double* xprev, double* xnext,
00080 double t, double& delT, double& delTActual,
00081 double minStep, double maxStep,
00082 double maxError, double& error)
00083 {
00084 return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00085 minStep, maxStep, maxError, error);
00086 }
00087 virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext,
00088 double t, double& delT, double& delTActual,
00089 double minStep, double maxStep,
00090 double maxError, double& error);
00092
00093 protected:
00094 vtkRungeKutta2();
00095 ~vtkRungeKutta2();
00096 private:
00097 vtkRungeKutta2(const vtkRungeKutta2&);
00098 void operator=(const vtkRungeKutta2&);
00099 };
00100
00101 #endif
00102
00103
00104
00105
00106
00107
00108
00109