pub struct GridConfig {
pub x_min: f64,
pub x_max: f64,
pub n_points: usize,
pub x_transition: f64,
pub log_fraction: f64,
pub refinement_zones: Vec<RefinementZone>,
}Expand description
Configuration for the frequency grid.
Presets Self::fast (500 points) and Self::production (4000 points)
cover the common cases. Hand-rolled configurations must satisfy
Self::validate: in particular, x_max ≥ 30 for accurate G₃ integrals.
Fields§
§x_min: f64Lower grid bound in dimensionless frequency x = hν/(kT_z).
Must be positive (log spacing). Default 1e-4.
x_max: f64Upper grid bound. Must be ≥ 30 for accurate spectral integrals.
n_points: usizeTotal number of grid points.
x_transition: f64Transition frequency from log to linear spacing.
log_fraction: f64Fraction of points allocated to the log region (must be in [0, 1)).
refinement_zones: Vec<RefinementZone>Optional refinement zones for extra resolution near injection features.
Implementations§
Source§impl GridConfig
impl GridConfig
Sourcepub fn production() -> Self
pub fn production() -> Self
Production-quality grid: 4000 points, x ∈ [1e-5, 60]. Used for all
paper runs.
Sourcepub fn fast() -> Self
pub fn fast() -> Self
Fast/testing grid: 500 points, x ∈ [1e-4, 40]. Suitable for quick
exploratory runs; distortion amplitudes are accurate to a few percent.
Sourcepub fn validate(&self) -> Result<(), String>
pub fn validate(&self) -> Result<(), String>
Validate grid configuration parameters.
Returns Err with a descriptive message if any parameter would cause
numerical failure or produce meaningless results.
Sourcepub fn with_refinement(self, zone: RefinementZone) -> Self
pub fn with_refinement(self, zone: RefinementZone) -> Self
Add a refinement zone to this grid configuration.
Trait Implementations§
Source§impl Clone for GridConfig
impl Clone for GridConfig
Source§fn clone(&self) -> GridConfig
fn clone(&self) -> GridConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more