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

Common/vtkRungeKutta2.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkRungeKutta2.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 =========================================================================*/
00044 #ifndef __vtkRungeKutta2_h
00045 #define __vtkRungeKutta2_h
00046 
00047 #include "vtkInitialValueProblemSolver.h"
00048 
00049 class VTK_COMMON_EXPORT vtkRungeKutta2 : public vtkInitialValueProblemSolver
00050 {
00051 public:
00052   vtkTypeRevisionMacro(vtkRungeKutta2,vtkInitialValueProblemSolver);
00053 
00055   static vtkRungeKutta2 *New();
00056 
00058 
00064   virtual int ComputeNextStep(float* xprev, float* xnext, float t,
00065                               float& delT, float maxError, float& error) 
00066     {
00067       float minStep = delT;
00068       float maxStep = delT;
00069       float delTActual;
00070       return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00071                                    minStep, maxStep, maxError, error);
00072     }
00073   virtual int ComputeNextStep(float* xprev, float* dxprev, float* xnext, 
00074                               float t, float& delT, 
00075                               float maxError, float& error)
00076     {
00077       float minStep = delT;
00078       float maxStep = delT;
00079       float delTActual;
00080       return this->ComputeNextStep(xprev, dxprev, xnext, t, delT, delTActual,
00081                                    minStep, maxStep, maxError, error);
00082     }
00083   virtual int ComputeNextStep(float* xprev, float* xnext, 
00084                               float t, float& delT, float& delTActual,
00085                               float minStep, float maxStep,
00086                               float maxError, float& error)
00087     {
00088       return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00089                                    minStep, maxStep, maxError, error);
00090     }
00091   virtual int ComputeNextStep(float* xprev, float* dxprev, float* xnext, 
00092                               float t, float& delT, float& delTActual,
00093                               float minStep, float maxStep, 
00094                               float maxError, float& error);
00096 
00097 protected:
00098   vtkRungeKutta2();
00099   ~vtkRungeKutta2();
00100 private:
00101   vtkRungeKutta2(const vtkRungeKutta2&);  // Not implemented.
00102   void operator=(const vtkRungeKutta2&);  // Not implemented.
00103 };
00104 
00105 #endif
00106 
00107 
00108 
00109 
00110 
00111 
00112 
00113