summaryrefslogtreecommitdiff
path: root/packages/sundials/src/Numeric/Sundials
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sundials/src/Numeric/Sundials')
-rw-r--r--packages/sundials/src/Numeric/Sundials/ARKode/ODE.hs18
1 files changed, 2 insertions, 16 deletions
diff --git a/packages/sundials/src/Numeric/Sundials/ARKode/ODE.hs b/packages/sundials/src/Numeric/Sundials/ARKode/ODE.hs
index 8f83fe7..2577b8e 100644
--- a/packages/sundials/src/Numeric/Sundials/ARKode/ODE.hs
+++ b/packages/sundials/src/Numeric/Sundials/ARKode/ODE.hs
@@ -35,6 +35,8 @@
35-- main = mplot (ts : toColumns sol) 35-- main = mplot (ts : toColumns sol)
36-- @ 36-- @
37-- 37--
38-- <<diagrams/brusselator.png#diagram=brusselator&height=400&width=500>>
39--
38-- KVAERNO_4_2_3 40-- KVAERNO_4_2_3
39-- 41--
40-- \[ 42-- \[
@@ -70,7 +72,6 @@
70module Numeric.Sundials.ARKode.ODE ( odeSolve 72module Numeric.Sundials.ARKode.ODE ( odeSolve
71 , odeSolveV 73 , odeSolveV
72 , odeSolveVWith 74 , odeSolveVWith
73 , odeSolve'
74 , getButcherTable 75 , getButcherTable
75 , getBT 76 , getBT
76 , btGet 77 , btGet
@@ -244,21 +245,6 @@ odeSolve f y0 ts =
244 nC = length y0 245 nC = length y0
245 g t x0 = V.fromList $ f t (V.toList x0) 246 g t x0 = V.fromList $ f t (V.toList x0)
246 247
247odeSolve' :: ODEMethod
248 -> (Double -> [Double] -> [Double]) -- ^ The RHS of the system \(\dot{y} = f(t,y)\)
249 -> [Double] -- ^ initial conditions
250 -> Vector Double -- ^ desired solution times
251 -> Matrix Double -- ^ solution
252odeSolve' method f y0 ts =
253 case odeSolveVWith method (XX' 1.0e-6 1.0e-10 1 1) g (V.fromList y0) (V.fromList $ toList ts) of
254 Left c -> error $ show c -- FIXME
255 Right (v, d) -> trace (show d) $ (nR >< nC) (V.toList v)
256 where
257 us = toList ts
258 nR = length us
259 nC = length y0
260 g t x0 = V.fromList $ f t (V.toList x0)
261
262odeSolveVWith :: 248odeSolveVWith ::
263 ODEMethod 249 ODEMethod
264 -> StepControl 250 -> StepControl