ComplexLinSolver

Struct ComplexLinSolver 

Source
pub struct ComplexLinSolver<'a> {
    pub actual: Box<dyn Send + ComplexLinSolTrait + 'a>,
}
Expand description

Unifies the access to linear system solvers

Fields§

§actual: Box<dyn Send + ComplexLinSolTrait + 'a>

Holds the actual implementation

Implementations§

Source§

impl<'a> ComplexLinSolver<'a>

Source

pub fn new(genie: Genie) -> Result<Self, StrError>

Allocates a new instance

§Input
  • genie – the actual implementation that does all the magic
Source

pub fn compute( genie: Genie, x: &mut ComplexVector, mat: &ComplexCooMatrix, rhs: &ComplexVector, params: Option<LinSolParams>, ) -> Result<Self, StrError>

Computes the solution of a complex linear system

Solves the linear system:

  A   · x = rhs
(m,n)  (n)  (m)
§Output
  • x – the vector of unknown values with dimension equal to mat.ncol
§Input
  • genie – the actual implementation that does all the magic
  • mat – the matrix representing the sparse coefficient matrix A (see Notes below)
  • rhs – the right-hand side vector with know values an dimension equal to coo.nrow
  • verbose – shows messages
§Notes
  1. For symmetric matrices, MUMPS requires crate::Sym::YesLower
  2. For symmetric matrices, UMFPACK requires crate::Sym::YesFull
  3. This function calls the actual implementation (genie) via the functions factorize, and solve.
  4. This function is best for a single-use, whereas the actual solver should be considered for a recurrent use (e.g., inside a loop).

Auto Trait Implementations§

§

impl<'a> Freeze for ComplexLinSolver<'a>

§

impl<'a> !RefUnwindSafe for ComplexLinSolver<'a>

§

impl<'a> Send for ComplexLinSolver<'a>

§

impl<'a> !Sync for ComplexLinSolver<'a>

§

impl<'a> Unpin for ComplexLinSolver<'a>

§

impl<'a> !UnwindSafe for ComplexLinSolver<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.