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

vtkRungeKutta4.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkRungeKutta4.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 =========================================================================*/
00046 #ifndef __vtkRungeKutta4_h
00047 #define __vtkRungeKutta4_h
00048 
00049 #include "vtkInitialValueProblemSolver.h"
00050 
00051 class VTK_COMMON_EXPORT vtkRungeKutta4 : public vtkInitialValueProblemSolver
00052 {
00053 public:
00054   vtkTypeRevisionMacro(vtkRungeKutta4,vtkInitialValueProblemSolver);
00055   virtual void PrintSelf(ostream& os, vtkIndent indent);
00056 
00058   static vtkRungeKutta4 *New();
00059 
00060 
00062 
00068   virtual int ComputeNextStep(double* xprev, double* xnext, double t,
00069                               double& delT, double maxError, double& error) 
00070     {
00071       double minStep = delT;
00072       double maxStep = delT;
00073       double delTActual;
00074       return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00075                                    minStep, maxStep, maxError, error);
00076     }
00077   virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext, 
00078                               double t, double& delT, 
00079                               double maxError, double& error)
00080     {
00081       double minStep = delT;
00082       double maxStep = delT;
00083       double delTActual;
00084       return this->ComputeNextStep(xprev, dxprev, xnext, t, delT, delTActual,
00085                                    minStep, maxStep, maxError, error);
00086     }
00087   virtual int ComputeNextStep(double* xprev, double* xnext, 
00088                               double t, double& delT, double& delTActual,
00089                               double minStep, double maxStep,
00090                               double maxError, double& error)
00091     {
00092       return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00093                                    minStep, maxStep, maxError, error);
00094     }
00095   virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext, 
00096                               double t, double& delT, double& delTActual,
00097                               double minStep, double maxStep, 
00098                               double maxError, double& error);
00100 
00101 protected:
00102   vtkRungeKutta4();
00103   ~vtkRungeKutta4();
00104 
00105   virtual void Initialize();
00106 
00107   double* NextDerivs[3];
00108 private:
00109   vtkRungeKutta4(const vtkRungeKutta4&);  // Not implemented.
00110   void operator=(const vtkRungeKutta4&);  // Not implemented.
00111 };
00112 
00113 #endif
00114 
00115 
00116 
00117 
00118 
00119 
00120 
00121