Skip to main content

pounce_linsol/
status.rs

1//! Linear-solver return status — port of `ESymSolverStatus`
2//! in `IpSymLinearSolver.hpp`.
3
4/// Outcome of a single call into a [`crate::SymLinearSolver`] or
5/// [`crate::SparseSymLinearSolverInterface`].
6///
7/// Variant order and semantics match upstream Ipopt's
8/// `enum ESymSolverStatus` so the algorithm-side state machines port
9/// 1:1.
10#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
11pub enum ESymSolverStatus {
12    /// Successful solve. Mirrors `SYMSOLVER_SUCCESS`.
13    Success,
14    /// Matrix is singular; solve was aborted. Mirrors
15    /// `SYMSOLVER_SINGULAR`.
16    Singular,
17    /// Inertia mismatch — `numberOfNegEVals` did not match.
18    /// Mirrors `SYMSOLVER_WRONG_INERTIA`.
19    WrongInertia,
20    /// Backend asks the caller to refill the values array and call
21    /// again with the same RHS (e.g. MA57 after growing factor
22    /// arrays). Mirrors `SYMSOLVER_CALL_AGAIN`.
23    CallAgain,
24    /// Unrecoverable error — the optimization should abort.
25    /// Mirrors `SYMSOLVER_FATAL_ERROR`.
26    FatalError,
27}