From: Martin Kronbichler Date: Tue, 14 May 2019 10:07:28 +0000 (+0200) Subject: Correct memory access in grid_tools_guess_pt_owner_02 X-Git-Tag: v9.1.0-rc1~7^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65602f5fdbe82bd9e65fb76e598d809a8003630c;p=dealii.git Correct memory access in grid_tools_guess_pt_owner_02 --- 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