|
OpenFPM
5.2.0
Project that contain the implementation of distributed structures
|
|
8 #ifndef OPENFPM_DATA_SRC_NN_CELLLIST_CELLNNITERATORRUNTIMEM_HPP_
9 #define OPENFPM_DATA_SRC_NN_CELLLIST_CELLNNITERATORRUNTIMEM_HPP_
24 template<
unsigned int dim,
typename Cell,
unsigned int sh_
byte>
27 typedef boost::low_bits_mask_t<
sizeof(size_t)*8-sh_byte> mask_low;
82 template<
unsigned int dim,
typename Cell,
unsigned int sh_
byte>
85 typedef boost::low_bits_mask_t<
sizeof(size_t)*8-sh_byte> mask_low;
93 const typename Cell::internal_vector_pos_type &
pos;
105 while (this->start_id < this->
stop_id)
108 for (
long int i = dim-1 ; i >= 0 ; i--)
110 if (
pos.template get<0>(
p)[i] <
ps.get(q >> (
sizeof(
size_t)*8-sh_byte)).pos.template get<0>(q & mask_low::sig_bits_fast)[i])
112 else if (
pos.template get<0>(
p)[i] >
ps.get(q >> (
sizeof(
size_t)*8-sh_byte)).pos.template get<0>(q & mask_low::sig_bits_fast)[i])
115 if (q >> (
sizeof(
size_t)*8-sh_byte) !=
pp)
return;
116 if ((q & mask_low::sig_bits_fast) >=
p)
return;
143 const long int *
NNc,
146 const typename Cell::internal_vector_pos_type &
pos,
Structure that contain a reference to a vector of particles.
Iterator for the neighborhood of the cell structures.
size_t getV()
Get the value of the cell.
const long int cell
Center cell, or cell for witch we are searching the NN-cell.
Iterator for the neighborhood of the cell structures.
const openfpm::vector< pos_v< typename Cell::internal_vector_pos_type > > & ps
Position of the particles in the phases.
const Cell::Mem_type_type::local_index_type * stop_id
stop id to read the end of the cell
size_t pp
phase of particle p
Symmetric iterator for the neighborhood of the cell structures.
CellNNIteratorSymM(size_t cell, size_t pp, size_t p, const long int *NNc, size_t NNc_size, Cell &cl, const typename Cell::internal_vector_pos_type &pos, const openfpm::vector< pos_v< typename Cell::internal_vector_pos_type >> &ps)
Cell NN iterator.
size_t p
index of the particle p
const NNc_array< dim, NNc_size > & NNc
NN cell id.
size_t pp
phase of the particle p
size_t getV()
Get the value of the cell.
Implementation of 1-D std::vector like structure.
Iterator for the neighborhood of the cell structures.
CellNNIteratorSymM< dim, Cell, sh_byte, RUNTIME > & operator++()
take the next element
const Cell::Mem_type_type::local_index_type * start_id
actual element id
size_t NNc_id
Actual NNc_id;.
size_t p
index of the particle p
size_t getP()
Get the value of the cell.
const Cell::internal_vector_pos_type & pos
Position of the particles p.
const openfpm::vector< pos_v< typename Cell::internal_vector_pos_type > > & ps
Position of the particle p.
size_t getP()
Get the value of the cell.
CellNNIteratorM(size_t cell, const long int *NNc, size_t NNc_size, Cell &cl)
Cell NN iterator.