#[non_exhaustive]pub enum Error {
InvalidParam(&'static str),
AupdFailed(i32),
EupdFailed(i32),
UnexpectedIdo(i32),
MaxIterReached {
iters: usize,
nconv: usize,
n_matvec: usize,
},
}Expand description
Errors raised by the safe ARPACK wrappers.
info codes are passed through verbatim from the underlying *aupd_c
and *eupd_c routines so the caller can interpret them against the
ARPACK Users’ Guide. Negative values indicate misuse or numerical
failure; positive values other than 1 indicate non-recoverable
convergence conditions (e.g. info = 3 from aupd means no shifts
could be applied — try increasing ncv).
info = 1 from *aupd_c (max_iter reached before all nev Ritz
pairs converged) is mapped to Error::MaxIterReached, which
preserves the iparam diagnostic counters so the caller can decide
whether to retry with a larger budget. For the single-eigenpair
drivers (nev = 1) currently exposed, info = 1 always means
nconv = 0 and no usable Ritz pair was extracted.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidParam(&'static str)
A wrapper-side parameter check failed before any FFI call.
AupdFailed(i32)
The reverse-communication driver (*aupd_c) returned a non-zero
info code that is not separately modelled.
EupdFailed(i32)
The eigenvector-extraction routine (*eupd_c) returned a
non-zero info code.
UnexpectedIdo(i32)
*aupd_c requested an ido value the wrapper does not support
(currently ido = 2, which only occurs for generalized
eigenproblems with bmat = 'G').
MaxIterReached
*aupd_c returned info = 1: the iteration hit max_iter
before the requested nev Ritz pairs converged. The iparam
writeback counters are preserved so the caller can retry with
a larger max_iter or report partial progress.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()