From 1a66fb41c9c9f7e965b26a2e8cd55b52497e0903 Mon Sep 17 00:00:00 2001 From: Mathieu Boespflug Date: Sun, 25 Mar 2018 12:10:14 +0200 Subject: Remove extraneous whitespace. --- packages/sundials/src/Numeric/Sundials/Arkode/ODE.hs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'packages/sundials') diff --git a/packages/sundials/src/Numeric/Sundials/Arkode/ODE.hs b/packages/sundials/src/Numeric/Sundials/Arkode/ODE.hs index 15d2747..7b0cb0d 100644 --- a/packages/sundials/src/Numeric/Sundials/Arkode/ODE.hs +++ b/packages/sundials/src/Numeric/Sundials/Arkode/ODE.hs @@ -42,10 +42,10 @@ C.include "" C.include "" C.include "" -- prototypes for ARKODE fcts., consts. C.include "" -- serial N_Vector types, fcts., macros -C.include "" -- access to dense SUNMatrix -C.include "" -- access to dense SUNLinearSolver -C.include "" -- access to ARKDls interface -C.include "" -- definition of type realtype +C.include "" -- access to dense SUNMatrix +C.include "" -- access to dense SUNLinearSolver +C.include "" -- access to ARKDls interface +C.include "" -- definition of type realtype C.include "" C.include "../../../helpers.h" @@ -110,7 +110,7 @@ odeSolve f y0 ts = case solveOde g (V.fromList y0) (V.fromList $ toList ts) of nC = length y0 g t x0 = V.fromList $ f t (V.toList x0) -solveOde :: +solveOde :: (Double -> V.Vector Double -> V.Vector Double) -- ^ The RHS of the system \(\dot{y} = f(t,y)\) -> V.Vector Double -- ^ Initial conditions -> V.Vector Double -- ^ Desired solution times @@ -118,7 +118,7 @@ solveOde :: solveOde f y0 tt = case solveOdeC (coerce f) (coerce y0) (coerce tt) of Left c -> Left $ fromIntegral c Right (v, d) -> Right (coerce v, d) - + solveOdeC :: (CDouble -> V.Vector CDouble -> V.Vector CDouble) -- ^ The RHS of the system \(\dot{y} = f(t,y)\) -> V.Vector CDouble -- ^ Initial conditions @@ -287,13 +287,13 @@ solveOdeC fun f0 ts = unsafePerformIO $ do flag = ARKDlsGetNumRhsEvals(arkode_mem, &nfeLS); check_flag(&flag, "ARKDlsGetNumRhsEvals", 1); ($vec-ptr:(long int *diagMut))[9] = ncfn; - + /* Clean up and return */ N_VDestroy(y); /* Free y vector */ ARKodeFree(&arkode_mem); /* Free integrator memory */ SUNLinSolFree(LS); /* Free linear solver */ SUNMatDestroy(A); /* Free A matrix */ - + return flag; } |] if res == 0 @@ -313,4 +313,3 @@ solveOdeC fun f0 ts = unsafePerformIO $ do return $ Right (m, d) else do return $ Left res - -- cgit v1.2.3