From bd92671586f60dbb0af2f7c3d98ceadfdb5fa23f Mon Sep 17 00:00:00 2001 From: Marco Feder Date: Fri, 22 Sep 2023 07:07:01 +0000 Subject: [PATCH] Review --- .../multigrid/mg_transfer_global_coarsening.h | 30 ++++++++--------- .../mg_transfer_global_coarsening.templates.h | 32 +++++++++---------- .../events_non_nested.cc | 3 +- ...nested.mpirun=1.with_trilinos=true.output} | 0 4 files changed, 32 insertions(+), 33 deletions(-) rename tests/multigrid-global-coarsening/{events_non_nested.output => events_non_nested.mpirun=1.with_trilinos=true.output} (100%) diff --git a/include/deal.II/multigrid/mg_transfer_global_coarsening.h b/include/deal.II/multigrid/mg_transfer_global_coarsening.h index 99fc5835e2..96268b1dca 100644 --- a/include/deal.II/multigrid/mg_transfer_global_coarsening.h +++ b/include/deal.II/multigrid/mg_transfer_global_coarsening.h @@ -68,35 +68,35 @@ namespace mg { /** * This signal is triggered before and after the call to the actual - * evaluationfunction inside RemotePointEvaluation::evaluate_and_process() + * evaluation function inside RemotePointEvaluation::evaluate_and_process() * during prolongation. */ - boost::signals2::signal evaluation_prolongation; + boost::signals2::signal prolongation_cell_loop; /** * This signal is triggered before and after the call to the actual * evaluation function inside RemotePointEvaluation::process_and_evaluate() * during restriction. */ - boost::signals2::signal evaluation_restriction; + boost::signals2::signal restriction_cell_loop; /** * This signal is triggered before and after the call to * RemotePointEvaluation::evaluate_and_process() used in * MGTwoLevelTransferNonNested::prolongate_and_add(). The difference - * with the @p evaluation_prolongation signal is that also the + * with the @p prolongation_cell_loop signal is that also the * communication phase is included. */ - boost::signals2::signal evaluate_and_process; + boost::signals2::signal prolongation; /** * This signal is triggered before and after the call to * RemotePointEvaluation::process_and_evaluate() used in * MGTwoLevelTransferNonNested::restrict_and_add(). Similarly to - * the @p evaluation_restriction signal, also the communication phase is + * the @p restriction_cell_loop signal, also the communication phase is * included. */ - boost::signals2::signal process_and_evaluate; + boost::signals2::signal restriction; }; } // namespace mg @@ -848,28 +848,28 @@ public: memory_consumption() const override; /** - * Connect a function to mg::SignalsNonNested::evaluation_restriction. + * Connect a function to mg::SignalsNonNested::prolongation_cell_loop. */ boost::signals2::connection - connect_evaluation_prolongation(const std::function &slot); + connect_prolongation_cell_loop(const std::function &slot); /** - * Connect a function to mg::SignalsNonNested::evaluation_restriction. + * Connect a function to mg::SignalsNonNested::restriction_cell_loop. */ boost::signals2::connection - connect_evaluation_restriction(const std::function &slot); + connect_restriction_cell_loop(const std::function &slot); /** - * Connect a function to mg::SignalsNonNested::evaluate_and_process. + * Connect a function to mg::SignalsNonNested::prolongation. */ boost::signals2::connection - connect_evaluate_and_process(const std::function &slot); + connect_prolongation(const std::function &slot); /** - * Connect a function to mg::SignalsNonNested::process_and_evaluate. + * Connect a function to mg::SignalsNonNested::restriction. */ boost::signals2::connection - connect_process_and_evaluate(const std::function &slot); + connect_restriction(const std::function &slot); protected: AdditionalData additional_data; diff --git a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h index b00bcfeea8..d034d4545b 100644 --- a/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h +++ b/include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h @@ -4942,7 +4942,7 @@ MGTwoLevelTransferNonNested>:: std::vector buffer; const auto evaluation_function = [&](auto &values, const auto &cell_data) { - this->signals_non_nested.evaluation_prolongation(true); + this->signals_non_nested.prolongation_cell_loop(true); std::vector solution_values; FEPointEvaluation evaluator(*mapping_info, @@ -4972,14 +4972,14 @@ MGTwoLevelTransferNonNested>:: values[q + cell_data.reference_point_ptrs[cell]] = evaluator.get_value(q); } - this->signals_non_nested.evaluation_prolongation(false); + this->signals_non_nested.prolongation_cell_loop(false); }; - this->signals_non_nested.evaluate_and_process(true); + this->signals_non_nested.prolongation(true); rpe.template evaluate_and_process(evaluation_point_results, buffer, evaluation_function); - this->signals_non_nested.evaluate_and_process(false); + this->signals_non_nested.prolongation(false); // Weight operator in case some points are owned by multiple cells. if (rpe.is_map_unique() == false) @@ -5121,7 +5121,7 @@ MGTwoLevelTransferNonNested>:: const auto evaluation_function = [&](const auto &values, const auto &cell_data) { - this->signals_non_nested.evaluation_restriction(true); + this->signals_non_nested.restriction_cell_loop(true); std::vector solution_values; FEPointEvaluation evaluator(*mapping_info, *fe_coarse); @@ -5151,14 +5151,14 @@ MGTwoLevelTransferNonNested>:: solution_values.size(), true); } - this->signals_non_nested.evaluation_restriction(false); + this->signals_non_nested.restriction_cell_loop(false); }; - this->signals_non_nested.process_and_evaluate(true); + this->signals_non_nested.restriction(true); rpe.template process_and_evaluate(evaluation_point_results, buffer, evaluation_function); - this->signals_non_nested.process_and_evaluate(false); + this->signals_non_nested.restriction(false); } @@ -5231,9 +5231,9 @@ MGTwoLevelTransferNonNested>:: template boost::signals2::connection MGTwoLevelTransferNonNested>:: - connect_evaluation_prolongation(const std::function &slot) + connect_prolongation_cell_loop(const std::function &slot) { - return signals_non_nested.evaluation_prolongation.connect(slot); + return signals_non_nested.prolongation_cell_loop.connect(slot); } @@ -5241,9 +5241,9 @@ MGTwoLevelTransferNonNested>:: template boost::signals2::connection MGTwoLevelTransferNonNested>:: - connect_evaluation_restriction(const std::function &slot) + connect_restriction_cell_loop(const std::function &slot) { - return signals_non_nested.evaluation_restriction.connect(slot); + return signals_non_nested.restriction_cell_loop.connect(slot); } @@ -5251,9 +5251,9 @@ MGTwoLevelTransferNonNested>:: template boost::signals2::connection MGTwoLevelTransferNonNested>:: - connect_evaluate_and_process(const std::function &slot) + connect_prolongation(const std::function &slot) { - return signals_non_nested.evaluate_and_process.connect(slot); + return signals_non_nested.prolongation.connect(slot); } @@ -5261,9 +5261,9 @@ MGTwoLevelTransferNonNested>:: template boost::signals2::connection MGTwoLevelTransferNonNested>:: - connect_process_and_evaluate(const std::function &slot) + connect_restriction(const std::function &slot) { - return signals_non_nested.process_and_evaluate.connect(slot); + return signals_non_nested.restriction.connect(slot); } diff --git a/tests/multigrid-global-coarsening/events_non_nested.cc b/tests/multigrid-global-coarsening/events_non_nested.cc index 723a5a593d..0eace650f6 100644 --- a/tests/multigrid-global-coarsening/events_non_nested.cc +++ b/tests/multigrid-global-coarsening/events_non_nested.cc @@ -104,8 +104,7 @@ test(const unsigned int n_refinements, { transfers[l + 1] = std::make_shared>(); - transfers[l + 1]->connect_evaluate_and_process( - print_evaluate_and_process); + transfers[l + 1]->connect_prolongation(print_evaluate_and_process); transfers[l + 1]->reinit(dof_handlers[l + 1], dof_handlers[l], *mappings[l + 1], diff --git a/tests/multigrid-global-coarsening/events_non_nested.output b/tests/multigrid-global-coarsening/events_non_nested.mpirun=1.with_trilinos=true.output similarity index 100% rename from tests/multigrid-global-coarsening/events_non_nested.output rename to tests/multigrid-global-coarsening/events_non_nested.mpirun=1.with_trilinos=true.output -- 2.39.5