Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use sparse Cholesky decomposition with ldiv! #122

Open
JoshuaLampert opened this issue Jul 27, 2024 · 1 comment
Open

Use sparse Cholesky decomposition with ldiv! #122

JoshuaLampert opened this issue Jul 27, 2024 · 1 comment

Comments

@JoshuaLampert
Copy link
Owner

JoshuaLampert commented Jul 27, 2024

Currently, we use an LU factorization for the BBMBBMEquations1D and BBMBBMVariableEquations1D although the matrix is spd, which means we could use a Cholesky decomposition. We did this because ldiv! was not supported for sparse Cholesky factorizations, see the discussion in #108 (comment). For the SvaerdKalischEquations1D we use a sparse Cholesky decomposition, but use \ instead of ldiv!, again, because ldiv! was not implemented for sparse Cholesky decompositions.
Once JuliaSparse/SparseArrays.jl#547 (thanks for the PR @ranocha!) is available, it should be possible to use a sparse Cholesky decomposition together with ldiv! for all equations. This will be with Julia v1.12.

@JoshuaLampert
Copy link
Owner Author

In this case, we could reuse the function solve_system_matrix!, which is currently only used for the Serre-Green-Naghdi equations for the others, too.

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

No branches or pull requests

1 participant