@@ -1258,25 +1258,33 @@ end
12581258
12591259# # Compute that symbolic factorization only
12601260function  symbolic (A:: Sparse{<:VTypes, Ti} ;
1261-     perm:: Union{Nothing,AbstractVector{<:Integer}} = nothing ,
1262-     postorder:: Bool = isnothing (perm)|| isempty (perm), userperm_only:: Bool = true ) where  Ti
1261+                   perm:: Union{Nothing,AbstractVector{<:Integer}} = nothing ,
1262+                   postorder:: Bool = isnothing (perm)|| isempty (perm),
1263+                   userperm_only:: Bool = true ,
1264+                   nested_dissection:: Bool = false ) where  Ti
12631265
12641266    sA =  unsafe_load (pointer (A))
12651267    sA. stype ==  0  &&  throw (ArgumentError (" sparse matrix is not symmetric/Hermitian" 
12661268
1267-     @cholmod_param  postorder =  postorder begin 
1268-         if  perm ===  nothing  ||  isempty (perm) #  TODO : deprecate empty perm
1269-             return  analyze (A)
1270-         else  #  user permutation provided
1271-             if  userperm_only #  use perm even if it is worse than AMD
1272-                 @cholmod_param  nmethods =  1  begin 
1269+     #  The default is to just use AMD. Use nested dissection only if explicitly asked for.
1270+     #  https://github.com/JuliaSparse/SparseArrays.jl/issues/548
1271+     #  https://github.com/DrTimothyAldenDavis/SuiteSparse/blob/26ababc7f3af725c5fb9168a1b94850eab74b666/CHOLMOD/Include/cholmod.h#L555-L574
1272+     @cholmod_param  nmethods =  (nested_dissection ?  0  :  2 ) begin 
1273+         @cholmod_param  postorder =  postorder begin 
1274+             if  perm ===  nothing  ||  isempty (perm) #  TODO : deprecate empty perm
1275+                 return  analyze (A)
1276+             else  #  user permutation provided
1277+                 if  userperm_only #  use perm even if it is worse than AMD
1278+                     @cholmod_param  nmethods =  1  begin 
1279+                         return  analyze_p (A, Ti[p- 1  for  p in  perm])
1280+                     end 
1281+                 else 
12731282                    return  analyze_p (A, Ti[p- 1  for  p in  perm])
12741283                end 
1275-             else 
1276-                 return  analyze_p (A, Ti[p- 1  for  p in  perm])
12771284            end 
12781285        end 
12791286    end 
1287+ 
12801288end 
12811289
12821290function  cholesky! (F:: Factor{Tv} , A:: Sparse{Tv} ;
0 commit comments