]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Attempt to make MPGMRES test more robust 18473/head
authorMartin Kronbichler <martin.kronbichler@rub.de>
Tue, 20 May 2025 14:43:01 +0000 (16:43 +0200)
committerMartin Kronbichler <martin.kronbichler@rub.de>
Tue, 20 May 2025 15:03:58 +0000 (17:03 +0200)
tests/lac/solver_mpgmres_01.cc
tests/lac/solver_mpgmres_01.output

index 28cafb3cc359f39e5f83b4fecaac4bd832b3f63b..8c4b27e81195d827d1ddfb6f755c148c75412417 100644 (file)
@@ -70,8 +70,9 @@ main()
   const unsigned int M = 2 * N;
 
   SparsityPattern sparsity_pattern(M, M, 2);
-  for (unsigned int i = 0; i < M - 1; ++i)
+  for (unsigned int i = 0; i < N; ++i)
     sparsity_pattern.add(i, i + 1);
+  sparsity_pattern.add(N, N - 1);
   sparsity_pattern.compress();
   SparseMatrix<double> matrix(sparsity_pattern);
 
@@ -80,6 +81,7 @@ main()
       matrix.diag_element(i) = 1.0 + 1 * i;
       matrix.set(i, i + 1, 1.);
     }
+  matrix.set(N, N - 1, 1.);
   for (unsigned int i = N; i < M; ++i)
     matrix.diag_element(i) = 1.;
 
@@ -136,6 +138,6 @@ main()
   check_solver_within_range(
     solver_mpgmres.solve(matrix, sol, rhs, wrapper_a, wrapper_b, wrapper_c),
     control.last_step(),
-    24 - 6,
-    24 + 6);
+    20 - 12,
+    20 + 12);
 }
index c50f13ed6c24accb465ff7bb472be306d2c90c29..ca380bf2586e3758eb24c30586c224a452690517 100644 (file)
@@ -31,4 +31,4 @@ Applying preconditioner C
 Applying preconditioner A
 Applying preconditioner B
 Applying preconditioner C
-DEAL::Solver stopped within 18 - 30 iterations
+DEAL::Solver stopped within 8 - 32 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.