From 6f7853f35edaa41be88dfd42586dc1a9bb073463 Mon Sep 17 00:00:00 2001 From: Pietro Incardona <i-bird@localhost.localdomain> Date: Thu, 1 Sep 2016 22:33:53 +0200 Subject: [PATCH] Fixing test --- src/Vector/vector_dist_comm.hpp | 2 -- src/Vector/vector_dist_unit_test.hpp | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Vector/vector_dist_comm.hpp b/src/Vector/vector_dist_comm.hpp index 8dad03aff..c665b3588 100644 --- a/src/Vector/vector_dist_comm.hpp +++ b/src/Vector/vector_dist_comm.hpp @@ -177,8 +177,6 @@ class vector_dist_comm */ void local_ghost_from_opart(openfpm::vector<Point<dim, St>> & v_pos, openfpm::vector<prop> & v_prp) { - lg_m = v_prp.size(); - // get the shift vectors const openfpm::vector<Point<dim, St>> & shifts = dec.getShiftVectors(); diff --git a/src/Vector/vector_dist_unit_test.hpp b/src/Vector/vector_dist_unit_test.hpp index c94482163..92db2c2e5 100644 --- a/src/Vector/vector_dist_unit_test.hpp +++ b/src/Vector/vector_dist_unit_test.hpp @@ -1608,7 +1608,7 @@ BOOST_AUTO_TEST_CASE( vector_dist_ghost_put ) // Distributed vector vector_dist<3,float, part_prop > vd(0,box,bc,ghost); - auto it = vd.getGridIterator({k,k,k}); + auto it = vd.getGridIterator({(size_t)k,(size_t)k,(size_t)k}); while (it.isNext()) { @@ -1656,7 +1656,7 @@ BOOST_AUTO_TEST_CASE( vector_dist_ghost_put ) float dist = xp.distance(xq); - if (dist < 0.05) + if (dist < 1.0/k) vd.getProp<0>(q) += a*(-dist*dist+1.0/k/k); ++Np; @@ -1678,7 +1678,7 @@ BOOST_AUTO_TEST_CASE( vector_dist_ghost_put ) float constant2 = vd.getProp<0>(it3.get()); if (fabs((constant - constant2)/constant > eps)) { - std::cout << Point<3,float>(vd.getPos(it3.get())).toString() << " " << constant2 << " " << v_cl.getProcessUnitID() << std::endl; + std::cout << Point<3,float>(vd.getPos(it3.get())).toString() << " " << constant2 << "/" << constant << " " << v_cl.getProcessUnitID() << std::endl; ret = false; break; } -- GitLab