8 #ifndef OPENFPM_NUMERICS_SRC_FINITEDIFFERENCE_MUL_HPP_ 
    9 #define OPENFPM_NUMERICS_SRC_FINITEDIFFERENCE_MUL_HPP_ 
   12 #include "util/util_debug.hpp" 
   13 #include "util/util_num.hpp" 
   19 template <
unsigned int, 
typename T>
 
   25         std::cerr << 
"Error the type " << demangle(
typeid(T).name()) << 
"interpreted as constant field, does not have a function val() or val_pos(), please see the numeric examples in Finite Differences for more information\n";
 
   42 template<
typename v_expr>
 
   46     typedef boost::mpl::size<v_expr> 
size;
 
   49     typedef typename boost::mpl::at<v_expr,boost::mpl::int_<size::value-1> >::type 
last;
 
   52     std::unordered_map<long int,typename last::stype> & 
cols;
 
   67     typename last::stype (& 
spacing)[last::dims];
 
   82                             typename last::stype (& 
spacing)[last::dims],
 
   83                             std::unordered_map<long int,typename last::stype> & 
cols,
 
   84                             typename last::stype 
coeff)
 
   94         typedef typename boost::mpl::at<v_expr, boost::mpl::int_<T::value> >::type cfield;
 
  118 template<
typename ... expr >
 
  122     typedef boost::mpl::vector<expr... > 
v_expr;
 
  125     typedef typename boost::mpl::size<v_expr>::type 
v_sz;
 
  128     typedef typename boost::mpl::at<
v_expr, boost::mpl::int_<v_sz::type::value - 1> >::type 
Sys_eqs;
 
  143                              typename Sys_eqs::stype (& spacing )[Sys_eqs::dims],
 
  144                              std::unordered_map<long int,typename Sys_eqs::stype > & cols,
 
  145                              typename Sys_eqs::stype coeff)
 
  150         boost::mpl::for_each_ref< boost::mpl::range_c<int,0,v_sz::type::value - 2> >(mfv);
 
  153         typedef typename boost::mpl::at< 
v_expr ,boost::mpl::int_<v_sz::value-2> >::type last_m;
 
  155         last_m::value(g_map,kmap,gs,spacing,cols,mfv.
coeff);
 
  171         return boost::mpl::at<
v_expr, boost::mpl::int_<v_sz::type::value - 2> >::type::position(pos,gs,s_pos);
 
std::unordered_map< long int, typename last::stype > & cols
sum functor 
 
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. 
 
Evaluate the constant field function. 
 
boost::mpl::size< v_expr >::type v_sz
size of v_expr 
 
boost::mpl::at< v_expr, boost::mpl::int_< v_sz::type::value-1 > >::type Sys_eqs
type on which this expression operate 
 
const grid_dist_id< last::dims, typename last::stype, aggregate< size_t >, typename last::b_grid::decomposition::extended_type > & g_map
grid mapping 
 
boost::mpl::size< v_expr > size
Number of elements in the vector v_expr. 
 
boost::mpl::vector< expr... > v_expr
Transform from variadic template to boost mpl vector. 
 
last::stype coeff
coefficent 
 
const grid_sm< last::dims, void > & gs
grid size 
 
It model an expression expr1 * expr2. 
 
This is a distributed grid. 
 
void operator()(T &t)
It call this function for every constant expression in the mul. 
 
grid_dist_key_dx< last::dims > & kmap
grid position 
 
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 float call_val()
evaluate 
 
const_mul_functor_value(const grid_dist_id< last::dims, typename last::stype, aggregate< size_t >, typename last::b_grid::decomposition::extended_type > &g_map, grid_dist_key_dx< last::dims > &kmap, const grid_sm< last::dims, void > &gs, typename last::stype(&spacing)[last::dims], std::unordered_map< long int, typename last::stype > &cols, typename last::stype coeff)
constructor 
 
last::stype getCoeff()
Get the coefficent. 
 
boost::mpl::at< v_expr, boost::mpl::int_< size::value-1 > >::type last
Last element of sum. 
 
aggregate of properties, from a list of object if create a struct that follow the OPENFPM native stru...
 
last::stype(& spacing)[last::dims]
spacing 
 
Multiplication expression.