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

Symmetric local iterator for the neighborhood of the cell structures. More...

#include <CellNNIterator.hpp>

Public Member Functions

 __attribute__ ((always_inline)) inline const typename Cell
 
 __attribute__ ((always_inline)) inline const typename Cell
 Get the value of the cell. More...
 
 __attribute__ ((always_inline)) inline CellNNIteratorSymLocal< dim
 take the next element More...
 
NNc_size & operator++ ()
 
 __attribute__ ((always_inline)) inline bool isNext()
 Check if there is the next element. More...
 

Data Fields

 Cell
 
 vector_pos_type
 

Private Member Functions

 __attribute__ ((always_inline)) inline void IterateOwnCell()
 
 __attribute__ ((always_inline)) inline void selectValid()
 

Private Attributes

size_t p
 index of the particle p
 
const vector_pos_type & v
 Position of the particle p.
 
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, typename vector_pos_type, int NNc_size>
class CellNNIteratorSymLocal< dim, Cell, vector_pos_type, NNc_size >

Symmetric local 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.

Note
if we query the neighborhood of p and q is the neighborhood of p when we will query the neighborhood of q p is not present. This is useful to implement formula like \( \sum_{q = neighborhood(p) and p <= q} \)
Template Parameters
dimdimensionality of the space where the cell live
Cellcell type on which the iterator is working
NNc_sizeneighborhood size

Definition at line 163 of file CellNNIterator.hpp.

Member Function Documentation

◆ __attribute__() [1/5]

template<unsigned int dim, typename Cell , typename vector_pos_type , int NNc_size>
CellNNIteratorSymLocal< dim, Cell, vector_pos_type, NNc_size >::__attribute__ ( (always_inline)  )
inline

Check if there is the next element.

Returns
true if there is the next element

Definition at line 314 of file CellNNIterator.hpp.

◆ __attribute__() [2/5]

template<unsigned int dim, typename Cell , typename vector_pos_type , int NNc_size>
CellNNIteratorSymLocal< dim, Cell, vector_pos_type, NNc_size >::__attribute__ ( (always_inline)  )

take the next element

Returns
itself

◆ __attribute__() [3/5]

template<unsigned int dim, typename Cell , typename vector_pos_type , int NNc_size>
CellNNIteratorSymLocal< dim, Cell, vector_pos_type, NNc_size >::__attribute__ ( (always_inline)  ) const
inline

Get the value of the cell.

Returns
the next element object

Cell NN iterator

Parameters
cellCell id
pindex of the particle from which we are searching the neighborhood particles
NNcCell neighborhood indexes (relative)
clCell structure

Definition at line 260 of file CellNNIterator.hpp.

◆ __attribute__() [4/5]

template<unsigned int dim, typename Cell , typename vector_pos_type , int NNc_size>
CellNNIteratorSymLocal< dim, Cell, vector_pos_type, NNc_size >::__attribute__ ( (always_inline)  )
inlineprivate

Select the next valid element

Definition at line 195 of file CellNNIterator.hpp.

◆ __attribute__() [5/5]

template<unsigned int dim, typename Cell , typename vector_pos_type , int NNc_size>
CellNNIteratorSymLocal< dim, Cell, vector_pos_type, NNc_size >::__attribute__ ( (always_inline)  )
inlineprivate

Select the next valid element

Definition at line 221 of file CellNNIterator.hpp.


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