8#ifndef OPENFPM_NUMERICS_SRC_FINITEDIFFERENCE_EQ_HPP_
9#define OPENFPM_NUMERICS_SRC_FINITEDIFFERENCE_EQ_HPP_
17#include "util/util_num.hpp"
18#include "Matrix/SparseMatrix.hpp"
28template<
typename expr1,
typename expr2,
typename Sys_eqs>
50 return expr1::value_s(it) - expr2::value_s(it);
59 return expr1::value_s(it) - expr2::value_s(it);
66template<
unsigned int dim,
typename T>
81template<
unsigned int f,
typename Sys_eqs>
94 cols[g_map.template get<0>(kmap)*Sys_eqs::nvar + f] += coeff;
112inline size_t mat_factor(
size_t nvar,
size_t sz,
const size_t ord)
118#include "Average.hpp"
119#include "Derivative.hpp"
121#include "Laplacian.hpp"
static void value(const grid_key_dx< Sys_eqs::dims > &pos)
Create the row of the Matrix.
static openfpm::vector< cval< typename Sys_eqs::stype > > value_s(grid_key_dx< Sys_eqs::dims > &it)
fill the row
static void value_f(grid_key_dx< Sys_eqs::dims > &it)
fill the row
static void value(const map_grid &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)
fill the row
Grid key for a distributed grid.
grid_key_dx is the key to access any element in the grid
Implementation of 1-D std::vector like structure.
Position of the element of dimension d in the hyper-cube of dimension dim.
pos_val()
Initialize to zero the value.