pub struct GmresOptions {
pub rtol: f64,
pub atol: f64,
pub restart: usize,
pub max_iterations: usize,
}Expand description
Accuracy and memory budget of restarted GMRES.
The solve converges when the true residual norm is at most
max(atol, rtol * |b|). The defaults are rtol = 1e-10, atol = 0,
restart = 30 and max_iterations = 300; the Python constants
iterative.DEFAULT_RTOL, DEFAULT_ATOL, DEFAULT_RESTART and
DEFAULT_MAX_ITERATIONS repeat them.
Fields§
§rtol: f64Relative residual tolerance with respect to the right-hand side norm.
atol: f64Absolute residual tolerance, for right-hand sides near zero.
restart: usizeMaximum number of Krylov vectors retained before a restart.
max_iterations: usizeMaximum total operator applications in the Arnoldi iterations.
Implementations§
Source§impl GmresOptions
impl GmresOptions
Sourcepub(crate) fn for_derivative(self) -> Self
pub(crate) fn for_derivative(self) -> Self
Derivative right-hand sides have arbitrary scale, so an absolute tolerance would incorrectly erase small tangents or cotangents. Keep the relative tolerance, or use the default when the primal requested absolute-only convergence; the restart and iteration budgets stay unchanged.
Trait Implementations§
Source§impl Clone for GmresOptions
impl Clone for GmresOptions
Source§fn clone(&self) -> GmresOptions
fn clone(&self) -> GmresOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GmresOptions
impl Debug for GmresOptions
Source§impl Default for GmresOptions
impl Default for GmresOptions
impl Copy for GmresOptions
Auto Trait Implementations§
impl Freeze for GmresOptions
impl RefUnwindSafe for GmresOptions
impl Send for GmresOptions
impl Sync for GmresOptions
impl Unpin for GmresOptions
impl UnwindSafe for GmresOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.