OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
CellNNIteratorSym< dim, Cell, RUNTIME, impl > Class Template Reference

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

Detailed Description

template<unsigned int dim, typename Cell, unsigned int impl>
class CellNNIteratorSym< dim, Cell, RUNTIME, impl >

Symmetric 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
implimplementation specific options NO_CHECK do not do check on access, SAFE do check on access

Definition at line 161 of file CellNNIteratorRuntime.hpp.

#include <CellNNIteratorRuntime.hpp>

+ Inheritance diagram for CellNNIteratorSym< dim, Cell, RUNTIME, impl >:

Public Member Functions

 CellNNIteratorSym (size_t cell, size_t p, const long int *NNc, size_t NNc_size, Cell &cl, const openfpm::vector< Point< dim, typename Cell::stype >> &v)
 Cell NN iterator. More...
 
CellNNIteratorSym< dim, Cell,
RUNTIME, impl > & 
operator++ ()
 take the next element More...
 
- Public Member Functions inherited from CellNNIterator< dim, Cell, RUNTIME, impl >
 CellNNIterator (size_t cell, const long int *NNc, size_t NNc_size, Cell &cl)
 Cell NN iterator. More...
 
bool isNext ()
 Check if there is the next element. More...
 
CellNNIteratoroperator++ ()
 take the next element More...
 
const
Cell::Mem_type_type::loc_index & 
get ()
 Get the value of the cell. More...
 

Private Member Functions

void selectValid ()
 

Private Attributes

size_t p
 index of the particle p
 
const openfpm::vector< Point
< dim, typename Cell::stype > > & 
v
 Position of the particle p.
 

Additional Inherited Members

- Protected Member Functions inherited from CellNNIterator< dim, Cell, RUNTIME, impl >
void selectValid ()
 Select non-empty cell. More...
 
- Protected Attributes inherited from CellNNIterator< dim, Cell, RUNTIME, impl >
const
Cell::Mem_type_type::loc_index * 
start_id
 actual element id
 
const
Cell::Mem_type_type::loc_index * 
stop_id
 stop id to read the end of the cell
 
size_t NNc_id
 Actual NNc_id;.
 
size_t NNc_size
 Size of the neighboring cells.
 
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 long int * NNc
 NN cell id.
 

Constructor & Destructor Documentation

template<unsigned int dim, typename Cell , unsigned int impl>
CellNNIteratorSym< dim, Cell, RUNTIME, impl >::CellNNIteratorSym ( size_t  cell,
size_t  p,
const long int *  NNc,
size_t  NNc_size,
Cell &  cl,
const openfpm::vector< Point< dim, typename Cell::stype >> &  v 
)
inline

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 211 of file CellNNIteratorRuntime.hpp.

Member Function Documentation

template<unsigned int dim, typename Cell , unsigned int impl>
CellNNIteratorSym<dim,Cell,RUNTIME,impl>& CellNNIteratorSym< dim, Cell, RUNTIME, impl >::operator++ ( )
inline

take the next element

Returns
itself

Definition at line 231 of file CellNNIteratorRuntime.hpp.

template<unsigned int dim, typename Cell , unsigned int impl>
void CellNNIteratorSym< dim, Cell, RUNTIME, impl >::selectValid ( )
inlineprivate

Select the next valid element

Definition at line 172 of file CellNNIteratorRuntime.hpp.


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