5 #ifndef OPENFPM_PDATA_VANDERMONDE_HPP 6 #define OPENFPM_PDATA_VANDERMONDE_HPP 8 #include "MonomialBasis.hpp" 9 #include "VandermondeRowBuilder.hpp" 10 #include "Support.hpp" 12 template<
unsigned int dim,
typename T,
typename MatrixType>
17 std::vector<Point<dim, T>> offsets;
25 template<
typename vector_type>
30 monomialBasis(monomialBasis)
36 MatrixType &getMatrix(MatrixType &M)
41 for (
auto &offset : offsets)
43 vrb.buildRow(M, row, offset, eps);
57 void computeEps(T factor)
59 T avgNeighbourSpacing = 0;
60 for (
auto &offset : offsets)
62 avgNeighbourSpacing += computeAbsSum(offset);
64 avgNeighbourSpacing /= offsets.size();
65 eps = factor * avgNeighbourSpacing;
72 for (
unsigned int i = 0; i < dim; ++i)
74 absSum += fabs(x.value(i));
79 template<
typename vector_type>
82 auto & keys = sup.getKeys();
84 for (
int i = 0 ; i < keys.size() ; i++)
92 if (offsets.size() < monomialBasis.size())
94 ACTION_ON_ERROR(std::length_error(
"Not enough neighbour points passed for Vandermonde matrix construction!"));
105 #endif //OPENFPM_PDATA_VANDERMONDE_HPP
auto getPosOrig(vect_dist_key_dx vec_key) const -> decltype(v_pos.template get< 0 >(vec_key.getKey()))
Get the position of an element.
This class implement the point shape in an N-dimensional space.