OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
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.
 
ParticleItCRS_Cellsoperator++ ()
 Increment to the next particle.
 
bool isNext ()
 Return true if there is the next particle.
 
size_t get ()
 Get the actual particle id.
 
CellListType::SymNNIterator getNNIteratorCSR (const vector_pos_type &v) const
 Get the neighborhood iterator according to the CRS scheme.
 
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.
 

Private Member Functions

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

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

◆ anom_dom_cell

template<unsigned int dim, typename CellListType , typename vector_pos_type >
const openfpm::vector<subsub_lin<dim> >& ParticleItCRS_Cells< dim, CellListType, vector_pos_type >::anom_dom_cell
private

List of all anomalous domain cells with neighborhood.

Definition at line 79 of file ParticleItCRS_Cells.hpp.

◆ cid

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

Actual cell.

Definition at line 63 of file ParticleItCRS_Cells.hpp.

◆ cli

template<unsigned int dim, typename CellListType , typename vector_pos_type >
CellListType& ParticleItCRS_Cells< dim, CellListType, vector_pos_type >::cli
private

Celllist type.

Definition at line 89 of file ParticleItCRS_Cells.hpp.

◆ dom_cell

template<unsigned int dim, typename CellListType , typename vector_pos_type >
const openfpm::vector<size_t>& ParticleItCRS_Cells< dim, CellListType, vector_pos_type >::dom_cell
private

List of all the domain cells.

Definition at line 76 of file ParticleItCRS_Cells.hpp.

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

◆ NNc

template<unsigned int dim, typename CellListType , typename vector_pos_type >
const long int* ParticleItCRS_Cells< dim, CellListType, vector_pos_type >::NNc
private

Neighborhood.

Definition at line 66 of file ParticleItCRS_Cells.hpp.

◆ NNc_size

template<unsigned int dim, typename CellListType , typename vector_pos_type >
long int ParticleItCRS_Cells< dim, CellListType, vector_pos_type >::NNc_size
private

Neighborhood size.

Definition at line 69 of file ParticleItCRS_Cells.hpp.

◆ NNc_sym

template<unsigned int dim, typename CellListType , typename vector_pos_type >
const NNc_array<dim,openfpm::math::pow(3,dim)/2+1>& ParticleItCRS_Cells< dim, CellListType, vector_pos_type >::NNc_sym
private

The array contain the neighborhood of the cell-id in case of symmetric interaction.

Definition at line 86 of file ParticleItCRS_Cells.hpp.

◆ start

template<unsigned int dim, typename CellListType , typename vector_pos_type >
const CellListType::Mem_type_type::loc_index* ParticleItCRS_Cells< dim, CellListType, vector_pos_type >::start
private

starting position

Definition at line 57 of file ParticleItCRS_Cells.hpp.

◆ stop

template<unsigned int dim, typename CellListType , typename vector_pos_type >
const CellListType::Mem_type_type::loc_index* ParticleItCRS_Cells< dim, CellListType, vector_pos_type >::stop
private

stop position

Definition at line 60 of file ParticleItCRS_Cells.hpp.


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