Skip to content

Commit

Permalink
Merge pull request #15486 from kronbichler/test_robustness2
Browse files Browse the repository at this point in the history
MatrixFree inverse mass matrix: Make tests more robust
  • Loading branch information
tamiko committed Jun 26, 2023
2 parents 27f5a85 + 9892dc5 commit 1ffb60c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
8 changes: 1 addition & 7 deletions tests/matrix_free/inverse_mass_10.cc
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class MatrixFreeTest
make_vectorized_array(random_value<Number>(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]);
Expand Down Expand Up @@ -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<dim>::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<dim> fe(FE_DGQ<dim>(degree), dim);
Expand Down
8 changes: 1 addition & 7 deletions tests/matrix_free/inverse_mass_11.cc
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class MatrixFreeTest
make_vectorized_array(random_value<Number>(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]);
Expand Down Expand Up @@ -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<dim>::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<dim> fe(FE_DGQ<dim>(degree), dim);
Expand Down

0 comments on commit 1ffb60c

Please sign in to comment.