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" 27 template<
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++)
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();
void set_gm(size_t g_m)
Set the ghost marker.
__device__ __host__ size_t size() const
Return the size of the grid.
Prock< dim, CellList_gen< dim, T, Prock, Mem_type, transform, vector_pos_type > >::Pit getIterator()
return the celllist iterator (across cells)
void Initialize(const Box< dim, T > &box, const size_t(&div)[dim], const size_t pad=1, size_t slot=STARTING_NSLOT)
size_t get_gm()
return the ghost marker
const grid_sm< dim, void > & getGrid()
Return the underlying grid information of the cell list.
void init_SFC()
Initialize Space-filling-curve (SFC)
size_t(& getPadding())[dim]
Return the number of padding cells of the Cell decomposer as an array.
const openfpm::vector< size_t > & getKeys()
Return cellkeys vector.
const grid_key_dx< dim > & get() const
Get the actual key.
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)
This class represent an N-dimensional box.
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 initialize_sfc(size_t pad)
Initialize the space-filling-curve.
Implementation of 1-D std::vector like structure.
Class for FAST cell list implementation.
bool isNext()
Check if there is the next element.