Linear solvers
Description
ExaPF allows to solve linear systems with either direct and indirect linear algebra, both on CPU and on GPU. To solve a linear system $Ax = b$, ExaPF uses the function ldiv!.
ExaPF.LinearSolvers.ldiv! — Functionldiv!(solver, x, A, y)
ldiv!(solver, x, y)solver::AbstractLinearSolver: linear solver to solve the systemx::AbstractVector: SolutionA::AbstractMatrix: Input matrixy::AbstractVector: RHS
Solve the linear system $A x = y$ using the algorithm specified in solver. If A is not specified, the function will used directly the factorization stored inside solver.
Direct solvers
ExaPF wraps UMFPACK (shipped with SuiteSparse.jl) on the CPU, and CUSPARSE on CUDA device.
ExaPF.LinearSolvers.DirectSolver — TypeDirectSolver <: AbstractLinearSolverSolve linear system $A x = y$ with direct linear algebra.
- On the CPU,
DirectSolveruses UMFPACK to solve the linear system - On CUDA GPU,
DirectSolverredirects the resolution to the methodCUSOLVER.csrlsvqr
Iterative solvers
ExaPF.LinearSolvers.Bicgstab — TypeBicgstab <: AbstractIterativeLinearSolver
Bicgstab(precond; verbose=0, rtol=1e-10, atol=1e-10)Wrap Krylov.jl's BICGSTAB algorithm to solve iteratively the linear system $A x = y$.
ExaPF.LinearSolvers.Dqgmres — TypeDqgmres <: AbstractIterativeLinearSolver
Dqgmres(precond; verbose=false, memory=4)Wrap Krylov.jl's Dqgmres algorithm to solve iteratively the linear system $A x = y$.
Available linear solvers can be queried with
ExaPF.LinearSolvers.list_solvers — Functionlist_solvers(::KernelAbstractions.Device)List linear solvers available on current device.
A default solver is provided for each vendor backend.
ExaPF.LinearSolvers.default_linear_solver — Functiondefault_linear_solver(A, ::KA.CPU)Default linear solver on the CPU.