Distributed grid iterator. More...
Distributed grid iterator.
Iterator across the local elements of the distributed grid
dim | dimensionality of the grid |
device_grid | type of basic grid |
impl | implementation |
Definition at line 22 of file grid_dist_id_iterator_sub.hpp.
#include <grid_dist_id_iterator_sub.hpp>
Data Structures | |
struct | sub_set |
Public Member Functions | |
grid_dist_iterator_sub< dim, device_grid > & | operator= (const grid_dist_iterator_sub< dim, device_grid > &tmp) |
Copy operator=. | |
grid_dist_iterator_sub (const grid_dist_iterator_sub< dim, device_grid > &tmp, bool reinitialize=true) | |
Copy constructor. | |
grid_dist_iterator_sub (const grid_key_dx< dim > &start, const grid_key_dx< dim > &stop, const openfpm::vector< device_grid > &gk, const openfpm::vector< GBoxes< device_grid::dims > > &gdb_ext) | |
Constructor of the distributed grid iterator. | |
grid_dist_iterator_sub< dim, device_grid > & | operator++ () |
Get the next element. | |
bool | isNext () |
Check if there is the next element. | |
grid_dist_key_dx< dim, typename device_grid::base_key > | get () |
Get the actual key. | |
grid_key_dx< dim > | getGKey (const grid_dist_key_dx< dim > &k) |
Convert a g_dist_key_dx into a global key. | |
grid_key_dx< dim > | getStart () const |
grid_key_dx< dim > | getStop () const |
size_t | N_loc_grid () |
Return the number of local grids. | |
size_t | loc_grid_info_start (size_t i, size_t j) |
Return the component j of the starting point (P1) of the domain part for the local grid i. | |
size_t | loc_grid_info_size (size_t i, size_t j) |
Return the component j of the stop point (P2) of the domain part for the local grid i. | |
Private Member Functions | |
bool | compute_subset (size_t gc, grid_key_dx< dim > &start_c, grid_key_dx< dim > &stop_c) |
compute the subset where it has to iterate | |
void | selectValidGrid () |
from g_c increment g_c until you find a valid grid | |
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. | |
decltype(device_grid::type_of_subiterator()) | a_it |
Actual iterator. | |
grid_key_dx< dim > | start |
start key | |
grid_key_dx< dim > | stop |
stop key | |
|
inline |
Copy constructor.
tmp | iterator to copy |
Definition at line 136 of file grid_dist_id_iterator_sub.hpp.
|
inline |
Constructor of the distributed grid iterator.
start | position |
stop | position |
gk | std::vector of the local grid |
gdb_ext | information about the local grids |
Definition at line 157 of file grid_dist_id_iterator_sub.hpp.
|
inline |
Definition at line 166 of file grid_dist_id_iterator_sub.hpp.
|
inlineprivate |
compute the subset where it has to iterate
gc | Actual grid |
start_c | adjusted start point for the grid g_c |
stop_c | adjusted stop point for the grid g_c |
Definition at line 60 of file grid_dist_id_iterator_sub.hpp.
|
inline |
Get the actual key.
Definition at line 215 of file grid_dist_id_iterator_sub.hpp.
|
inline |
Convert a g_dist_key_dx into a global key.
Definition at line 228 of file grid_dist_id_iterator_sub.hpp.
|
inline |
Definition at line 246 of file grid_dist_id_iterator_sub.hpp.
|
inline |
Definition at line 256 of file grid_dist_id_iterator_sub.hpp.
|
inline |
Check if there is the next element.
Definition at line 200 of file grid_dist_id_iterator_sub.hpp.
|
inline |
Return the component j of the stop point (P2) of the domain part for the local grid i.
i | local grid |
j | dimension |
Definition at line 291 of file grid_dist_id_iterator_sub.hpp.
|
inline |
Return the component j of the starting point (P1) of the domain part for the local grid i.
i | local grid |
j | dimension |
Definition at line 278 of file grid_dist_id_iterator_sub.hpp.
|
inline |
Return the number of local grids.
Definition at line 265 of file grid_dist_id_iterator_sub.hpp.
|
inline |
Get the next element.
Definition at line 176 of file grid_dist_id_iterator_sub.hpp.
|
inline |
Copy operator=.
tmp | iterator to copy |
Definition at line 119 of file grid_dist_id_iterator_sub.hpp.
|
inlineprivate |
from g_c increment g_c until you find a valid grid
Definition at line 89 of file grid_dist_id_iterator_sub.hpp.
|
private |
Actual iterator.
Definition at line 43 of file grid_dist_id_iterator_sub.hpp.
|
private |
grid list counter
Definition at line 34 of file grid_dist_id_iterator_sub.hpp.
|
private |
Extension of each grid: domain and ghost + domain.
Definition at line 40 of file grid_dist_id_iterator_sub.hpp.
|
private |
List of the grids we are going to iterate.
Definition at line 37 of file grid_dist_id_iterator_sub.hpp.
|
private |
start key
Definition at line 46 of file grid_dist_id_iterator_sub.hpp.
|
private |
stop key
Definition at line 49 of file grid_dist_id_iterator_sub.hpp.