pub enum OdeLaneStatus {
Completed,
MaxStepsExceeded,
StepSizeUnderflow,
NotFinite,
InvalidLane,
}Expand description
How one lane of an ODE ensemble ended.
Only Completed means the lane reached x_end. Every
other variant is a failure a caller must handle; see the module-level
“Non-convergence is reported, never swallowed” section for the accessors that
make it hard to skip.
| Variant | last_state | Meaning |
|---|---|---|
Completed | the state at x_end | reached the end of the interval |
MaxStepsExceeded | genuine partial state at x_reached — not the answer | ran out of sub-steps |
StepSizeUnderflow | genuine partial state at x_reached | the step shrank below f64::EPSILON |
NotFinite | the non-finite state | the state went NaN/infinite |
InvalidLane | all NaN | the lane’s inputs were unusable |
The two middle variants are the stiffness signature: an explicit stepper on a stiff lane runs out of budget rather than returning a wrong answer.
§Units
Dimensionless — a status tag.
Variants§
Completed
The lane reached x_end with a finite state.
MaxStepsExceeded
OdeSolverConfig::max_steps sub-steps were taken without spanning the
interval. The reported state is genuine but partial, at
OdeLaneSolution::x_reached.
StepSizeUnderflow
The adaptive controller shrank the step below f64::EPSILON trying to
meet the tolerance — the system is too stiff for the chosen stepper, or
the tolerances are unattainable. Maps to
OdeError::StepSizeUnderflow.
NotFinite
The integration returned success but the final state contains a NaN or
an infinity. Reported separately from the two budget failures because it
means the model blew up, not that the stepper ran out of room.
InvalidLane
The lane was rejected before any integration — see OdeLane’s
“Validity” section for the exact conditions. The state is all NaN,
because returning the untouched initial condition would look like a
zero-length integration that succeeded.
Implementations§
Source§impl OdeLaneStatus
impl OdeLaneStatus
Sourcepub fn is_completed(self) -> bool
pub fn is_completed(self) -> bool
Whether this status means the lane produced a usable final state.
§Example
use outram_foam_basic_lib::ode::parallel::OdeLaneStatus;
assert!(OdeLaneStatus::Completed.is_completed());
assert!(!OdeLaneStatus::MaxStepsExceeded.is_completed());