270 likes | 424 Views
Mutigrid Methods for Solving Differential Equations. Ferien Akademie ’05 – Veselin Dikov. Multigrid Methods . Agenda Model problem Relaxation. Smoothing property Elements of Multigrid Multigrid schemes. Ferien Akademie ’05 Veselin Dikov.
E N D
Mutigrid Methods for Solving Differential Equations Ferien Akademie ’05 – Veselin Dikov
MultigridMethods Agenda • Model problem • Relaxation. Smoothing property • Elements of Multigrid • Multigrid schemes Ferien Akademie ’05 Veselin Dikov
MultigridMethods Model Problem • 1D boundary problem of steady state temperature a long a uniform rod • Discretization in n points, step h = 1/n Ferien Akademie ’05 Veselin Dikov
MultigridMethodsModel Problem • Av = f, where and • Stencil notation • A is Symmetric positive definite Ferien Akademie ’05 VeselinDikov
MultigridMethods Agenda • Model problem • Relaxation. Smoothing property • Elements of Multigrid • Multigrid schemes Ferien Akademie ’05 Veselin Dikov
MultigridMethodsIterative Methods • Iterative vs Direct methods More about iterative methods • Jacobi and Gauss-Seidel methods • Smoothing property Ferien Akademie ’05 VeselinDikov
MultigridMethodsSmoothing Property • Error along the domain After 35 sweeps with weighted Jacobi Error was smoothed Ferien Akademie ’05 VeselinDikov
MultigridMethodsSmoothing Property • Smoothing property explained in four steps Fourier modes • k – wave number Ferien Akademie ’05 VeselinDikov
MultigridMethodsSmoothing Property • Smoothing property explained in four steps Fourier modes k = 1 k = 2 k = 12 k = 7 Ferien Akademie ’05 VeselinDikov
MultigridMethodsSmoothing Property • Smoothing property explained in four steps Fourier modes • smooth modes - • oscillatory modes - Ferien Akademie ’05 VeselinDikov
MultigridMethodsSmoothing Property • Smoothing property explained in four steps Fourier modes Modified model problem • f = 0, σ = 0 Au = 0 • exact solution: u = 0 • error: e = u – v = -v we can trace the error! Ferien Akademie ’05 VeselinDikov
MultigridMethodsSmoothing Property • Smoothing property explained in four steps Fourier modes Modified model problem Weighted Jacobi relaxation • wJacobi step • error Ferien Akademie ’05 VeselinDikov
MultigridMethodsSmoothing Property • Smoothing property explained in four steps Fourier modes Modified model problem Weighted Jacobi relaxation Three experiments • we relax with wJacobi with ω = 2/3 on initial guesses respectively: # iterations Ferien Akademie ’05 VeselinDikov
MultigridMethodsSmoothing Property • Smoothing property explained in four steps Fourier modes Modified model problem Weighted Jacobi relaxation Three experiments • repeat the experiment with: ω = 2/3 and initial guess # iterations Ferien Akademie ’05 VeselinDikov
MultigridMethodsSmoothing Property • Smoothing property explained in four steps Fourier modes Modified model problem Weighted Jacobi relaxation Three experiments • Explanation • Rω has the same eigenvectors as A and they are the same as the wave vectors • Recall that for the error e(m) = Rme(0) • Eigenvalues of Rω ? Ferien Akademie ’05 VeselinDikov
MultigridMethodsSmoothing Property • Smoothing property explained in four steps Fourier modes Modified model problem Weighted Jacobi relaxation Three experiments • Explanation Eigenvalue wavenumber k Ferien Akademie ’05 VeselinDikov
MultigridMethodsSmoothing Property • Smoothing property explained in four steps Fourier modes Modified model problem Weighted Jacobi relaxation Three experiments • Explanation • Smoothing property • Fast damping of oscillatory error modes • Common for all iterative methods • How to overcome the bad performance effect over smooth error modes? Ferien Akademie ’05 VeselinDikov
MultigridMethods Agenda • Model problem • Relaxation. Smoothing property • Elements of Multigrid • Multigrid schemes Ferien Akademie ’05 Veselin Dikov
MultigridMethodsElements of Multigrid • Element I: A smooth wave looks more oscillatory on a coarser grid • Aliasing: k looks like (n-k) Ferien Akademie ’05 VeselinDikov
finest grid coarsest grid transfer the coarse grid result to the finer grid for the initial guess Relax Relax Relax MultigridMethodsElements of Multigrid • Element II: Nested Iterations • Problems? Ferien Akademie ’05 VeselinDikov
MultigridMethodsElements of Multigrid • Element III: Correction scheme • Residual equation: Ae = r • The scheme: • Relax on Au = f on to obtain an approximation . • Compute . • Relax on Ae = r on to obtain an approximation to the error, . • Correct the approximation . Ferien Akademie ’05 VeselinDikov
MultigridMethodsElements of Multigrid • Element IV: Interpolation and restriction • Interpolation : • Restriction : Injection: Full weighting: • Variational property: Ferien Akademie ’05 VeselinDikov
MultigridMethods Agenda • Model problem • Relaxation. Smoothing property • Elements of Multigrid • Multigrid schemes Ferien Akademie ’05 Veselin Dikov
MultigridMethodsTwo-Grid • Two-Grid = Corr.Scheme+Interpolation+Restriction • Relax times on on with initial guess • Compute and restrict . • Solve on . • Interpolate and correct . • Relax times on on with initial guess Ferien Akademie ’05 VeselinDikov
MultigridMethods Two-Grid -> V-Cycle • Two-Grid Scheme • V-Cycle = Recursive Two-Grid Scheme V-Cycle W-Cycle Ferien Akademie ’05 VeselinDikov
MultigridMethods Full Multigrid(FMG) • FMG = V-Cycle + nested iterations FMG Ferien Akademie ’05 VeselinDikov
MultigridMethods Costs • V-Cycle costs Storage Computational cost • FMG computational costs • Speedup because working on smaller domains Ferien Akademie ’05 VeselinDikov