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 =========================================================================*/
29 #ifndef vtkRungeKutta2_h
30 #define vtkRungeKutta2_h
31 
32 #include "vtkCommonMathModule.h" // For export macro
34 
35 class VTKCOMMONMATH_EXPORT vtkRungeKutta2 : public vtkInitialValueProblemSolver
36 {
37 public:
39 
43  static vtkRungeKutta2 *New();
44 
46 
59  int ComputeNextStep(double* xprev, double* xnext,
60  double t, double& delT,
61  double maxError, double& error) VTK_OVERRIDE
62  {
63  double minStep = delT;
64  double maxStep = delT;
65  double delTActual;
66  return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
67  minStep, maxStep, maxError, error);
68  }
69  int ComputeNextStep(double* xprev, double* dxprev, double* xnext,
70  double t, double& delT,
71  double maxError, double& error) VTK_OVERRIDE
72  {
73  double minStep = delT;
74  double maxStep = delT;
75  double delTActual;
76  return this->ComputeNextStep(xprev, dxprev, xnext, t, delT, delTActual,
77  minStep, maxStep, maxError, error);
78  }
79  int ComputeNextStep(double* xprev, double* xnext,
80  double t, double& delT, double& delTActual,
81  double minStep, double maxStep,
82  double maxError, double& error) VTK_OVERRIDE
83  {
84  return this->ComputeNextStep(xprev, 0, xnext, t, delT, delTActual,
85  minStep, maxStep, maxError, error);
86  }
87  int ComputeNextStep(double* xprev, double* dxprev, double* xnext,
88  double t, double& delT, double& delTActual,
89  double minStep, double maxStep,
90  double maxError, double& error) VTK_OVERRIDE;
92 
93 protected:
95  ~vtkRungeKutta2() VTK_OVERRIDE;
96 private:
97  vtkRungeKutta2(const vtkRungeKutta2&) VTK_DELETE_FUNCTION;
98  void operator=(const vtkRungeKutta2&) VTK_DELETE_FUNCTION;
99 };
100 
101 #endif
102 
103 
104 
105 
106 
107 
108 
109 
110 // VTK-HeaderTest-Exclude: vtkRungeKutta2.h
virtual int ComputeNextStep(double *xprev, double *xnext, double t, double &delT, double maxError, double &error)
Given initial values, xprev , initial time, t and a requested time interval, delT calculate values of...
int ComputeNextStep(double *xprev, double *xnext, double t, double &delT, double &delTActual, double minStep, double maxStep, double maxError, double &error) override
Given initial values, xprev , initial time, t and a requested time interval, delT calculate values of...
int ComputeNextStep(double *xprev, double *xnext, double t, double &delT, double maxError, double &error) override
Given initial values, xprev , initial time, t and a requested time interval, delT calculate values of...
int ComputeNextStep(double *xprev, double *dxprev, double *xnext, double t, double &delT, double maxError, double &error) override
Given initial values, xprev , initial time, t and a requested time interval, delT calculate values of...
Integrate an initial value problem using 2nd order Runge-Kutta method.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
Integrate a set of ordinary differential equations (initial value problem) in time.