]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Put an extra check to lac/schur_complement_01 2770/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 7 Jul 2016 15:59:35 +0000 (17:59 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 7 Jul 2016 15:59:35 +0000 (17:59 +0200)
tests/lac/schur_complement_01.cc
tests/lac/schur_complement_01.with_cxx11=on.output

index 27e687bc20738aaaf1485d3933dd062234404e4f..2dea3359ef48e96ce511ed2e7ffa2577fe806c98 100644 (file)
@@ -109,7 +109,10 @@ int main()
                                              preconditioner_S);
 
       auto rhs = condense_schur_rhs (lo_A_inv,lo_C,f,g);
-      y = lo_S_inv * rhs; // Solve for y
+      check_solver_within_range(
+        y = lo_S_inv * rhs, // Solve for y
+        solver_control_S.last_step(), 1, 1);
+
       x = postprocess_schur_solution (lo_A_inv,lo_B,y,f);
 
       PRINTME("x", x);
@@ -208,7 +211,10 @@ int main()
                                                preconditioner_S);
 
         auto rhs = condense_schur_rhs (lo_A_inv,lo_C,f,g);
-        y = lo_S_inv * rhs; // Solve for y
+        check_solver_within_range(
+          y = lo_S_inv * rhs, // Solve for y
+          solver_control_S.last_step(), 11, 11);
+
         x = postprocess_schur_solution (lo_A_inv,lo_B,y,f);
 
         PRINTME("x = s.block(1)", x);
@@ -238,7 +244,10 @@ int main()
                                                lo_S_inv_approx);
 
         auto rhs = condense_schur_rhs (lo_A_inv,lo_C,f,g);
-        y = lo_S_inv * rhs; // Solve for y
+        check_solver_within_range(
+          y = lo_S_inv * rhs,// Solve for y
+          solver_control_S.last_step(), 11, 11);
+
         x = postprocess_schur_solution (lo_A_inv,lo_B,y,f);
 
         PRINTME("x = s.block(1)", x);
index 841b2a7b0ac66e48ac31bbe46f6e0b105c4f6563..c8b47e7d8c1f9b32263a318e43f4ce6846f4401d 100644 (file)
@@ -1,12 +1,15 @@
 
 DEAL::Schur complement
 DEAL:SC_SparseMatrix::SparseMatrix 1
+DEAL:SC_SparseMatrix::Solver stopped within 1 - 1 iterations
 DEAL:SC_SparseMatrix::Solution vector: x: -4.000000000 
 DEAL:SC_SparseMatrix::Solution vector: y: 4.500000000 
 DEAL:SC_SparseMatrix::SparseMatrix OK
 DEAL:SC_SparseMatrix:SC_BlockSparseMatrix::BlockSparseMatrix 1
+DEAL:SC_SparseMatrix:SC_BlockSparseMatrix::Solver stopped within 11 - 11 iterations
 DEAL:SC_SparseMatrix:SC_BlockSparseMatrix::Solution vector: x = s.block(1): -3.333333333 -6.000000000 -8.666666667 -11.33333333 -14.00000000 -16.66666667 -19.33333333 -22.00000000 -24.66666667 -27.33333333 
 DEAL:SC_SparseMatrix:SC_BlockSparseMatrix::Solution vector: y = s.block(0): 8.333333333 11.00000000 13.66666667 16.33333333 19.00000000 21.66666667 24.33333333 27.00000000 29.66666667 32.33333333 
+DEAL:SC_SparseMatrix:SC_BlockSparseMatrix::Solver stopped within 11 - 11 iterations
 DEAL:SC_SparseMatrix:SC_BlockSparseMatrix::Solution vector: x = s.block(1): -3.333333333 -6.000000000 -8.666666667 -11.33333333 -14.00000000 -16.66666667 -19.33333333 -22.00000000 -24.66666667 -27.33333333 
 DEAL:SC_SparseMatrix:SC_BlockSparseMatrix::Solution vector: y = s.block(0): 8.333333333 11.00000000 13.66666667 16.33333333 19.00000000 21.66666667 24.33333333 27.00000000 29.66666667 32.33333333 
 DEAL:SC_SparseMatrix:SC_BlockSparseMatrix::BlockSparseMatrix OK

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.