OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
grid_dist_iterator< dim, device_grid, FIXED, stencil > Class Template Reference

Distributed grid iterator. More...

Detailed Description

template<unsigned int dim, typename device_grid, typename stencil>
class grid_dist_iterator< dim, device_grid, FIXED, stencil >

Distributed grid iterator.

Iterator across the local elements of the distributed grid

Template Parameters
dimdimensionality of the grid
device_gridtype of basic grid
implimplementation

Definition at line 257 of file grid_dist_id_iterator.hpp.

#include <grid_dist_id_iterator.hpp>

Public Member Functions

grid_dist_iterator< dim,
device_grid, FIXED > & 
operator= (const grid_dist_iterator< dim, device_grid, FIXED > &tmp)
 Copy operator=. More...
 
 grid_dist_iterator (const openfpm::vector< device_grid > &gk, const openfpm::vector< GBoxes< device_grid::dims >> &gdb_ext)
 Constructor of the distributed grid iterator. More...
 
grid_dist_iterator< dim,
device_grid, FIXED > & 
operator++ ()
 Get the next element. More...
 
bool isNext ()
 Check if there is the next element. More...
 
grid_dist_key_dx< dim > get ()
 Get the actual key. More...
 
const openfpm::vector< GBoxes
< device_grid::dims > > & 
getGBoxes ()
 Get the boxes. More...
 
grid_key_dx< dim > getGKey (const grid_dist_key_dx< dim > &k)
 Convert a g_dist_key_dx into a global key. More...
 
template<unsigned int id>
grid_dist_lin_dx getStencil ()
 Return the stencil point offset. More...
 

Private Member Functions

void selectValidGrid ()
 from g_c increment g_c until you find a valid grid More...
 

Private Attributes

size_t g_c
 grid list counter
 
const openfpm::vector
< device_grid > & 
gList
 List of the grids we are going to iterate.
 
const openfpm::vector< GBoxes
< device_grid::dims > > & 
gdb_ext
 Extension of each grid: domain and ghost + domain.
 
grid_key_dx_iterator< dim,
stencil > 
a_it
 Actual iterator.
 

Constructor & Destructor Documentation

template<unsigned int dim, typename device_grid , typename stencil >
grid_dist_iterator< dim, device_grid, FIXED, stencil >::grid_dist_iterator ( const openfpm::vector< device_grid > &  gk,
const openfpm::vector< GBoxes< device_grid::dims >> &  gdb_ext 
)
inline

Constructor of the distributed grid iterator.

Parameters
gkstd::vector of the local grid
gdb_extinformation about the local grids

Definition at line 311 of file grid_dist_id_iterator.hpp.

Member Function Documentation

template<unsigned int dim, typename device_grid , typename stencil >
grid_dist_key_dx<dim> grid_dist_iterator< dim, device_grid, FIXED, stencil >::get ( )
inline

Get the actual key.

Returns
the actual key

Definition at line 368 of file grid_dist_id_iterator.hpp.

template<unsigned int dim, typename device_grid , typename stencil >
const openfpm::vector<GBoxes<device_grid::dims> >& grid_dist_iterator< dim, device_grid, FIXED, stencil >::getGBoxes ( )
inline

Get the boxes.

Get the boxes that define the local grids

Returns
Vector of local boxes

Definition at line 380 of file grid_dist_id_iterator.hpp.

template<unsigned int dim, typename device_grid , typename stencil >
grid_key_dx<dim> grid_dist_iterator< dim, device_grid, FIXED, stencil >::getGKey ( const grid_dist_key_dx< dim > &  k)
inline

Convert a g_dist_key_dx into a global key.

See Also
grid_dist_key_dx
grid_dist_iterator
Parameters
klocal coordinates to convert into global
Returns
the global position in the grid

Definition at line 395 of file grid_dist_id_iterator.hpp.

template<unsigned int dim, typename device_grid , typename stencil >
template<unsigned int id>
grid_dist_lin_dx grid_dist_iterator< dim, device_grid, FIXED, stencil >::getStencil ( )
inline

Return the stencil point offset.

Template Parameters
id
Returns
linearized distributed key

Definition at line 415 of file grid_dist_id_iterator.hpp.

template<unsigned int dim, typename device_grid , typename stencil >
bool grid_dist_iterator< dim, device_grid, FIXED, stencil >::isNext ( )
inline

Check if there is the next element.

Returns
true if there is the next, false otherwise

Definition at line 353 of file grid_dist_id_iterator.hpp.

template<unsigned int dim, typename device_grid , typename stencil >
grid_dist_iterator<dim,device_grid,FIXED>& grid_dist_iterator< dim, device_grid, FIXED, stencil >::operator++ ( )
inline

Get the next element.

Returns
the next grid_key

Definition at line 330 of file grid_dist_id_iterator.hpp.

template<unsigned int dim, typename device_grid , typename stencil >
grid_dist_iterator<dim,device_grid,FIXED>& grid_dist_iterator< dim, device_grid, FIXED, stencil >::operator= ( const grid_dist_iterator< dim, device_grid, FIXED > &  tmp)
inline

Copy operator=.

Parameters
tmpiterator to copy
Returns
itself

Definition at line 295 of file grid_dist_id_iterator.hpp.

template<unsigned int dim, typename device_grid , typename stencil >
void grid_dist_iterator< dim, device_grid, FIXED, stencil >::selectValidGrid ( )
inlineprivate

from g_c increment g_c until you find a valid grid

Definition at line 274 of file grid_dist_id_iterator.hpp.


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