Skip to content

Commit af671d4

Browse files
committed
docs: add diffusion
1 parent 6d1da05 commit af671d4

File tree

6 files changed

+58
-2
lines changed

6 files changed

+58
-2
lines changed
File renamed without changes.

diffusion/readme.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
This demo considers different strength measures in the SA-AMG setup phase for
2+
finite element (Q1) discretizations of anisotropic diffusion. In particular,
3+
the Classic Strength Measure is compared to the Evolution Measure. For this
4+
example, we see that total work is reduced by using the Evolution Measure and
5+
that a scalable convergence rate is observed with rootnode:
File renamed without changes.

readme.md

+50-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ The demo produces residual norms that can vary from machine to machine.
4242
iteration 5.0
4343
iteration 6.0
4444
iteration 7.0
45-
Residuals ||r_k||_M, ||r_0||_M = 6.45e-01, 8.68e+06
46-
Residual reduction ||r_k||_M/||r_0||_M = 7.43e-08
45+
Residuals ||r_k||_M, ||r_0||_M = 6.46e-01, 8.68e+06
46+
Residual reduction ||r_k||_M/||r_0||_M = 7.44e-08
4747
```
4848

4949
***
@@ -410,6 +410,54 @@ operator than for classical AMG.
410410
### Finite Elements
411411

412412

413+
#### Anisotropic Diffusion
414+
415+
[demo.py](./diffusion/demo.py)
416+
417+
This demo considers different strength measures in the SA-AMG setup phase for
418+
finite element (Q1) discretizations of anisotropic diffusion. In particular,
419+
the Classic Strength Measure is compared to the Evolution Measure. For this
420+
example, we see that total work is reduced by using the Evolution Measure and
421+
that a scalable convergence rate is observed with rootnode:
422+
423+
```
424+
Running Grid = (100 x 100)
425+
Running Grid = (200 x 200)
426+
Running Grid = (300 x 300)
427+
Running Grid = (400 x 400)
428+
429+
AMG Scalability Study for Ax = 0, x_init = rand
430+
431+
Emphasis on Robustness of Evolution Strength
432+
Measure and Root-Node Solver
433+
434+
Rotated Anisotropic Diffusion in 2D
435+
Anisotropic Coefficient = 1.000e-03
436+
Rotation Angle = 0.393
437+
n | nnz | rho | OpCx | Work
438+
--------------------------------------------------------
439+
Classic strength
440+
--------------------------------------------------------
441+
10000 | 88804 | 0.86 | 1.6 | 24
442+
40000 | 357604 | 0.87 | 1.6 | 25
443+
90000 | 806404 | 0.87 | 1.6 | 27
444+
160000 | 1435204 | 0.87 | 1.6 | 27
445+
--------------------------------------------------------
446+
Evolution strength
447+
--------------------------------------------------------
448+
10000 | 88804 | 0.56 | 1.8 | 7
449+
40000 | 357604 | 0.67 | 1.8 | 10
450+
90000 | 806404 | 0.69 | 1.8 | 11
451+
160000 | 1435204 | 0.72 | 1.8 | 13
452+
--------------------------------------------------------
453+
Evolution strength with Rootnode
454+
--------------------------------------------------------
455+
10000 | 88804 | 0.46 | 1.8 | 5.4
456+
40000 | 357604 | 0.49 | 1.9 | 6
457+
90000 | 806404 | 0.5 | 1.9 | 6.3
458+
160000 | 1435204 | 0.5 | 1.9 | 6.5
459+
```
460+
413461
***
414462

415463
<a name="preconditioning"></a>

runner.py

+3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ def exectute_demo(exampledir, name='demo.py'):
4646
- dir: rootnode
4747
title: Rootnode AMG
4848
Finite Elements:
49+
- dir: diffusion
50+
title: Anisotropic Diffusion
4951
Preconditioning:
5052
Other Applications:
5153
""")
@@ -73,6 +75,7 @@ def exectute_demo(exampledir, name='demo.py'):
7375

7476
if toc[section] is not None:
7577
for demo in toc[section]:
78+
print(f'Processing {demo["dir"]}')
7679
title = demo.get('title', None)
7780
if title:
7881
main += f'\n#### {title}\n\n'
45 Bytes
Loading

0 commit comments

Comments
 (0)