Grid key class iterator, iterate through the grid element
dim | dimensionality of the grid |
stencil | stencil type iterator |
Definition at line 28 of file grid_key_dx_iterator.hpp.
#include <grid_key_dx_iterator.hpp>
Public Member Functions | |
grid_key_dx_iterator () | |
Default constructor. | |
grid_key_dx_iterator (const grid_key_dx_iterator< dim > &g_it) | |
Constructor from a grid_key_dx_iterator<dim> | |
template<typename grid_lin > | |
grid_key_dx_iterator (const grid_lin &g, const grid_key_dx< dim >(&stencil_pnt)[stencil::nsp]) | |
Constructor require a grid_sm<dim,T> | |
grid_key_dx_iterator (const grid_key_dx< dim >(&stencil_pnt)[stencil::nsp]) | |
Constructor. | |
grid_key_dx_iterator (const linearizer &g) | |
Constructor require a grid_sm<dim,T> | |
grid_key_dx_iterator< dim > | operator= (const grid_key_dx_iterator< dim > &key_it) |
Constructor from another grid_key_dx_iterator. | |
grid_key_dx_iterator< dim, stencil, linearizer > & | operator++ () |
Get the next element. | |
void | set (int d, size_t sz) |
Set the dimension. | |
template<unsigned int id> | |
size_t | getStencil () const |
Get the actual position. | |
bool | isNext () |
Check if there is the next element. | |
const grid_key_dx< dim > & | get () const |
Get the actual key. | |
void | reinitialize (const grid_key_dx_iterator< dim > &key) |
Reinitialize the grid_key_dx_iterator. | |
const linearizer & | getGridInfo () const |
Get the information about the grid. | |
void | reset () |
Reset the iterator (it restart from the beginning) | |
void | calc_stencil_offset (const grid_key_dx< dim > &start_p) |
Calculate the stencil offset. | |
grid_key_dx< dim > | getStart () |
Return the starting point of the iteration. | |
grid_key_dx< dim > | getStop () |
Return the stop point of the iteration. | |
size_t | getVolume () |
Get the volume spanned by this sub-grid iterator. | |
Protected Attributes | |
grid_key_dx< dim > | gk |
Actual key. | |
stencil | stl_code |
Private Member Functions | |
size_t | get_gk (size_t i) const |
return the index i of the gk key | |
Private Attributes | |
linearizer | grid_base |
information of the grid where this iterator iterate | |
|
inline |
Default constructor.
Definition at line 69 of file grid_key_dx_iterator.hpp.
|
inline |
Constructor from a grid_key_dx_iterator<dim>
g_it | grid_key_dx_iterator<dim> |
Initialize to 0 the index
Definition at line 80 of file grid_key_dx_iterator.hpp.
|
inline |
Constructor require a grid_sm<dim,T>
g | info of the grid on which iterate |
stencil_pnt | stencil points |
Definition at line 104 of file grid_key_dx_iterator.hpp.
|
inline |
Constructor.
Using this constructor you must call reinitialize
stencil_pnt | stencil points |
Definition at line 128 of file grid_key_dx_iterator.hpp.
|
inline |
Constructor require a grid_sm<dim,T>
g | info of the grid on which iterate |
Definition at line 138 of file grid_key_dx_iterator.hpp.
|
inline |
Calculate the stencil offset.
start_p | starting point |
Definition at line 317 of file grid_key_dx_iterator.hpp.
|
inline |
Get the actual key.
Get the actual key
Definition at line 264 of file grid_key_dx_iterator.hpp.
|
inlineprivate |
return the index i of the gk key
i | index to get |
Definition at line 47 of file grid_key_dx_iterator.hpp.
|
inline |
Get the information about the grid.
Definition at line 285 of file grid_key_dx_iterator.hpp.
|
inline |
Return the starting point of the iteration.
it is always the point (0,0) in 2D (0,0,0) in 3D ...
Definition at line 328 of file grid_key_dx_iterator.hpp.
|
inline |
Get the actual position.
Get the actual position
Definition at line 231 of file grid_key_dx_iterator.hpp.
|
inline |
Return the stop point of the iteration.
Definition at line 340 of file grid_key_dx_iterator.hpp.
|
inline |
Get the volume spanned by this sub-grid iterator.
Definition at line 357 of file grid_key_dx_iterator.hpp.
|
inline |
Check if there is the next element.
Check if there is the next element
we did not reach the end of the grid
we reach the end of the grid
Definition at line 244 of file grid_key_dx_iterator.hpp.
|
inline |
Get the next element.
increment the first index
check the overflow of all the index with exception of the last dimensionality
Definition at line 173 of file grid_key_dx_iterator.hpp.
|
inline |
Constructor from another grid_key_dx_iterator.
key_it | grid_key_dx_iterator |
Initialize the index using key_it
Definition at line 155 of file grid_key_dx_iterator.hpp.
|
inline |
Reinitialize the grid_key_dx_iterator.
key | form |
Definition at line 274 of file grid_key_dx_iterator.hpp.
|
inline |
Reset the iterator (it restart from the beginning)
Definition at line 293 of file grid_key_dx_iterator.hpp.
|
inline |
Set the dimension.
Set the dimension
d | is the dimension |
sz | set the counter to sz |
Definition at line 217 of file grid_key_dx_iterator.hpp.
|
protected |
Actual key.
Definition at line 55 of file grid_key_dx_iterator.hpp.
|
private |
information of the grid where this iterator iterate
Definition at line 37 of file grid_key_dx_iterator.hpp.
|
protected |
Additional operation and information in case we do stencil operations
Definition at line 59 of file grid_key_dx_iterator.hpp.