From 7c7f405bbc6061f17a2ae776a69b54e6c51522b0 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sun, 4 May 2025 22:09:38 -0400 Subject: [PATCH 1/5] More updates to the Getting Started page @WalterMadelim did some edits, did this cover all the questions you had? --- docs/src/tutorials/linear.md | 37 +++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/docs/src/tutorials/linear.md b/docs/src/tutorials/linear.md index 089e0a172..053180d07 100644 --- a/docs/src/tutorials/linear.md +++ b/docs/src/tutorials/linear.md @@ -2,8 +2,9 @@ A linear system $$Au=b$$ is specified by defining an `AbstractMatrix` or `AbstractSciMLOperator`. For the sake of simplicity, this tutorial will start by only showcasing concrete matrices. +And specifically, we will start by using the basic Julia `Matrix` type. -The following defines a matrix and a `LinearProblem` which is subsequently solved +The following defines a `Matrix` and a `LinearProblem` which is subsequently solved by the default linear solver. ```@example linsys1 @@ -57,15 +58,33 @@ sol = solve(prob, KrylovJL_GMRES()) # Choosing algorithms is done the same way sol.u ``` -Similerly structure matrix types, like banded matrices, can be provided using special matrix +Similarly structure matrix types, like banded matrices, can be provided using special matrix types. While any `AbstractMatrix` type should be compatible via the general Julia interfaces, -LinearSolve.jl specifically tests with the following cases: - -* [BandedMatrices.jl](https://github.com/JuliaLinearAlgebra/BandedMatrices.jl) -* [BlockDiagonals.jl](https://github.com/JuliaArrays/BlockDiagonals.jl) -* [CUDA.jl](https://cuda.juliagpu.org/stable/) (CUDA GPU-based dense and sparse matrices) -* [FastAlmostBandedMatrices.jl](https://github.com/SciML/FastAlmostBandedMatrices.jl) -* [Metal.jl](https://metal.juliagpu.org/stable/) (Apple M-series GPU-based dense matrices) +LinearSolve.jl specifically tests with the following cases: + +* [LinearAlgebra.jl](https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/) + * Symmetric + * Hermitian + * UpperTriangular + * UnitUpperTriangular + * LowerTriangular + * UnitLowerTriangular + * SymTridiagonal + * Tridiagonal + * Bidiagonal + * Diagonal +* [BandedMatrices.jl](https://github.com/JuliaLinearAlgebra/BandedMatrices.jl) `BandedMatrix` +* [BlockDiagonals.jl](https://github.com/JuliaArrays/BlockDiagonals.jl) `BlockDiagonal` +* [CUDA.jl](https://cuda.juliagpu.org/stable/) (CUDA GPU-based dense and sparse matrices) `CuArray` (`GPUArray`) +* [FastAlmostBandedMatrices.jl](https://github.com/SciML/FastAlmostBandedMatrices.jl) `FastAlmostBandedMatrix` +* [Metal.jl](https://metal.juliagpu.org/stable/) (Apple M-series GPU-based dense matrices) `MetalArray` + +!!! note + + Choosing the most specific matrix structure that matches your specific system will give you the most performance. + Thus if your matrix is symmetric, specifically building with `Symmetric(A)` will be faster than simply using `A`, + and will generally lead to better automatic linear solver choices. Note that you can also choose the type for `b`, + but generally a dense vector will be the fastest here and many solvers will not support a sparse `b`. ## Using Matrix-Free Operators From ef4c01f3d83bb78a19c9560be8f6513f961574aa Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sun, 4 May 2025 22:12:33 -0400 Subject: [PATCH 2/5] Update docs/src/tutorials/linear.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- docs/src/tutorials/linear.md | 37 ++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/docs/src/tutorials/linear.md b/docs/src/tutorials/linear.md index 053180d07..a112f7428 100644 --- a/docs/src/tutorials/linear.md +++ b/docs/src/tutorials/linear.md @@ -60,24 +60,25 @@ sol.u Similarly structure matrix types, like banded matrices, can be provided using special matrix types. While any `AbstractMatrix` type should be compatible via the general Julia interfaces, -LinearSolve.jl specifically tests with the following cases: - -* [LinearAlgebra.jl](https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/) - * Symmetric - * Hermitian - * UpperTriangular - * UnitUpperTriangular - * LowerTriangular - * UnitLowerTriangular - * SymTridiagonal - * Tridiagonal - * Bidiagonal - * Diagonal -* [BandedMatrices.jl](https://github.com/JuliaLinearAlgebra/BandedMatrices.jl) `BandedMatrix` -* [BlockDiagonals.jl](https://github.com/JuliaArrays/BlockDiagonals.jl) `BlockDiagonal` -* [CUDA.jl](https://cuda.juliagpu.org/stable/) (CUDA GPU-based dense and sparse matrices) `CuArray` (`GPUArray`) -* [FastAlmostBandedMatrices.jl](https://github.com/SciML/FastAlmostBandedMatrices.jl) `FastAlmostBandedMatrix` -* [Metal.jl](https://metal.juliagpu.org/stable/) (Apple M-series GPU-based dense matrices) `MetalArray` +LinearSolve.jl specifically tests with the following cases: + + - [LinearAlgebra.jl](https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/) + + + Symmetric + + Hermitian + + UpperTriangular + + UnitUpperTriangular + + LowerTriangular + + UnitLowerTriangular + + SymTridiagonal + + Tridiagonal + + Bidiagonal + + Diagonal + - [BandedMatrices.jl](https://github.com/JuliaLinearAlgebra/BandedMatrices.jl) `BandedMatrix` + - [BlockDiagonals.jl](https://github.com/JuliaArrays/BlockDiagonals.jl) `BlockDiagonal` + - [CUDA.jl](https://cuda.juliagpu.org/stable/) (CUDA GPU-based dense and sparse matrices) `CuArray` (`GPUArray`) + - [FastAlmostBandedMatrices.jl](https://github.com/SciML/FastAlmostBandedMatrices.jl) `FastAlmostBandedMatrix` + - [Metal.jl](https://metal.juliagpu.org/stable/) (Apple M-series GPU-based dense matrices) `MetalArray` !!! note From faf7b781de163fcb394f0c7081d55f67a9a8455d Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sun, 4 May 2025 22:12:38 -0400 Subject: [PATCH 3/5] Update docs/src/tutorials/linear.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- docs/src/tutorials/linear.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/tutorials/linear.md b/docs/src/tutorials/linear.md index a112f7428..a014e44b0 100644 --- a/docs/src/tutorials/linear.md +++ b/docs/src/tutorials/linear.md @@ -82,10 +82,10 @@ LinearSolve.jl specifically tests with the following cases: !!! note - Choosing the most specific matrix structure that matches your specific system will give you the most performance. - Thus if your matrix is symmetric, specifically building with `Symmetric(A)` will be faster than simply using `A`, - and will generally lead to better automatic linear solver choices. Note that you can also choose the type for `b`, - but generally a dense vector will be the fastest here and many solvers will not support a sparse `b`. +Choosing the most specific matrix structure that matches your specific system will give you the most performance. +Thus if your matrix is symmetric, specifically building with `Symmetric(A)` will be faster than simply using `A`, +and will generally lead to better automatic linear solver choices. Note that you can also choose the type for `b`, +but generally a dense vector will be the fastest here and many solvers will not support a sparse `b`. ## Using Matrix-Free Operators From 501ea49422486f6a3e9d109545a152eb8034cfab Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sun, 4 May 2025 22:12:46 -0400 Subject: [PATCH 4/5] Update docs/src/tutorials/linear.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- docs/src/tutorials/linear.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/tutorials/linear.md b/docs/src/tutorials/linear.md index a014e44b0..97840d982 100644 --- a/docs/src/tutorials/linear.md +++ b/docs/src/tutorials/linear.md @@ -81,6 +81,7 @@ LinearSolve.jl specifically tests with the following cases: - [Metal.jl](https://metal.juliagpu.org/stable/) (Apple M-series GPU-based dense matrices) `MetalArray` !!! note + Choosing the most specific matrix structure that matches your specific system will give you the most performance. Thus if your matrix is symmetric, specifically building with `Symmetric(A)` will be faster than simply using `A`, From ec6245d5b416816e235acf2720e895583774d3f4 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Thu, 8 May 2025 07:28:21 -0400 Subject: [PATCH 5/5] Update docs/src/tutorials/linear.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- docs/src/tutorials/linear.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/tutorials/linear.md b/docs/src/tutorials/linear.md index 97840d982..d43839c38 100644 --- a/docs/src/tutorials/linear.md +++ b/docs/src/tutorials/linear.md @@ -74,6 +74,7 @@ LinearSolve.jl specifically tests with the following cases: + Tridiagonal + Bidiagonal + Diagonal + - [BandedMatrices.jl](https://github.com/JuliaLinearAlgebra/BandedMatrices.jl) `BandedMatrix` - [BlockDiagonals.jl](https://github.com/JuliaArrays/BlockDiagonals.jl) `BlockDiagonal` - [CUDA.jl](https://cuda.juliagpu.org/stable/) (CUDA GPU-based dense and sparse matrices) `CuArray` (`GPUArray`)