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

vtkInitialValueProblemSolver.h

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