From: Martin Kronbichler Date: Wed, 4 May 2022 20:43:33 +0000 (+0200) Subject: Use renumbering of DoFs for step-37 benchmark X-Git-Tag: v9.4.0-rc1~279^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d14d0397d6c76e9a7a0c95abe1268183a1f65499;p=dealii.git Use renumbering of DoFs for step-37 benchmark --- diff --git a/tests/performance/timing_step_37.cc b/tests/performance/timing_step_37.cc index e901033bb8..e63057b32a 100644 --- a/tests/performance/timing_step_37.cc +++ b/tests/performance/timing_step_37.cc @@ -34,6 +34,7 @@ #include #include +#include #include #include @@ -412,6 +413,35 @@ LaplaceProblem::setup_dofs() VectorTools::interpolate_boundary_values( mapping, dof_handler, 0, Functions::ZeroFunction(), constraints); constraints.close(); + + // Renumber DoFs + typename MatrixFree::AdditionalData additional_data; + additional_data.tasks_parallel_scheme = + MatrixFree::AdditionalData::none; + + std::set dirichlet_boundary; + dirichlet_boundary.insert(0); + mg_constrained_dofs.initialize(dof_handler); + mg_constrained_dofs.make_zero_boundary_constraints(dof_handler, + dirichlet_boundary); + + for (unsigned int level = 0; level < triangulation.n_global_levels(); ++level) + { + IndexSet relevant_dofs; + DoFTools::extract_locally_relevant_level_dofs(dof_handler, + level, + relevant_dofs); + AffineConstraints level_constraints; + level_constraints.reinit(relevant_dofs); + level_constraints.add_lines( + mg_constrained_dofs.get_boundary_indices(level)); + level_constraints.close(); + additional_data.mg_level = level; + + DoFRenumbering::matrix_free_data_locality(dof_handler, + level_constraints, + additional_data); + } }