Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

Common/vtkInitialValueProblemSolver.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkInitialValueProblemSolver.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
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 //BTX
00119   enum ErrorCodes
00120   {
00121     OUT_OF_DOMAIN = 1,
00122     NOT_INITIALIZED = 2,
00123     UNEXPECTED_VALUE = 3
00124   };
00125 //ETX
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&);  // Not implemented.
00142   void operator=(const vtkInitialValueProblemSolver&);  // Not implemented.
00143 };
00144 
00145 #endif
00146 
00147 
00148 
00149