pub struct LinsolveOptions {
pub nfullsweeps: usize,
pub truncation: TruncationOptions,
pub krylov_tol: f64,
pub krylov_maxiter: usize,
pub krylov_dim: usize,
pub a0: f64,
pub a1: f64,
pub convergence_tol: Option<f64>,
}Expand description
Options for the linsolve algorithm.
Fields§
§nfullsweeps: usizeNumber of full sweeps to perform.
A full sweep visits each edge twice (forward and backward) using an Euler tour.
truncation: TruncationOptionsTruncation options for factorization.
krylov_tol: f64Tolerance for GMRES convergence.
krylov_maxiter: usizeMaximum GMRES iterations per local solve.
krylov_dim: usizeKrylov subspace dimension (restart parameter).
a0: f64Coefficient a₀ in (a₀ + a₁ * A) * x = b.
a1: f64Coefficient a₁ in (a₀ + a₁ * A) * x = b.
convergence_tol: Option<f64>Convergence tolerance for early termination. If Some(tol), stop when relative residual < tol.
Implementations§
Source§impl LinsolveOptions
impl LinsolveOptions
Sourcepub fn new(nfullsweeps: usize) -> Self
pub fn new(nfullsweeps: usize) -> Self
Create new options with specified number of full sweeps.
Sourcepub fn with_nfullsweeps(self, nfullsweeps: usize) -> Self
pub fn with_nfullsweeps(self, nfullsweeps: usize) -> Self
Set number of full sweeps.
Sourcepub fn with_truncation(self, truncation: TruncationOptions) -> Self
pub fn with_truncation(self, truncation: TruncationOptions) -> Self
Set truncation options.
Sourcepub fn with_max_rank(self, max_rank: usize) -> Self
pub fn with_max_rank(self, max_rank: usize) -> Self
Set maximum bond dimension.
Sourcepub fn with_svd_policy(self, policy: SvdTruncationPolicy) -> Self
pub fn with_svd_policy(self, policy: SvdTruncationPolicy) -> Self
Set the SVD truncation policy used by TreeTN truncation steps.
Sourcepub fn with_krylov_tol(self, tol: f64) -> Self
pub fn with_krylov_tol(self, tol: f64) -> Self
Set GMRES tolerance.
Sourcepub fn with_krylov_maxiter(self, maxiter: usize) -> Self
pub fn with_krylov_maxiter(self, maxiter: usize) -> Self
Set maximum GMRES iterations.
Sourcepub fn with_krylov_dim(self, dim: usize) -> Self
pub fn with_krylov_dim(self, dim: usize) -> Self
Set Krylov subspace dimension.
Sourcepub fn with_coefficients(self, a0: f64, a1: f64) -> Self
pub fn with_coefficients(self, a0: f64, a1: f64) -> Self
Set coefficients a₀ and a₁.
Sourcepub fn with_convergence_tol(self, tol: f64) -> Self
pub fn with_convergence_tol(self, tol: f64) -> Self
Set convergence tolerance for early termination.
Trait Implementations§
Source§impl Clone for LinsolveOptions
impl Clone for LinsolveOptions
Source§fn clone(&self) -> LinsolveOptions
fn clone(&self) -> LinsolveOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LinsolveOptions
impl Debug for LinsolveOptions
Auto Trait Implementations§
impl Freeze for LinsolveOptions
impl RefUnwindSafe for LinsolveOptions
impl Send for LinsolveOptions
impl Sync for LinsolveOptions
impl Unpin for LinsolveOptions
impl UnsafeUnpin for LinsolveOptions
impl UnwindSafe for LinsolveOptions
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>,
§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