• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/Common/vtkRungeKutta4.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkRungeKutta4.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 =========================================================================*/
00031 #ifndef __vtkRungeKutta4_h
00032 #define __vtkRungeKutta4_h
00033 
00034 #include "vtkInitialValueProblemSolver.h"
00035 
00036 class VTK_COMMON_EXPORT vtkRungeKutta4 : public vtkInitialValueProblemSolver
00037 {
00038 public:
00039   vtkTypeRevisionMacro(vtkRungeKutta4,vtkInitialValueProblemSolver);
00040   virtual void PrintSelf(ostream& os, vtkIndent indent);
00041 
00043   static vtkRungeKutta4 *New();
00044 
00045 
00047 
00053   virtual int ComputeNextStep(double* xprev, double* xnext, double t,
00054                               double& delT, double maxError, double& error) 
00055     {
00056       double minStep = delT;
00057       double maxStep = delT;
00058       double delTActual;
00059       return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00060                                    minStep, maxStep, maxError, error);
00061     }
00062   virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext, 
00063                               double t, double& delT, 
00064                               double maxError, double& error)
00065     {
00066       double minStep = delT;
00067       double maxStep = delT;
00068       double delTActual;
00069       return this->ComputeNextStep(xprev, dxprev, xnext, t, delT, delTActual,
00070                                    minStep, maxStep, maxError, error);
00071     }
00072   virtual int ComputeNextStep(double* xprev, double* xnext, 
00073                               double t, double& delT, double& delTActual,
00074                               double minStep, double maxStep,
00075                               double maxError, double& error)
00076     {
00077       return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
00078                                    minStep, maxStep, maxError, error);
00079     }
00080   virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext, 
00081                               double t, double& delT, double& delTActual,
00082                               double minStep, double maxStep, 
00083                               double maxError, double& error);
00085 
00086 protected:
00087   vtkRungeKutta4();
00088   ~vtkRungeKutta4();
00089 
00090   virtual void Initialize();
00091 
00092   double* NextDerivs[3];
00093 private:
00094   vtkRungeKutta4(const vtkRungeKutta4&);  // Not implemented.
00095   void operator=(const vtkRungeKutta4&);  // Not implemented.
00096 };
00097 
00098 #endif
00099 
00100 
00101 
00102 
00103 
00104 
00105 
00106 

Generated by  doxygen 1.7.1