00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00035 #ifndef __vtkInitialValueProblemSolver_h
00036 #define __vtkInitialValueProblemSolver_h
00037
00038 #include "vtkObject.h"
00039
00040 class vtkFunctionSet;
00041
00042 class VTK_COMMON_EXPORT vtkInitialValueProblemSolver : public vtkObject
00043 {
00044 public:
00045 vtkTypeRevisionMacro(vtkInitialValueProblemSolver,vtkObject);
00046 virtual void PrintSelf(ostream& os, vtkIndent indent);
00047
00049
00063 virtual int ComputeNextStep(float* xprev, float* xnext, float t,
00064 float& delT, float maxError,
00065 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, float maxError,
00075 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) = 0;
00096
00098
00099 virtual void SetFunctionSet(vtkFunctionSet* functionset);
00100 vtkGetObjectMacro(FunctionSet,vtkFunctionSet);
00102
00104 virtual int IsAdaptive() { return this->Adaptive; }
00105
00106
00107 enum ErrorCodes
00108 {
00109 OUT_OF_DOMAIN = 1,
00110 NOT_INITIALIZED = 2,
00111 UNEXPECTED_VALUE = 3
00112 };
00113
00114
00115 protected:
00116 vtkInitialValueProblemSolver();
00117 ~vtkInitialValueProblemSolver();
00118
00119 virtual void Initialize();
00120
00121 vtkFunctionSet* FunctionSet;
00122
00123 float* Vals;
00124 float* Derivs;
00125 int Initialized;
00126 int Adaptive;
00127
00128 private:
00129 vtkInitialValueProblemSolver(const vtkInitialValueProblemSolver&);
00130 void operator=(const vtkInitialValueProblemSolver&);
00131 };
00132
00133 #endif
00134
00135
00136
00137