From 08f2170117bde4a19ef8b83e74024194f4ede3bf Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 14 Feb 2020 22:28:16 -0700 Subject: [PATCH] Avoid nonlocal control flow since it's so hard to read. --- source/multigrid/mg_transfer_internal.cc | 36 ++++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/source/multigrid/mg_transfer_internal.cc b/source/multigrid/mg_transfer_internal.cc index e6a026aa81..9e0f9f3311 100644 --- a/source/multigrid/mg_transfer_internal.cc +++ b/source/multigrid/mg_transfer_internal.cc @@ -167,27 +167,27 @@ namespace internal globally_relevant.index_within_set( global_dof_indices[i]); - // skip if we did this global dof already (on this or a + // Work on this dof if we haven't already (on this or a // coarser level) - if (dof_touched[relevant_idx]) - continue; - - if (global_mine) - { - copy_indices_global_mine[level].emplace_back( - global_dof_indices[i], level_dof_indices[i]); - - // send this to the owner of the level_dof: - send_data_temp.emplace_back(level, - global_dof_indices[i], - level_dof_indices[i]); - } - else + if (dof_touched[relevant_idx] == false) { - // somebody will send those to me + if (global_mine) + { + copy_indices_global_mine[level].emplace_back( + global_dof_indices[i], level_dof_indices[i]); + + // send this to the owner of the level_dof: + send_data_temp.emplace_back(level, + global_dof_indices[i], + level_dof_indices[i]); + } + else + { + // somebody will send those to me + } + + dof_touched[relevant_idx] = true; } - - dof_touched[relevant_idx] = true; } } } -- 2.39.5