Grid key sparse iterator on a sub-part of the domain. More...
Grid key sparse iterator on a sub-part of the domain.
Definition at line 148 of file SparseGrid_iterator.hpp.
#include <SparseGrid_iterator.hpp>
Public Member Functions | |
grid_key_sparse_dx_iterator_sub () | |
Default constructor. | |
grid_key_sparse_dx_iterator_sub (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], const grid_key_dx< dim > &start, const grid_key_dx< dim > &stop, const size_t(&sz_cnk)[dim]) | |
void | reinitialize (const grid_key_sparse_dx_iterator_sub< dim, n_ele > &g_s_it) |
Reinitialize the iterator. | |
grid_key_sparse_dx_iterator_sub< dim, n_ele > & | operator++ () |
grid_key_dx< dim > | get () const |
Return the position of the actual point in coordinates. | |
grid_key_sparse_lin_dx | getKeyF () |
Return the actual point linearized. | |
bool | isNext () |
Return true if there is a next grid point. | |
const grid_key_dx< dim > & | getStart () const |
Return the starting point for the iteration. | |
const grid_key_dx< dim > & | getStop () const |
Return the stop point for the iteration. | |
const openfpm::vector< cheader< dim > > * | private_get_header_inf () const |
Return the private member header. | |
const openfpm::vector< mheader< n_ele > > * | private_get_header_mask () const |
Return the private member header. | |
const grid_key_dx< dim >(* | private_get_lin_id_pos () const)[n_ele] |
Return the private member lin_id_pos. | |
size_t | private_get_chunk_id () const |
Return the private member chunk_id. | |
size_t | private_get_mask_nele () const |
Return the private member mask_nele. | |
size_t | private_get_mask_it_pnt () const |
Return the private member mask_it_pnt. | |
const short unsigned int(& | private_get_mask_it () const)[n_ele] |
Return the private member mask_it. | |
Private Member Functions | |
void | SelectValidAndFill_mask_it () |
Everytime we move to a new chunk we calculate on which indexes we have to iterate. | |
Private Attributes | |
const openfpm::vector< mheader< n_ele > > * | header_mask |
It store the information of each chunk mask. | |
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 | |
size_t | mask_nele |
Number of points in mask_it. | |
size_t | mask_it_pnt |
Actual point in mask it. | |
grid_key_dx< dim > | start |
Starting point. | |
grid_key_dx< dim > | stop |
Stop point. | |
Box< dim, size_t > | bx |
Sub-grid box. | |
size_t | sz_cnk [dim] |
Chunk size. | |
short unsigned int | mask_it [n_ele] |
set of index in the chunk on which we have to iterate | |
Static Private Attributes | |
static const int | cnk_pos = 0 |
static const int | cnk_nele = 1 |
static const int | cnk_mask = 2 |
|
inline |
Default constructor.
Definition at line 231 of file SparseGrid_iterator.hpp.
|
inline |
Definition at line 233 of file SparseGrid_iterator.hpp.
|
inline |
Return the position of the actual point in coordinates.
Definition at line 304 of file SparseGrid_iterator.hpp.
|
inline |
Return the actual point linearized.
The disadvantage is that in general you cannot use move in this type of key
Definition at line 325 of file SparseGrid_iterator.hpp.
|
inline |
Return the starting point for the iteration.
Definition at line 345 of file SparseGrid_iterator.hpp.
|
inline |
Return the stop point for the iteration.
Definition at line 355 of file SparseGrid_iterator.hpp.
|
inline |
Return true if there is a next grid point.
Definition at line 335 of file SparseGrid_iterator.hpp.
|
inline |
Definition at line 278 of file SparseGrid_iterator.hpp.
|
inline |
Return the private member chunk_id.
Definition at line 389 of file SparseGrid_iterator.hpp.
|
inline |
Return the private member header.
Definition at line 365 of file SparseGrid_iterator.hpp.
|
inline |
Return the private member header.
Definition at line 373 of file SparseGrid_iterator.hpp.
|
inline |
Return the private member lin_id_pos.
Definition at line 381 of file SparseGrid_iterator.hpp.
|
inline |
Return the private member mask_it.
Definition at line 414 of file SparseGrid_iterator.hpp.
|
inline |
Return the private member mask_it_pnt.
Definition at line 406 of file SparseGrid_iterator.hpp.
|
inline |
Return the private member mask_nele.
Definition at line 397 of file SparseGrid_iterator.hpp.
|
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
g_s_it | grid_key_dx_iterator_sub |
Definition at line 261 of file SparseGrid_iterator.hpp.
|
inlineprivate |
Everytime we move to a new chunk we calculate on which indexes we have to iterate.
Definition at line 191 of file SparseGrid_iterator.hpp.
|
private |
Sub-grid box.
Definition at line 179 of file SparseGrid_iterator.hpp.
|
private |
point to the actual chunk
Definition at line 164 of file SparseGrid_iterator.hpp.
|
staticprivate |
Definition at line 152 of file SparseGrid_iterator.hpp.
|
staticprivate |
Definition at line 151 of file SparseGrid_iterator.hpp.
|
staticprivate |
Definition at line 150 of file SparseGrid_iterator.hpp.
|
private |
it store the information of each chunk
Definition at line 158 of file SparseGrid_iterator.hpp.
|
private |
It store the information of each chunk mask.
Definition at line 155 of file SparseGrid_iterator.hpp.
|
private |
linearized id to position in coordinates conversion
Definition at line 161 of file SparseGrid_iterator.hpp.
|
private |
set of index in the chunk on which we have to iterate
Definition at line 185 of file SparseGrid_iterator.hpp.
|
private |
Actual point in mask it.
Definition at line 170 of file SparseGrid_iterator.hpp.
|
private |
Number of points in mask_it.
Definition at line 167 of file SparseGrid_iterator.hpp.
|
private |
Starting point.
Definition at line 173 of file SparseGrid_iterator.hpp.
|
private |
Stop point.
Definition at line 176 of file SparseGrid_iterator.hpp.
|
private |
Chunk size.
Definition at line 182 of file SparseGrid_iterator.hpp.