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

Common/vtkRungeKutta4.h

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