8 #ifndef OPENFPM_DATA_SRC_NN_CELLLIST_PARTICLEITCRS_CELLS_HPP_
9 #define OPENFPM_DATA_SRC_NN_CELLLIST_PARTICLEITCRS_CELLS_HPP_
11 #include "CellNNIterator.hpp"
12 #include "CellList_util.hpp"
13 #include "NN/CellList/NNc_array.hpp"
20 template<
unsigned int dim>
35 template<
unsigned int dim>
57 const typename CellListType::Mem_type_type::loc_index *
start;
60 const typename CellListType::Mem_type_type::loc_index *
stop;
158 if (dom_cell.
size() != 0)
159 s_cell = dom_cell.get(0);
176 start = &cli.getStartId(s_cell);
179 stop = &cli.getStopId(s_cell);
265 return typename CellListType::SymNNIterator(dom_cell.get(
cid),CellListType::getV(*
start),CellListType::getP(*
start),
NNc_sym.
getPointer(),openfpm::math::pow(3,dim)/2+1,
cli,pos,v);
grid_key_dx is the key to access any element in the grid
const long int * getPointer() const
return the pointer to the array
const openfpm::vector< subsub_lin< dim > > & anom_dom_cell
List of all anomalous domain cells with neighborhood.
grid_key_dx< dim > subsub
sub-sub-domain
ParticleItCRS_Cells & operator++()
Increment to the next particle.
ParticleItCRS_Cells(CellListType &cli, const openfpm::vector< size_t > &dom_cell, const openfpm::vector< subsub_lin< dim >> &anom_dom_cell, const NNc_array< dim, openfpm::math::pow(3, dim)/2+1 > &NNc_sym)
Initialize the iterator.
CellListType::SymNNIterator getNNIteratorCSR(const openfpm::vector< Point< dim, typename CellListType::stype >> &v) const
Get the neighborhood iterator according to the CRS scheme.
This class implement the point shape in an N-dimensional space.
Structure that contain a reference to a vector of particles.
openfpm::vector< long int > NN_subsub
Neighborhood of each sub-sub-domains (indicate the relative position compared to subsub) ...
const CellListType::Mem_type_type::loc_index * start
starting position
This iterator iterate across the particles of a Cell-list following the Cell structure.
long int NNc_size
Neighborhood size.
size_t subsub
sub-sub-domain
const NNc_array< dim, openfpm::math::pow(3, dim)/2+1 > & NNc_sym
The array contain the neighborhood of the cell-id in case of symmetric interaction.
CellListType::SymNNIterator getNNIteratorCSRM(const openfpm::vector< Point< dim, typename CellListType::stype >> &pos, const openfpm::vector< pos_v< dim, typename CellListType::stype >> &v) const
Get the neighborhood iterator according to the CRS scheme Multi-phase case.
void selectValid()
Adjust the counters to reach a valid particle element.
const CellListType::Mem_type_type::loc_index * stop
stop position
CellListType & cli
Celllist type.
bool isNext()
Return true if there is the next particle.
Implementation of 1-D std::vector like structure.
const long int * NNc
Neighborhood.
Linearized version of subsub.
const openfpm::vector< size_t > & dom_cell
List of all the domain cells.
openfpm::vector< grid_key_dx< dim > > NN_subsub
Neighborhood of each sub-sub-domains.