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