From: Daniel Arndt Date: Fri, 5 Nov 2021 15:24:36 +0000 (-0400) Subject: Revert "Addressed comments by WB." X-Git-Tag: v9.3.2~1^2~8 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc1f89da80249b8dce8ee4c736dd25ea7d607b11;p=dealii.git Revert "Addressed comments by WB." This reverts commit ab509cd1cbe288efa0f7164bc453c589b14aa50d. --- diff --git a/source/sundials/kinsol.cc b/source/sundials/kinsol.cc index 78e951b8d2..bdbac29035 100644 --- a/source/sundials/kinsol.cc +++ b/source/sundials/kinsol.cc @@ -504,12 +504,12 @@ namespace SUNDIALS // Finally, if we were given a set-up function, tell KINSOL about // it as well. The manual says that this must happen *after* // calling KINSetLinearSolver - if (!setup_jacobian) - setup_jacobian = [](const VectorType &, const VectorType &) { - return 0; - }; - status = KINSetJacFn(kinsol_mem, &setup_jacobian_callback); - AssertKINSOL(status); + if (setup_jacobian) + { + status = + KINSetJacFn(kinsol_mem, &setup_jacobian_callback); + AssertKINSOL(status); + } # endif } @@ -537,6 +537,8 @@ namespace SUNDIALS reinit_vector = [](VectorType &) { AssertThrow(false, ExcFunctionNotProvided("reinit_vector")); }; + + setup_jacobian = [](const VectorType &, const VectorType &) { return 0; }; } template class KINSOL>;