From: Martin Kronbichler Date: Thu, 19 May 2022 20:37:50 +0000 (+0200) Subject: Improve robustness of two tests X-Git-Tag: v9.4.0-rc1~194^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f05a1e81b8b740d299ae76b360f5e5630750d04b;p=dealii.git Improve robustness of two tests --- diff --git a/tests/matrix_free/parallel_multigrid_interleave.cc b/tests/matrix_free/parallel_multigrid_interleave.cc index c189eff703..dc2e5b651a 100644 --- a/tests/matrix_free/parallel_multigrid_interleave.cc +++ b/tests/matrix_free/parallel_multigrid_interleave.cc @@ -60,7 +60,8 @@ public: : n_calls_vmult(0) {} - ~LaplaceOperator() + void + print_n_calls_special() { // round number of calls to make test more robust if (n_calls_vmult > 0) @@ -430,6 +431,14 @@ do_test(const DoFHandler &dof) SolverCG> solver(control); solver.solve(fine_matrix, sol, in, preconditioner); } + + // Print statistics + for (unsigned int level = 0; + level < dof.get_triangulation().n_global_levels(); + ++level) + mg_matrices[level].print_n_calls_special(); + + fine_matrix.print_n_calls_special(); } diff --git a/tests/matrix_free/parallel_multigrid_interleave_renumber.cc b/tests/matrix_free/parallel_multigrid_interleave_renumber.cc index 9084cd849e..9e5c95d9c2 100644 --- a/tests/matrix_free/parallel_multigrid_interleave_renumber.cc +++ b/tests/matrix_free/parallel_multigrid_interleave_renumber.cc @@ -61,7 +61,8 @@ public: : n_calls_vmult(0) {} - ~LaplaceOperator() + void + print_n_calls_special() { // round number of calls to make test more robust if (n_calls_vmult > 0) @@ -471,6 +472,14 @@ do_test(DoFHandler &dof) SolverCG> solver(control); solver.solve(fine_matrix, sol, in, preconditioner); } + + // Print statistics + for (unsigned int level = 0; + level < dof.get_triangulation().n_global_levels(); + ++level) + mg_matrices[level].print_n_calls_special(); + + fine_matrix.print_n_calls_special(); }