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

dox/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 =========================================================================*/
00032 #ifndef __vtkRungeKutta2_h
00033 #define __vtkRungeKutta2_h
00034 
00035 #include "vtkInitialValueProblemSolver.h"
00036 
00037 class VTK_COMMON_EXPORT vtkRungeKutta2 : public vtkInitialValueProblemSolver
00038 {
00039 public:
00040   vtkTypeRevisionMacro(vtkRungeKutta2,vtkInitialValueProblemSolver);
00041 
00043   static vtkRungeKutta2 *New();
00044 
00046 
00052   virtual int ComputeNextStep(float* xprev, float* xnext, float t,
00053                               float& delT, float maxError, float& error) 
00054     {
00055       float minStep = delT;
00056       float maxStep = delT;
00057       float delTActual;
00058       return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00059                                    minStep, maxStep, maxError, error);
00060     }
00061   virtual int ComputeNextStep(float* xprev, float* dxprev, float* xnext, 
00062                               float t, float& delT, 
00063                               float maxError, float& error)
00064     {
00065       float minStep = delT;
00066       float maxStep = delT;
00067       float delTActual;
00068       return this->ComputeNextStep(xprev, dxprev, xnext, t, delT, delTActual,
00069                                    minStep, maxStep, maxError, error);
00070     }
00071   virtual int ComputeNextStep(float* xprev, float* xnext, 
00072                               float t, float& delT, float& delTActual,
00073                               float minStep, float maxStep,
00074                               float maxError, float& error)
00075     {
00076       return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00077                                    minStep, maxStep, maxError, error);
00078     }
00079   virtual int ComputeNextStep(float* xprev, float* dxprev, float* xnext, 
00080                               float t, float& delT, float& delTActual,
00081                               float minStep, float maxStep, 
00082                               float maxError, float& error);
00084 
00085 protected:
00086   vtkRungeKutta2();
00087   ~vtkRungeKutta2();
00088 private:
00089   vtkRungeKutta2(const vtkRungeKutta2&);  // Not implemented.
00090   void operator=(const vtkRungeKutta2&);  // Not implemented.
00091 };
00092 
00093 #endif
00094 
00095 
00096 
00097 
00098 
00099 
00100 
00101