@@ -7,11 +7,11 @@ using SparseArrays: nonzeros, rowvals, getcolptr
7
7
using UnPack
8
8
9
9
Base. @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
15
15
end
16
16
17
17
MKLPardisoFactorize (; kwargs... ) = PardisoJL (; solver_type = 0 , kwargs... )
@@ -20,19 +20,17 @@ LinearSolve.needs_concrete_A(alg::PardisoJL) = true
20
20
21
21
# TODO schur complement functionality
22
22
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 )
36
34
@unpack nprocs, solver_type, matrix_type, iparm, dparm = alg
37
35
A = convert (AbstractMatrix, A)
38
36
@@ -103,12 +101,10 @@ function LinearSolve.init_cacheval(
103
101
Pardiso. set_iparm! (solver, 3 , round (Int, abs (log10 (reltol)), RoundDown) * 10 + 1 )
104
102
end
105
103
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)
112
108
113
109
return solver
114
110
end
0 commit comments