summaryrefslogtreecommitdiff
path: root/packages/sundials/src/Numeric/Sundials/ARKode/ODE.hs
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sundials/src/Numeric/Sundials/ARKode/ODE.hs')
-rw-r--r--packages/sundials/src/Numeric/Sundials/ARKode/ODE.hs24
1 files changed, 15 insertions, 9 deletions
diff --git a/packages/sundials/src/Numeric/Sundials/ARKode/ODE.hs b/packages/sundials/src/Numeric/Sundials/ARKode/ODE.hs
index 444138d..380b1d6 100644
--- a/packages/sundials/src/Numeric/Sundials/ARKode/ODE.hs
+++ b/packages/sundials/src/Numeric/Sundials/ARKode/ODE.hs
@@ -137,7 +137,7 @@ import Numeric.LinearAlgebra.HMatrix (Vector, Matrix, toList, (><),
137 size, subVector) 137 size, subVector)
138 138
139import qualified Types as T 139import qualified Types as T
140import Arkode (sDIRK_2_1_2, kVAERNO_4_2_3, sDIRK_5_3_4) 140import Arkode (sDIRK_2_1_2, kVAERNO_4_2_3, sDIRK_5_3_4, fEHLBERG_6_4_5)
141import qualified Arkode as B 141import qualified Arkode as B
142 142
143import Debug.Trace 143import Debug.Trace
@@ -225,18 +225,24 @@ data ODEMethod = SDIRK_2_1_2 Jacobian
225 | KVAERNO_4_2_3 Jacobian 225 | KVAERNO_4_2_3 Jacobian
226 | SDIRK_5_3_4 Jacobian 226 | SDIRK_5_3_4 Jacobian
227 | SDIRK_5_3_4' 227 | SDIRK_5_3_4'
228 | FEHLBERG_6_4_5 Jacobian
229 | FEHLBERG_6_4_5'
228 230
229getMethod :: ODEMethod -> Int 231getMethod :: ODEMethod -> Int
230getMethod (SDIRK_2_1_2 _) = sDIRK_2_1_2 232getMethod (SDIRK_2_1_2 _) = sDIRK_2_1_2
231getMethod (KVAERNO_4_2_3 _) = kVAERNO_4_2_3 233getMethod (KVAERNO_4_2_3 _) = kVAERNO_4_2_3
232getMethod (SDIRK_5_3_4 _) = sDIRK_5_3_4 234getMethod (SDIRK_5_3_4 _) = sDIRK_5_3_4
233getMethod (SDIRK_5_3_4' ) = sDIRK_5_3_4 235getMethod (SDIRK_5_3_4' ) = sDIRK_5_3_4
236getMethod (FEHLBERG_6_4_5 _) = fEHLBERG_6_4_5
237getMethod (FEHLBERG_6_4_5' ) = fEHLBERG_6_4_5
234 238
235getJacobian :: ODEMethod -> Maybe Jacobian 239getJacobian :: ODEMethod -> Maybe Jacobian
236getJacobian (SDIRK_2_1_2 j) = Just j 240getJacobian (SDIRK_2_1_2 j) = Just j
237getJacobian (KVAERNO_4_2_3 j) = Just j 241getJacobian (KVAERNO_4_2_3 j) = Just j
238getJacobian (SDIRK_5_3_4 j) = Just j 242getJacobian (SDIRK_5_3_4 j) = Just j
239getJacobian (SDIRK_5_3_4' ) = Nothing 243getJacobian (SDIRK_5_3_4' ) = Nothing
244getJacobian (FEHLBERG_6_4_5 j) = Just j
245getJacobian (FEHLBERG_6_4_5' ) = Nothing
240 246
241-- | A version of 'odeSolveVWith' with reasonable default step control. 247-- | A version of 'odeSolveVWith' with reasonable default step control.
242odeSolveV 248odeSolveV