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 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 KLU on the CPU, and cuDSS on NVIDIA GPU.
ExaPF.LinearSolvers.DirectSolver — Type
DirectSolver <: AbstractLinearSolverSolve linear system $A x = y$ with direct linear algebra.
- On
CPU,DirectSolverredirects the resolution to KLU ifAis aSparseMatrixCSC. - On CUDA GPU,
DirectSolverredirects the resolution to cuDSS ifAis aCuSparseMatrixCSR.
Iterative solvers
ExaPF wraps BICGSTAB and DQGMRES for CPU, NVIDIA GPU, and AMD GPU.
ExaPF.LinearSolvers.Bicgstab — Type
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$.
ExaPF.LinearSolvers.Dqgmres — Type
Dqgmres <: 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 — Function
list_solvers(::KernelAbstractions.Device)List linear solvers available on current device (CPU, NVIDIA GPU, AMD GPU).
A default linear solver is provided for each vendor backend.
ExaPF.LinearSolvers.default_linear_solver — Function
default_linear_solver(A::SparseMatrixCSC, ::KA.CPU)Default linear solver on the CPU.
A default batch linear solver is provided for each vendor backend.
ExaPF.LinearSolvers.default_batch_linear_solver — Function
default_linear_solver(A::SparseMatrixCSC, ::KA.CPU)Default batch linear solver on the CPU.