pub fn compute_sve<K>(
kernel: K,
epsilon: Option<f64>,
cutoff: Option<f64>,
max_num_svals: Option<usize>,
twork: TworkType,
) -> Result<SVEResult, Error>Expand description
Main SVE computation function for centrosymmetric kernels
Automatically chooses the appropriate SVE strategy based on kernel properties and working precision based on epsilon.
§Arguments
kernel- The centrosymmetric kernel to expandepsilon- Required accuracy, in (0, 1).Noneselects the best accuracy of the working precision (about 1.6e-16 in Float64X2).cutoff- Relative tolerance for singular value truncation: singular values smaller thancutofftimes the largest singular value are discarded.Noneselects2 * machine epsilonof the working precision, about 4.44e-16 for Float64 and 4.93e-32 for Float64X2 (the libsparseir default). The SVD of each even/odd block already discards singular values below2 * machine epsilontimes that block’s largest singular value, so a smallercutoffhas little effect. Must be in [0, 1].max_num_svals- Maximum number of singular values to keeptwork- Working precision type (Auto for automatic selection)
§Returns
SVEResult containing singular functions and values
§Errors
Error::InvalidParameterifepsilonis not in (0, 1),cutoffis not in [0, 1], ormax_num_svalsisSome(0); checked before any workError::NonFiniteInputif the discretized kernel has a NaN or infinite entry (e.g. a cutoff Λ so small that 1/Λ overflows)Error::DecompositionFailedif an SVD fails
§FPU State Warning
This function checks for dangerous FPU settings (Flush-to-Zero and Denormals-Are-Zero)
that can cause incorrect results. If detected, it temporarily corrects the FPU state
and prints a warning. If you see this warning, add -fp-model precise flag when
compiling with Intel Fortran.