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

It model an expression expr1 + ... exprn. More...

Detailed Description

template<typename ... expr>
struct sum< expr >

It model an expression expr1 + ... exprn.

Template Parameters
expr..two or more expression to be summed
Sys_eqsstystem specification

Example

Definition at line 92 of file sum.hpp.

#include <sum.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
 struct that specify the syste, of equations
 

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.
 

Member Typedef Documentation

◆ Sys_eqs

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

struct that specify the syste, of equations

Definition at line 101 of file sum.hpp.

◆ v_expr

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

Transform from variadic template to boost mpl vector.

Definition at line 95 of file sum.hpp.

◆ v_sz

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

size of v_expr

Definition at line 98 of file sum.hpp.

Member Function Documentation

◆ value()

template<typename ... expr>
static void sum< expr >::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_mapGrid mapping, it convert grid position into vector/Matrix row
kmapgrid position
gsgrid information
spacinggrid spacing
colsunordered map contain the map colum -> value
coeffit contain an additional actual coefficients in front of the values

Example

Definition at line 117 of file sum.hpp.


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