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