OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
CellNNIteratorM< dim, Cell, sh_byte, NNc_size, impl > Class Template Reference

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

Detailed Description

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

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

Template Parameters
dimdimensionality of the space where the cell live
Cellcell type on which the iterator is working
NNc_sizeneighborhood size
implimplementation specific options NO_CHECK do not do check on access, SAFE do check on access

Definition at line 149 of file CellNNIteratorM.hpp.

#include <CellNNIteratorM.hpp>

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

Public Member Functions

 CellNNIteratorM (size_t cell, const NNc_array< dim, NNc_size > &NNc, Cell &cl)
 Cell NN iterator.
 
size_t getP ()
 Get the value of the cell.
 
size_t getV ()
 Get the value of the cell.
 
- Public Member Functions inherited from CellNNIterator< dim, Cell, NNc_size, impl >
 __attribute__ ((always_inline)) inline CellNNIterator(size_t cell
 Cell NN iterator.
 
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.
 
 __attribute__ ((always_inline)) inline CellNNIterator &operator++()
 take the next element
 
 __attribute__ ((always_inline)) inline const typename Cell
 Get the value of the cell.
 

Private Types

typedef boost::low_bits_mask_t< sizeof(size_t) *8-sh_bytemask_low
 

Additional Inherited Members

- Data Fields inherited from CellNNIterator< dim, Cell, NNc_size, impl >
const NNc_array< dim, NNc_size > Cell & cl:NNc_id(0)
 
- Protected Member Functions inherited from CellNNIterator< dim, Cell, NNc_size, impl >
 __attribute__ ((always_inline)) inline void selectValid()
 Select non-empty cell.
 
- Protected Attributes inherited from CellNNIterator< dim, Cell, NNc_size, impl >
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.
 

Member Typedef Documentation

◆ mask_low

template<unsigned int dim, typename Cell , unsigned int sh_byte, int NNc_size, unsigned int impl>
typedef boost::low_bits_mask_t<sizeof(size_t)*8-sh_byte> CellNNIteratorM< dim, Cell, sh_byte, NNc_size, impl >::mask_low
private

Definition at line 151 of file CellNNIteratorM.hpp.

Constructor & Destructor Documentation

◆ CellNNIteratorM()

template<unsigned int dim, typename Cell , unsigned int sh_byte, int NNc_size, unsigned int impl>
CellNNIteratorM< dim, Cell, sh_byte, NNc_size, impl >::CellNNIteratorM ( size_t  cell,
const NNc_array< dim, NNc_size > &  NNc,
Cell &  cl 
)
inline

Cell NN iterator.

Parameters
cellCell id
NNcCell neighborhood indexes (relative)
clCell structure

Definition at line 164 of file CellNNIteratorM.hpp.

Member Function Documentation

◆ getP()

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

Get the value of the cell.

Returns
the next element object

Definition at line 174 of file CellNNIteratorM.hpp.

◆ getV()

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

Get the value of the cell.

Returns
the next element object

Definition at line 184 of file CellNNIteratorM.hpp.


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