VTK
vtkRungeKutta2.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkRungeKutta2.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
28 #ifndef vtkRungeKutta2_h
29 #define vtkRungeKutta2_h
30 
31 #include "vtkCommonMathModule.h" // For export macro
33 
35 {
36 public:
38 
40  static vtkRungeKutta2 *New();
41 
43 
49  virtual int ComputeNextStep(double* xprev, double* xnext, double t,
50  double& delT, double maxError, double& error)
51  {
52  double minStep = delT;
53  double maxStep = delT;
54  double delTActual;
55  return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
56  minStep, maxStep, maxError, error);
57  }
58  virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext,
59  double t, double& delT,
60  double maxError, double& error)
61  {
62  double minStep = delT;
63  double maxStep = delT;
64  double delTActual;
65  return this->ComputeNextStep(xprev, dxprev, xnext, t, delT, delTActual,
66  minStep, maxStep, maxError, error);
67  }
68  virtual int ComputeNextStep(double* xprev, double* xnext,
69  double t, double& delT, double& delTActual,
70  double minStep, double maxStep,
71  double maxError, double& error)
72  {
73  return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
74  minStep, maxStep, maxError, error);
75  }
76  virtual int ComputeNextStep(double* xprev, double* dxprev, double* xnext,
77  double t, double& delT, double& delTActual,
78  double minStep, double maxStep,
79  double maxError, double& error);
81 
82 protected:
84  ~vtkRungeKutta2();
85 private:
86  vtkRungeKutta2(const vtkRungeKutta2&); // Not implemented.
87  void operator=(const vtkRungeKutta2&); // Not implemented.
88 };
89 
90 #endif
91 
92 
93 
94 
95 
96 
97 
98 
99 // VTK-HeaderTest-Exclude: vtkRungeKutta2.h
virtual int ComputeNextStep(double *xprev, double *xnext, double t, double &delT, double maxError, double &error)
Integrate an initial value problem using 2nd order Runge-Kutta method.
virtual int ComputeNextStep(double *xprev, double *xnext, double t, double &delT, double &delTActual, double minStep, double maxStep, double maxError, double &error)
static vtkObject * New()
virtual int ComputeNextStep(double *xprev, double *dxprev, double *xnext, double t, double &delT, double maxError, double &error)
virtual int ComputeNextStep(double *xprev, double *xnext, double t, double &delT, double maxError, double &error)
#define VTKCOMMONMATH_EXPORT
Integrate a set of ordinary differential equations (initial value problem) in time.