You can get around this by specifying that the matrix is symmetric. This can be done with
cholfact(Symmetric(A, :L)) which then bypasses the test for symmetry and cholfact only looks at the lower triangle. However, the error you got is not consistent with the way cholfact works for dense matrices, so it might be worth changing the behavior of either dense or sparse cholfact. Dense cholfact doesn't check for symmetry. 2015-03-14 17:37 GMT-04:00 Kristoffer Carlsson <[email protected]>: > From my Finite Element code I generate a global stiffness matrix K. > > However, I can not use the cholesky factorization on it because of > > ERROR: ArgumentError: sparse matrix is not symmetric/Hermitian > in cholfact at sparse/cholmod.jl:916 > in cholfact at sparse/cholmod.jl:991 > > However, I am pretty sure it is symmetric and positive definite. > > For example: > julia> issym(K) > false > > julia> maximum(abs(K - K')) > 4.440892098500626e-16 > > Matlab for example has no problem running chol on it when I copy + paste > it. > > This works (of course): > julia> cholfact((K + K')/2) > > Are the tolerances for the Hermitian check set too small or is there maybe > a specific symmetric sparse type I should use when I know my matrix will be > symm + pos def? > > Best regards, > Kristoffer Carlsson >
