Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound 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 =========================================================================*/
00043 #ifndef __vtkRungeKutta2_h
00044 #define __vtkRungeKutta2_h
00045 
00046 #include "vtkInitialValueProblemSolver.h"
00047 
00048 class VTK_COMMON_EXPORT vtkRungeKutta2 : public vtkInitialValueProblemSolver
00049 {
00050 public:
00051   vtkTypeRevisionMacro(vtkRungeKutta2,vtkInitialValueProblemSolver);
00052 
00054   static vtkRungeKutta2 *New();
00055 
00057 
00063   virtual int ComputeNextStep(float* xprev, float* xnext, float t,
00064                               float& delT, float maxError, float& error) 
00065     {
00066       float minStep = delT;
00067       float maxStep = delT;
00068       float delTActual;
00069       return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00070                                    minStep, maxStep, maxError, error);
00071     }
00072   virtual int ComputeNextStep(float* xprev, float* dxprev, float* xnext, 
00073                               float t, float& delT, 
00074                               float maxError, float& error)
00075     {
00076       float minStep = delT;
00077       float maxStep = delT;
00078       float delTActual;
00079       return this->ComputeNextStep(xprev, dxprev, xnext, t, delT, delTActual,
00080                                    minStep, maxStep, maxError, error);
00081     }
00082   virtual int ComputeNextStep(float* xprev, float* xnext, 
00083                               float t, float& delT, float& delTActual,
00084                               float minStep, float maxStep,
00085                               float maxError, float& error)
00086     {
00087       return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00088                                    minStep, maxStep, maxError, error);
00089     }
00090   virtual int ComputeNextStep(float* xprev, float* dxprev, float* xnext, 
00091                               float t, float& delT, float& delTActual,
00092                               float minStep, float maxStep, 
00093                               float maxError, float& error);
00095 
00096 protected:
00097   vtkRungeKutta2();
00098   ~vtkRungeKutta2();
00099 private:
00100   vtkRungeKutta2(const vtkRungeKutta2&);  // Not implemented.
00101   void operator=(const vtkRungeKutta2&);  // Not implemented.
00102 };
00103 
00104 #endif
00105 
00106 
00107 
00108 
00109 
00110 
00111 
00112