OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
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.
 
template<unsigned int id>
size_t getStencil () const
 Get the calculated stencil offset.
 
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.
 
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.
 
void increment ()
 Increment the offsets by one.
 
template<typename ginfo >
void adjust_offset (size_t i, size_t idr, const ginfo &grid_base)
 Adjust the offset.
 
template<unsigned int tot_add>
void private_sum ()
 Sum a template constant.
 
void private_adjust (size_t tot_add)
 Sum a template constant.
 

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

◆ adjust_offset()

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.

◆ calc_offsets() [1/2]

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.

◆ calc_offsets() [2/2]

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.

◆ getStencil()

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.

◆ increment()

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.

◆ private_adjust()

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.

◆ private_sum()

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.

◆ set_stencil()

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.

Field Documentation

◆ nsp

template<unsigned int dim, unsigned int Np>
const unsigned int stencil_offset_compute< dim, Np >::nsp = Np
static

Number of stencil points.

Definition at line 21 of file stencil_type.hpp.

◆ stencil_offset

template<unsigned int dim, unsigned int Np>
long int stencil_offset_compute< dim, Np >::stencil_offset[Np]

set of offsets for the stencil

Definition at line 24 of file stencil_type.hpp.

◆ stencil_pnt

template<unsigned int dim, unsigned int Np>
grid_key_dx<dim> stencil_offset_compute< dim, Np >::stencil_pnt[Np]

Stencil points.

Definition at line 27 of file stencil_type.hpp.


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