8#ifndef OPENFPM_DATA_SRC_NN_CELLLIST_CELLLISTM_HPP_
9#define OPENFPM_DATA_SRC_NN_CELLLIST_CELLLISTM_HPP_
11#include "CellList.hpp"
12#include "CellNNIteratorM.hpp"
50template<
unsigned int dim,
typename T,
unsigned int sh_
byte,
typename CellBase=CellList<dim,T,Mem_fast<>,shift<dim, T>> >
133 CellBase::addCell(cell_id,
ele_k);
143 inline void add(
const T (& pos)[dim],
size_t ele,
size_t v_id)
147 size_t cell_id = this->getCell(pos);
152 CellBase::addCell(cell_id,
ele_k);
166 size_t cell_id = this->getCell(pos);
171 CellBase::addCell(cell_id,
ele_k);
183 return ele & mask_low::sig_bits_fast;
210 return CellBase::get(cell,
ele) & mask_low::sig_bits_fast;
235 CellBase::swap(*
this);
247 return CellBase::getIterator(cell);
272 CellNNIteratorM<dim,CellListM<dim,T,sh_byte,CellBase>,
sh_byte,FULL,impl>
cln(cell,
CellListM<dim,T,sh_byte,CellBase>::NNc_full,*
this);
301 const typename CellBase::internal_vector_pos_type & pos,
304 CellNNIteratorSymM<dim,CellListM<dim,T,sh_byte,CellBase>,
sh_byte,SYM,impl>
cln(cell,pp,p,
CellListM<dim,T,sh_byte,CellBase>::NNc_sym,*
this,pos,v);
This class represent an N-dimensional box.
it iterate through the elements of a cell
Class for Multi-Phase cell-list.
CellNNIteratorSymM< dim, CellListM< dim, T, sh_byte, CellBase >, sh_byte, RUNTIME, NO_CHECK > SymNNIterator
Type of the iterator for the neighborhood.
void swap(CellListM< dim, T, sh_byte, CellBase > &cl)
Swap the memory.
CellListM()
Default Constructor.
CellListM(Box< dim, T > &box, const size_t(&div)[dim], const size_t pad=1, size_t slot=STARTING_NSLOT)
Cell list constructor.
void add(const Point< dim, T > &pos, size_t ele, size_t v_id)
Add an element in the cell list.
CellListM(Box< dim, T > &box, const size_t(&div)[dim], Matrix< dim, T > mat, const size_t pad=1, size_t slot=STARTING_NSLOT)
Cell list constructor.
CellNNIteratorM< dim, CellListM< dim, T, sh_byte, CellBase >, sh_byte, FULL, impl > getNNIterator(size_t cell)
Get the Neighborhood iterator.
CellListM(CellListM< dim, T, sh_byte, CellBase > &&cell)
Copy constructor.
static size_t getP(size_t ele)
Convert an element in particle id.
void add(const T(&pos)[dim], size_t ele, size_t v_id)
Add an element in the cell list.
static size_t getV(size_t ele)
Convert an element in phase id.
CellIterator< CellListM< dim, T, sh_byte, CellBase > > getIterator(size_t cell)
Get the Cell iterator.
void addCell(size_t cell_id, size_t ele, size_t v_id)
Add to the cell.
boost::low_bits_mask_t< sizeof(size_t) *8-sh_byte > mask_low
Mask to get the low bits of a number.
CellListM< dim, T, sh_byte, CellBase > & operator=(CellListM< dim, T, sh_byte, CellBase > &&clm)
operator=
CellListM(const CellListM< dim, T, sh_byte, CellBase > &cell)
Copy constructor.
size_t getP(size_t cell, size_t ele)
Get the element-id in the cell.
size_t getV(size_t cell, size_t ele)
Get the element vector in the cell.
boost::high_bit_mask_t< sh_byte > mask_high
Mask to get the high bits of a number.
CellListM< dim, T, sh_byte, CellBase > & operator=(const CellListM< dim, T, sh_byte, CellBase > &clm)
operator=
CellNNIteratorSymM< dim, CellListM< dim, T, sh_byte, CellBase >, sh_byte, SYM, impl > getNNIteratorSym(size_t cell, size_t pp, size_t p, const typename CellBase::internal_vector_pos_type &pos, const openfpm::vector< pos_v< typename CellBase::internal_vector_pos_type > > &v)
Get the Neighborhood iterator.
Iterator for the neighborhood of the cell structures.
Iterator for the neighborhood of the cell structures.
This class implement an NxN (dense) matrix.
This class implement the point shape in an N-dimensional space.
Implementation of 1-D std::vector like structure.
Structure that contain a reference to a vector of particles.