Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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 =========================================================================*/
00034 #ifndef __vtkRungeKutta4_h
00035 #define __vtkRungeKutta4_h
00036 
00037 #include "vtkInitialValueProblemSolver.h"
00038 
00039 class VTK_COMMON_EXPORT vtkRungeKutta4 : public vtkInitialValueProblemSolver
00040 {
00041 public:
00042   vtkTypeRevisionMacro(vtkRungeKutta4,vtkInitialValueProblemSolver);
00043   virtual void PrintSelf(ostream& os, vtkIndent indent);
00044 
00046   static vtkRungeKutta4 *New();
00047 
00048 
00050 
00056   virtual int ComputeNextStep(double* xprev, double* xnext, double t,
00057                               double& delT, double maxError, double& error) 
00058     {
00059       double minStep = delT;
00060       double maxStep = delT;
00061       double delTActual;
00062       return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00063                                    minStep, maxStep, maxError, error);
00064     }
00065   virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext, 
00066                               double t, double& delT, 
00067                               double maxError, double& error)
00068     {
00069       double minStep = delT;
00070       double maxStep = delT;
00071       double delTActual;
00072       return this->ComputeNextStep(xprev, dxprev, xnext, t, delT, delTActual,
00073                                    minStep, maxStep, maxError, error);
00074     }
00075   virtual int ComputeNextStep(double* xprev, double* xnext, 
00076                               double t, double& delT, double& delTActual,
00077                               double minStep, double maxStep,
00078                               double maxError, double& error)
00079     {
00080       return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00081                                    minStep, maxStep, maxError, error);
00082     }
00083   virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext, 
00084                               double t, double& delT, double& delTActual,
00085                               double minStep, double maxStep, 
00086                               double maxError, double& error);
00088 
00089 protected:
00090   vtkRungeKutta4();
00091   ~vtkRungeKutta4();
00092 
00093   virtual void Initialize();
00094 
00095   double* NextDerivs[3];
00096 private:
00097   vtkRungeKutta4(const vtkRungeKutta4&);  // Not implemented.
00098   void operator=(const vtkRungeKutta4&);  // Not implemented.
00099 };
00100 
00101 #endif
00102 
00103 
00104 
00105 
00106 
00107 
00108 
00109 

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