|
Peano
|
SPH Kernel related constants, coefficients, and functions. More...
Data Structures | |
| class | _forbidInvalidKernelsDict |
| Modify the default dict to raise an error if a user tries to access kernels which aren't defined. More... | |
Functions | |
| _sph_kernel_eval_cubic_spline (float q) | |
| Evaluates the cubic spline kernel. | |
| _sph_kernel_eval_quartic_spline (float q) | |
| Evaluates the quartic spline kernel. | |
| _sph_kernel_eval_quartic_spline_vectorized (np.ndarray q) | |
| Evaluates the quartic spline kernel. | |
| _sph_kernel_eval_quintic_spline (float q) | |
| Evaluates the quintic spline kernel. | |
| _sph_kernel_eval_quintic_spline_vectorized (np.ndarray q) | |
| Evaluates the quintic spline kernel. | |
| _sph_kernel_eval_wendland_C2 (float q) | |
| Evaluates the Wendland C2 kernel. | |
| _sph_kernel_eval_wendland_C4 (float q) | |
| Evaluates the Wendland C4 kernel. | |
| _sph_kernel_eval_wendland_C6 (float q) | |
| Evaluates the Wendland C6 kernel. | |
| _sph_kernel_deval_cubic_spline (float q) | |
| Evaluates the cubic spline kernel derivative. | |
| _sph_kernel_deval_quartic_spline (float q) | |
| Evaluates the quartic spline kernel derivative. | |
| _sph_kernel_deval_quartic_spline_vectorized (np.ndarray q) | |
| Evaluates the quartic spline kernel derivative. | |
| _sph_kernel_deval_quintic_spline (float q) | |
| Evaluates the quintic spline kernel derivative. | |
| _sph_kernel_deval_wendland_C2 (float q) | |
| Evaluates the Wendland C2 kernel derivative. | |
| _sph_kernel_deval_wendland_C4 (float q) | |
| Evaluates the Wendland C4 kernel derivative. | |
| _sph_kernel_deval_wendland_C6 (float q) | |
| Evaluates the Wendland C6 kernel derivative. | |
| sph_kernel_W (Union[float, np.ndarray] r, Union[float, np.ndarray] h, str kernel, int ndim) | |
| Evaluates various kernels. | |
| sph_kernel_dWdr (Union[float, np.ndarray] r, Union[float, np.ndarray] h, str kernel, int ndim) | |
| Evaluates kernel derivatives for various kernels: returns dW/dr = dW/dq dq/dr = 1/H * dW/dq. | |
| sph_kernel_get_interaction_radius (Union[float, np.ndarray] h, str kernel, int ndim) | |
Computes the interaction radius (compact support radius) for a given smoothing length h, SPH kernel kernel, and kernel dimension ndim. | |
| sph_kernel_get_H (Union[float, np.ndarray] h, str kernel, int ndim) | |
| Compute the compact support radius of a given kernel and given smoothing length. | |
| sph_kernel_get_smoothing_length_from_interaction_radius (Union[float, np.ndarray] H, str kernel, int ndim) | |
| Compute the smoothing length given the compact support length of a given kernel. | |
| sph_kernel_root (str kernel, int ndim) | |
| Evaluate kernel root, i.e. | |
SPH Kernel related constants, coefficients, and functions.
All constants and kernel coefficients are taken from table 1 of Dehnen & Aly, MNRAS, 425, pp. 1062-1082 (2012).
|
protected |
Evaluates the cubic spline kernel derivative.
Definition at line 342 of file sph_kernels.py.
|
protected |
Evaluates the quartic spline kernel derivative.
Definition at line 356 of file sph_kernels.py.
|
protected |
Evaluates the quartic spline kernel derivative.
Definition at line 371 of file sph_kernels.py.
|
protected |
Evaluates the quintic spline kernel derivative.
Definition at line 396 of file sph_kernels.py.
|
protected |
Evaluates the Wendland C2 kernel derivative.
Definition at line 417 of file sph_kernels.py.
|
protected |
Evaluates the Wendland C4 kernel derivative.
Definition at line 428 of file sph_kernels.py.
|
protected |
Evaluates the Wendland C6 kernel derivative.
Definition at line 446 of file sph_kernels.py.
|
protected |
Evaluates the cubic spline kernel.
Definition at line 169 of file sph_kernels.py.
|
protected |
Evaluates the quartic spline kernel.
Definition at line 183 of file sph_kernels.py.
|
protected |
Evaluates the quartic spline kernel.
Definition at line 198 of file sph_kernels.py.
|
protected |
Evaluates the quintic spline kernel.
Definition at line 225 of file sph_kernels.py.
|
protected |
Evaluates the quintic spline kernel.
Definition at line 251 of file sph_kernels.py.
|
protected |
Evaluates the Wendland C2 kernel.
Definition at line 287 of file sph_kernels.py.
|
protected |
Evaluates the Wendland C4 kernel.
Definition at line 299 of file sph_kernels.py.
|
protected |
Evaluates the Wendland C6 kernel.
Definition at line 321 of file sph_kernels.py.
| exaparty.api.sphtools.sph_kernels.sph_kernel_dWdr | ( | Union[float, np.ndarray] | r, |
| Union[float, np.ndarray] | h, | ||
| str | kernel, | ||
| int | ndim | ||
| ) |
Evaluates kernel derivatives for various kernels: returns dW/dr = dW/dq dq/dr = 1/H * dW/dq.
The kernels are scaled such that W(q > 1) = 0. Currently implemented: cubic_spline, quartic_spline, quintic_spline, wendland_C2, wendland_C4, [not with ndim=1] wendland_C6, [not with ndim=1]
r: float or ndarray particle distance(s)
h: float or ndarray smoothing length(s)
kernel: str which kernel to use
ndim: int what dimension to use. [1-3]
dWdr: float or ndarray evaluated kernel derivative
Definition at line 535 of file sph_kernels.py.
| exaparty.api.sphtools.sph_kernels.sph_kernel_get_H | ( | Union[float, np.ndarray] | h, |
| str | kernel, | ||
| int | ndim | ||
| ) |
Compute the compact support radius of a given kernel and given smoothing length.
The kernels defined above are defined and scaled to support a region <= H.
h: float or np.ndarray smoothing length
kernel: str which kernel to use.
ndim: int how many dimensions we're working with
H: float or np.dnarray compact support radii.
Definition at line 594 of file sph_kernels.py.
| exaparty.api.sphtools.sph_kernels.sph_kernel_get_interaction_radius | ( | Union[float, np.ndarray] | h, |
| str | kernel, | ||
| int | ndim | ||
| ) |
Computes the interaction radius (compact support radius) for a given smoothing length h, SPH kernel kernel, and kernel dimension ndim.
Definition at line 584 of file sph_kernels.py.
| exaparty.api.sphtools.sph_kernels.sph_kernel_get_smoothing_length_from_interaction_radius | ( | Union[float, np.ndarray] | H, |
| str | kernel, | ||
| int | ndim | ||
| ) |
Compute the smoothing length given the compact support length of a given kernel.
The kernels defined above are defined and scaled to support a region <= H.
H: float or np.ndarray compact support radii.
kernel: str which kernel to use.
ndim: int how many dimensions we're working with
h: float or np.dnarray smoothing lengt(s)
Definition at line 623 of file sph_kernels.py.
| exaparty.api.sphtools.sph_kernels.sph_kernel_root | ( | str | kernel, |
| int | ndim | ||
| ) |
Evaluate kernel root, i.e.
W(0, h). We don't actually need h here, because the quantity used in the kernels, q = r/h is also zero by construction.
kernel: str which kernel to use
ndim: int what dimension to use. [1-3]
W: float evaluated kernel
Definition at line 655 of file sph_kernels.py.
| exaparty.api.sphtools.sph_kernels.sph_kernel_W | ( | Union[float, np.ndarray] | r, |
| Union[float, np.ndarray] | h, | ||
| str | kernel, | ||
| int | ndim | ||
| ) |
Evaluates various kernels.
The kernels are scaled such that W(q > 1) = 0. Currently implemented: cubic_spline, quartic_spline, quintic_spline, wendland_C2, wendland_C4, [not with ndim=1] wendland_C6, [not with ndim=1]
r: float or ndarray particle distance(s)
h: float or ndarray smoothing length(s)
kernel: str which kernel to use
ndim: int what dimension to use. [1-3]
W: float evaluated kernel
Definition at line 487 of file sph_kernels.py.
| exaparty.api.sphtools.sph_kernels.sph_kernel_deval_function = _forbidInvalidKernelsDict() |
Definition at line 84 of file sph_kernels.py.
| exaparty.api.sphtools.sph_kernels.sph_kernel_eval_function = _forbidInvalidKernelsDict() |
Definition at line 81 of file sph_kernels.py.
| list exaparty.api.sphtools.sph_kernels.sph_kernel_H_over_h |
Definition at line 66 of file sph_kernels.py.
| list exaparty.api.sphtools.sph_kernels.sph_kernel_list |
Definition at line 15 of file sph_kernels.py.
| exaparty.api.sphtools.sph_kernels.sph_kernel_macro_name = _forbidInvalidKernelsDict() |
Definition at line 63 of file sph_kernels.py.
| list exaparty.api.sphtools.sph_kernels.sph_kernel_normalization |
Definition at line 74 of file sph_kernels.py.
| list exaparty.api.sphtools.sph_kernels.sph_vectorized_kernel_list |
Definition at line 24 of file sph_kernels.py.