Skip to content

Commit

Permalink
fix pardiso complex
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Dec 15, 2021
1 parent 71142f7 commit 5b8e73d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/pardiso.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,17 @@ function init_cacheval(alg::PardisoJL, cache::LinearCache)

Pardiso.pardisoinit(solver) # default initialization

matrix_type !== nothing && Pardiso.set_matrixtype!(solver, matrix_type)
if matrix_type !== nothing
Pardiso.set_matrixtype!(solver, matrix_type)
else
if eltype(A) <: Real
Pardiso.set_matrixtype!(solver, Pardiso.REAL_NONSYM)
elseif eltype(A) <: Complex
Pardiso.set_matrixtype!(solver, Pardiso.COMPLEX_NONSYM)
else
error("Number type not supported by Pardiso")
end
end
cache.verbose && Pardiso.set_msglvl!(solver, Pardiso.MESSAGE_LEVEL_ON)

# pass in vector of tuples like [(iparm::Int, key::Int) ...]
Expand Down

0 comments on commit 5b8e73d

Please sign in to comment.