num::spatial::debug::verify_kernel_normalization¶
Defined in header <spatial/debug.hpp>
template <class K, class Scalar = float>
requires smoothing_kernel<K, Scalar>
void verify_kernel_normalization(
Scalar h, Scalar tol = Scalar(2e-2),
std::source_location loc = std::source_location::current());
Verify that a smoothing kernel integrates to one over its support.
\[
\int_0^{2h} W(r,h) \, 2\pi r \, dr = 1
\]
SPH interpolates a field as \(\sum_j m_j (\rho_j)^{-1} A_j W_{ij}\), which reproduces a constant only when the kernel is normalized. A kernel that is not produces densities off by a constant factor, which looks like a physical result rather than an error.