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

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

Detailed Description

template<unsigned int dim, typename Cell, unsigned int impl>
class CellNNIterator< dim, Cell, RUNTIME, 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

Note
to calculate quantities that involve a total reduction (like energies) use the CellIteratorSymRed
Template Parameters
dimdimensionality of the space where the cell live
Cellcell type on which the iterator is working
implimplementation specific options NO_CHECK do not do check on access, SAFE do check on access

Definition at line 33 of file CellNNIteratorRuntime.hpp.

#include <CellNNIteratorRuntime.hpp>

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

Public Member Functions

 __attribute__ ((always_inline)) inline CellNNIterator(size_t cell
 Cell NN iterator.
 
const long int size_t Cell NNc_size (NNc_size)
 
const long int size_t Cell cell (cell)
 
const long int size_t Cell cell_id (NNc[NNc_id]+cell)
 
const long int size_t Cell cl (cl)
 
const long int size_t 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.
 

Data Fields

const long int size_t NNc_size
 
const long int size_t Cell & cl:NNc_id(0)
 

Protected Member Functions

 __attribute__ ((always_inline)) inline void selectValid()
 Select non-empty cell.
 

Protected Attributes

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.
 

Member Function Documentation

◆ __attribute__() [1/5]

template<unsigned int dim, typename Cell , unsigned int impl>
CellNNIterator< dim, Cell, RUNTIME, impl >::__attribute__ ( (always_inline)  )
inline

Check if there is the next element.

Returns
true if there is the next element

Definition at line 108 of file CellNNIteratorRuntime.hpp.

◆ __attribute__() [2/5]

template<unsigned int dim, typename Cell , unsigned int impl>
CellNNIterator< dim, Cell, RUNTIME, impl >::__attribute__ ( (always_inline)  ) &
inline

take the next element

Returns
itself

Definition at line 120 of file CellNNIteratorRuntime.hpp.

◆ __attribute__() [3/5]

template<unsigned int dim, typename Cell , unsigned int impl>
CellNNIterator< dim, Cell, RUNTIME, impl >::__attribute__ ( (always_inline)  )

Cell NN iterator.

Parameters
cellCell id
NNcCell neighborhood indexes (relative)
NNc_sizesize of the neighborhood
clCell structure

◆ __attribute__() [4/5]

template<unsigned int dim, typename Cell , unsigned int impl>
CellNNIterator< dim, Cell, RUNTIME, impl >::__attribute__ ( (always_inline)  ) const
inline

Get the value of the cell.

Returns
the next element object

Definition at line 134 of file CellNNIteratorRuntime.hpp.

◆ __attribute__() [5/5]

template<unsigned int dim, typename Cell , unsigned int impl>
CellNNIterator< dim, Cell, RUNTIME, impl >::__attribute__ ( (always_inline)  )
inlineprotected

Select non-empty cell.

Definition at line 64 of file CellNNIteratorRuntime.hpp.

◆ NNc()

template<unsigned int dim, typename Cell , unsigned int impl>
const long int size_t Cell CellNNIterator< dim, Cell, RUNTIME, impl >::NNc ( NNc  )
inline

Definition at line 96 of file CellNNIteratorRuntime.hpp.

Field Documentation

◆ cell

template<unsigned int dim, typename Cell , unsigned int impl>
const long int CellNNIterator< dim, Cell, RUNTIME, impl >::cell
protected

Center cell, or cell for witch we are searching the NN-cell.

Definition at line 50 of file CellNNIteratorRuntime.hpp.

◆ cell_id

template<unsigned int dim, typename Cell , unsigned int impl>
size_t CellNNIterator< dim, Cell, RUNTIME, impl >::cell_id
protected

actual cell id = NNc[NNc_id]+cell stored for performance reason

Definition at line 53 of file CellNNIteratorRuntime.hpp.

◆ cl [1/2]

template<unsigned int dim, typename Cell , unsigned int impl>
Cell& CellNNIterator< dim, Cell, RUNTIME, impl >::cl
protected

Cell list.

Definition at line 56 of file CellNNIteratorRuntime.hpp.

◆ cl [2/2]

template<unsigned int dim, typename Cell , unsigned int impl>
const long int size_t Cell& CellNNIterator< dim, Cell, RUNTIME, impl >::cl

Definition at line 95 of file CellNNIteratorRuntime.hpp.

◆ NNc

template<unsigned int dim, typename Cell , unsigned int impl>
const long int * CellNNIterator< dim, Cell, RUNTIME, impl >::NNc
protected

NN cell id.

Definition at line 59 of file CellNNIteratorRuntime.hpp.

◆ NNc_id

template<unsigned int dim, typename Cell , unsigned int impl>
size_t CellNNIterator< dim, Cell, RUNTIME, impl >::NNc_id
protected

Actual NNc_id;.

Definition at line 44 of file CellNNIteratorRuntime.hpp.

◆ NNc_size [1/2]

template<unsigned int dim, typename Cell , unsigned int impl>
size_t CellNNIterator< dim, Cell, RUNTIME, impl >::NNc_size
protected

Size of the neighboring cells.

Definition at line 47 of file CellNNIteratorRuntime.hpp.

◆ NNc_size [2/2]

template<unsigned int dim, typename Cell , unsigned int impl>
const long int size_t CellNNIterator< dim, Cell, RUNTIME, impl >::NNc_size

Definition at line 95 of file CellNNIteratorRuntime.hpp.

◆ start_id

template<unsigned int dim, typename Cell , unsigned int impl>
const Cell::Mem_type_type::loc_index* CellNNIterator< dim, Cell, RUNTIME, impl >::start_id
protected

actual element id

Definition at line 38 of file CellNNIteratorRuntime.hpp.

◆ stop_id

template<unsigned int dim, typename Cell , unsigned int impl>
const Cell::Mem_type_type::loc_index* CellNNIterator< dim, Cell, RUNTIME, impl >::stop_id
protected

stop id to read the end of the cell

Definition at line 41 of file CellNNIteratorRuntime.hpp.


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