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

vtkRungeKutta2.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkRungeKutta2.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00040 #ifndef __vtkRungeKutta2_h
00041 #define __vtkRungeKutta2_h
00042 
00043 #include "vtkInitialValueProblemSolver.h"
00044 
00045 class VTK_COMMON_EXPORT vtkRungeKutta2 : public vtkInitialValueProblemSolver
00046 {
00047 public:
00048   vtkTypeRevisionMacro(vtkRungeKutta2,vtkInitialValueProblemSolver);
00049 
00051   static vtkRungeKutta2 *New();
00052 
00054 
00060   virtual int ComputeNextStep(double* xprev, double* xnext, double t,
00061                               double& delT, double maxError, double& error) 
00062     {
00063       double minStep = delT;
00064       double maxStep = delT;
00065       double delTActual;
00066       return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00067                                    minStep, maxStep, maxError, error);
00068     }
00069   virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext, 
00070                               double t, double& delT, 
00071                               double maxError, double& error)
00072     {
00073       double minStep = delT;
00074       double maxStep = delT;
00075       double delTActual;
00076       return this->ComputeNextStep(xprev, dxprev, xnext, t, delT, delTActual,
00077                                    minStep, maxStep, maxError, error);
00078     }
00079   virtual int ComputeNextStep(double* xprev, double* xnext, 
00080                               double t, double& delT, double& delTActual,
00081                               double minStep, double maxStep,
00082                               double maxError, double& error)
00083     {
00084       return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00085                                    minStep, maxStep, maxError, error);
00086     }
00087   virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext, 
00088                               double t, double& delT, double& delTActual,
00089                               double minStep, double maxStep, 
00090                               double maxError, double& error);
00092 
00093 protected:
00094   vtkRungeKutta2();
00095   ~vtkRungeKutta2();
00096 private:
00097   vtkRungeKutta2(const vtkRungeKutta2&);  // Not implemented.
00098   void operator=(const vtkRungeKutta2&);  // Not implemented.
00099 };
00100 
00101 #endif
00102 
00103 
00104 
00105 
00106 
00107 
00108 
00109