You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This package lets you solve sparse linear systems using Algebraic Multigrid (AMG). This works especially well for symmetric positive definite matrices.
8
+
9
+
## Usage
10
+
11
+
```julia
12
+
using AMG
13
+
14
+
A =poisson(1000) # Creates a sample symmetric positive definite sparse matrix
15
+
ml =ruge_stuben(A) # Construct a Ruge-Stuben solver
16
+
# Multilevel Solver
17
+
# -----------------
18
+
# Operator Complexity: 1.9859906604402935
19
+
# Grid Complexity: 1.99
20
+
# No. of Levels: 8
21
+
# Coarse Solver: AMG.Pinv()
22
+
# Level Unknowns NonZeros
23
+
# ----- -------- --------
24
+
# 1 1000 2998 [50.35%]
25
+
# 2 500 1498 [25.16%]
26
+
# 3 250 748 [12.56%]
27
+
# 4 125 373 [ 6.26%]
28
+
# 5 62 184 [ 3.09%]
29
+
# 6 31 91 [ 1.53%]
30
+
# 7 15 43 [ 0.72%]
31
+
# 8 7 19 [ 0.32%]
32
+
33
+
34
+
solve(ml, A *ones(1000)) # should return ones(1000)
0 commit comments