Skip to main content

Error

Enum Error 

Source
#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

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.

Fields

§iters: usize

iparam[2] writeback — restart iterations performed (equals Options::max_iter when the cap was hit).

§nconv: usize

iparam[4] writeback — converged Ritz value count. For the single-eigenpair drivers this is always 0 when this variant is returned.

§n_matvec: usize

iparam[8] writeback — operator applications performed.

Trait Implementations§

Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

§

impl Freeze for Error

§

impl RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin for Error

§

impl UnwindSafe for Error

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.