From 9892dc5c0557563b82c84591fefa1129780a9ddd Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Mon, 26 Jun 2023 13:25:42 +0200 Subject: [PATCH] Make tests more robust --- tests/matrix_free/inverse_mass_10.cc | 8 +------- tests/matrix_free/inverse_mass_11.cc | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/tests/matrix_free/inverse_mass_10.cc b/tests/matrix_free/inverse_mass_10.cc index 7e4f9676e9..16bde126e1 100644 --- a/tests/matrix_free/inverse_mass_10.cc +++ b/tests/matrix_free/inverse_mass_10.cc @@ -150,7 +150,7 @@ private: make_vectorized_array(random_value(1.0e-2, 1.0e-1)); // make diagonal dominant because inverse is needed if (d1 == d2) - dyadic_coefficients[q][d1][d2] *= 1.0e2; + dyadic_coefficients[q][d1][d2] += 5.0; } } inverse_dyadic_coefficients[q] = invert(dyadic_coefficients[q]); @@ -220,12 +220,6 @@ test() tria.begin(tria.n_levels() - 1)->set_refine_flag(); tria.last()->set_refine_flag(); tria.execute_coarsening_and_refinement(); - typename Triangulation::active_cell_iterator cell = tria.begin_active(), - endc = tria.end(); - for (; cell != endc; ++cell) - if (cell->center().norm() < 1e-8) - cell->set_refine_flag(); - tria.execute_coarsening_and_refinement(); const unsigned int degree = fe_degree; FESystem fe(FE_DGQ(degree), dim); diff --git a/tests/matrix_free/inverse_mass_11.cc b/tests/matrix_free/inverse_mass_11.cc index 1bf984c41d..e97b5fb2fd 100644 --- a/tests/matrix_free/inverse_mass_11.cc +++ b/tests/matrix_free/inverse_mass_11.cc @@ -151,7 +151,7 @@ private: make_vectorized_array(random_value(1.0e-2, 1.0e-1)); // make diagonal dominant because inverse is needed if (d1 == d2) - dyadic_coefficients[q][d1][d2] *= 1.0e2; + dyadic_coefficients[q][d1][d2] += 5.0; } } inverse_dyadic_coefficients[q] = invert(dyadic_coefficients[q]); @@ -221,12 +221,6 @@ test() tria.begin(tria.n_levels() - 1)->set_refine_flag(); tria.last()->set_refine_flag(); tria.execute_coarsening_and_refinement(); - typename Triangulation::active_cell_iterator cell = tria.begin_active(), - endc = tria.end(); - for (; cell != endc; ++cell) - if (cell->center().norm() < 1e-8) - cell->set_refine_flag(); - tria.execute_coarsening_and_refinement(); const unsigned int degree = fe_degree; FESystem fe(FE_DGQ(degree), dim); -- 2.39.5