OpenFPM_data  0.1.0
Project that contain the implementation and interfaces for basic structure like vectors, grids, graph ... .
 All Data Structures Namespaces Functions Variables Typedefs Friends
CellNNIterator< dim, Cell, 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 NNc_size, unsigned int impl>
class CellNNIterator< dim, Cell, 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 32 of file CellNNIterator.hpp.

#include <CellNNIterator.hpp>

Public Member Functions

 CellNNIterator (size_t cell, long int(&NNc)[NNc_size], Cell &cl)
 Cell NN iterator. More...
 
bool isNext ()
 Check if there is the next element. More...
 
CellNNIteratoroperator++ ()
 take the next element More...
 
Cell::value_type & get ()
 Get the value of the cell. More...
 

Private Attributes

Cell & cl
 
size_t NNc_id
 
size_t cell_id
 
size_t ele_id
 
const long int(& NNc )[NNc_size]
 
const long int cell
 

Constructor & Destructor Documentation

template<unsigned int dim, typename Cell, unsigned int NNc_size, unsigned int impl>
CellNNIterator< dim, Cell, NNc_size, impl >::CellNNIterator ( size_t  cell,
long int(&)  NNc[NNc_size],
Cell &  cl 
)
inline

Cell NN iterator.

Parameters
cellCell id
NNcCell neighborhood indexes (relative)
clCell structure

Definition at line 63 of file CellNNIterator.hpp.

Member Function Documentation

template<unsigned int dim, typename Cell, unsigned int NNc_size, unsigned int impl>
Cell::value_type& CellNNIterator< dim, Cell, NNc_size, impl >::get ( )
inline

Get the value of the cell.

Returns
the next element object

Definition at line 107 of file CellNNIterator.hpp.

template<unsigned int dim, typename Cell, unsigned int NNc_size, unsigned int impl>
bool CellNNIterator< dim, Cell, NNc_size, impl >::isNext ( )
inline

Check if there is the next element.

Definition at line 73 of file CellNNIterator.hpp.

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

take the next element

Definition at line 83 of file CellNNIterator.hpp.


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