OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
grid_key_sparse_dx_iterator< dim, n_ele > Class Template Reference

Grid key sparse iterator. More...

Detailed Description

template<unsigned dim, unsigned int n_ele>
class grid_key_sparse_dx_iterator< dim, n_ele >

Grid key sparse iterator.

Definition at line 425 of file SparseGrid_iterator.hpp.

#include <SparseGrid_iterator.hpp>

Public Member Functions

 grid_key_sparse_dx_iterator ()
 Default constructor. More...
 
 grid_key_sparse_dx_iterator (const openfpm::vector< mheader< n_ele >> *header_mask, const openfpm::vector< cheader< dim >> *header_inf, const grid_key_dx< dim >(*lin_id_pos)[n_ele])
 
grid_key_sparse_dx_iterator< dim, n_ele > & operator++ ()
 
void reinitialize (const grid_key_sparse_dx_iterator< dim, n_ele > &g_s_it)
 Reinitialize the iterator. More...
 
void reinitialize (const grid_key_sparse_dx_iterator_sub< dim, n_ele > &g_s_it)
 Reinitialize the iterator. More...
 
grid_key_sparse_lin_dx getKeyF ()
 Return the actual point. More...
 
grid_key_dx< dim > get () const
 Return the position of the actual point in coordinates. More...
 
bool isNext ()
 Return true if there is a next grid point. More...
 

Private Member Functions

void SelectValidAndFill_mask_it ()
 Everytime we move to a new chunk we calculate on which indexes we have to iterate. More...
 

Private Attributes

const openfpm::vector< mheader< n_ele > > * header_mask
 It store the information of each chunk.
 
const openfpm::vector< cheader< dim > > * header_inf
 It store the information of each chunk.
 
const grid_key_dx< dim >(* lin_id_pos )[n_ele]
 linearized id to position in coordinates conversion
 
size_t chunk_id
 point to the actual chunk
 
int mask_nele
 Number of points in mask_it.
 
size_t mask_it_pnt
 Actual point in mask it.
 
short unsigned int mask_it [n_ele]
 set of index in the chunk on which we have to iterate
 

Constructor & Destructor Documentation

◆ grid_key_sparse_dx_iterator()

template<unsigned dim, unsigned int n_ele>
grid_key_sparse_dx_iterator< dim, n_ele >::grid_key_sparse_dx_iterator ( )
inline

Default constructor.

Warning
extremely unsafe If you use this constructor before use the iterator you should call reinitialize first

Definition at line 476 of file SparseGrid_iterator.hpp.

Member Function Documentation

◆ get()

template<unsigned dim, unsigned int n_ele>
grid_key_dx<dim> grid_key_sparse_dx_iterator< dim, n_ele >::get ( ) const
inline

Return the position of the actual point in coordinates.

Returns
the position

Definition at line 561 of file SparseGrid_iterator.hpp.

◆ getKeyF()

template<unsigned dim, unsigned int n_ele>
grid_key_sparse_lin_dx grid_key_sparse_dx_iterator< dim, n_ele >::getKeyF ( )
inline

Return the actual point.

Warning
the key that this function return cannot be used with function like move
Returns
the actual point

Definition at line 551 of file SparseGrid_iterator.hpp.

◆ isNext()

template<unsigned dim, unsigned int n_ele>
bool grid_key_sparse_dx_iterator< dim, n_ele >::isNext ( )
inline

Return true if there is a next grid point.

Returns
true if there is the next grid point

Definition at line 580 of file SparseGrid_iterator.hpp.

◆ reinitialize() [1/2]

template<unsigned dim, unsigned int n_ele>
void grid_key_sparse_dx_iterator< dim, n_ele >::reinitialize ( const grid_key_sparse_dx_iterator< dim, n_ele > &  g_s_it)
inline

Reinitialize the iterator.

it re-initialize the iterator with the passed grid_key_dx_iterator_sub the actual position of the grid_key_dx_iterator_sub is ignored

Parameters
g_s_itgrid_key_dx_iterator

Definition at line 514 of file SparseGrid_iterator.hpp.

◆ reinitialize() [2/2]

template<unsigned dim, unsigned int n_ele>
void grid_key_sparse_dx_iterator< dim, n_ele >::reinitialize ( const grid_key_sparse_dx_iterator_sub< dim, n_ele > &  g_s_it)
inline

Reinitialize the iterator.

it re-initialize the iterator with the passed grid_key_dx_iterator_sub the actual position of the grid_key_dx_iterator_sub is ignored

Parameters
g_s_itgrid_key_dx_iterator

Definition at line 534 of file SparseGrid_iterator.hpp.

◆ SelectValidAndFill_mask_it()

template<unsigned dim, unsigned int n_ele>
void grid_key_sparse_dx_iterator< dim, n_ele >::SelectValidAndFill_mask_it ( )
inlineprivate

Everytime we move to a new chunk we calculate on which indexes we have to iterate.

Definition at line 452 of file SparseGrid_iterator.hpp.


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