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

vtkRungeKutta45.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkRungeKutta45.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 =========================================================================*/
00037 #ifndef __vtkRungeKutta45_h
00038 #define __vtkRungeKutta45_h
00039 
00040 #include "vtkInitialValueProblemSolver.h"
00041 
00042 class VTK_COMMON_EXPORT vtkRungeKutta45 : public vtkInitialValueProblemSolver
00043 {
00044 public:
00045   vtkTypeRevisionMacro(vtkRungeKutta45,vtkInitialValueProblemSolver);
00046   void PrintSelf(ostream& os, vtkIndent indent);
00047 
00049   static vtkRungeKutta45 *New();
00050 
00052 
00067   virtual int ComputeNextStep(double* xprev, double* xnext, double t,
00068                               double& delT, double maxError, double& error) 
00069     {
00070       double minStep = delT;
00071       double maxStep = delT;
00072       double delTActual;
00073       return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00074                                    minStep, maxStep, maxError, error);
00075     }
00076   virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext, 
00077                               double t, double& delT, 
00078                               double maxError, double& error)
00079     {
00080       double minStep = delT;
00081       double maxStep = delT;
00082       double delTActual;
00083       return this->ComputeNextStep(xprev, dxprev, xnext, t, delT, delTActual,
00084                                    minStep, maxStep, maxError, error);
00085     }
00086   virtual int ComputeNextStep(double* xprev, double* xnext, 
00087                               double t, double& delT, double& delTActual,
00088                               double minStep, double maxStep,
00089                               double maxError, double& error)
00090     {
00091       return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00092                                    minStep, maxStep, maxError, error);
00093     }
00094   virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext, 
00095                               double t, double& delT, double& delTActual,
00096                               double minStep, double maxStep, 
00097                               double maxError, double& error);
00099 
00100 protected:
00101   vtkRungeKutta45();
00102   ~vtkRungeKutta45();
00103 
00104   virtual void Initialize();
00105 
00106   // Cash-Karp parameters
00107   static double A[5];
00108   static double B[5][5];
00109   static double C[6];
00110   static double DC[6];
00111 
00112   double* NextDerivs[6];
00113 
00114   int ComputeAStep(double* xprev, double* dxprev, double* xnext, double t, 
00115                    double& delT,  double& error);
00116 
00117 private:
00118   vtkRungeKutta45(const vtkRungeKutta45&);  // Not implemented.
00119   void operator=(const vtkRungeKutta45&);  // Not implemented.
00120 };
00121 
00122 #endif
00123 
00124 
00125 
00126 
00127 
00128 
00129 
00130 

Generated on Mon Jan 21 23:07:17 2008 for VTK by  doxygen 1.4.3-20050530