Skip to content

Commit 753a26a

Browse files
committed
by and large working. need to add defaults
1 parent 843fac9 commit 753a26a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/pardiso.jl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import Pardiso
55

6-
export PardisoJL
6+
export PardisoJL, PardisoJLFactorize, PardisoJLIterate
77

88
Base.@kwdef struct PardisoJL <: SciMLLinearSolveAlgorithm
99
nprocs::Union{Int, Nothing} = nothing
@@ -15,6 +15,11 @@ Base.@kwdef struct PardisoJL <: SciMLLinearSolveAlgorithm
1515
dparm::Union{Vector{Tuple{Int,Int}}, Nothing} = nothing
1616
end
1717

18+
PardisoJLFactorize(;kwargs...) = PardisoJL(;solver_type=0, kwargs...)
19+
PardisoJLIterate(;kwargs...) = PardisoJL(;solver_type=1, kwargs...)
20+
21+
# TODO schur complement functionality
22+
1823
function init_cacheval(alg::PardisoJL, cache::LinearCache)
1924
@unpack nprocs, solver_type, matrix_type, iparm, dparm = alg
2025

@@ -62,7 +67,7 @@ function SciMLBase.solve(cache::LinearCache, alg::PardisoJL; kwargs...)
6267
can we use phase to store factorization in cache?
6368
"""
6469
alg.solve_phase !== nothing && Pardiso.set_phase!(cacheval, alg.solve_phase)
65-
Pardiso.solve!(cache.cacheval, u, A, b)
70+
Pardiso.pardiso(cache.cacheval, u, A, b)
6671
alg.release_phase !== nothing && Pardiso.set_phase!(cacheval, alg.release_phase) # is this necessary?
6772

6873
return cache.u

0 commit comments

Comments
 (0)