From 8612df2834fa652e6f9ab9b6e18617b6eac267a6 Mon Sep 17 00:00:00 2001 From: Dominic Steinitz Date: Wed, 28 Mar 2018 17:34:46 +0100 Subject: Remove unnecessary white space --- packages/sundials/src/Numeric/Sundials/ARKode/ODE.hs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'packages/sundials/src/Numeric/Sundials/ARKode') diff --git a/packages/sundials/src/Numeric/Sundials/ARKode/ODE.hs b/packages/sundials/src/Numeric/Sundials/ARKode/ODE.hs index 76ed61b..ff4ede8 100644 --- a/packages/sundials/src/Numeric/Sundials/ARKode/ODE.hs +++ b/packages/sundials/src/Numeric/Sundials/ARKode/ODE.hs @@ -58,10 +58,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" @@ -126,7 +126,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 @@ -134,7 +134,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 @@ -303,13 +303,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 @@ -423,7 +423,7 @@ getButcherTable = unsafePerformIO $ do /* Clean up and return */ N_VDestroy(y); /* Free y vector */ ARKodeFree(&arkode_mem); /* Free integrator memory */ - + return flag; } |] if res == 0 @@ -433,4 +433,3 @@ getButcherTable = unsafePerformIO $ do return $ Right (x, y) else do return $ Left res - -- cgit v1.2.3