51 #ifndef MUI_SAMPLER_SPH_QUINTIC_H_
52 #define MUI_SAMPLER_SPH_QUINTIC_H_
54 #include "../../general/util.h"
55 #include "../../config.h"
56 #include "../sampler.h"
61 template<
typename CONFIG=default_config,
typename O_TP=
typename CONFIG::REAL,
typename I_TP=O_TP>
67 using REAL =
typename CONFIG::REAL;
68 using INT =
typename CONFIG::INT;
70 const static int D = CONFIG::D;
74 static_assert(
D == 1 ||
D == 2 ||
D == 3,
"Quintic kernel for dimension other than 1,2,3 not defined." );
81 sigma = 7.0 / 478.0 / PI;
84 sigma = 1.0 / 120.0 / PI;
90 template<
template<
typename,
typename>
class CONTAINER>
94 for(
size_t i = 0 ; i < data_points.size() ; i++ ) {
95 auto dist2 =
normsq( focus - data_points[i].first );
98 vsum += data_points[i].second * w;
116 REAL s1_5, s2_5, s3_5;
121 s1_5 = 15.0 * powr<5>( s1 );
122 s2_5 = -6.0 * powr<5>( s2 );
123 s3_5 = powr<5>( s3 );
125 w = s3_5 + s2_5 + s1_5;
126 }
else if( s < 2.0 ) {
128 }
else if( s < 3.0 ) {
Definition: geometry.h:92
Definition: geometry.h:158
Definition: sampler_sph_quintic.h:63
REAL quintic_polynomial(const REAL dist) const
Definition: sampler_sph_quintic.h:112
typename CONFIG::INT INT
Definition: sampler_sph_quintic.h:68
O_TP OTYPE
Definition: sampler_sph_quintic.h:65
REAL r
Definition: sampler_sph_quintic.h:110
typename CONFIG::point_type point_type
Definition: sampler_sph_quintic.h:69
REAL hinv
Definition: sampler_sph_quintic.h:110
OTYPE filter(point_type focus, const CONTAINER< ITYPE, CONFIG > &data_points) const
Definition: sampler_sph_quintic.h:91
I_TP ITYPE
Definition: sampler_sph_quintic.h:66
static const int D
Definition: sampler_sph_quintic.h:70
REAL norm_factor
Definition: sampler_sph_quintic.h:110
geometry::any_shape< CONFIG > support(point_type focus, REAL domain_mag) const
Definition: sampler_sph_quintic.h:104
sampler_sph_quintic(REAL r_)
Definition: sampler_sph_quintic.h:72
typename CONFIG::REAL REAL
Definition: sampler_sph_quintic.h:67
SCALAR normsq(vexpr< E, SCALAR, D > const &u)
Definition: point.h:380