Title: Introduction to Scientific Computing II
1Introduction to Scientific Computing II
- From Gaussian Elimination to Multigrid A
Recapitulation
2Tasks SLE
???
3Tasks Molecular Dynamics
4Prerequisites
- discretisation of PDEs
- linear algebra
- Gaussian elimination
- basics on iterative solvers
- Jacobi, Gauss-Seidel, SOR, MG
- matlab
5Organization
- lecture (90 min/week)
- theory
- methods
- simple examples
- tutorials (45 min/week)
- more examples
- make your own experiences
6What Determines the Grading?
- written exam at the end of the semester
- no weighting of tutorials
- !!!! solving tutorials is essential !!!!
- for understanding and remembering subjects
- for your success in the exam
7Materials
- slides (short, only headwords)
- exercise sheets
- make your own lecture notes!
- find your own solutions!
- solutions presented in the tutorials
8Rules
- for questions ask or fix a date per emailDr.
Miriam Mehl mehl_at_in.tum.de Martin
Buchholzbuchholm_at_in.tum.de
9Introduction to Scientific Computing II
- From Gaussian Elimination to Multigrid A
Recapitulation
10Whats the Problem to be Solved?
Application Scenario
Partial Differential Equations
Modelling Scientific Computing I
Finite Elements Finite Differences (Finite
Volumes) Scientific Computing I Numerical
Programming II
Systems of linear equations
LU, Richardson, Jacobi, Gauss-Seidel, SOR,
MG Scientific Computing I, Scientific Computing
Lab, Numerical Programming I
More on this!!!
11Example Equation
- two-dimensional Poisson equation
- heat equation
- diffusion
- membranes
grid finite differences
12Typical SLE
13Example
14Gaussian Elimination (LU)
15Gaussian Elimination (LU)
16Gaussian Elimination (LU)
17Gaussian Elimination (LU)
18Gaussian Elimination (LU)
19Gaussian Elimination (LU)
20Gaussian Elimination (LU)
21Gaussian Elimination (LU)
22Gaussian Elimination (LU)
23Gaussian Elimination Costs
2D O(N4) 3D O(N7)
24Gaussian Elimination Costs 2D
h runtime (HLRB2, 62 TFlop/s)
2-7 0.02 sec
2-8 0.27 sec
2-9 4.4 sec
2-10 1 min 16 sec
2-11 18 min 55 sec
2-12 5 h 02 min 40 sec
2-13 3 d 8 h 37 min 15 sec
hallo
25Gaussian Elimination Costs 3D
hallo
h runtime (HLRB2, 62 TFlop/s)
2-6 4 min 44 sec
2-7 10 h 05 min 24 sec
2-8 53 d 19 h 21 min 17 sec
2-9 18 a 313 d 21 h 54 min 22 sec
26Iterative Solvers Principle
- series of approximations
- costs per iteration?
- convergence?
- stopping criterion?
27Relaxation Methods
problem order an amount of peas on a straight
line (corresponds to solving uxx0)
28Relaxation Methods Gauss-Seidel
sequentially place peas on the line between two
neighbours
29Relaxation Methods Gauss-Seidel
sequentially place peas on the line between two
neighbours
30Relaxation Methods Gauss-Seidel
sequentially place peas on the line between two
neighbours
31Relaxation Methods Gauss-Seidel
sequentially place peas on the line between two
neighbours
32Relaxation Methods Gauss-Seidel
sequentially place peas on the line between two
neighbours
33Relaxation Methods Gauss-Seidel
sequentially place peas on the line between two
neighbours
34Relaxation Methods Gauss-Seidel
sequentially place peas on the line between two
neighbours
35Relaxation Methods Gauss-Seidel
sequentially place peas on the line between two
neighbours
36Relaxation Methods Gauss-Seidel
sequentially place peas on the line between two
neighbours
37Relaxation Methods Gauss-Seidel
sequentially place peas on the line between two
neighbours
38Relaxation Methods Gauss-Seidel
sequentially place peas on the line between two
neighbours
39Relaxation Methods Gauss-Seidel
sequentially place peas on the line between two
neighbours
40Relaxation Methods Gauss-Seidel
sequentially place peas on the line between two
neighbours
41Relaxation Methods Gauss-Seidel
sequentially place peas on the line between two
neighbours
42Relaxation Methods Gauss-Seidel
sequentially place peas on the line between two
neighbours
43Relaxation Methods Gauss-Seidel
sequentially place peas on the line between two
neighbours
44Relaxation Methods Gauss-Seidel
sequentially place peas on the line between two
neighbours
45Relaxation Methods Gauss-Seidel
sequentially place peas on the line between two
neighbours
46Relaxation Methods Gauss-Seidel
sequentially place peas on the line between two
neighbours
47Relaxation Methods Gauss-Seidel
sequentially place peas on the line between two
neighbours
48Relaxation Methods Gauss-Seidel
sequentially place peas on the line between two
neighbours
49Relaxation Methods Gauss-Seidel
sequentially place peas on the line between two
neighbours
- we get a smooth curve instead of a straight line
- global error is locally (almost) invisible
50Relaxation Methods
problem order an amount of peas on a straight
line (corresponds to solving uxx0)
51Relaxation Methods Jacobi
place peas on the line between two neighbours in
parallel
52Relaxation Methods Jacobi
place peas on the line between two neighbours in
parallel
53Relaxation Methods Jacobi
place peas on the line between two neighbours in
parallel
54Relaxation Methods Jacobi
place peas on the line between two neighbours in
parallel
- we get a high plus a low frequency oscillation
- these fequencies are locally (almost) invisible
55Relaxation Methods
problem order an amount of peas on a straight
line (corresponds to solving uxx0)
56Relaxation Methods SOR
sequentially correct location of peas a little
more than to the line between two neighbours
57Relaxation Methods SOR
sequentially correct location of peas a little
more than to the line between two neighbours
58Relaxation Methods SOR
sequentially correct location of peas a little
more than to the line between two neighbours
59Relaxation Methods SOR
sequentially correct location of peas a little
more than to the line between two neighbours
60Relaxation Methods SOR
sequentially correct location of peas a little
more than to the line between two neighbours
61Relaxation Methods SOR
62Relaxation Methods SOR
sequentially correct location of peas a little
more than to the line between two neighbours
63Relaxation Methods SOR
sequentially correct location of peas a little
more than to the line between two neighbours
64Relaxation Methods SOR
sequentially correct location of peas a little
more than to the line between two neighbours
65Relaxation Methods SOR
sequentially correct location of peas a little
more than to the line between two neighbours
66Relaxation Methods SOR
sequentially correct location of peas a little
more than to the line between two neighbours
67Relaxation Methods SOR
sequentially correct location of peas a little
more than to the line between two neighbours
68Relaxation Methods SOR
sequentially correct location of peas a little
more than to the line between two neighbours
69Relaxation Methods SOR
sequentially correct location of peas a little
more than to the line between two neighbours
70Relaxation Methods SOR
sequentially correct location of peas a little
more than to the line between two neighbours
71Relaxation Methods SOR
sequentially correct location of peas a little
more than to the line between two neighbours
72Relaxation Methods SOR
sequentially correct location of peas a little
more than to the line between two neighbours
73Relaxation Methods SOR
sequentially correct location of peas a little
more than to the line between two neighbours
74Relaxation Methods SOR
sequentially correct location of peas a little
more than to the line between two neighbours
75Relaxation Methods SOR
sequentially correct location of peas a little
more than to the line between two neighbours
76Relaxation Methods SOR
sequentially correct location of peas a little
more than to the line between two neighbours
77Relaxation Methods SOR
sequentially correct location of peas a little
more than to the line between two neighbours
78Relaxation Methods SOR
sequentially correct location of peas a little
more than to the line between two neighbours
better than GS and J, but still not optimal
79Relaxation Methods
problem order an amount of peas on a straight
line (corresponds to solving uxx0)
80Relaxation Methods Hierarchical
place peas on the line between two neighbours in
parallel, but in a hierarchical way from coarse
to smooth
81Relaxation Methods Hierarchical
place peas on the line between two neighbours in
parallel, but in a hierarchical way from coarse
to smooth
82Relaxation Methods Hierarchical
place peas on the line between two neighbours in
parallel, but in a hierarchical way from coarse
to smooth
83Relaxation Methods Hierarchical
place peas on the line between two neighbours in
parallel, but in a hierarchical way from coarse
to smooth
- exact solution in one step
- unfortunately only in 1D, 2D and 3D multigrid