![]() |
Shamrock 2025.10.0
Astrophysical Code
|
Public Types | |
| using | Generator = BaseKernel |
| using | Tscal = Tscal_ |
Static Public Member Functions | |
| static Tscal | f (Tscal q) |
| the base function for this SPH kernel | |
| static Tscal | df (Tscal q) |
| derivative of M4::f | |
| static Tscal | ddf (Tscal q) |
| static Tscal | W_1d (Tscal r, Tscal h) |
| static Tscal | W_2d (Tscal r, Tscal h) |
| static Tscal | W_3d (Tscal r, Tscal h) |
| compute the normed & resized version of the kernel : | |
| static Tscal | dW_3d (Tscal r, Tscal h) |
| static Tscal | ddW_3d (Tscal r, Tscal h) |
| static Tscal | dhW_3d (Tscal r, Tscal h) |
| template<int np> | |
| static Tscal | f3d_integ_z (Tscal x) |
| Riemann sum of \( f(\sqrt{x^2 + z^2}) \) along z over the kernel support. | |
| static Tscal | f3d_integ_z (Tscal x, int np=32) |
| static Tscal | Y_3d (Tscal r, Tscal h, int np) |
| template<int np> | |
| static Tscal | Y_3d (Tscal r, Tscal h) |
| static Tscal | phi_tilde_3d (Tscal q) |
| static Tscal | phi_tilde_3d_prime (Tscal q) |
| static Tscal | phi_3D (Tscal r, Tscal h) |
| static Tscal | phi_3D_prime (Tscal r, Tscal h) |
Static Public Attributes | |
| static constexpr Tscal | Rkern = BaseKernel::Rkern |
| static constexpr Tscal | hfactd = BaseKernel::hfactd |
| static constexpr bool | has_3d_phi_soft = ::shammath::has_phi_tilde_3d<BaseKernel, Tscal>::value |
| static constexpr bool | has_3d_phi_soft_prime = ::shammath::has_phi_tilde_3d_prime<BaseKernel, Tscal>::value |
Definition at line 2287 of file sphkernels.hpp.
| using shammath::SPHKernelGen< Tscal_, BaseKernel >::Generator = BaseKernel |
Definition at line 2289 of file sphkernels.hpp.
| using shammath::SPHKernelGen< Tscal_, BaseKernel >::Tscal = Tscal_ |
Definition at line 2290 of file sphkernels.hpp.
|
inlinestatic |
Definition at line 2313 of file sphkernels.hpp.
|
inlinestatic |
Definition at line 2338 of file sphkernels.hpp.
|
inlinestatic |
derivative of M4::f
| q | parameter of the function |
Definition at line 2311 of file sphkernels.hpp.
|
inlinestatic |
Definition at line 2342 of file sphkernels.hpp.
|
inlinestatic |
Definition at line 2334 of file sphkernels.hpp.
|
inlinestatic |
the base function for this SPH kernel
Such that : \(\int f(\vert\vert q\vert\vert) {\rm d}^n \mathbf{q} = 1\) Also : \( f(q > Rkern) = 0\)
| q | parameter of the function |
Definition at line 2303 of file sphkernels.hpp.
|
inlinestatic |
Riemann sum of \( f(\sqrt{x^2 + z^2}) \) along z over the kernel support.
Samples the grid z_k = k * step, step = Rkern / np, for k = -np, ..., np - 1. These are the points visited by integ_riemann_sum(-Rkern, Rkern, step, ...) whenever its accumulated z += step is exact (e.g. a power of two np with the kernels here). The grid is symmetric around 0, so \( f(\sqrt{x^2 + z^2}) \) is evaluated once at z = 0 (as f(|x|), equal to f(sqrt(x * x)) barring over/underflow) and once per k = 1, ..., np - 1, counted twice for its mirror -z_k. The z = -Rkern sample is dropped since its argument \( \sqrt{x^2 + R_{\rm kern}^2} \ge R_{\rm kern} \) is outside the compact support, where f is 0.
x * x + z * z is computed as fma(z, z, x * x) and step is factored out of the sum, so the operations are reordered with respect to the plain Riemann sum: both match up to a few ulp per term, not bitwise. The runtime np overload below still computes the plain Riemann sum.
Definition at line 2364 of file sphkernels.hpp.
|
inlinestatic |
Definition at line 2378 of file sphkernels.hpp.
|
inlinestatic |
Definition at line 2415 of file sphkernels.hpp.
|
inlinestatic |
Definition at line 2419 of file sphkernels.hpp.
|
inlinestatic |
Definition at line 2396 of file sphkernels.hpp.
|
inlinestatic |
Definition at line 2407 of file sphkernels.hpp.
|
inlinestatic |
Definition at line 2315 of file sphkernels.hpp.
|
inlinestatic |
Definition at line 2317 of file sphkernels.hpp.
|
inlinestatic |
compute the normed & resized version of the kernel :
\[ W(r,h) = C_{\rm norm} \frac{1}{h^3} f(\frac{r}{h}) \]
| r | |
| h |
Definition at line 2330 of file sphkernels.hpp.
|
inlinestatic |
Definition at line 2389 of file sphkernels.hpp.
|
inlinestatic |
Definition at line 2384 of file sphkernels.hpp.
|
staticconstexpr |
Definition at line 2393 of file sphkernels.hpp.
|
staticconstexpr |
Definition at line 2404 of file sphkernels.hpp.
|
inlinestaticconstexpr |
default $h_{\rm fact}$ for this kernel
Definition at line 2292 of file sphkernels.hpp.
|
inlinestaticconstexpr |
Radius of the support
Definition at line 2291 of file sphkernels.hpp.