From 7107646e9c92747d81ca15a264609e6637e1dd71 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 28 Feb 2021 13:41:39 +0100 Subject: [PATCH] No longer support SUNDIALS versions before 3.0. --- source/sundials/kinsol.cc | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/source/sundials/kinsol.cc b/source/sundials/kinsol.cc index 0bccafdbbc..cc38f809e8 100644 --- a/source/sundials/kinsol.cc +++ b/source/sundials/kinsol.cc @@ -36,14 +36,10 @@ # include +# include # include -# if DEAL_II_SUNDIALS_VERSION_GTE(3, 0, 0) -# include -# include -# include -# else -# include -# endif +# include +# include # include # include @@ -269,32 +265,21 @@ namespace SUNDIALS status = KINSetRelErrFunc(kinsol_mem, data.dq_relative_error); AssertKINSOL(status); -# if DEAL_II_SUNDIALS_VERSION_GTE(3, 0, 0) SUNMatrix J = nullptr; SUNLinearSolver LS = nullptr; -# endif if (solve_jacobian_system) { auto KIN_mem = static_cast(kinsol_mem); KIN_mem->kin_lsolve = t_kinsol_solve_jacobian; if (setup_jacobian) - { - KIN_mem->kin_lsetup = t_kinsol_setup_jacobian; -# if DEAL_II_SUNDIALS_VERSION_LT(3, 0, 0) - KIN_mem->kin_setupNonNull = true; -# endif - } + KIN_mem->kin_lsetup = t_kinsol_setup_jacobian; } else { -# if DEAL_II_SUNDIALS_VERSION_GTE(3, 0, 0) J = SUNDenseMatrix(system_size, system_size); LS = SUNDenseLinearSolver(u_scale, J); status = KINDlsSetLinearSolver(kinsol_mem, LS, J); -# else - status = KINDense(kinsol_mem, system_size); -# endif AssertKINSOL(status); } @@ -332,10 +317,8 @@ namespace SUNDIALS status = KINGetNumNonlinSolvIters(kinsol_mem, &nniters); AssertKINSOL(status); -# if DEAL_II_SUNDIALS_VERSION_GTE(3, 0, 0) SUNMatDestroy(J); SUNLinSolFree(LS); -# endif KINFree(&kinsol_mem); return static_cast(nniters); -- 2.39.5