6 #ifndef OPENFPM_PDATA_DCPSEDIAGONALSCALINGMATRIX_HPP
7 #define OPENFPM_PDATA_DCPSEDIAGONALSCALINGMATRIX_HPP
9 #include "MonomialBasis.hpp"
12 template <
unsigned int dim,
typename monomialBasis_type = MonomialBasis<dim>>
16 const monomialBasis_type& monomialBasis;
21 template <
typename T,
typename MatrixType,
typename verletIterator_type,
typename vector_type,
typename vector_type2>
22 void buildMatrix(MatrixType &M,
size_t p, verletIterator_type &it, T eps,
vector_type & particlesSupport ,
vector_type2 & particlesDomain)
35 _xp -= particlesSupport.
getPos(q);
37 M(i,i) = exp(- norm2(_xp) / (2.0 * eps * eps));
43 template <
typename T,
typename vector_type,
typename vector_type2>
44 __host__ __device__
void buildMatrix(T* M,
size_t p,
size_t supportKeysSize,
const size_t* supportKeys, T eps,
vector_type & particlesSupport,
vector_type2 & particlesDomain)
47 assert(supportKeysSize >= monomialBasis.size());
51 for (
size_t i = 0; i < supportKeysSize; ++i)
53 size_t q = supportKeys[i];
55 _xp -= particlesSupport.
getPos(q);
57 M[i] = exp(- norm2(_xp) / (2.0 * eps * eps));
This class implement the point shape in an N-dimensional space.
__device__ __host__ const T & get(unsigned int i) const
Get coordinate.
auto getPos(size_t vec_key) -> decltype(vd.getPos(vec_key))
Get the position of an element.
auto getPos(vect_dist_key_dx vec_key) -> decltype(vPos.template get< 0 >(vec_key.getKey()))
Get the position of an element.