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