Mercurial > octave
diff libinterp/dldfcn/__ode15__.cc @ 26894:ee6300e77c92
Update detection of sundials in the build system (bug #52475).
* m4/acnclude.m4 : check for sunlinsol_klu.h and sunlinsol_dense.h
* configure.ac : update check for sundials features
* script/ode/ode15i.m : update conditionals in tests
* script/ode/ode15s.m : update conditionals in tests
* libinterp/dldfcn/__ode15__.cc : udate conditionals in preprocessor directives
author | Carlo de Falco <carlo.defalco@polimi.it> |
---|---|
date | Fri, 15 Feb 2019 12:35:15 +0100 |
parents | 25284d620919 |
children | a1acd11bad19 |
line wrap: on
line diff
--- a/libinterp/dldfcn/__ode15__.cc Fri Feb 15 12:24:28 2019 +0100 +++ b/libinterp/dldfcn/__ode15__.cc Fri Feb 15 12:35:15 2019 +0100 @@ -45,15 +45,31 @@ # include <ida/ida.h> # endif -# if defined (HAVE_IDA_IDA_DENSE_H) -# include <ida/ida_dense.h> +# if defined (HAVE_SUNDIALS_SUNDIALS_MATRIX_H) +# include <sundials/sundials_matrix.h> +# endif + +# if defined (HAVE_SUNDIALS_SUNDIALS_LINEARSOLVER_H) +# include <sundials/sundials_linearsolver.h> +# endif + +# if defined (HAVE_SUNLINSOL_SUNLINSOL_DENSE_H) +# include <sunlinsol/sunlinsol_dense.h> # endif -# if defined (HAVE_IDA_IDA_KLU_H) -# include <ida/ida_klu.h> +# if defined (HAVE_IDA_IDA_DIRECT_H) +# include <ida/ida_direct.h> +# endif + +# if defined (HAVE_SUNDIALS_SUNDIALS_SPARSE_H) # include <sundials/sundials_sparse.h> # endif + +# if defined (HAVE_SUNLINSOL_SUNLINSOL_KLU_H) +# include <sunlinsol/sunlinsol_klu.h> +# endif + # if defined (HAVE_NVECTOR_NVECTOR_SERIAL_H) # include <nvector/nvector_serial.h> # endif @@ -221,7 +237,7 @@ jacdense_impl (realtype t, realtype cj, N_Vector& yy, N_Vector& yyp, SUNMatrix& JJ); -# if defined (HAVE_SUNDIALS_IDAKLU) +# if defined (HAVE_SUNDIALS_SUNLINSOL_KLU) static int jacsparse (realtype t, realtype cj, N_Vector yy, N_Vector yyp, N_Vector, SUNMatrix Jac, void *user_data, N_Vector, @@ -338,7 +354,7 @@ if (havejacsparse) { -# if defined (HAVE_SUNDIALS_IDAKLU) +#if defined (HAVE_SUNDIALS_SUNLINSOL_KLU) sunJacMatrix = SUNSparseMatrix (num, num, num*num, CSC_MAT); if (! sunJacMatrix) @@ -405,7 +421,7 @@ END_INTERRUPT_WITH_EXCEPTIONS; } -# if defined (HAVE_SUNDIALS_IDAKLU) +# if defined (HAVE_SUNDIALS_SUNLINSOL_KLU) void IDA::jacsparse_impl (realtype t, realtype cj, N_Vector& yy, N_Vector& yyp, SUNMatrix& Jac)