00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00047 #ifndef __vtkInitialValueProblemSolver_h
00048 #define __vtkInitialValueProblemSolver_h
00049
00050 #include "vtkObject.h"
00051
00052 class vtkFunctionSet;
00053
00054 class VTK_COMMON_EXPORT vtkInitialValueProblemSolver : public vtkObject
00055 {
00056 public:
00057 vtkTypeRevisionMacro(vtkInitialValueProblemSolver,vtkObject);
00058 virtual void PrintSelf(ostream& os, vtkIndent indent);
00059
00061
00075 virtual int ComputeNextStep(float* xprev, float* xnext, float t,
00076 float& delT, float maxError,
00077 float& error)
00078 {
00079 float minStep = delT;
00080 float maxStep = delT;
00081 float delTActual;
00082 return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00083 minStep, maxStep, maxError, error);
00084 }
00085 virtual int ComputeNextStep(float* xprev, float* dxprev, float* xnext,
00086 float t, float& delT, float maxError,
00087 float& error)
00088 {
00089 float minStep = delT;
00090 float maxStep = delT;
00091 float delTActual;
00092 return this->ComputeNextStep(xprev, dxprev, xnext, t, delT, delTActual,
00093 minStep, maxStep, maxError, error);
00094 }
00095 virtual int ComputeNextStep(float* xprev, float* xnext,
00096 float t, float& delT, float& delTActual,
00097 float minStep, float maxStep,
00098 float maxError, float& error)
00099 {
00100 return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00101 minStep, maxStep, maxError, error);
00102 }
00103 virtual int ComputeNextStep(float* xprev, float* dxprev, float* xnext,
00104 float t, float& delT, float& delTActual,
00105 float minStep, float maxStep,
00106 float maxError, float& error) = 0;
00108
00110
00111 virtual void SetFunctionSet(vtkFunctionSet* functionset);
00112 vtkGetObjectMacro(FunctionSet,vtkFunctionSet);
00114
00116 virtual int IsAdaptive() { return this->Adaptive; }
00117
00118
00119 enum ErrorCodes
00120 {
00121 OUT_OF_DOMAIN = 1,
00122 NOT_INITIALIZED = 2,
00123 UNEXPECTED_VALUE = 3
00124 };
00125
00126
00127 protected:
00128 vtkInitialValueProblemSolver();
00129 ~vtkInitialValueProblemSolver();
00130
00131 virtual void Initialize();
00132
00133 vtkFunctionSet* FunctionSet;
00134
00135 float* Vals;
00136 float* Derivs;
00137 int Initialized;
00138 int Adaptive;
00139
00140 private:
00141 vtkInitialValueProblemSolver(const vtkInitialValueProblemSolver&);
00142 void operator=(const vtkInitialValueProblemSolver&);
00143 };
00144
00145 #endif
00146
00147
00148
00149