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