OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
mul< expr > Struct Template Reference

It model an expression expr1 * expr2. More...

Detailed Description

template<typename ... expr>
struct mul< expr >

It model an expression expr1 * expr2.

Warning
expr1 MUST be a constant expression only expr2 depend form variable, this requirement ensure linearity in the solving variable of the equations
Template Parameters
expr1
expr2

Definition at line 119 of file mul.hpp.

#include <mul.hpp>

Public Types

typedef boost::mpl::vector< expr... > v_expr
 Transform from variadic template to boost mpl vector.
 
typedef boost::mpl::size< v_expr >::type v_sz
 size of v_expr
 
typedef boost::mpl::at< v_expr, boost::mpl::int_< v_sz::type::value-1 > >::type Sys_eqs
 type on which this expression operate
 

Static Public Member Functions

static void value (const grid_dist_id< Sys_eqs::dims, typename Sys_eqs::stype, aggregate< size_t >, typename Sys_eqs::b_grid::decomposition::extended_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 in the cell where the mul operator is performed.
 

Member Typedef Documentation

◆ Sys_eqs

template<typename ... expr>
typedef boost::mpl::at<v_expr,boost::mpl::int_<v_sz::type::value-1>>::type mul< expr >::Sys_eqs

type on which this expression operate

Definition at line 128 of file mul.hpp.

◆ v_expr

template<typename ... expr>
typedef boost::mpl::vector<expr... > mul< expr >::v_expr

Transform from variadic template to boost mpl vector.

Definition at line 122 of file mul.hpp.

◆ v_sz

template<typename ... expr>
typedef boost::mpl::size<v_expr>::type mul< expr >::v_sz

size of v_expr

Definition at line 125 of file mul.hpp.

Member Function Documentation

◆ position()

template<typename ... expr>
static grid_key_dx< Sys_eqs::dims > mul< expr >::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 in the cell where the mul operator is performed.

it just return the position of the staggered property in the last expression

Parameters
posposition where we are calculating the derivative
gsGrid info
s_posstaggered position of the properties

Definition at line 167 of file mul.hpp.

◆ value()

template<typename ... expr>
static void mul< expr >::value ( const grid_dist_id< Sys_eqs::dims, typename Sys_eqs::stype, aggregate< size_t >, typename Sys_eqs::b_grid::decomposition::extended_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
kmapposition where the multiplication is calculated
gsGrid info
spacingof the grid
colsnon-zero colums calculated by the function
coeffcoefficent (constant in front of the derivative)

Last element of multiplication

Definition at line 140 of file mul.hpp.


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