Class
NumCosmoMathSBesselIntegratorLevin
Description [src]
final class NumCosmoMath.SBesselIntegratorLevin : NumCosmoMath.SBesselIntegrator
{
/* No available fields */
}
Levin-Bessel method for spherical Bessel function integration.
This class implements integration of functions multiplied by spherical Bessel functions using a Levin-type method for low multipoles and vector cubature integration for high multipoles.
For low ell values, the method solves the differential equation $x^2 y”(x) + 2x y’(x) + (x^2 - \ell(\ell+1)) y(x) = f(x)$ with boundary conditions $y(x_n) = 0 = y(x_{n+1})$. The integral is then given by $I_n = j_\ell(x_{n+1}) y’(x_{n+1}) - j_\ell(x_n) y’(x_n)$.
For high ell values, it uses vector cubature integration where the integrand evaluates $f(x)$ and all $j_\ell(x)$ values simultaneously for efficiency.
Constructors
ncm_sbessel_integrator_levin_new
Creates a new NcmSBesselIntegratorLevin with default parameters:
- y_knots_min = NCM_SBESSEL_INTEGRATOR_LEVIN_DEFAULT_Y_KNOTS_MIN
- y_knots_max = NCM_SBESSEL_INTEGRATOR_LEVIN_DEFAULT_Y_KNOTS_MAX
- n_knots = NCM_SBESSEL_INTEGRATOR_LEVIN_DEFAULT_N_KNOTS
- ell_cache_max = NCM_SBESSEL_INTEGRATOR_LEVIN_DEFAULT_ELL_CACHE_MAX
- reltol = NCM_SBESSEL_INTEGRATOR_LEVIN_DEFAULT_RELTOL
- cheb_min_order = NCM_SBESSEL_INTEGRATOR_LEVIN_DEFAULT_CHEB_MIN_ORDER
- cheb_reltol = NCM_SBESSEL_INTEGRATOR_LEVIN_DEFAULT_CHEB_RELTOL.
ncm_sbessel_integrator_levin_new_full
Creates a new NcmSBesselIntegratorLevin with optional knots-based paneling. To
disable knots-based paneling and use single panel mode, set y_knots_min,
y_knots_max, or n_knots to 0.
Functions
ncm_sbessel_integrator_levin_clear
If sbilv is different from NULL, decreases the reference count of
sbilv by one and sets sbilv to NULL.
Instance methods
ncm_sbessel_integrator_levin_get_cheb_min_order
Gets the minimum Chebyshev order for RHS computation.
ncm_sbessel_integrator_levin_get_cheb_reltol
Gets the relative tolerance for Chebyshev decomposition.
ncm_sbessel_integrator_levin_get_ell_cache_max
Gets the maximum ell value for the precomputed spherical Bessel cache.
ncm_sbessel_integrator_levin_set_cheb_min_order
Sets the minimum order of Chebyshev decomposition for RHS computation.
ncm_sbessel_integrator_levin_set_cheb_reltol
Sets the relative tolerance for Chebyshev decomposition of the integrand.
Methods inherited from NcmSBesselIntegrator (10)
ncm_sbessel_integrator_free
Decreases the reference count of sbi by one.
ncm_sbessel_integrator_get_ell_range
Gets the multipole range.
ncm_sbessel_integrator_integrate
Integrates the function F(x, k) multiplied by the spherical Bessel function
$j_\ell(kx)$ from a to b for all multipoles from ell_min to ell_max.
Computes: $\int_a^b K(x,k) j_\ell(kx) dx$ for each $\ell$.
The results are stored in result, which must have length (ell_max - ell_min + 1).
ncm_sbessel_integrator_integrate_ell
Integrates the function F(x, k) multiplied by the spherical Bessel function
$j_\ell(kx)$ from a to b for a single multipole.
Computes: $\int_a^b K(x,k) j_\ell(kx) dx$.
ncm_sbessel_integrator_integrate_gaussian
Integrates a Gaussian function $\exp(-\frac{1}{2}(\frac{x - center}{std})^2)$
multiplied by the spherical Bessel function $j_\ell(kx)$ from a to b
for all multipoles from ell_min to ell_max.
The results are stored in result, which must have length (ell_max - ell_min + 1).
ncm_sbessel_integrator_integrate_gaussian_ell
Integrates a Gaussian function $\exp(-\frac{1}{2}(\frac{x - center}{std})^2)$
multiplied by the spherical Bessel function $j_\ell(kx)$ from a to b
for a single multipole.
ncm_sbessel_integrator_integrate_rational
Integrates a rational function $\frac{x^2}{(1+((x - center)/std)^2)^3}$
multiplied by the spherical Bessel function $j_\ell(kx)$ from a to b for all
multipoles from ell_min to ell_max. The results are stored in result, which must have
length (ell_max - ell_min + 1).
ncm_sbessel_integrator_integrate_rational_ell
Integrates a rational function $\frac{x^2}{(1+((x - center)/std)^2)^3}$
multiplied by the spherical Bessel function $j_\ell(kx)$ from a to b for a single multipole.
ncm_sbessel_integrator_ref
Increases the reference count of sbi by one.
ncm_sbessel_integrator_set_ell_range
Sets the multipole range for integration. If the range has changed from the previous call, subclasses may perform preparation work (e.g., allocating operators for the new range). The default implementation simply updates ell_min and ell_max properties.
Properties
NumCosmoMath.SBesselIntegratorLevin:cheb-min-order
Minimum order of Chebyshev decomposition used when computing the RHS for the Levin method.
NumCosmoMath.SBesselIntegratorLevin:cheb-reltol
Relative tolerance for Chebyshev decomposition of the integrand when computing the RHS for the Levin method.
NumCosmoMath.SBesselIntegratorLevin:ell-cache-max
Maximum ell value for precomputed spherical Bessel functions at knots. The integrator will precompute j_ell(knot) for all knots and all ell from 0 to ell-cache-max. This enables fast lookup during integration when the requested ell values are within the cached range. For ell values beyond ell-cache-max, the integrator will compute spherical Bessel functions on-the-fly. This property can only be set during construction.
NumCosmoMath.SBesselIntegratorLevin:max-order
Maximum order of Chebyshev decomposition for the Levin method. Higher order may give better accuracy but is more expensive. Default is 2^14.
NumCosmoMath.SBesselIntegratorLevin:n-knots
Number of knots in the log-spaced grid. The knots will be equally spaced in log space between y-knots-min and y-knots-max. Set to 0 to disable knots-based paneling. This property can only be set during construction.
NumCosmoMath.SBesselIntegratorLevin:y-knots-max
Maximum value for knots in log-spaced grid. Set to 0 to disable knots-based paneling. This property can only be set during construction.
NumCosmoMath.SBesselIntegratorLevin:y-knots-min
Minimum value for knots in log-spaced grid. Set to 0 to disable knots-based paneling. This property can only be set during construction.
Properties inherited from NcmSBesselIntegrator (1)
NumCosmoMath.SBesselIntegrator:ell-range
Multipole range [ell_min, ell_max]. Both values must be non-negative integers with ell_min <= ell_max.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.