@@ -298,70 +298,3 @@ function SciMLBase.solve(cache::LinearCache, alg::IterativeSolversJL; kwargs...)
298298 return cache. u
299299end
300300
301- # # Paradiso
302-
303- struct PardisoJL{A} <: SciMLLinearSolveAlgorithm
304- nthreads:: Union{Int, Nothing}
305- solver_type:: Union{Int, Pardiso.Solver, Nothing}
306- matrix_type:: Union{Int, Pardiso.MatrixType, Nothing}
307- solve_phase:: Union{Int, Pardiso.Phase, Nothing}
308- release_phase:: Union{Int, Nothing}
309- iparm:: Union{A, Nothing}
310- dparm:: Union{A, Nothing}
311- end
312-
313- function PardisoJL (solver_type= Pardiso. nothing ,)
314-
315- return PardisoJL (nthreads, solver_type, matrix_type, solve_phase,
316- release_phase, iparm, dparm)
317- end
318-
319- function init_cacheval (alg:: PardisoJL , cache:: LinearCache )
320- @unpack nthreads, solver_type, matrix_type, iparm, dparm = alg
321-
322- solver = Pardiso. PARDISO_LOADED[] ? PardisoSolver () : MKLPardisoSolver ()
323-
324- Pardiso. pardisoinit (solver) # default initialization
325-
326- nthreads != = nothing && Pardiso. set_nprocs! (ps, nthreads)
327- solver_type != = nothing && Pardiso. set_solver! (solver, key)
328- matrix_type != = nothing && Pardiso. set_matrixtype! (solver, matrix_type)
329- cache. verbose && Pardiso. set_msglvl! (solver, Pardiso. MESSAGE_LEVEL_ON)
330-
331- iparm != = nothing && begin # pass in vector of tuples like [(iparm, key)]
332- for i in length (iparm)
333- Pardiso. set_iparm! (solver, iparm[i]. .. )
334- end
335- end
336-
337- dparm != = nothing && begin
338- for i in length (dparm)
339- Pardiso. set_dparm! (solver, dparm[i]. .. )
340- end
341- end
342-
343- return solver
344- end
345-
346- function SciMLBase. solve (cache:: LinearCache , alg:: PardisoJL ; kwargs... )
347- @unpack A, b, u, cacheval = cache
348-
349- if cache. isfresh
350- solver = init_cacheval (alg, cache)
351- cache = set_cacheval (cache, solver)
352- end
353-
354- abstol = cache. abstol
355- reltol = cache. reltol
356- kwargs = (abstol= abstol, reltol= reltol, alg. kwargs... )
357-
358- """
359- figure out whatever phase is. should set_phase call be in init_cacheval?
360- can we use phase to store factorization in cache?
361- """
362- Pardiso. set_phase! (cacheval, alg. solve_phase)
363- Pardiso. solve! (cacheval, u, A, b)
364- Pardiso. set_phase! (cacheval, alg. release_phase) # is this necessary?
365-
366- return cache. u
367- end
0 commit comments