-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
The following code:
using Random
using LinearAlgebra: isposdef, ishermitian
using KrylovKit: geneigsolve
Random.seed!(1234)
n = 8
ω = 100
B = randn((n,n))
B = ω *(B * B')
A = randn((n,n))
A = ω *(A + A')
@assert ishermitian(A)
@assert isposdef(B)
x0 = randn((n,))
vals, vecs, info = geneigsolve((A,B), x0, 1, :SR; isposdef = true, ishermitian = true)
@show first(vals)
fails for ω > 50
due to error: ERROR: LoadError: PosDefException: matrix is not positive definite; Cholesky factorization failed.
It seems that for matrices with sufficiently large elements the posdef flag gets raised even though the matrices involved are of the correct form (A
is symmetric and B
is posdef)? I assume this is related to some sort of numerical precision/ tolerance in the check that is not relative to the norm of the matrix itself.
Is there any way to make the algorithm more tolerant with respect to that check? Any help would be greatly appreciated.
Metadata
Metadata
Assignees
Labels
No labels