From ef18f7747bf8ababfb0013517627e0825e77b61e Mon Sep 17 00:00:00 2001 From: Yaroslav <beorn.90@gmail.com> Date: Wed, 12 Oct 2016 16:32:44 +0200 Subject: [PATCH] Changed calls for CellList<> to CellList_gen<Process_keys_lin<>>. Renamed getIterator to getCellIterator in CellListFast --- openfpm_data | 2 +- openfpm_numerics | 2 +- src/Decomposition/ie_ghost.hpp | 16 ++++++++-------- src/Vector/vector_dist.hpp | 14 +++++++------- src/Vector/vector_dist_unit_test.hpp | 2 +- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/openfpm_data b/openfpm_data index 338bd580c..a1e9a9ac6 160000 --- a/openfpm_data +++ b/openfpm_data @@ -1 +1 @@ -Subproject commit 338bd580c0abe90bc255e586eb866bf8ccd07a1a +Subproject commit a1e9a9ac63b7c339049bdf4fbd44a205141c10b5 diff --git a/openfpm_numerics b/openfpm_numerics index 4059a8314..f5709f23f 160000 --- a/openfpm_numerics +++ b/openfpm_numerics @@ -1 +1 @@ -Subproject commit 4059a8314fe1974c4713f514567124ac4f640d9b +Subproject commit f5709f23ffa0135b64c67f6dfe53351084b1ceb1 diff --git a/src/Decomposition/ie_ghost.hpp b/src/Decomposition/ie_ghost.hpp index 8b1bbe5fb..8df26d329 100755 --- a/src/Decomposition/ie_ghost.hpp +++ b/src/Decomposition/ie_ghost.hpp @@ -724,9 +724,9 @@ public: * \return An iterator with the id's of the internal boxes in which the point fall * */ - auto getInternalIDBoxes(Point<dim,T> & p) -> decltype(geo_cell.getIterator(geo_cell.getCell(p))) + auto getInternalIDBoxes(Point<dim,T> & p) -> decltype(geo_cell.getCellIterator(geo_cell.getCell(p))) { - return geo_cell.getIterator(geo_cell.getCell(p)); + return geo_cell.getCellIterator(geo_cell.getCell(p)); } /*! \brief if the point fall into the ghost of some near processor it return the processors id's in which @@ -736,9 +736,9 @@ public: * \return iterator of the processors id's * */ - inline auto labelPoint(Point<dim,T> & p) -> decltype(geo_cell.getIterator(geo_cell.getCell(p))) + inline auto labelPoint(Point<dim,T> & p) -> decltype(geo_cell.getCellIterator(geo_cell.getCell(p))) { - return geo_cell.getIterator(geo_cell.getCell(p)); + return geo_cell.getCellIterator(geo_cell.getCell(p)); } /*! \brief Given a position it return if the position belong to any neighborhood processor ghost @@ -764,7 +764,7 @@ public: // Check with geo-cell if a particle is inside one Cell containing boxes - auto cell_it = geo_cell.getIterator(geo_cell.getCell(p)); + auto cell_it = geo_cell.getCellIterator(geo_cell.getCell(p)); // For each element in the cell, check if the point is inside the box // if it is, store the processor id @@ -813,7 +813,7 @@ public: // Check with geo-cell if a particle is inside one Cell containing boxes - auto cell_it = geo_cell.getIterator(geo_cell.getCell(p)); + auto cell_it = geo_cell.getCellIterator(geo_cell.getCell(p)); // For each element in the cell, check if the point is inside the box // if it is, store the processor id @@ -854,7 +854,7 @@ public: // Check with geo-cell if a particle is inside one Cell containing boxes - auto cell_it = geo_cell.getIterator(geo_cell.getCell(p)); + auto cell_it = geo_cell.getCellIterator(geo_cell.getCell(p)); // For each element in the cell, check if the point is inside the box // if it is, store the processor id @@ -895,7 +895,7 @@ public: // Check with geo-cell if a particle is inside one Cell containing boxes - auto cell_it = geo_cell.getIterator(geo_cell.getCell(p)); + auto cell_it = geo_cell.getCellIterator(geo_cell.getCell(p)); // For each element in the cell, check if the point is inside the box // if it is, store the processor id diff --git a/src/Vector/vector_dist.hpp b/src/Vector/vector_dist.hpp index 0f56b6c2a..58a2f7081 100644 --- a/src/Vector/vector_dist.hpp +++ b/src/Vector/vector_dist.hpp @@ -357,7 +357,7 @@ public: * \return the Cell list * */ - template<typename CellL = CellList<dim, St, FAST, shift<dim, St> > > CellL getCellList(St r_cut) + template<typename CellL = CellList_gen<dim, St, Process_keys_lin<dim>, FAST, shift<dim, St> > > CellL getCellList(St r_cut) { // Get ghost and anlarge by 1% Ghost<dim,St> g = getDecomposition().getGhost(); @@ -391,7 +391,7 @@ public: * \param cell_list Cell list to update * */ - template<typename CellL = CellList<dim, St, FAST, shift<dim, St> > > void updateCellList(CellL & cell_list) + template<typename CellL = CellList_gen<dim, St, Process_keys_lin<dim>, FAST, shift<dim, St> > > void updateCellList(CellL & cell_list) { // Clear the cell list from the previous particles cell_list.clear(); @@ -427,7 +427,7 @@ public: * \return the CellList * */ - template<typename CellL = CellList<dim, St, FAST, shift<dim, St> > > CellL getCellList(St r_cut, const Ghost<dim, St> & enlarge) + template<typename CellL = CellList_gen<dim, St, Process_keys_lin<dim>, FAST, shift<dim, St> > > CellL getCellList(St r_cut, const Ghost<dim, St> & enlarge) { CellL cell_list; @@ -440,7 +440,7 @@ public: // Processor bounding box cl_param_calculate(pbox, div, r_cut, enlarge); - cell_list.Initialize(pbox, div); + cell_list.Initialize(pbox, div, g_m); updateCellList(cell_list); @@ -590,7 +590,7 @@ public: * * */ - template<typename CellL=CellList<dim,St,FAST,shift<dim,St> > > void reorder (int32_t m) + template<typename CellL=CellList_gen<dim,St,Process_keys_lin<dim>,FAST,shift<dim,St> > > void reorder (int32_t m) { reorder(m,getDecomposition().getGhost()); } @@ -608,7 +608,7 @@ public: * \param enlarge In case of padding particles the cell list must be enlarged, like a ghost this parameter say how much must be enlarged * */ - template<typename CellL=CellList<dim,St,FAST,shift<dim,St> > > void reorder(int32_t m, const Ghost<dim,St> & enlarge) + template<typename CellL=CellList_gen<dim,St,Process_keys_lin<dim>,FAST,shift<dim,St> > > void reorder(int32_t m, const Ghost<dim,St> & enlarge) { // reset the ghost part v_pos.resize(g_m); @@ -632,7 +632,7 @@ public: div[i] = 1 << m; } - cell_list.Initialize(pbox,div); + cell_list.Initialize(pbox,div,g_m); // for each particle add the particle to the cell list diff --git a/src/Vector/vector_dist_unit_test.hpp b/src/Vector/vector_dist_unit_test.hpp index 47ee46c08..bcec71e30 100644 --- a/src/Vector/vector_dist_unit_test.hpp +++ b/src/Vector/vector_dist_unit_test.hpp @@ -1055,7 +1055,7 @@ void Test_interacting(Box<3,float> & box) Point<3,float> xp = vd.getPos(p); - auto Np = NN.getIterator(NN.getCell(vd.getPos(p))); + auto Np = NN.getCellIterator(NN.getCell(vd.getPos(p))); while (Np.isNext()) { -- GitLab