OpenFPM  5.2.0
Project that contain the implementation of distributed structures
CellNNIteratorSymM< dim, Cell, sh_byte, NNc_size > Class Template Reference

Iterator for the neighborhood of the cell structures. More...

#include <CellNNIteratorM.hpp>

+ Inheritance diagram for CellNNIteratorSymM< dim, Cell, sh_byte, NNc_size >:

Public Member Functions

 CellNNIteratorSymM (size_t cell, size_t pp, size_t p, const NNc_array< dim, NNc_size > &NNc, Cell &cl, const typename Cell::internal_vector_pos_type &pos, const typename openfpm::vector< pos_v< typename Cell::internal_vector_pos_type >> &ps)
 Cell NN iterator. More...
 
size_t getP ()
 Get the value of the cell. More...
 
size_t getV ()
 Get the value of the cell. More...
 
CellNNIteratorSymM< dim, Cell, sh_byte, NNc_size > & operator++ ()
 take the next element More...
 
- Public Member Functions inherited from CellNNIterator< dim, Cell, NNc_size >
 __attribute__ ((always_inline)) inline CellNNIterator(size_t cell
 Cell NN iterator. More...
 
const NNc_array< dim, NNc_size > Cell cell (cell)
 
const NNc_array< dim, NNc_size > Cell cell_id (NNc[NNc_id]+cell)
 
const NNc_array< dim, NNc_size > Cell cl (cl)
 
const NNc_array< dim, NNc_size > Cell NNc (NNc)
 
 __attribute__ ((always_inline)) inline bool isNext()
 Check if there is the next element. More...
 
 __attribute__ ((always_inline)) inline CellNNIterator &operator++()
 take the next element More...
 
 __attribute__ ((always_inline)) inline const typename Cell
 Get the value of the cell. More...
 

Private Types

typedef boost::low_bits_mask_t< sizeof(size_t) *8-sh_byte > mask_low
 

Private Member Functions

void selectValid ()
 

Private Attributes

size_t pp
 phase of particle p
 
size_t p
 index of the particle p
 
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.
 

Additional Inherited Members

- Data Fields inherited from CellNNIterator< dim, Cell, NNc_size >
const NNc_array< dim, NNc_size > Cell & cl:NNc_id(0)
 
- Protected Member Functions inherited from CellNNIterator< dim, Cell, NNc_size >
 __attribute__ ((always_inline)) inline void selectValid()
 Select non-empty cell.
 
- Protected Attributes inherited from CellNNIterator< dim, Cell, NNc_size >
const Cell::Mem_type_type::local_index_type * start_id
 actual element id
 
const Cell::Mem_type_type::local_index_type * stop_id
 stop id to read the end of the cell
 
size_t NNc_id
 Actual NNc_id;.
 
const long int cell
 Center cell, or cell for witch we are searching the NN-cell.
 
size_t cell_id
 actual cell id = NNc[NNc_id]+cell stored for performance reason
 
Cell & cl
 Cell list.
 
const NNc_array< dim, NNc_size > & NNc
 NN cell id.
 

Detailed Description

template<unsigned int dim, typename Cell, unsigned int sh_byte, int NNc_size>
class CellNNIteratorSymM< dim, Cell, sh_byte, NNc_size >

Iterator for the neighborhood of the cell structures.

In general you never create it directly but you get it from the CellList structures

It iterate across all the element of the selected cell and the near cells accordingly yo the symmetric scheme

Template Parameters
dimdimensionality of the space where the cell live
Cellcell type on which the iterator is working
NNc_sizeneighborhood size

Definition at line 30 of file CellNNIteratorM.hpp.

Constructor & Destructor Documentation

◆ CellNNIteratorSymM()

template<unsigned int dim, typename Cell , unsigned int sh_byte, int NNc_size>
CellNNIteratorSymM< dim, Cell, sh_byte, NNc_size >::CellNNIteratorSymM ( size_t  cell,
size_t  pp,
size_t  p,
const NNc_array< dim, NNc_size > &  NNc,
Cell &  cl,
const typename Cell::internal_vector_pos_type &  pos,
const typename openfpm::vector< pos_v< typename Cell::internal_vector_pos_type >> &  ps 
)
inline

Cell NN iterator.

Parameters
cellCell id
NNcCell neighborhood indexes (relative)
clCell structure

Definition at line 88 of file CellNNIteratorM.hpp.

Member Function Documentation

◆ getP()

template<unsigned int dim, typename Cell , unsigned int sh_byte, int NNc_size>
size_t CellNNIteratorSymM< dim, Cell, sh_byte, NNc_size >::getP ( )
inline

Get the value of the cell.

Returns
the next element object

Definition at line 106 of file CellNNIteratorM.hpp.

◆ getV()

template<unsigned int dim, typename Cell , unsigned int sh_byte, int NNc_size>
size_t CellNNIteratorSymM< dim, Cell, sh_byte, NNc_size >::getV ( )
inline

Get the value of the cell.

Returns
the next element object

Definition at line 116 of file CellNNIteratorM.hpp.

◆ operator++()

template<unsigned int dim, typename Cell , unsigned int sh_byte, int NNc_size>
CellNNIteratorSymM<dim,Cell,sh_byte,NNc_size>& CellNNIteratorSymM< dim, Cell, sh_byte, NNc_size >::operator++ ( )
inline

take the next element

Returns
itself

Definition at line 126 of file CellNNIteratorM.hpp.

◆ selectValid()

template<unsigned int dim, typename Cell , unsigned int sh_byte, int NNc_size>
void CellNNIteratorSymM< dim, Cell, sh_byte, NNc_size >::selectValid ( )
inlineprivate

Select the next valid element

Definition at line 49 of file CellNNIteratorM.hpp.


The documentation for this class was generated from the following file: