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!Function
ldiv!(solver, x, A, y)
ldiv!(solver, x, y)
  • solver::AbstractLinearSolver: linear solver to solve the system
  • x::AbstractVector: Solution
  • A::AbstractMatrix: Input matrix
  • y::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.

source

Direct solvers

ExaPF wraps KLU on the CPU, and cuDSS on NVIDIA GPU.

ExaPF.LinearSolvers.DirectSolverType
DirectSolver <: AbstractLinearSolver

Solve linear system $A x = y$ with direct linear algebra.

  • On CPU, DirectSolver redirects the resolution to KLU if A is a SparseMatrixCSC.
  • On CUDA GPU, DirectSolver redirects the resolution to cuDSS if A is a CuSparseMatrixCSR.
source

Iterative solvers

ExaPF wraps BICGSTAB and DQGMRES for CPU, NVIDIA GPU, and AMD GPU.

ExaPF.LinearSolvers.BicgstabType
Bicgstab <: 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$.

source
ExaPF.LinearSolvers.DqgmresType
Dqgmres <: AbstractIterativeLinearSolver
Dqgmres(precond; verbose=false, memory=4)

Wrap Krylov.jl's DQGMRES algorithm to solve iteratively the linear system $A x = y$.

source

Available linear solvers can be queried with

A default linear solver is provided for each vendor backend.

A default batch linear solver is provided for each vendor backend.