Grid key class iterator, iterate through the grid element
dim | dimensionality of the grid |
Definition at line 28 of file grid_key_dx_iterator_stencil.hpp.
#include <grid_key_dx_iterator_stencil.hpp>
Public Member Functions | |
grid_key_dx_iterator_stencil () | |
Default constructor. More... | |
grid_key_dx_iterator_stencil (const grid_key_dx_iterator_stencil< dim, Np > &g_it) | |
Constructor from a grid_key_dx_iterator<dim> More... | |
template<typename T > | |
grid_key_dx_iterator_stencil (const grid_sm< dim, T > &g, const grid_key_dx< dim >(&stencil)[Np]) | |
Constructor require a grid_sm<dim,T> More... | |
grid_key_dx_iterator_stencil < dim, Np > | operator= (const grid_key_dx_iterator_stencil< dim, Np > &key_it) |
Constructor from another grid_key_dx_iterator. More... | |
grid_key_dx_iterator_stencil < dim, Np > & | operator++ () |
Get the next element. More... | |
void | set (int d, size_t sz) |
Set the dimension. More... | |
bool | isNext () |
Check if there is the next element. More... | |
const grid_key_dx< dim > & | getLoc () const |
Get the actual position. More... | |
template<unsigned int id> | |
size_t | get () const |
Get the actual position. More... | |
void | reinitialize (const grid_key_dx_iterator_stencil< dim, Np > &key) |
Reinitialize the grid_key_dx_iterator. More... | |
void | reset () |
Reset the iterator (it restart from the beginning) More... | |
Protected Attributes | |
grid_key_dx< dim > | gk |
Private Member Functions | |
size_t | get_gk (size_t i) const |
return the index i of the gk key More... | |
Private Attributes | |
grid_sm< dim, void > | grid_base |
information about the grid | |
long int | stencil_offset [Np] |
set of offsets for the stencil | |
|
inline |
Default constructor.
Definition at line 67 of file grid_key_dx_iterator_stencil.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 78 of file grid_key_dx_iterator_stencil.hpp.
|
inline |
Constructor require a grid_sm<dim,T>
g | info of the grid on which iterate |
Definition at line 100 of file grid_key_dx_iterator_stencil.hpp.
|
inline |
Get the actual position.
Get the actual position
Definition at line 247 of file grid_key_dx_iterator_stencil.hpp.
|
inlineprivate |
return the index i of the gk key
i | index to get |
Definition at line 50 of file grid_key_dx_iterator_stencil.hpp.
|
inline |
Get the actual position.
Get the actual position
Definition at line 234 of file grid_key_dx_iterator_stencil.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 214 of file grid_key_dx_iterator_stencil.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 150 of file grid_key_dx_iterator_stencil.hpp.
|
inline |
Constructor from another grid_key_dx_iterator.
key_it | grid_key_dx_iterator |
Initialize the index using key_it
Definition at line 129 of file grid_key_dx_iterator_stencil.hpp.
|
inline |
Reinitialize the grid_key_dx_iterator.
key | form |
Definition at line 257 of file grid_key_dx_iterator_stencil.hpp.
|
inline |
Reset the iterator (it restart from the beginning)
Definition at line 266 of file grid_key_dx_iterator_stencil.hpp.
|
inline |
Set the dimension.
Set the dimension
d | is the dimension |
sz | set the counter to sz |
Definition at line 199 of file grid_key_dx_iterator_stencil.hpp.