pub struct SpectralBudget {
pub principal_period: f64,
pub ring_down_factor: f64,
}Expand description
A ceiling on the diameter a bounded sequential domain may reach before its becoming exceeds the principal eigenvalue of the underlying Laplacian.
For a closed scene of diameter d with wave-speed c, the principal
period is T_1 ≈ 2·d/c (Faber–Krahn). The recommended ceiling is
ring_down_factor · T_1 — capturing the first few rings of the
lowest mode.
Fields§
§principal_period: f64T_1 — period of the lowest mode of the bounded domain.
ring_down_factor: f64Multiplier on T_1 defining the admission ceiling. 3.0 by
default — three ring-down cycles of the principal mode.
Implementations§
Source§impl SpectralBudget
impl SpectralBudget
Sourcepub fn for_scene_diameter(diam_m: f64, c: f64) -> SpectralBudget
pub fn for_scene_diameter(diam_m: f64, c: f64) -> SpectralBudget
Continuous Dirichlet bound for a scene of diameter diam_m
(metres) with propagation speed c (m/s). T_1 = 2·diam/c.
Useful for physical (path-tracer-style) budgets.
Sourcepub fn try_admit(&self, diameter: f64) -> Result<(), BudgetError>
pub fn try_admit(&self, diameter: f64) -> Result<(), BudgetError>
Strict admission. Returns Ok(()) if the diameter sits within
the ring_down_factor · principal_period ceiling; otherwise
returns the structured violation so the caller can decide to
abort, downgrade, or surface the error.
Sourcepub fn admits(&self, diameter: f64) -> bool
pub fn admits(&self, diameter: f64) -> bool
Boolean shortcut where the caller does not need violation
detail. Prefer Self::try_admit when you need to surface the
reason.
Trait Implementations§
Source§impl Clone for SpectralBudget
impl Clone for SpectralBudget
Source§fn clone(&self) -> SpectralBudget
fn clone(&self) -> SpectralBudget
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more