From 121d28a9cae970fce1af3b146710a81c2471e9fb Mon Sep 17 00:00:00 2001 From: Pietro Incardona <incardon@mpi-cbg.de> Date: Fri, 30 Sep 2016 21:55:44 +0200 Subject: [PATCH] Latest changes in progress --- CHANGELOG.md | 2 +- src/Vector/vector_dist.hpp | 12 +++++++----- src/Vector/vector_dist_comm.hpp | 3 ++- src/Vector/vector_dist_unit_test.hpp | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c03e493a..bfc246e8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Change Log All notable changes to this project will be documented in this file. -## [0.5.1] - Mid september +## [0.5.1] - 27 September 2016 ### Added - ghost_put support for particles diff --git a/src/Vector/vector_dist.hpp b/src/Vector/vector_dist.hpp index 305e2d902..493fd115e 100644 --- a/src/Vector/vector_dist.hpp +++ b/src/Vector/vector_dist.hpp @@ -363,13 +363,13 @@ public: size_t div[dim]; // Calculate the Cell list division for this CellList - CellDecomposer<dim,St,shift<dim,St>> cd_sm; + CellDecomposer_sm<dim,St,shift<dim,St>> cd_sm; for (size_t i = 0 ; i < dim ; i++) - div[i] = (domain.getHigh(i) - domain.getLow(i)) / r_cut; + div[i] = (getDecomposition().getDomain().getHigh(i) - getDecomposition().getDomain().getLow(i)) / r_cut; size_t pad = 0; - Ghost g = getDecomposition().getGhost(); + Ghost<dim,St> g = getDecomposition().getGhost(); g.magnify(1.013); // Calculate the maximum padding @@ -379,14 +379,16 @@ public: pad = (pad > tmp)?pad:tmp; } - cd_sm.Initialize(domain,div,pad); + cd_sm.setDimensions(getDecomposition().getDomain(),div,pad); // get the processor bounding box Box<dim, St> pbox = getDecomposition().getProcessorBounds(); - cell_list.Initialize(cd_sm, pbox); + cell_list.setDimensions(cd_sm, pbox); updateCellList(cell_list); + + return cell_list; } /*! \brief Construct a cell list starting from the stored particles diff --git a/src/Vector/vector_dist_comm.hpp b/src/Vector/vector_dist_comm.hpp index fa00ed674..00baad340 100644 --- a/src/Vector/vector_dist_comm.hpp +++ b/src/Vector/vector_dist_comm.hpp @@ -846,7 +846,8 @@ public: typedef openfpm::vector<prp_object> send_vector; // reset the ghost part - v_pos.resize(g_m); + if (opt != NO_POSITION) + v_pos.resize(g_m); v_prp.resize(g_m); // Label all the particles diff --git a/src/Vector/vector_dist_unit_test.hpp b/src/Vector/vector_dist_unit_test.hpp index ad982528e..454ba22e5 100644 --- a/src/Vector/vector_dist_unit_test.hpp +++ b/src/Vector/vector_dist_unit_test.hpp @@ -1948,7 +1948,7 @@ BOOST_AUTO_TEST_CASE( vector_dist_symmetric_cell_list ) ++p_it; } - vd.ghost_put<add,1>(); + vd.ghost_put<add_,1>(); } #include "vector_dist_cell_list_tests.hpp" -- GitLab