pub struct DeflationSubspace<T: ComplexField> { /* private fields */ }Expand description
Pre-computed deflation data for deflated GMRES
Given deflation vectors W = [w₁,…,wᵣ] (n×r, r≪n) and operator A:
- AW = A·W columns
- E = Wᴴ·A·W (r×r dense), factored via LU
Provides projectors:
- Left: P(v) = v - AW·E⁻¹·Wᴴ·v
- Coarse correction: W·E⁻¹·Wᴴ·b
- Recovery: Q(v) = v - W·E⁻¹·Wᴴ·A·v
Implementations§
Source§impl<T: ComplexField> DeflationSubspace<T>
impl<T: ComplexField> DeflationSubspace<T>
Sourcepub fn new<A: LinearOperator<T>>(
w_columns: Vec<Array1<T>>,
operator: &A,
) -> Result<Self, LuError>
pub fn new<A: LinearOperator<T>>( w_columns: Vec<Array1<T>>, operator: &A, ) -> Result<Self, LuError>
Construct deflation subspace from deflation vectors and operator
Computes AW = A·W and factors E = Wᴴ·A·W via LU.
§Arguments
w_columns- Deflation vectors (should be orthonormal or near-orthonormal)operator- The linear operator A
Sourcepub fn num_vectors(&self) -> usize
pub fn num_vectors(&self) -> usize
Number of deflation vectors
Sourcepub fn apply_left_projector(&self, v: &Array1<T>) -> Array1<T>
pub fn apply_left_projector(&self, v: &Array1<T>) -> Array1<T>
Apply left deflation projector: P(v) = v - AW·E⁻¹·Wᴴ·v
Sourcepub fn coarse_correction(&self, b: &Array1<T>) -> Array1<T>
pub fn coarse_correction(&self, b: &Array1<T>) -> Array1<T>
Compute coarse correction: W·E⁻¹·Wᴴ·b
Sourcepub fn apply_recovery<A: LinearOperator<T>>(
&self,
v: &Array1<T>,
operator: &A,
) -> Array1<T>
pub fn apply_recovery<A: LinearOperator<T>>( &self, v: &Array1<T>, operator: &A, ) -> Array1<T>
Apply recovery operator: Q(v) = v - W·E⁻¹·Wᴴ·A·v
Trait Implementations§
Source§impl<T: Clone + ComplexField> Clone for DeflationSubspace<T>
impl<T: Clone + ComplexField> Clone for DeflationSubspace<T>
Source§fn clone(&self) -> DeflationSubspace<T>
fn clone(&self) -> DeflationSubspace<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for DeflationSubspace<T>
impl<T> RefUnwindSafe for DeflationSubspace<T>where
T: RefUnwindSafe,
impl<T> Send for DeflationSubspace<T>
impl<T> Sync for DeflationSubspace<T>
impl<T> Unpin for DeflationSubspace<T>
impl<T> UnsafeUnpin for DeflationSubspace<T>
impl<T> UnwindSafe for DeflationSubspace<T>where
T: RefUnwindSafe,
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
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>
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