Skip to content

Commit 0ee4194

Browse files
Merge pull request #604 from SciML/ChrisRackauckas-patch-3
More updates to the Getting Started page
2 parents f26a4df + ec6245d commit 0ee4194

File tree

1 file changed

+29
-7
lines changed

1 file changed

+29
-7
lines changed

docs/src/tutorials/linear.md

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
A linear system $$Au=b$$ is specified by defining an `AbstractMatrix` or `AbstractSciMLOperator`.
44
For the sake of simplicity, this tutorial will start by only showcasing concrete matrices.
5+
And specifically, we will start by using the basic Julia `Matrix` type.
56

6-
The following defines a matrix and a `LinearProblem` which is subsequently solved
7+
The following defines a `Matrix` and a `LinearProblem` which is subsequently solved
78
by the default linear solver.
89

910
```@example linsys1
@@ -57,15 +58,36 @@ sol = solve(prob, KrylovJL_GMRES()) # Choosing algorithms is done the same way
5758
sol.u
5859
```
5960

60-
Similerly structure matrix types, like banded matrices, can be provided using special matrix
61+
Similarly structure matrix types, like banded matrices, can be provided using special matrix
6162
types. While any `AbstractMatrix` type should be compatible via the general Julia interfaces,
6263
LinearSolve.jl specifically tests with the following cases:
6364

64-
* [BandedMatrices.jl](https://github.com/JuliaLinearAlgebra/BandedMatrices.jl)
65-
* [BlockDiagonals.jl](https://github.com/JuliaArrays/BlockDiagonals.jl)
66-
* [CUDA.jl](https://cuda.juliagpu.org/stable/) (CUDA GPU-based dense and sparse matrices)
67-
* [FastAlmostBandedMatrices.jl](https://github.com/SciML/FastAlmostBandedMatrices.jl)
68-
* [Metal.jl](https://metal.juliagpu.org/stable/) (Apple M-series GPU-based dense matrices)
65+
- [LinearAlgebra.jl](https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/)
66+
67+
+ Symmetric
68+
+ Hermitian
69+
+ UpperTriangular
70+
+ UnitUpperTriangular
71+
+ LowerTriangular
72+
+ UnitLowerTriangular
73+
+ SymTridiagonal
74+
+ Tridiagonal
75+
+ Bidiagonal
76+
+ Diagonal
77+
78+
- [BandedMatrices.jl](https://github.com/JuliaLinearAlgebra/BandedMatrices.jl) `BandedMatrix`
79+
- [BlockDiagonals.jl](https://github.com/JuliaArrays/BlockDiagonals.jl) `BlockDiagonal`
80+
- [CUDA.jl](https://cuda.juliagpu.org/stable/) (CUDA GPU-based dense and sparse matrices) `CuArray` (`GPUArray`)
81+
- [FastAlmostBandedMatrices.jl](https://github.com/SciML/FastAlmostBandedMatrices.jl) `FastAlmostBandedMatrix`
82+
- [Metal.jl](https://metal.juliagpu.org/stable/) (Apple M-series GPU-based dense matrices) `MetalArray`
83+
84+
!!! note
85+
86+
87+
Choosing the most specific matrix structure that matches your specific system will give you the most performance.
88+
Thus if your matrix is symmetric, specifically building with `Symmetric(A)` will be faster than simply using `A`,
89+
and will generally lead to better automatic linear solver choices. Note that you can also choose the type for `b`,
90+
but generally a dense vector will be the fastest here and many solvers will not support a sparse `b`.
6991

7092
## Using Matrix-Free Operators
7193

0 commit comments

Comments
 (0)