Skip to content

Conversation

ChrisRackauckas
Copy link
Member

Fixes #630 fixes #532

@@ -258,5 +263,5 @@ function SciMLBase.solve!(cache::LinearCache, alg::AppleAccelerateLUFactorizatio
aa_getrs!('N', A.factors, A.ipiv, cache.u; info)
end

SciMLBase.build_linear_solution(alg, cache.u, nothing, cache)
SciMLBase.build_linear_solution(alg, cache.u, nothing, cache; retcode = ReturnCode.Success)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
SciMLBase.build_linear_solution(alg, cache.u, nothing, cache; retcode = ReturnCode.Success)
SciMLBase.build_linear_solution(
alg, cache.u, nothing, cache; retcode = ReturnCode.Success)

@@ -953,6 +953,12 @@ A fast factorization which uses a Cholesky factorization on A * A'. Can be much
faster than LU factorization, but is not as numerically stable and thus should only
be applied to well-conditioned matrices.

!!! warn
`NormalCholeskyFactorization` should only be applied to well-conditioned matrices. As a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
`NormalCholeskyFactorization` should only be applied to well-conditioned matrices. As a
`NormalCholeskyFactorization` should only be applied to well-conditioned matrices. As a

@@ -1010,6 +1016,12 @@
fact = cholesky(Symmetric((A)' * A), alg.pivot; check = false)
end
cache.cacheval = fact

if hasmethod(LinearAlgebra.issuccess, Tuple{typeof(fact)}) && !LinearAlgebra.issuccess(fact)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
if hasmethod(LinearAlgebra.issuccess, Tuple{typeof(fact)}) && !LinearAlgebra.issuccess(fact)
if hasmethod(LinearAlgebra.issuccess, Tuple{typeof(fact)}) &&
!LinearAlgebra.issuccess(fact)

@ChrisRackauckas ChrisRackauckas merged commit 3bc2191 into main Jul 14, 2025
6 of 10 checks passed
@ChrisRackauckas ChrisRackauckas deleted the retcodes branch July 14, 2025 13:19
Comment on lines +43 to +44
# This is a known and documented incorrectness in NormalCholeskyFactorization
# due to numerical instability in its method that is fundamental.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
# This is a known and documented incorrectness in NormalCholeskyFactorization
# due to numerical instability in its method that is fundamental.
# This is a known and documented incorrectness in NormalCholeskyFactorization
# due to numerical instability in its method that is fundamental.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trivial LinearProblem retcodes with Default Factorization algorithms return ReturnCode.Default when it should be ReturnCode.Success
1 participant