]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Test sundials/kinsol_08: remove calls to deprecated and removed functions 17341/head
authorMatthias Maier <tamiko@43-1.org>
Mon, 22 Jul 2024 11:55:47 +0000 (06:55 -0500)
committerMatthias Maier <tamiko@43-1.org>
Mon, 22 Jul 2024 13:36:06 +0000 (08:36 -0500)
tests/sundials/kinsol_08.cc
tests/sundials/kinsol_08.output.sundials7 [new file with mode: 0644]

index b38797aa4debca750b2242656b2ab17990f33825..2ddddea730176bdd6f83f91d857a79804bf92191 100644 (file)
@@ -112,10 +112,14 @@ main()
       J_inverse.vmult(dst, rhs);
     };
 
-  kinsol.custom_setup = [](void *kinsol_mem) {
-    // test custom_setup callback by querying some information from KINSOL
+  kinsol.custom_setup = [](void *kinsol_mem [[maybe_unused]]) {
+  // test custom_setup callback by querying some information from KINSOL
+#if DEAL_II_SUNDIALS_VERSION_LT(7, 0, 0)
+    // TODO: KINSetInfoHandlerFn and KINSetPrintLevel have been removed in
+    // version 7.0, so ideally do something else here. MM
     KINSetInfoHandlerFn(kinsol_mem, kinsol_info_callback, nullptr);
     KINSetPrintLevel(kinsol_mem, 1);
+#endif
   };
 
   VectorType v(N);
diff --git a/tests/sundials/kinsol_08.output.sundials7 b/tests/sundials/kinsol_08.output.sundials7
new file mode 100644 (file)
index 0000000..431b213
--- /dev/null
@@ -0,0 +1,20 @@
+
+DEAL::Evaluating the solution at u=(0.500000,1.23400)
+DEAL::Setting up Jacobian system at u=(0.500000,1.23400)
+DEAL::Solving Jacobian system with rhs=(0.162480,-1.79816)
+DEAL::Evaluating the solution at u=(0.500000,1.23400)
+DEAL::Evaluating the solution at u=(-0.282294,0.265967)
+DEAL::Setting up Jacobian system at u=(-0.282294,0.265967)
+DEAL::Solving Jacobian system with rhs=(0.564722,-0.0107297)
+DEAL::Evaluating the solution at u=(-0.282294,0.265967)
+DEAL::Evaluating the solution at u=(-0.000445202,0.0468183)
+DEAL::Setting up Jacobian system at u=(-0.000445202,0.0468183)
+DEAL::Solving Jacobian system with rhs=(0.00196544,-0.0463907)
+DEAL::Evaluating the solution at u=(-0.000445202,0.0468183)
+DEAL::Evaluating the solution at u=(-0.000536539,0.000570488)
+DEAL::Setting up Jacobian system at u=(-0.000536539,0.000570488)
+DEAL::Solving Jacobian system with rhs=(0.00107308,-3.39491e-05)
+DEAL::Evaluating the solution at u=(-0.000536554,0.000570504)
+DEAL::Evaluating the solution at u=(-2.88123e-10,7.40347e-10)
+-2.881e-10 7.403e-10 
+DEAL::Converged in 4 iterations.

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.