diff options
Diffstat (limited to 'packages/sundials/src/Numeric/Sundials/ARKode')
-rw-r--r-- | packages/sundials/src/Numeric/Sundials/ARKode/ODE.hs | 24 |
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 | ||
139 | import qualified Types as T | 139 | import qualified Types as T |
140 | import Arkode (sDIRK_2_1_2, kVAERNO_4_2_3, sDIRK_5_3_4) | 140 | import Arkode (sDIRK_2_1_2, kVAERNO_4_2_3, sDIRK_5_3_4, fEHLBERG_6_4_5) |
141 | import qualified Arkode as B | 141 | import qualified Arkode as B |
142 | 142 | ||
143 | import Debug.Trace | 143 | import 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 | ||
229 | getMethod :: ODEMethod -> Int | 231 | getMethod :: ODEMethod -> Int |
230 | getMethod (SDIRK_2_1_2 _) = sDIRK_2_1_2 | 232 | getMethod (SDIRK_2_1_2 _) = sDIRK_2_1_2 |
231 | getMethod (KVAERNO_4_2_3 _) = kVAERNO_4_2_3 | 233 | getMethod (KVAERNO_4_2_3 _) = kVAERNO_4_2_3 |
232 | getMethod (SDIRK_5_3_4 _) = sDIRK_5_3_4 | 234 | getMethod (SDIRK_5_3_4 _) = sDIRK_5_3_4 |
233 | getMethod (SDIRK_5_3_4' ) = sDIRK_5_3_4 | 235 | getMethod (SDIRK_5_3_4' ) = sDIRK_5_3_4 |
236 | getMethod (FEHLBERG_6_4_5 _) = fEHLBERG_6_4_5 | ||
237 | getMethod (FEHLBERG_6_4_5' ) = fEHLBERG_6_4_5 | ||
234 | 238 | ||
235 | getJacobian :: ODEMethod -> Maybe Jacobian | 239 | getJacobian :: ODEMethod -> Maybe Jacobian |
236 | getJacobian (SDIRK_2_1_2 j) = Just j | 240 | getJacobian (SDIRK_2_1_2 j) = Just j |
237 | getJacobian (KVAERNO_4_2_3 j) = Just j | 241 | getJacobian (KVAERNO_4_2_3 j) = Just j |
238 | getJacobian (SDIRK_5_3_4 j) = Just j | 242 | getJacobian (SDIRK_5_3_4 j) = Just j |
239 | getJacobian (SDIRK_5_3_4' ) = Nothing | 243 | getJacobian (SDIRK_5_3_4' ) = Nothing |
244 | getJacobian (FEHLBERG_6_4_5 j) = Just j | ||
245 | getJacobian (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. |
242 | odeSolveV | 248 | odeSolveV |