From bc1f89da80249b8dce8ee4c736dd25ea7d607b11 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Fri, 5 Nov 2021 11:24:36 -0400 Subject: [PATCH] Revert "Addressed comments by WB." This reverts commit ab509cd1cbe288efa0f7164bc453c589b14aa50d. --- source/sundials/kinsol.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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>; -- 2.39.5