pub struct RestartGmresOptions {
pub max_outer_iters: usize,
pub rtol: f64,
pub inner_max_iter: usize,
pub inner_max_restarts: usize,
pub min_reduction: Option<f64>,
pub inner_rtol: Option<f64>,
pub verbose: bool,
}Expand description
Options for restarted GMRES with truncation.
This is used by restart_gmres_with_truncation which wraps the standard GMRES
with an outer loop that recomputes the true residual at each restart.
Fields§
§max_outer_iters: usizeMaximum number of outer restart iterations. Default: 20
rtol: f64Convergence tolerance for relative residual norm (based on true residual).
The solver stops when ||b - A*x|| / ||b|| < rtol.
Default: 1e-10
inner_max_iter: usizeMaximum iterations per inner GMRES cycle. Default: 10
inner_max_restarts: usizeNumber of restarts within each inner GMRES (usually 0). Default: 0
min_reduction: Option<f64>Stagnation detection threshold. If the residual reduction ratio exceeds this value (i.e., residual doesn’t decrease enough), the solver considers it stagnated. For example, 0.99 means stagnation is detected when residual decreases by less than 1%. Default: None (no stagnation detection)
inner_rtol: Option<f64>Inner GMRES relative tolerance. If None, uses 0.1 (solve inner problem loosely). Default: None
verbose: boolWhether to print convergence information. Default: false
Implementations§
Source§impl RestartGmresOptions
impl RestartGmresOptions
Sourcepub fn with_max_outer_iters(self, max_outer_iters: usize) -> Self
pub fn with_max_outer_iters(self, max_outer_iters: usize) -> Self
Set maximum number of outer iterations.
Sourcepub fn with_inner_max_iter(self, inner_max_iter: usize) -> Self
pub fn with_inner_max_iter(self, inner_max_iter: usize) -> Self
Set maximum iterations per inner GMRES cycle.
Sourcepub fn with_inner_max_restarts(self, inner_max_restarts: usize) -> Self
pub fn with_inner_max_restarts(self, inner_max_restarts: usize) -> Self
Set number of restarts within each inner GMRES.
Sourcepub fn with_min_reduction(self, min_reduction: f64) -> Self
pub fn with_min_reduction(self, min_reduction: f64) -> Self
Set stagnation detection threshold.
Sourcepub fn with_inner_rtol(self, inner_rtol: f64) -> Self
pub fn with_inner_rtol(self, inner_rtol: f64) -> Self
Set inner GMRES relative tolerance.
Sourcepub fn with_verbose(self, verbose: bool) -> Self
pub fn with_verbose(self, verbose: bool) -> Self
Enable verbose output.
Trait Implementations§
Source§impl Clone for RestartGmresOptions
impl Clone for RestartGmresOptions
Source§fn clone(&self) -> RestartGmresOptions
fn clone(&self) -> RestartGmresOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RestartGmresOptions
impl Debug for RestartGmresOptions
Auto Trait Implementations§
impl Freeze for RestartGmresOptions
impl RefUnwindSafe for RestartGmresOptions
impl Send for RestartGmresOptions
impl Sync for RestartGmresOptions
impl Unpin for RestartGmresOptions
impl UnwindSafe for RestartGmresOptions
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
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