@@ -4,35 +4,35 @@ using Pardiso, LinearSolve, SciMLBase
44using UnPack
55
66Base. @kwdef struct PardisoJL <: LinearSolve.SciMLLinearSolveAlgorithm
7- nprocs:: Union{Int,Nothing} = nothing
8- solver_type:: Union{Int,Pardiso.Solver,Nothing} = nothing
9- matrix_type:: Union{Int,Pardiso.MatrixType,Nothing} = nothing
10- iparm:: Union{Vector{Tuple{Int,Int}},Nothing} = nothing
11- dparm:: Union{Vector{Tuple{Int,Int}},Nothing} = nothing
7+ nprocs:: Union{Int, Nothing} = nothing
8+ solver_type:: Union{Int, Pardiso.Solver, Nothing} = nothing
9+ matrix_type:: Union{Int, Pardiso.MatrixType, Nothing} = nothing
10+ iparm:: Union{Vector{Tuple{Int, Int}}, Nothing} = nothing
11+ dparm:: Union{Vector{Tuple{Int, Int}}, Nothing} = nothing
1212end
1313
14- MKLPardisoFactorize (; kwargs... ) = PardisoJL (; solver_type= 0 , kwargs... )
15- MKLPardisoIterate (; kwargs... ) = PardisoJL (; solver_type= 1 , kwargs... )
14+ MKLPardisoFactorize (; kwargs... ) = PardisoJL (; solver_type = 0 , kwargs... )
15+ MKLPardisoIterate (; kwargs... ) = PardisoJL (; solver_type = 1 , kwargs... )
1616LinearSolve. needs_concrete_A (alg:: PardisoJL ) = true
1717
1818# TODO schur complement functionality
1919
20- function LinearSolve. init_cacheval (alg:: PardisoJL , A, b, u, Pl, Pr, maxiters, abstol, reltol, verbose)
20+ function LinearSolve. init_cacheval (alg:: PardisoJL , A, b, u, Pl, Pr, maxiters, abstol,
21+ reltol, verbose)
2122 @unpack nprocs, solver_type, matrix_type, iparm, dparm = alg
2223 A = convert (AbstractMatrix, A)
2324
24- solver =
25- if Pardiso. PARDISO_LOADED[]
26- solver = Pardiso. PardisoSolver ()
27- solver_type != = nothing && Pardiso. set_solver! (solver, solver_type)
25+ solver = if Pardiso. PARDISO_LOADED[]
26+ solver = Pardiso. PardisoSolver ()
27+ solver_type != = nothing && Pardiso. set_solver! (solver, solver_type)
2828
29- solver
30- else
31- solver = Pardiso. MKLPardisoSolver ()
32- nprocs != = nothing && Pardiso. set_nprocs! (solver, nprocs)
29+ solver
30+ else
31+ solver = Pardiso. MKLPardisoSolver ()
32+ nprocs != = nothing && Pardiso. set_nprocs! (solver, nprocs)
3333
34- solver
35- end
34+ solver
35+ end
3636
3737 Pardiso. pardisoinit (solver) # default initialization
3838
113113
114114export PardisoJL, MKLPardisoFactorize, MKLPardisoIterate
115115
116- end
116+ end
0 commit comments