8 #ifndef OPENFPM_DATA_SRC_NN_CELLLIST_PROCKEYS_HPP_ 
    9 #define OPENFPM_DATA_SRC_NN_CELLLIST_PROCKEYS_HPP_ 
   13 #include "hilbertKey.h" 
   20 template<
unsigned int dim, 
typename CellList>
 
   53         for (
size_t i = 0; i < dim; i++)
 
   55             point[i] = gk.
get(i) + obj.getPadding(i);
 
   58         keys.add(obj.getGrid().LinIdPtr(static_cast<size_t *>(point)));
 
   61     template<
typename S> 
void linearize_hkeys(S & obj, 
size_t m)
 
   71 template<
unsigned int dim, 
typename CellList>
 
  113         for (
size_t i = 0; i < dim; i++)
 
  115             point[i] = gk.
get(i);
 
  118         size_t hkey = getHKeyFromIntCoord(m, dim, point, &err);
 
  143         for(
size_t i = 0; i < obj.getKeys().size(); i++)
 
  145             getIntCoordFromHKey(coord, m, dim, obj.getKeys().get(i), &err);
 
  147             for (
size_t j = 0 ; j < dim ; j++)  {coord2[j] = coord[j] + obj.getPadding(j);}
 
  149             keys_new.add(obj.getGrid().LinIdPtr(static_cast<size_t *>(coord2)));
 
  160 template<
unsigned int dim, 
typename CellList>
 
  202         for (
size_t i = 0; i < dim; i++)
 
  204             point[i] = gk.
get(i);
 
  207         size_t hkey = obj.getGrid().LinId(gk);
 
void linearize_hkeys(S &obj, size_t m)
Get get the coordinates from hilbert key, linearize and add to the getKeys vector. 
 
grid_key_dx is the key to access any element in the grid 
 
Class for an hilbert order processing of cell keys for CellList_gen implementation. 
 
ParticleIt_CellP< CellList > Pit
Particle Iterator produced by this key generator. 
 
const openfpm::vector< size_t > & getKeys() const 
Return cellkeys vector. 
 
mem_id get(size_t i) const 
Get the i index. 
 
openfpm::vector< size_t > p_keys
vector for storing the particle keys 
 
size_t m
Order of an hilbert curve. 
 
const openfpm::vector< size_t > & getKeys() const 
Return cellkeys vector. 
 
void get_hkey(S &obj, grid_key_dx< dim > gk, size_t m)
Get a linear (1D-like) key from the coordinates and add to the getKeys vector. 
 
size_t m
Order of an hilbert curve. 
 
ParticleIt_CellP< CellList > Pit
Particle Iterator produced by this key generator. 
 
const openfpm::vector< size_t > & getKeys() const 
Return cellkeys vector. 
 
void get_hkey(S &obj, grid_key_dx< dim > gk, size_t m)
Get an hilbert key from the coordinates and add to the getKeys vector. 
 
void get_hkey(S &obj, grid_key_dx< dim > gk, size_t m)
Get an hilbert key from the coordinates and add to the getKeys vector. 
 
openfpm::vector< size_t > p_keys
vector for storing the particle keys 
 
ParticleIt_CellP< CellList > Pit
Particle Iterator produced by this key generator. 
 
openfpm::vector< size_t > keys
vector for storing the cell keys 
 
openfpm::vector< size_t > keys
stub object 
 
openfpm::vector< size_t > keys
vector for storing the cell keys 
 
void linearize_hkeys(S &obj, size_t m)
Get get the coordinates from hilbert key, linearize and add to the getKeys vector. 
 
Class for an hilbert order processing of cell keys for CellList_gen implementation.