8#ifndef OPENFPM_DATA_SRC_GRID_ITERATORS_STENCIL_TYPE_HPP_
9#define OPENFPM_DATA_SRC_GRID_ITERATORS_STENCIL_TYPE_HPP_
17template<
unsigned int dim,
unsigned int Np>
21 static const unsigned int nsp = Np;
37 for (
size_t i = 0 ; i < Np ; i++)
60 template<
unsigned int dim2,
typename ginfo>
64 for (
size_t i = 0 ; i < Np ; i++)
84 template<
unsigned int dim2,
typename ginfo>
89 for (
size_t i = 0 ; i < Np ; i++)
105 for (
size_t i = 0 ; i < Np ; i++)
118 size_t str_dw = (i == 0)?1:
grid_base.size_s(i-1);
121 for (
size_t k = 0 ; k < Np ; k++)
130 template<
unsigned int tot_add>
133 for (
size_t i = 0 ; i < Np ; i++)
144 for (
size_t i = 0 ; i < Np ; i++)
157 static const unsigned int nsp = 1;
181 template<
unsigned int dim2,
typename ginfo>
grid_key_dx is the key to access any element in the grid
void calc_offsets(const ginfo &g, const grid_key_dx< dim2 > &start_p)
Calculate the stencil offsets.
void increment()
Increment do nothing.
void set_stencil(const grid_key_dx< dim2 >(&stencil_pnt)[1])
Set the stencil points.
size_t getStencil() const
get stencil point
static const unsigned int nsp
void adjust_offset(size_t i, size_t idr, const ginfo &grid_base)
Adjust the offset.
Structure for stencil iterator.
long int stencil_offset[Np]
set of offsets for the stencil
void private_sum()
Sum a template constant.
size_t getStencil() const
Get the calculated stencil offset.
grid_key_dx< dim > stencil_pnt[Np]
Stencil points.
void private_adjust(size_t tot_add)
Sum a template constant.
static const unsigned int nsp
Number of stencil points.
void adjust_offset(size_t i, size_t idr, const ginfo &grid_base)
Adjust the offset.
void calc_offsets(const ginfo &g, const grid_key_dx< dim2 > &start_p, const grid_key_dx< dim2 >(&stencil_pnt)[Np])
Calculate the offsets of the stencil points.
void calc_offsets(const ginfo &g, const grid_key_dx< dim2 > &start_p)
Calculate the offsets of the stencil points.
void set_stencil(const grid_key_dx< dim2 >(&stencil_pnt)[Np])
Set the stencil points.
void increment()
Increment the offsets by one.