OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
D< d, arg, Sys_eqs, CENTRAL_B_ONE_SIDE > Class Template Reference

Second order one sided Derivative scheme on direction i. More...

Detailed Description

template<unsigned int d, typename arg, typename Sys_eqs>
class D< d, arg, Sys_eqs, CENTRAL_B_ONE_SIDE >

Second order one sided Derivative scheme on direction i.

*
*  -1.5    2.0   -0.5
*    +------*------*
*
* or
*
*  -0.5    2.0   -1.5
*    *------*------+
*
*  in the bulk
*
*  -1        +1
*   *---+---*
*
* 

Definition at line 206 of file Derivative.hpp.

#include <Derivative.hpp>

Static Public Member Functions

static void value (const typename stub_or_real< Sys_eqs, Sys_eqs::dims, typename Sys_eqs::stype, typename Sys_eqs::b_grid::decomposition::extended_type >::type &g_map, grid_dist_key_dx< Sys_eqs::dims > &kmap, const grid_sm< Sys_eqs::dims, void > &gs, typename Sys_eqs::stype(&spacing)[Sys_eqs::dims], std::unordered_map< long int, typename Sys_eqs::stype > &cols, typename Sys_eqs::stype coeff)
 Calculate which colums of the Matrix are non zero.
 
static grid_key_dx< Sys_eqs::dims > position (grid_key_dx< Sys_eqs::dims > &pos, const grid_sm< Sys_eqs::dims, void > &gs, const comb< Sys_eqs::dims >(&s_pos)[Sys_eqs::nvar])
 Calculate the position where the derivative is calculated.
 

Member Function Documentation

◆ position()

template<unsigned int d, typename arg , typename Sys_eqs >
static grid_key_dx< Sys_eqs::dims > D< d, arg, Sys_eqs, CENTRAL_B_ONE_SIDE >::position ( grid_key_dx< Sys_eqs::dims > &  pos,
const grid_sm< Sys_eqs::dims, void > &  gs,
const comb< Sys_eqs::dims >(&)  s_pos[Sys_eqs::nvar] 
)
inlinestatic

Calculate the position where the derivative is calculated.

In case on non staggered case this function just return a null grid_key, in case of staggered, it calculate how the operator shift in the cell

  +--$--+
  |     |
  #  *  #
  |     |
  0--$--+

# = velocity(y)
$ = velocity(x)
* = pressure

In the one side stencil the cell position depend if you are or not at the boundary. outside the boundary is simply the central scheme, at the boundary it is simply the staggered position of the property

Parameters
posposition where we are calculating the derivative
gsGrid info
s_posstaggered position of the properties
Returns
where (in which cell grid) the derivative is calculated

Definition at line 310 of file Derivative.hpp.

◆ value()

template<unsigned int d, typename arg , typename Sys_eqs >
static void D< d, arg, Sys_eqs, CENTRAL_B_ONE_SIDE >::value ( const typename stub_or_real< Sys_eqs, Sys_eqs::dims, typename Sys_eqs::stype, typename Sys_eqs::b_grid::decomposition::extended_type >::type &  g_map,
grid_dist_key_dx< Sys_eqs::dims > &  kmap,
const grid_sm< Sys_eqs::dims, void > &  gs,
typename Sys_eqs::stype(&)  spacing[Sys_eqs::dims],
std::unordered_map< long int, typename Sys_eqs::stype > &  cols,
typename Sys_eqs::stype  coeff 
)
inlinestatic

Calculate which colums of the Matrix are non zero.

Parameters
g_mapmapping grid points
kmapposition where the derivative is calculated
gsGrid info
spacingof the grid
colsnon-zero colums calculated by the function
coeffcoefficent (constant in front of the derivative)

Example

Definition at line 224 of file Derivative.hpp.


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