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

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