Common/vtkRungeKutta4.h Source File

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

# Common/vtkRungeKutta4.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkRungeKutta4.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 =========================================================================*/
    00049 #ifndef __vtkRungeKutta4_h
    00050 #define __vtkRungeKutta4_h
    00051
    00052 #include "vtkInitialValueProblemSolver.h"
    00053
    00054 class VTK_COMMON_EXPORT vtkRungeKutta4 : public vtkInitialValueProblemSolver
    00055 {
    00056 public:
    00057   vtkTypeRevisionMacro(vtkRungeKutta4,vtkInitialValueProblemSolver);
    00058   virtual void PrintSelf(ostream& os, vtkIndent indent);
    00059
    00061   static vtkRungeKutta4 *New();
    00062
    00063
    00065
    00071   virtual int ComputeNextStep(float* xprev, float* xnext, float t,
    00072                               float& delT, float maxError, float& error)
    00073     {
    00074       float minStep = delT;
    00075       float maxStep = delT;
    00076       float delTActual;
    00077       return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
    00078                                    minStep, maxStep, maxError, error);
    00079     }
    00080   virtual int ComputeNextStep(float* xprev, float* dxprev, float* xnext,
    00081                               float t, float& delT,
    00082                               float maxError, float& error)
    00083     {
    00084       float minStep = delT;
    00085       float maxStep = delT;
    00086       float delTActual;
    00087       return this->ComputeNextStep(xprev, dxprev, xnext, t, delT, delTActual,
    00088                                    minStep, maxStep, maxError, error);
    00089     }
    00090   virtual int ComputeNextStep(float* xprev, float* xnext,
    00091                               float t, float& delT, float& delTActual,
    00092                               float minStep, float maxStep,
    00093                               float maxError, float& error)
    00094     {
    00095       return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
    00096                                    minStep, maxStep, maxError, error);
    00097     }
    00098   virtual int ComputeNextStep(float* xprev, float* dxprev, float* xnext,
    00099                               float t, float& delT, float& delTActual,
    00100                               float minStep, float maxStep,
    00101                               float maxError, float& error);
    00103
    00104 protected:
    00105   vtkRungeKutta4();
    00106   ~vtkRungeKutta4();
    00107
    00108   virtual void Initialize();
    00109
    00110   float* NextDerivs[3];
    00111 private:
    00112   vtkRungeKutta4(const vtkRungeKutta4&);  // Not implemented.
    00113   void operator=(const vtkRungeKutta4&);  // Not implemented.
    00114 };
    00115
    00116 #endif
    00117
    00118
    00119
    00120
    00121
    00122
    00123
    00124