8 #ifndef CELLNNITERATOR_FULL_HPP_
9 #define CELLNNITERATOR_FULL_HPP_
11 #include "util/mathutil.hpp"
13 #define FULL openfpm::math::pow(3,dim)
14 #define SYM openfpm::math::pow(3,dim)/2
15 #define CRS openfpm::math::pow(2,dim)
32 template<
unsigned int dim,
typename Cell,
unsigned int NNc_size,
unsigned int impl>
class CellNNIterator
47 const long int (& NNc)[NNc_size];
64 :cl(cl),NNc_id(0),cell_id(NNc[NNc_id] + cell),ele_id(0),NNc(NNc),cell(cell)
75 if (NNc_id >= NNc_size)
87 while (ele_id >= cl.getNelements(cell_id))
92 if (NNc_id >= NNc_size)
return *
this;
94 cell_id = NNc[NNc_id] + cell;
107 typename Cell::value_type &
get()
109 return cl.get(cell_id,ele_id);
140 :cl(cl),ele_id(0),cell(cell)
151 return cl.getNelements(cell) > ele_id;
169 typename Cell::value_type &
get()
171 return cl.get(cell,ele_id);
CellNNIterator & operator++()
take the next element
bool isNext()
Check if there is the next element.
CellIterator(const size_t cell, Cell &cl)
Cell iterator.
CellIterator & operator++()
take the next element
it iterate through the elements of a cell
bool isNext()
Check if there is the next element.
CellNNIterator(size_t cell, long int(&NNc)[NNc_size], Cell &cl)
Cell NN iterator.
Iterator for the neighborhood of the cell structures.