From 65602f5fdbe82bd9e65fb76e598d809a8003630c Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Tue, 14 May 2019 12:07:28 +0200 Subject: [PATCH] Correct memory access in grid_tools_guess_pt_owner_02 --- tests/grid/grid_tools_guess_pt_owner_02.cc | 9 +++------ tests/grid/grid_tools_guess_pt_owner_02.output | 3 +-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/grid/grid_tools_guess_pt_owner_02.cc b/tests/grid/grid_tools_guess_pt_owner_02.cc index 483136152f..db6d784309 100644 --- a/tests/grid/grid_tools_guess_pt_owner_02.cc +++ b/tests/grid/grid_tools_guess_pt_owner_02.cc @@ -86,14 +86,11 @@ test_point_owner(unsigned int n_procs) unsigned int tot_pt = 0; for (unsigned int rk = 0; rk < n_procs; ++rk) { - const auto & rk_points = std::get<0>(output_tp)[rk]; - unsigned int first_el = rk * (rk + 1) / 2 - 1; - unsigned int last_el = (rk + 1) * (rk + 2) / 2; + const auto &rk_points = std::get<0>(output_tp)[rk]; for (unsigned int box = 0; box < rk; ++box) { - if (std::find(rk_points.begin() + first_el, - rk_points.begin() + last_el, - tot_pt) == rk_points.end()) + if (std::find(rk_points.begin(), rk_points.end(), tot_pt) == + rk_points.end()) { deallog << "Point " << tot_pt << " not found in rank " << rk << std::endl; diff --git a/tests/grid/grid_tools_guess_pt_owner_02.output b/tests/grid/grid_tools_guess_pt_owner_02.output index 816e8115e0..06872b5511 100644 --- a/tests/grid/grid_tools_guess_pt_owner_02.output +++ b/tests/grid/grid_tools_guess_pt_owner_02.output @@ -33,8 +33,7 @@ DEAL::TEST PASSED DEAL::Simulating 3 processes DEAL::TEST PASSED DEAL::Simulating 5 processes -DEAL::Point 2 not found in rank 2 -DEAL::TEST FAILED +DEAL::TEST PASSED DEAL::Simulating 7 processes DEAL::TEST PASSED DEAL::Simulating 9 processes -- 2.39.5