summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominic Steinitz <dominic@steinitz.org>2018-04-07 09:23:05 +0100
committerDominic Steinitz <dominic@steinitz.org>2018-04-07 09:23:05 +0100
commit5b3a99d6be39981dbae52bd4d6cb594b3593e103 (patch)
treef11f6ea6ed66053729fefe10d65570b84470c83f
parent4c15bd8e57e64bec38059d632e0de437aad06309 (diff)
The specification for step control
-rw-r--r--packages/sundials/src/Numeric/Sundials/ARKode/ODE.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/sundials/src/Numeric/Sundials/ARKode/ODE.hs b/packages/sundials/src/Numeric/Sundials/ARKode/ODE.hs
index e95ca3f..9ddb3df 100644
--- a/packages/sundials/src/Numeric/Sundials/ARKode/ODE.hs
+++ b/packages/sundials/src/Numeric/Sundials/ARKode/ODE.hs
@@ -588,7 +588,7 @@ getButcherTable method = unsafePerformIO $ do
588-- 588--
589-- [GSL](https://www.gnu.org/software/gsl/doc/html/ode-initval.html#adaptive-step-size-control) 589-- [GSL](https://www.gnu.org/software/gsl/doc/html/ode-initval.html#adaptive-step-size-control)
590-- allows the user to control the step size adjustment using 590-- allows the user to control the step size adjustment using
591-- \(D_i = \epsilon^{abs}s_i + \epsilon^{rel}(a_{y} |y_i| + a_{dy/dt} h |y'_i|)\) where 591-- \(D_i = \epsilon^{abs}s_i + \epsilon^{rel}(a_{y} |y_i| + a_{dy/dt} h |\dot{y}_i|)\) where
592-- \(\epsilon^{abs}\) is the required absolute error, \(\epsilon^{rel}\) 592-- \(\epsilon^{abs}\) is the required absolute error, \(\epsilon^{rel}\)
593-- is the required relative error, \(s_i\) is a vector of scaling 593-- is the required relative error, \(s_i\) is a vector of scaling
594-- factors, \(a_{y}\) is a scaling factor for the solution \(y\) and 594-- factors, \(a_{y}\) is a scaling factor for the solution \(y\) and
@@ -596,12 +596,12 @@ getButcherTable method = unsafePerformIO $ do
596-- 596--
597-- [ARKode](https://computation.llnl.gov/projects/sundials/arkode) 597-- [ARKode](https://computation.llnl.gov/projects/sundials/arkode)
598-- allows the user to control the step size adjustment using 598-- allows the user to control the step size adjustment using
599-- \(\epsilon^{rel}|y_i| + \epsilon^{abs}_i\). For compatibility with 599-- \(\eta^{rel}|y_i| + \eta^{abs}_i\). For compatibility with
600-- [hmatrix-gsl](https://hackage.haskell.org/package/hmatrix-gsl), 600-- [hmatrix-gsl](https://hackage.haskell.org/package/hmatrix-gsl),
601-- tolerances for \(y\) and \(\dot{y}\) can be specified but the latter have no 601-- tolerances for \(y\) and \(\dot{y}\) can be specified but the latter have no
602-- effect. 602-- effect.
603data StepControl = X Double Double -- ^ absolute and relative tolerance for \(y\) 603data StepControl = X Double Double -- ^ absolute and relative tolerance for \(y\); in GSL terms, \(a_{y} = 1\) and \(a_{dy/dt} = 0\); in ARKode terms, the \(\eta^{abs}_i\) are identical
604 | X' Double Double -- ^ absolute and relative tolerance for \(\dot{y}\) 604 | X' Double Double -- ^ absolute and relative tolerance for \(\dot{y}\); in GSL terms, \(a_{y} = 0\) and \(a_{dy/dt} = 1\); in ARKode terms, the latter is treated as the relative tolerance for \(y\) so this is the same as specifying 'X' which may be entirely incorrect for the given problem
605 | XX' Double Double Double Double -- ^ include both via relative tolerance 605 | XX' Double Double Double Double -- ^ include both via relative tolerance
606 -- scaling factors \(a_y\), \(a_{{dy}/{dt}}\) 606 -- scaling factors \(a_y\), \(a_{{dy}/{dt}}\); in ARKode terms, the latter is ignored and \(\eta^{rel} = a_{y}\epsilon^{rel}\)
607 | ScXX' Double Double Double Double (Vector Double) -- ^ scale absolute tolerance of \(y_i\) 607 | ScXX' Double Double Double Double (Vector Double) -- ^ scale absolute tolerance of \(y_i\); in ARKode terms, \(a_{{dy}/{dt}}\) is ignored, \(\eta^{abs}_i = s_i \epsilon^{abs}\) and \(\eta^{rel} = a_{y}\epsilon^{rel}\)