summaryrefslogtreecommitdiffstats
path: root/src/vZ
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-10-06 23:05:48 -0400
committerTavian Barnes <tavianator@gmail.com>2010-10-06 23:05:48 -0400
commite4857d7abd64993c18986b7b5f7e3b0c14eb27e0 (patch)
tree7c772c730fa8e7dd37d97a417f83bfa75fe547cb /src/vZ
parent486a188b074c0c4f3ad771f536159e1bd2045fe2 (diff)
downloadvz-e4857d7abd64993c18986b7b5f7e3b0c14eb27e0.tar.xz
Clean up integrator comments.
Diffstat (limited to 'src/vZ')
-rw-r--r--src/vZ/BS23.hpp20
-rw-r--r--src/vZ/Euler.hpp2
-rw-r--r--src/vZ/HE12.hpp14
-rw-r--r--src/vZ/Heun.hpp6
-rw-r--r--src/vZ/Midpoint.hpp6
-rw-r--r--src/vZ/RK4.hpp8
6 files changed, 17 insertions, 39 deletions
diff --git a/src/vZ/BS23.hpp b/src/vZ/BS23.hpp
index 1092d81..f81cad1 100644
--- a/src/vZ/BS23.hpp
+++ b/src/vZ/BS23.hpp
@@ -23,20 +23,18 @@
namespace vZ
{
- // Heun-Euler method
+ // Bogacki-Shampine method
//
- // Second-order with embedded first-order
+ // Third-order with embedded second-order
// Its tableau is:
//
- // 0 |
- // 1 | 1
- // --+---------
- // | 1/2 1/2
- // | 1 0
- //
- // k1 = dt*f(y[n])
- // k2 = dt*f(y[n] + dt*k1)
- // y[n + 1] = y[n] + 1/2*(k1 + k2)
+ // 0 |
+ // 1/2 | 1/2
+ // 3/4 | 0 3/4
+ // 1 | 2/9 1/3 4/9
+ // ----+-----------------
+ // b | 2/9 1/3 4/9 0
+ // b* | 7/24 1/4 1/3 1/8
template <typename Y>
class GenericBS23Integrator : public GenericAdaptiveIntegrator<Y>
{
diff --git a/src/vZ/Euler.hpp b/src/vZ/Euler.hpp
index 033da2e..ba53b98 100644
--- a/src/vZ/Euler.hpp
+++ b/src/vZ/Euler.hpp
@@ -32,8 +32,6 @@ namespace vZ
// 0 |
// --+--
// | 1
- //
- // y[n + 1] = y[n] + dt*f(y[n])
template <typename Y>
class GenericEulerIntegrator : public GenericSimpleIntegrator<Y>
{
diff --git a/src/vZ/HE12.hpp b/src/vZ/HE12.hpp
index 0f7a299..48d63ec 100644
--- a/src/vZ/HE12.hpp
+++ b/src/vZ/HE12.hpp
@@ -28,15 +28,11 @@ namespace vZ
// Second-order with embedded first-order
// Its tableau is:
//
- // 0 |
- // 1 | 1
- // --+---------
- // | 1/2 1/2
- // | 1 0
- //
- // k1 = dt*f(y[n])
- // k2 = dt*f(y[n] + dt*k1)
- // y[n + 1] = y[n] + 1/2*(k1 + k2)
+ // 0 |
+ // 1 | 1
+ // ---+---------
+ // b | 1/2 1/2
+ // b* | 1 0
template <typename Y>
class GenericHE12Integrator : public GenericAdaptiveIntegrator<Y>
{
diff --git a/src/vZ/Heun.hpp b/src/vZ/Heun.hpp
index 5e697af..7de2f40 100644
--- a/src/vZ/Heun.hpp
+++ b/src/vZ/Heun.hpp
@@ -32,11 +32,7 @@ namespace vZ
// 0 |
// 1 | 1
// --+---------
- // | 1/2 1/2
- //
- // k1 = dt*f(y[n])
- // k2 = dt*f(y[n] + dt*k1)
- // y[n + 1] = y[n] + 1/2*(k1 + k2)
+ // b | 1/2 1/2
template <typename Y>
class GenericHeunIntegrator : public GenericSimpleIntegrator<Y>
{
diff --git a/src/vZ/Midpoint.hpp b/src/vZ/Midpoint.hpp
index a4bb906..071e589 100644
--- a/src/vZ/Midpoint.hpp
+++ b/src/vZ/Midpoint.hpp
@@ -32,11 +32,7 @@ namespace vZ
// 0 |
// 1/2 | 1/2
// ----+------
- // | 0 1
- //
- // k1 = dt*f(y[n])
- // k2 = dt*f(y[n] + (dt/2)*k1)
- // y[n + 1] = y[n] + k2
+ // b | 0 1
template <typename Y>
class GenericMidpointIntegrator : public GenericSimpleIntegrator<Y>
{
diff --git a/src/vZ/RK4.hpp b/src/vZ/RK4.hpp
index 39fa306..0eb680e 100644
--- a/src/vZ/RK4.hpp
+++ b/src/vZ/RK4.hpp
@@ -34,13 +34,7 @@ namespace vZ
// 1/2 | 0 1/2
// 1 | 0 0 1
// ----+----------------
- // | 1/6 1/3 1/3 1/6
- //
- // k1 = dt*f(y[n])
- // k2 = dt*f(y[n] + (dt/2)*k1)
- // k3 = dt*f(y[n] + (dt/2)*k2)
- // k4 = dt*f(y[n] + dt*k3)
- // y[n + 1] = y[n] + (k1 + 2*k2 + 2*k3 + k4)/6
+ // b | 1/6 1/3 1/3 1/6
template <typename Y>
class GenericRK4Integrator : public GenericSimpleIntegrator<Y>
{