pub enum GreenError {
NoConvergence(usize),
Eigen,
ModeCount {
right: usize,
left: usize,
expected: usize,
},
Singular(f64),
}Expand description
Error of a Green’s function computation.
Variants§
NoConvergence(usize)
The decimation (decimation::surface_green) did not converge in this many steps (η
zero or too small).
Eigen
A dense decomposition failed (an SVD, a Schur form, eigenvalues), as in the lead modes when no shift of the energy helps.
ModeCount
The lead modes did not split into r right-going and r left-going ones, r being the
rank of the coupling (an energy at a band edge?).
Fields
Singular(f64)
Singular near the energy it holds: a subband edge or a bound state of the lead surface (at every shift tried), or a device matrix that cannot be inverted.
Trait Implementations§
Source§impl Debug for GreenError
impl Debug for GreenError
Source§impl Display for GreenError
impl Display for GreenError
Source§impl Error for GreenError
impl Error for GreenError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for GreenError
impl PartialEq for GreenError
Source§fn eq(&self, other: &GreenError) -> bool
fn eq(&self, other: &GreenError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GreenError
Auto Trait Implementations§
impl Freeze for GreenError
impl RefUnwindSafe for GreenError
impl Send for GreenError
impl Sync for GreenError
impl Unpin for GreenError
impl UnsafeUnpin for GreenError
impl UnwindSafe for GreenError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more