]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Revert "Addressed comments by WB."
authorDaniel Arndt <arndtd@ornl.gov>
Fri, 5 Nov 2021 15:24:36 +0000 (11:24 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Fri, 5 Nov 2021 15:24:36 +0000 (11:24 -0400)
This reverts commit ab509cd1cbe288efa0f7164bc453c589b14aa50d.

source/sundials/kinsol.cc

index 78e951b8d2ca52d32c0345ecad0164b54aa15b7d..bdbac290350672e21c67fe45521657040913d325 100644 (file)
@@ -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<VectorType>);
-        AssertKINSOL(status);
+        if (setup_jacobian)
+          {
+            status =
+              KINSetJacFn(kinsol_mem, &setup_jacobian_callback<VectorType>);
+            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<Vector<double>>;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.