From 87b78e4aa765221f2381d2fd4b057a41e258a176 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Wed, 26 Jun 2024 22:14:57 +0200 Subject: [PATCH] Use new transfer type in benchmark --- tests/performance/timing_mg_glob_coarsen.cc | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/tests/performance/timing_mg_glob_coarsen.cc b/tests/performance/timing_mg_glob_coarsen.cc index 5134f49f95..5e900aada6 100644 --- a/tests/performance/timing_mg_glob_coarsen.cc +++ b/tests/performance/timing_mg_glob_coarsen.cc @@ -402,7 +402,8 @@ private: PreconditionChebyshev, VectorTypeMG>; mg::SmootherRelaxation mg_smoother; - MGLevelObject> mg_transfers; + MGLevelObject>> + mg_transfers; std::unique_ptr> mg_transfer; }; @@ -621,10 +622,19 @@ LaplaceProblem::setup_transfer() mg_transfers.resize(0, dof_handlers.max_level()); for (unsigned int level = 1; level <= dof_handlers.max_level(); ++level) { - mg_transfers[level].reinit(dof_handlers[level], - dof_handlers[level - 1], - level_constraints[level], - level_constraints[level - 1]); + auto transfer = std::make_unique>(); + if (level < triangulation.n_global_levels()) + transfer->reinit(dof_handlers[level], + dof_handlers[level - 1], + level_constraints[level], + level_constraints[level - 1]); + else + transfer->reinit(level_matrices[level].get_matrix_free(), + 0, + level_matrices[level - 1].get_matrix_free(), + 0); + + mg_transfers[level] = std::move(transfer); } mg_transfer = std::make_unique>( -- 2.39.5