Second order central Derivative scheme on direction i. More...
Second order central Derivative scheme on direction i.
* * -1 +1 * *---+---* * *
Definition at line 80 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. | |
|
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
Consider this 2D staggered cell and a second order central derivative scheme, this lead to
\( \frac{\partial v_y}{\partial x} \) is calculated on position (*), so the function return the grid_key {0,0}
\( \frac{\partial v_y}{\partial y} \) is calculated on position (0), so the function return the grid_key {-1,-1}
\( \frac{\partial v_x}{\partial x} \) is calculated on position (0), so the function return the grid_key {-1,-1}
\( \frac{\partial v_x}{\partial y} \) is calculated on position (*), so the function return the grid_key {0,0}
pos | position where we are calculating the derivative |
gs | Grid info |
s_pos | staggered position of the properties |
Definition at line 161 of file Derivative.hpp.
|
inlinestatic |
Calculate which colums of the Matrix are non zero.
g_map | mapping grid |
kmap | position where the derivative is calculated |
gs | Grid info |
spacing | grid spacing |
cols | non-zero colums calculated by the function |
coeff | coefficent (constant in front of the derivative) |
Definition at line 98 of file Derivative.hpp.