From cb09d0e99ae4f10cd2b3f3ac667df83946a9744d Mon Sep 17 00:00:00 2001 From: Dominic Steinitz Date: Sun, 30 Jun 2019 08:58:16 +0100 Subject: Remove sundials as it has its own repo now. Fix * https://github.com/haskell-numerics/hmatrix/issues/304 * https://github.com/haskell-numerics/hmatrix/issues/302 * https://github.com/haskell-numerics/hmatrix/issues/290 --- packages/sundials/src/helpers.c | 44 ----------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 packages/sundials/src/helpers.c (limited to 'packages/sundials/src/helpers.c') diff --git a/packages/sundials/src/helpers.c b/packages/sundials/src/helpers.c deleted file mode 100644 index f0ca592..0000000 --- a/packages/sundials/src/helpers.c +++ /dev/null @@ -1,44 +0,0 @@ -#include -#include -#include /* prototypes for ARKODE fcts., consts. */ -#include /* serial N_Vector types, fcts., macros */ -#include /* access to dense SUNMatrix */ -#include /* access to dense SUNLinearSolver */ -#include /* access to ARKDls interface */ -#include /* definition of type realtype */ -#include - -/* Check function return value... - opt == 0 means SUNDIALS function allocates memory so check if - returned NULL pointer - opt == 1 means SUNDIALS function returns a flag so check if - flag >= 0 - opt == 2 means function allocates memory so check if returned - NULL pointer -*/ -int check_flag(void *flagvalue, const char *funcname, int opt) -{ - int *errflag; - - /* Check if SUNDIALS function returned NULL pointer - no memory allocated */ - if (opt == 0 && flagvalue == NULL) { - fprintf(stderr, "\nSUNDIALS_ERROR: %s() failed - returned NULL pointer\n\n", - funcname); - return 1; } - - /* Check if flag < 0 */ - else if (opt == 1) { - errflag = (int *) flagvalue; - if (*errflag < 0) { - fprintf(stderr, "\nSUNDIALS_ERROR: %s() failed with flag = %d\n\n", - funcname, *errflag); - return 1; }} - - /* Check if function returned NULL pointer - no memory allocated */ - else if (opt == 2 && flagvalue == NULL) { - fprintf(stderr, "\nMEMORY_ERROR: %s() failed - returned NULL pointer\n\n", - funcname); - return 1; } - - return 0; -} -- cgit v1.2.3