@@ -7,11 +7,11 @@ using SparseArrays: nonzeros, rowvals, getcolptr
77using UnPack
88
99Base. @kwdef struct PardisoJL <: LinearSolve.SciMLLinearSolveAlgorithm
10- nprocs:: Union{Int,Nothing} = nothing
11- solver_type:: Union{Int,Pardiso.Solver,Nothing} = nothing
12- matrix_type:: Union{Int,Pardiso.MatrixType,Nothing} = nothing
13- iparm:: Union{Vector{Tuple{Int,Int}},Nothing} = nothing
14- dparm:: Union{Vector{Tuple{Int,Int}},Nothing} = nothing
10+ nprocs:: Union{Int, Nothing} = nothing
11+ solver_type:: Union{Int, Pardiso.Solver, Nothing} = nothing
12+ matrix_type:: Union{Int, Pardiso.MatrixType, Nothing} = nothing
13+ iparm:: Union{Vector{Tuple{Int, Int}}, Nothing} = nothing
14+ dparm:: Union{Vector{Tuple{Int, Int}}, Nothing} = nothing
1515end
1616
1717MKLPardisoFactorize (; kwargs... ) = PardisoJL (; solver_type = 0 , kwargs... )
@@ -20,19 +20,17 @@ LinearSolve.needs_concrete_A(alg::PardisoJL) = true
2020
2121# TODO schur complement functionality
2222
23- function LinearSolve. init_cacheval (
24- alg:: PardisoJL ,
25- A,
26- b,
27- u,
28- Pl,
29- Pr,
30- maxiters:: Int ,
31- abstol,
32- reltol,
33- verbose:: Bool ,
34- assumptions:: LinearSolve.OperatorAssumptions ,
35- )
23+ function LinearSolve. init_cacheval (alg:: PardisoJL ,
24+ A,
25+ b,
26+ u,
27+ Pl,
28+ Pr,
29+ maxiters:: Int ,
30+ abstol,
31+ reltol,
32+ verbose:: Bool ,
33+ assumptions:: LinearSolve.OperatorAssumptions )
3634 @unpack nprocs, solver_type, matrix_type, iparm, dparm = alg
3735 A = convert (AbstractMatrix, A)
3836
@@ -103,12 +101,10 @@ function LinearSolve.init_cacheval(
103101 Pardiso. set_iparm! (solver, 3 , round (Int, abs (log10 (reltol)), RoundDown) * 10 + 1 )
104102 end
105103
106- Pardiso. pardiso (
107- solver,
108- u,
109- SparseMatrixCSC (size (A)... , getcolptr (A), rowvals (A), nonzeros (A)),
110- b,
111- )
104+ Pardiso. pardiso (solver,
105+ u,
106+ SparseMatrixCSC (size (A)... , getcolptr (A), rowvals (A), nonzeros (A)),
107+ b)
112108
113109 return solver
114110end
0 commit comments