pyfracval.pca_kernels#
PCA-specific JIT kernels for PyFracVAL.
JIT-compiled batch functions for PCA position calculation and overlap checking.
These kernels support the PCA stage in the FracVAL-style aggregation pipeline [Morán et al., 2019].
Functions#
- batch_calculate_positions_pca
JIT batch calculation of particle positions during PCA.
- batch_check_overlaps_pca
JIT parallel overlap checker for PCA batch operations.
Module Contents#
- pyfracval.pca_kernels.batch_calculate_positions_pca(vec_0, i_vec, j_vec, angles)[source]#
Calculate batch of positions on intersection circle for PCA.
Uses Numba parallel loops to compute multiple rotation positions simultaneously.
- Parameters:
vec_0 (np.ndarray) – [x0, y0, z0, r0] - center and radius of intersection circle
i_vec (np.ndarray) – First basis vector (3D)
j_vec (np.ndarray) – Second basis vector (3D)
angles (np.ndarray) – Array of rotation angles (1D)
- Returns:
(N, 3) array of positions, one per angle
- Return type:
np.ndarray
- pyfracval.pca_kernels.batch_check_overlaps_pca(coords_agg, radii_agg, candidate_positions, radius_new, tolerance)[source]#
Check overlap for batch of candidate positions (PCA).
Uses Numba parallel loops to evaluate multiple positions simultaneously.
- Parameters:
- Returns:
(n_candidates,) array of max overlap values for each position
- Return type:
np.ndarray