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

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

Detailed Description

template<unsigned int dim, typename Cell, typename vector_pos_type, unsigned int impl>
class CellNNIteratorSym< dim, Cell, vector_pos_type, 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 158 of file CellNNIteratorRuntime.hpp.

#include <CellNNIteratorRuntime.hpp>

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

Public Member Functions

 __attribute__ ((always_inline)) inline CellNNIteratorSym(size_t cell
 Cell NN iterator.
 
size_t const long int size_t Cell const vector_pos_type impl (cell, NNc, NNc_size, cl)
 
size_t const long int size_t Cell const vector_pos_type p (p)
 
size_t const long int size_t Cell const vector_pos_type v (v)
 
 __attribute__ ((always_inline)) inline CellNNIteratorSym< dim
 take the next element
 
impl & operator++ ()
 
- Public Member Functions inherited from CellNNIterator< dim, Cell, RUNTIME, impl >
 __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

size_t const long int * NNc
 
size_t const long int size_t NNc_size
 
size_t const long int size_t Cell & cl
 
size_t const long int size_t Cell const vector_pos_type & v:CellNNIterator<dim
 
size_t const long int size_t Cell const vector_pos_type Cell
 
size_t const long int size_t Cell const vector_pos_type RUNTIME
 
 Cell
 
 vector_pos_type
 
 RUNTIME
 
- Data Fields inherited from CellNNIterator< dim, Cell, RUNTIME, impl >
const long int size_t NNc_size
 
const long int size_t Cell & cl:NNc_id(0)
 

Private Member Functions

 __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.
 

Additional Inherited Members

- Protected Member Functions inherited from CellNNIterator< dim, Cell, RUNTIME, impl >
 __attribute__ ((always_inline)) inline void selectValid()
 Select non-empty cell.
 
- 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.
 

Member Function Documentation

◆ __attribute__() [1/3]

template<unsigned int dim, typename Cell , typename vector_pos_type , unsigned int impl>
CellNNIteratorSym< dim, Cell, vector_pos_type, RUNTIME, impl >::__attribute__ ( (always_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

◆ __attribute__() [2/3]

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

take the next element

Returns
itself

◆ __attribute__() [3/3]

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

Select the next valid element

Definition at line 169 of file CellNNIteratorRuntime.hpp.

◆ operator++()

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

Definition at line 228 of file CellNNIteratorRuntime.hpp.

◆ v()

template<unsigned int dim, typename Cell , typename vector_pos_type , unsigned int impl>
size_t const long int size_t Cell const vector_pos_type CellNNIteratorSym< dim, Cell, vector_pos_type, RUNTIME, impl >::v ( )
inline

Definition at line 214 of file CellNNIteratorRuntime.hpp.

Field Documentation

◆ Cell [1/2]

template<unsigned int dim, typename Cell , typename vector_pos_type , unsigned int impl>
size_t const long int size_t Cell const vector_pos_type CellNNIteratorSym< dim, Cell, vector_pos_type, RUNTIME, impl >::Cell

Definition at line 214 of file CellNNIteratorRuntime.hpp.

◆ Cell [2/2]

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

Definition at line 228 of file CellNNIteratorRuntime.hpp.

◆ cl

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

Definition at line 212 of file CellNNIteratorRuntime.hpp.

◆ NNc

template<unsigned int dim, typename Cell , typename vector_pos_type , unsigned int impl>
size_t const long int* CellNNIteratorSym< dim, Cell, vector_pos_type, RUNTIME, impl >::NNc

Definition at line 210 of file CellNNIteratorRuntime.hpp.

◆ NNc_size

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

Definition at line 211 of file CellNNIteratorRuntime.hpp.

◆ p

template<unsigned int dim, typename Cell , typename vector_pos_type , unsigned int impl>
size_t CellNNIteratorSym< dim, Cell, vector_pos_type, RUNTIME, impl >::p
private

index of the particle p

Definition at line 161 of file CellNNIteratorRuntime.hpp.

◆ RUNTIME [1/2]

template<unsigned int dim, typename Cell , typename vector_pos_type , unsigned int impl>
size_t const long int size_t Cell const vector_pos_type CellNNIteratorSym< dim, Cell, vector_pos_type, RUNTIME, impl >::RUNTIME

Definition at line 214 of file CellNNIteratorRuntime.hpp.

◆ RUNTIME [2/2]

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

Definition at line 228 of file CellNNIteratorRuntime.hpp.

◆ v [1/2]

template<unsigned int dim, typename Cell , typename vector_pos_type , unsigned int impl>
const vector_pos_type& CellNNIteratorSym< dim, Cell, vector_pos_type, RUNTIME, impl >::v
private

Position of the particle p.

Definition at line 164 of file CellNNIteratorRuntime.hpp.

◆ v [2/2]

template<unsigned int dim, typename Cell , typename vector_pos_type , unsigned int impl>
size_t const long int size_t Cell const vector_pos_type& CellNNIteratorSym< dim, Cell, vector_pos_type, RUNTIME, impl >::v

Definition at line 213 of file CellNNIteratorRuntime.hpp.

◆ vector_pos_type

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

Definition at line 228 of file CellNNIteratorRuntime.hpp.


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