8#ifndef OPENFPM_DATA_SRC_NN_CELLLIST_CELLLISTFAST_GEN_HPP_
9#define OPENFPM_DATA_SRC_NN_CELLLIST_CELLLISTFAST_GEN_HPP_
13#include "CellList.hpp"
14#include "ProcKeys.hpp"
27template<
unsigned int dim,
29 template <
unsigned int,
typename>
class Prock,
42 Prock<dim,CellList_gen<dim,T,Prock,Mem_type,transform,vector_pos_type>>
SFC;
57 for (
size_t i = 0; i < dim ; i++)
58 sz[i] = this->getGrid().size(i) - 2*pad;
62 size_t a = gs_small.
size(0);
64 for (
size_t i = 1 ; i < dim ; i++)
66 if (a < gs_small.
size(i))
86 SFC.get_hkey(*
this,gk,m);
92 SFC.linearize_hkeys(*
this,m);
107 const Prock<dim,CellList_gen<dim,T,Prock,Mem_type,transform,vector_pos_type>> &
getCellSFC()
const
130 inline typename Prock<dim,CellList_gen<dim,T,Prock,Mem_type,transform,vector_pos_type>>::Pit
getIterator()
134 return typename Prock<dim,CellList_gen<dim,T,Prock,Mem_type,transform,vector_pos_type>>::Pit(*
this);
146 void Initialize(
const Box<dim,T> & box,
const size_t (&div)[dim],
const size_t pad = 1,
size_t slot=STARTING_NSLOT)
159 return SFC.getKeys();
This class represent an N-dimensional box.
void Initialize(const Box< dim, T > &box, const size_t(&div)[dim], const size_t pad=1, size_t slot=STARTING_NSLOT)
void set_gm(size_t g_m)
Set the ghost marker.
size_t get_gm()
return the ghost marker
const openfpm::vector< size_t > & getKeys()
Return cellkeys vector.
Prock< dim, CellList_gen< dim, T, Prock, Mem_type, transform, vector_pos_type > >::Pit getIterator()
return the celllist iterator (across cells)
Prock< dim, CellList_gen< dim, T, Prock, Mem_type, transform, vector_pos_type > > SFC
const Prock< dim, CellList_gen< dim, T, Prock, Mem_type, transform, vector_pos_type > > & getCellSFC() const
Get the space filling curve object.
void init_SFC()
Initialize Space-filling-curve (SFC)
void initialize_sfc(size_t pad)
Initialize the space-filling-curve.
Class for FAST cell list implementation.
void Initialize(CellDecomposer_sm< dim, T, transform > &cd_sm, const Box< dim, T > &dom_box, const size_t pad=1, size_t slot=STARTING_NSLOT)
It is a class that work like a vector of vector.
const grid_key_dx< dim > & get() const
Get the actual key.
bool isNext()
Check if there is the next element.
__device__ __host__ size_t size() const
Return the size of the grid.
Implementation of 1-D std::vector like structure.