8 #ifndef OPENFPM_DATA_SRC_NN_CELLLIST_CELLLISTNNITERATORRADIUS_HPP_
9 #define OPENFPM_DATA_SRC_NN_CELLLIST_CELLLISTNNITERATORRADIUS_HPP_
11 #include "Vector/map_vector.hpp"
49 while (ele_id >= cl.getNelements(cell_id))
54 if (NNc_id >= NNc.
size())
return;
56 cell_id = NNc.get(NNc_id) + cell;
74 :cl(cl),NNc_id(0),cell_id(NNc.
get(NNc_id) + cell),ele_id(0),NNc(NNc),cell(cell)
78 std::cerr <<
"Error " << __FILE__
":" << __LINE__ <<
" cell_id is negative, please check the the padding is chosen correctly." <<
79 "Remember, if you choose a radius that span N neighborhood cell-list, padding must be one" << std::endl;
92 if (NNc_id >= NNc.
size())
114 inline typename Cell::value_type &
get()
116 return cl.get(cell_id,ele_id);
Iterator for the neighborhood of the cell structures with free radius.
Cell::value_type & get()
Get the value of the cell.
CellNNIteratorRadius & operator++()
take the next element
bool isNext()
Check if there is the next element.
void selectValid()
Select non-empty cell.
CellNNIteratorRadius(size_t cell, const openfpm::vector< long int > &NNc, Cell &cl)
Cell NN iterator.