OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
ParticleItCRS_Cells< dim, CellListType > 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>
class ParticleItCRS_Cells< dim, CellListType >

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 openfpm::vector< Point< dim, typename CellListType::stype >> &v) const
 Get the neighborhood iterator according to the CRS scheme. More...
 
CellListType::SymNNIterator getNNIteratorCSRM (const openfpm::vector< Point< dim, typename CellListType::stype >> &pos, const openfpm::vector< pos_v< dim, typename CellListType::stype >> &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

template<unsigned int dim, typename CellListType>
ParticleItCRS_Cells< dim, CellListType >::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

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

Get the actual particle id.

Returns
the actual particle id

Definition at line 213 of file ParticleItCRS_Cells.hpp.

template<unsigned int dim, typename CellListType>
CellListType::SymNNIterator ParticleItCRS_Cells< dim, CellListType >::getNNIteratorCSR ( const openfpm::vector< Point< dim, typename CellListType::stype >> &  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.

template<unsigned int dim, typename CellListType>
CellListType::SymNNIterator ParticleItCRS_Cells< dim, CellListType >::getNNIteratorCSRM ( const openfpm::vector< Point< dim, typename CellListType::stype >> &  pos,
const openfpm::vector< pos_v< dim, typename CellListType::stype >> &  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.

template<unsigned int dim, typename CellListType>
bool ParticleItCRS_Cells< dim, CellListType >::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.

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

Increment to the next particle.

Returns
The actual particle iterator

Definition at line 189 of file ParticleItCRS_Cells.hpp.

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

Adjust the counters to reach a valid particle element.

Definition at line 95 of file ParticleItCRS_Cells.hpp.

Field Documentation

template<unsigned int dim, typename CellListType>
size_t ParticleItCRS_Cells< dim, CellListType >::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: