kryst 3.2.1

Krylov subspace and preconditioned iterative solvers for dense and sparse linear systems, with shared and distributed memory parallelism.
use crate::parallel::UniverseComm;
use crate::utils::convergence::SolveStats;

pub trait Solver<A, S = f64> {
    type Error;

    fn setup(&mut self, a: &A, comm: &UniverseComm) -> Result<(), Self::Error>;

    fn factor(&mut self, a: &A) -> Result<(), Self::Error>;

    fn solve(
        &mut self,
        b: &[S],
        x: &mut [S],
        comm: &UniverseComm,
    ) -> Result<SolveStats<S>, Self::Error>;

    fn reuse_factorization(&self) -> bool {
        false
    }
}