pub struct SolverResult {
pub snapshot: SolverSnapshot,
pub x_grid: Vec<f64>,
pub step_count: usize,
pub diag_newton_exhausted: usize,
pub warnings: Vec<String>,
}Expand description
Owned result from a completed solver run.
Contains the observed-redshift snapshot, the frequency grid, and
diagnostic info. Does not borrow the solver, so it can outlive it.
For runs that need multiple snapshots, use
crate::solver::ThermalizationSolver::run_with_snapshots directly.
Fields§
§snapshot: SolverSnapshotSnapshot at the requested observation redshift.
x_grid: Vec<f64>The frequency grid x[i] used by the solver.
step_count: usizeTotal number of timesteps taken.
diag_newton_exhausted: usizeNumber of steps where Newton iteration hit the max iteration limit.
warnings: Vec<String>Diagnostic warnings collected during the run (Newton non-convergence, ρ_e clamping, NaN emission rates, untested regimes, validation soft warnings). Empty for a clean run.
Implementations§
Source§impl SolverResult
impl SolverResult
Sourcepub fn to_json(&self) -> String
pub fn to_json(&self) -> String
Serialize to a JSON string (zero dependencies).
Output format matches the CLI convention used by the Python client:
{"results":[{"pde_mu":..., "pde_y":..., "drho":..., ...}], "diag_newton_exhausted":N}
Trait Implementations§
Source§impl Clone for SolverResult
impl Clone for SolverResult
Source§fn clone(&self) -> SolverResult
fn clone(&self) -> SolverResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more