OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
stencil_offset_compute< dim, Np > Struct Template Reference

Structure for stencil iterator. More...

Detailed Description

template<unsigned int dim, unsigned int Np>
struct stencil_offset_compute< dim, Np >

Structure for stencil iterator.

Template Parameters
Npnumber of stencil points

Definition at line 18 of file stencil_type.hpp.

#include <stencil_type.hpp>

Public Member Functions

template<unsigned int dim2>
void set_stencil (const grid_key_dx< dim2 >(&stencil_pnt)[Np])
 Set the stencil points. More...
 
template<unsigned int id>
size_t getStencil () const
 Get the calculated stencil offset. More...
 
template<unsigned int dim2, typename ginfo >
void calc_offsets (const ginfo &g, const grid_key_dx< dim2 > &start_p)
 Calculate the offsets of the stencil points. More...
 
template<unsigned int dim2, typename ginfo >
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. More...
 
void increment ()
 Increment the offsets by one. More...
 
template<typename ginfo >
void adjust_offset (size_t i, size_t idr, const ginfo &grid_base)
 Adjust the offset. More...
 
template<unsigned int tot_add>
void private_sum ()
 Sum a template constant. More...
 
void private_adjust (size_t tot_add)
 Sum a template constant. More...
 

Data Fields

long int stencil_offset [Np]
 set of offsets for the stencil
 
grid_key_dx< dim > stencil_pnt [Np]
 Stencil points.
 

Static Public Attributes

static const unsigned int nsp = Np
 Number of stencil points.
 

Member Function Documentation

template<unsigned int dim, unsigned int Np>
template<typename ginfo >
void stencil_offset_compute< dim, Np >::adjust_offset ( size_t  i,
size_t  idr,
const ginfo &  grid_base 
)
inline

Adjust the offset.

Parameters
icomponent
idrcomponent
grid_baseobbect containing the grid informations

Definition at line 116 of file stencil_type.hpp.

template<unsigned int dim, unsigned int Np>
template<unsigned int dim2, typename ginfo >
void stencil_offset_compute< dim, Np >::calc_offsets ( const ginfo &  g,
const grid_key_dx< dim2 > &  start_p 
)
inline

Calculate the offsets of the stencil points.

Parameters
gobject storing the grid information
start_pstarting point where we calculate the stencil offsets

Definition at line 61 of file stencil_type.hpp.

template<unsigned int dim, unsigned int Np>
template<unsigned int dim2, typename ginfo >
void stencil_offset_compute< dim, Np >::calc_offsets ( const ginfo &  g,
const grid_key_dx< dim2 > &  start_p,
const grid_key_dx< dim2 >(&)  stencil_pnt[Np] 
)
inline

Calculate the offsets of the stencil points.

Template Parameters
dimdimensionality
ginfogrid information object
Parameters
ginformation of the grid
start_pstarting point
stencil_pntstencil points in the grid

Definition at line 85 of file stencil_type.hpp.

template<unsigned int dim, unsigned int Np>
template<unsigned int id>
size_t stencil_offset_compute< dim, Np >::getStencil ( ) const
inline

Get the calculated stencil offset.

Template Parameters
idstencil point
Returns
the point

Definition at line 48 of file stencil_type.hpp.

template<unsigned int dim, unsigned int Np>
void stencil_offset_compute< dim, Np >::increment ( )
inline

Increment the offsets by one.

Definition at line 102 of file stencil_type.hpp.

template<unsigned int dim, unsigned int Np>
void stencil_offset_compute< dim, Np >::private_adjust ( size_t  tot_add)
inline

Sum a template constant.

Parameters
tot_addAdd an offset to all the pointer

Definition at line 142 of file stencil_type.hpp.

template<unsigned int dim, unsigned int Np>
template<unsigned int tot_add>
void stencil_offset_compute< dim, Np >::private_sum ( )
inline

Sum a template constant.

Template Parameters
compile-timeoffset

Definition at line 131 of file stencil_type.hpp.

template<unsigned int dim, unsigned int Np>
template<unsigned int dim2>
void stencil_offset_compute< dim, Np >::set_stencil ( const grid_key_dx< dim2 >(&)  stencil_pnt[Np])
inline

Set the stencil points.

Parameters
stencilpoints

Definition at line 35 of file stencil_type.hpp.


The documentation for this struct was generated from the following file: