OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
ParticleItCRS_Cells< dim, CellListType, vector_pos_type > Class Template Reference

This iterator iterate across the particles of a Cell-list following the Cell structure. More...

Detailed Description

template<unsigned int dim, typename CellListType, typename vector_pos_type>
class ParticleItCRS_Cells< dim, CellListType, vector_pos_type >

This iterator iterate across the particles of a Cell-list following the Cell structure.

Template Parameters
dimDimensionality
CellListTypetype of the cell-list

Definition at line 52 of file ParticleItCRS_Cells.hpp.

#include <ParticleItCRS_Cells.hpp>

Public Member Functions

 ParticleItCRS_Cells (CellListType &cli, const openfpm::vector< size_t > &dom_cell, const openfpm::vector< subsub_lin< dim >> &anom_dom_cell, const NNc_array< dim, openfpm::math::pow(3, dim)/2+1 > &NNc_sym)
 Initialize the iterator. More...
 
ParticleItCRS_Cellsoperator++ ()
 Increment to the next particle. More...
 
bool isNext ()
 Return true if there is the next particle. More...
 
size_t get ()
 Get the actual particle id. More...
 
CellListType::SymNNIterator getNNIteratorCSR (const vector_pos_type &v) const
 Get the neighborhood iterator according to the CRS scheme. More...
 
CellListType::SymNNIterator getNNIteratorCSRM (const vector_pos_type &pos, const openfpm::vector< pos_v< vector_pos_type >> &v) const
 Get the neighborhood iterator according to the CRS scheme Multi-phase case. More...
 

Private Member Functions

void selectValid ()
 Adjust the counters to reach a valid particle element. More...
 

Private Attributes

const CellListType::Mem_type_type::loc_index * start
 starting position
 
const CellListType::Mem_type_type::loc_index * stop
 stop position
 
size_t cid
 Actual cell.
 
const long int * NNc
 Neighborhood.
 
long int NNc_size
 Neighborhood size.
 
size_t dom_or_anom
 
const openfpm::vector< size_t > & dom_cell
 List of all the domain cells.
 
const openfpm::vector< subsub_lin< dim > > & anom_dom_cell
 List of all anomalous domain cells with neighborhood.
 
const NNc_array< dim, openfpm::math::pow(3, dim)/2+1 > & NNc_sym
 The array contain the neighborhood of the cell-id in case of symmetric interaction.
 
CellListType & cli
 Celllist type.
 

Constructor & Destructor Documentation

◆ ParticleItCRS_Cells()

template<unsigned int dim, typename CellListType, typename vector_pos_type>
ParticleItCRS_Cells< dim, CellListType, vector_pos_type >::ParticleItCRS_Cells ( CellListType &  cli,
const openfpm::vector< size_t > &  dom_cell,
const openfpm::vector< subsub_lin< dim >> &  anom_dom_cell,
const NNc_array< dim, openfpm::math::pow(3, dim)/2+1 > &  NNc_sym 
)
inline

Initialize the iterator.

Parameters
cliCell-list
dom_celldomain cell
anom_dom_cellanomalous domain cell
NNc_symsymmetric neighborhood

Definition at line 151 of file ParticleItCRS_Cells.hpp.

Member Function Documentation

◆ get()

template<unsigned int dim, typename CellListType, typename vector_pos_type>
size_t ParticleItCRS_Cells< dim, CellListType, vector_pos_type >::get ( )
inline

Get the actual particle id.

Returns
the actual particle id

Definition at line 213 of file ParticleItCRS_Cells.hpp.

◆ getNNIteratorCSR()

template<unsigned int dim, typename CellListType, typename vector_pos_type>
CellListType::SymNNIterator ParticleItCRS_Cells< dim, CellListType, vector_pos_type >::getNNIteratorCSR ( const vector_pos_type &  v) const
inline

Get the neighborhood iterator according to the CRS scheme.

The CRS scheme use different neighborhood based on where the cell is positioned in the processor domain


x * for a cell x in the center of the domain

  • x for a cell in the outside right
Returns
Return an iterator over the neighborhood particles

Definition at line 234 of file ParticleItCRS_Cells.hpp.

◆ getNNIteratorCSRM()

template<unsigned int dim, typename CellListType, typename vector_pos_type>
CellListType::SymNNIterator ParticleItCRS_Cells< dim, CellListType, vector_pos_type >::getNNIteratorCSRM ( const vector_pos_type &  pos,
const openfpm::vector< pos_v< vector_pos_type >> &  v 
) const
inline

Get the neighborhood iterator according to the CRS scheme Multi-phase case.

The CRS scheme use different neighborhood based on where the cell is positioned in the processor domain


x * for a cell x in the center of the domain

  • x for a cell in the outside right
Returns
Return an iterator over the neighborhood particles

Definition at line 262 of file ParticleItCRS_Cells.hpp.

◆ isNext()

template<unsigned int dim, typename CellListType, typename vector_pos_type>
bool ParticleItCRS_Cells< dim, CellListType, vector_pos_type >::isNext ( )
inline

Return true if there is the next particle.

Returns
true if there is a new point

Definition at line 203 of file ParticleItCRS_Cells.hpp.

◆ operator++()

template<unsigned int dim, typename CellListType, typename vector_pos_type>
ParticleItCRS_Cells& ParticleItCRS_Cells< dim, CellListType, vector_pos_type >::operator++ ( )
inline

Increment to the next particle.

Returns
The actual particle iterator

Definition at line 189 of file ParticleItCRS_Cells.hpp.

◆ selectValid()

template<unsigned int dim, typename CellListType, typename vector_pos_type>
void ParticleItCRS_Cells< dim, CellListType, vector_pos_type >::selectValid ( )
inlineprivate

Adjust the counters to reach a valid particle element.

Definition at line 95 of file ParticleItCRS_Cells.hpp.

Field Documentation

◆ dom_or_anom

template<unsigned int dim, typename CellListType, typename vector_pos_type>
size_t ParticleItCRS_Cells< dim, CellListType, vector_pos_type >::dom_or_anom
private

If 0 we are iterating over the domain, if 1 we are iterating over the anomalous neighborhood cells, if 2 we terminate

Definition at line 73 of file ParticleItCRS_Cells.hpp.


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