Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound 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 =========================================================================*/
00046 #ifndef __vtkInitialValueProblemSolver_h
00047 #define __vtkInitialValueProblemSolver_h
00048 
00049 #include "vtkObject.h"
00050 
00051 class vtkFunctionSet;
00052 
00053 class VTK_COMMON_EXPORT vtkInitialValueProblemSolver : public vtkObject
00054 {
00055 public:
00056   vtkTypeRevisionMacro(vtkInitialValueProblemSolver,vtkObject);
00057   virtual void PrintSelf(ostream& os, vtkIndent indent);
00058 
00060 
00074   virtual int ComputeNextStep(float* xprev, float* xnext, float t,
00075                               float& delT, float maxError, 
00076                               float& error) 
00077     {
00078       float minStep = delT;
00079       float maxStep = delT;
00080       float delTActual;
00081       return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00082                                    minStep, maxStep, maxError, error);
00083     }
00084   virtual int ComputeNextStep(float* xprev, float* dxprev, float* xnext, 
00085                               float t, float& delT, float maxError, 
00086                               float& error)
00087     {
00088       float minStep = delT;
00089       float maxStep = delT;
00090       float delTActual;
00091       return this->ComputeNextStep(xprev, dxprev, xnext, t, delT, delTActual,
00092                                    minStep, maxStep, maxError, error);
00093     }
00094   virtual int ComputeNextStep(float* xprev, float* xnext, 
00095                               float t, float& delT, float& delTActual,
00096                               float minStep, float maxStep,
00097                               float maxError, float& error)
00098     {
00099       return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00100                                    minStep, maxStep, maxError, error);
00101     }
00102   virtual int ComputeNextStep(float* xprev, float* dxprev, float* xnext, 
00103                               float t, float& delT, float& delTActual, 
00104                               float minStep, float maxStep, 
00105                               float maxError, float& error) = 0;
00107 
00109 
00110   virtual void SetFunctionSet(vtkFunctionSet* functionset);
00111   vtkGetObjectMacro(FunctionSet,vtkFunctionSet);
00113 
00115   virtual int IsAdaptive() { return this->Adaptive; }
00116   
00117 //BTX
00118   enum ErrorCodes
00119   {
00120     OUT_OF_DOMAIN = 1,
00121     NOT_INITIALIZED = 2,
00122     UNEXPECTED_VALUE = 3
00123   };
00124 //ETX
00125 
00126 protected:
00127   vtkInitialValueProblemSolver();
00128   ~vtkInitialValueProblemSolver();
00129 
00130   virtual void Initialize();
00131 
00132   vtkFunctionSet* FunctionSet;
00133 
00134   float* Vals;
00135   float* Derivs;
00136   int Initialized;
00137   int Adaptive;
00138 
00139 private:
00140   vtkInitialValueProblemSolver(const vtkInitialValueProblemSolver&);  // Not implemented.
00141   void operator=(const vtkInitialValueProblemSolver&);  // Not implemented.
00142 };
00143 
00144 #endif
00145 
00146 
00147 
00148