OpenFPM  5.2.0
Project that contain the implementation of distributed structures
VerletNNIterator< dim, Ver > Class Template Reference

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

#include <VerletNNIterator.hpp>

+ Inheritance diagram for VerletNNIterator< dim, Ver >:

Public Member Functions

 VerletNNIterator (size_t part_id, Ver &ver)
 Cell NN iterator. More...
 
bool isNext ()
 Check if there is the next element. More...
 
VerletNNIteratoroperator++ ()
 take the next element More...
 
Ver::Mem_type_type::local_index_type get ()
 Get the value of the cell. More...
 
void reset ()
 Resets the iterator to the starting position.
 

Private Attributes

const Ver::Mem_type_type::local_index_type * start
 start index for the neighborhood
 
const Ver::Mem_type_type::local_index_type * stop
 stop index for the neighborhood
 
const Ver::Mem_type_type::local_index_type * ele_id
 actual neighborhood
 
Ver & ver
 verlet list
 

Detailed Description

template<unsigned int dim, typename Ver>
class VerletNNIterator< dim, Ver >

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

Definition at line 16 of file VerletNNIterator.hpp.

Constructor & Destructor Documentation

◆ VerletNNIterator()

template<unsigned int dim, typename Ver >
VerletNNIterator< dim, Ver >::VerletNNIterator ( size_t  part_id,
Ver &  ver 
)
inline

Cell NN iterator.

Parameters
part_idParticle id
verVerlet-list

Definition at line 40 of file VerletNNIterator.hpp.

Member Function Documentation

◆ get()

template<unsigned int dim, typename Ver >
Ver::Mem_type_type::local_index_type VerletNNIterator< dim, Ver >::get ( )
inline

Get the value of the cell.

Returns
the next element object

Definition at line 75 of file VerletNNIterator.hpp.

◆ isNext()

template<unsigned int dim, typename Ver >
bool VerletNNIterator< dim, Ver >::isNext ( )
inline

Check if there is the next element.

Returns
true if there is the next element

Definition at line 51 of file VerletNNIterator.hpp.

◆ operator++()

template<unsigned int dim, typename Ver >
VerletNNIterator& VerletNNIterator< dim, Ver >::operator++ ( )
inline

take the next element

Returns
itself

Definition at line 63 of file VerletNNIterator.hpp.


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