1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.
-
Upload
whitney-higgins -
Category
Documents
-
view
214 -
download
1
Transcript of 1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.
![Page 1: 1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.](https://reader036.fdocuments.us/reader036/viewer/2022071805/56649ce25503460f949acd53/html5/thumbnails/1.jpg)
1
Numerical Solvers for BVPs
By Dong Xu
State Key Lab of CAD&CG, ZJU
![Page 2: 1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.](https://reader036.fdocuments.us/reader036/viewer/2022071805/56649ce25503460f949acd53/html5/thumbnails/2.jpg)
2
Overview
Introduction Numerical Solvers
– Relaxation Method– Conjugate Gradient– Multigrid Method
Conclusions
![Page 3: 1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.](https://reader036.fdocuments.us/reader036/viewer/2022071805/56649ce25503460f949acd53/html5/thumbnails/3.jpg)
3
Introduction
What is Boundary Value Problems?
Typical BVPs
![Page 4: 1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.](https://reader036.fdocuments.us/reader036/viewer/2022071805/56649ce25503460f949acd53/html5/thumbnails/4.jpg)
4
Discretization
Regular Grid Irregular Grid
![Page 5: 1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.](https://reader036.fdocuments.us/reader036/viewer/2022071805/56649ce25503460f949acd53/html5/thumbnails/5.jpg)
5
Linear System (Matrix)
![Page 6: 1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.](https://reader036.fdocuments.us/reader036/viewer/2022071805/56649ce25503460f949acd53/html5/thumbnails/6.jpg)
6
Relaxation Methods
0<w<2
![Page 7: 1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.](https://reader036.fdocuments.us/reader036/viewer/2022071805/56649ce25503460f949acd53/html5/thumbnails/7.jpg)
7
Conjugate Gradient
Steepest Descent Method– Search in the direction of the gradient of given point (lo
cal approximation).– The local gradient doesn’t point to the elliptic center.
Conjugate Gradient Method– Search in the direction pointing to the elliptic center.– Iterate at most n steps. (n – the order of the matrix)– Only need Ap & ATp (matrix multiplies vector), especi
ally efficient for sparse matrix.– Preconditioning
![Page 8: 1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.](https://reader036.fdocuments.us/reader036/viewer/2022071805/56649ce25503460f949acd53/html5/thumbnails/8.jpg)
8
Multigrid Methods
Multigrid Methods – NOT a single algorithm, BUT a general framework.
Solve elliptic PDEs (BVPs) discretized on N grid points in O(n) operations.
Multigrid means using fine-to-coarse hierarchy to speed up the convergence of a traditional relaxation method.
Another approach is discretizing the same underlying PDE in multiple resolution. (FMG method)
![Page 9: 1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.](https://reader036.fdocuments.us/reader036/viewer/2022071805/56649ce25503460f949acd53/html5/thumbnails/9.jpg)
9
Equations
Equation Discretization Correction Residual/Defect Linear relation between
correction and residual Only knows residual
how to get correction?– Approximation– Jacobi iteration: diagonal part– Gauss-Seidel iteration: lower triangle
Get new approximation
![Page 10: 1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.](https://reader036.fdocuments.us/reader036/viewer/2022071805/56649ce25503460f949acd53/html5/thumbnails/10.jpg)
10
A New Way
“Coarsify” rather than “Simplify” Take H = 2h New residual equation
Approximation Restriction operator Prolongation operator Get new approximation
![Page 11: 1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.](https://reader036.fdocuments.us/reader036/viewer/2022071805/56649ce25503460f949acd53/html5/thumbnails/11.jpg)
11
Coarse-grid Correction Scheme
Compute the defect on the fine grid. Restrict the defect. Solve exactly on the coarse grid for the cor
rection. Interpolate the correction to the fine grid. Compute the next approximation.
![Page 12: 1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.](https://reader036.fdocuments.us/reader036/viewer/2022071805/56649ce25503460f949acd53/html5/thumbnails/12.jpg)
12
Two-Grid Iteration
Pre-smoothing: Compute by applying steps of a relaxation method to .
Coarse-grid correction: As above, using to give .
Post-smoothing: Compute by applying steps of the relaxation method to .
Key Insight: Relaxation methods are good smoothing operators. (High freq. attenuates faster than low freq.)
![Page 13: 1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.](https://reader036.fdocuments.us/reader036/viewer/2022071805/56649ce25503460f949acd53/html5/thumbnails/13.jpg)
13
Operators
Smoothing Operator S– Gauss-Seidel, NOT SOR.
Restriction Operator R
Prolongation Operator P
Straight injection, half weighting, full weighting.
Bilinear interpolation
Relationship
![Page 14: 1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.](https://reader036.fdocuments.us/reader036/viewer/2022071805/56649ce25503460f949acd53/html5/thumbnails/14.jpg)
14
Multi-Grid
Cycle – One iteration of a multigrid method, from finest grid to coarser grids and back to finest grid again.
, the number of two-grid iterations at each intermediate stage (resolution/level).
V-cycle – W-cycle –
1
2 (named by shape)
![Page 15: 1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.](https://reader036.fdocuments.us/reader036/viewer/2022071805/56649ce25503460f949acd53/html5/thumbnails/15.jpg)
15
Multigrid Demo
![Page 16: 1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.](https://reader036.fdocuments.us/reader036/viewer/2022071805/56649ce25503460f949acd53/html5/thumbnails/16.jpg)
16
Full Grid Algorithm
First approximation– Arbitrary, on the finest grid. (Simple Multigrid, uh = 0)– Interpolating from a coarse-grid solution.
Nested Iteration– Get coarse-grid solution from even coarser grids.– At the coarsest grid, start with the exact solution.
Need f at all levels, while simple multigrid only needs f at the finest level.
Produce solutions at all level, while simple multigrid at the finest level.
![Page 17: 1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.](https://reader036.fdocuments.us/reader036/viewer/2022071805/56649ce25503460f949acd53/html5/thumbnails/17.jpg)
17
Full Grid Demo
![Page 18: 1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.](https://reader036.fdocuments.us/reader036/viewer/2022071805/56649ce25503460f949acd53/html5/thumbnails/18.jpg)
18
Conclusions
One Grid Two Grid Multi-Grid Full Grid
![Page 19: 1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.](https://reader036.fdocuments.us/reader036/viewer/2022071805/56649ce25503460f949acd53/html5/thumbnails/19.jpg)
19
Reference
Numerical Recipe in C
![Page 20: 1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.](https://reader036.fdocuments.us/reader036/viewer/2022071805/56649ce25503460f949acd53/html5/thumbnails/20.jpg)
20
Thank you