Geometric MultiGrid Mehod

Slides:



Advertisements
Similar presentations
Mutigrid Methods for Solving Differential Equations Ferien Akademie 05 – Veselin Dikov.
Advertisements

05/11/2005 Carnegie Mellon School of Computer Science Aladdin Lamps 05 Combinatorial and algebraic tools for multigrid Yiannis Koutis Computer Science.
Element Loads Strain and Stress 2D Analyses Structural Mechanics Displacement-based Formulations.
Improvement of a multigrid solver for 3D EM diffusion Research proposal final thesis Applied Mathematics, specialism CSE (Computational Science and Engineering)
1 Iterative Solvers for Linear Systems of Equations Presented by: Kaveh Rahnema Supervisor: Dr. Stefan Zimmer
1 Numerical Solvers for BVPs By Dong Xu State Key Lab of CAD&CG, ZJU.
CS 290H 7 November Introduction to multigrid methods
03/23/07CS267 Lecture 201 CS 267: Multigrid on Structured Grids Kathy Yelick
SOLVING THE DISCRETE POISSON EQUATION USING MULTIGRID ROY SROR ELIRAN COHEN.
CSCI-455/552 Introduction to High Performance Computing Lecture 26.
MULTISCALE COMPUTATIONAL METHODS Achi Brandt The Weizmann Institute of Science UCLA
Geometric (Classical) MultiGrid. Hierarchy of graphs Apply grids in all scales: 2x2, 4x4, …, n 1/2 xn 1/2 Coarsening Interpolate and relax Solve the large.
Image Reconstruction Group 6 Zoran Golic. Overview Problem Multigrid-Algorithm Results Aspects worth mentioning.
Ma221 - Multigrid DemmelFall 2004 Ma 221 – Fall 2004 Multigrid Overview James Demmel
Algebraic MultiGrid. Algebraic MultiGrid – AMG (Brandt 1982)  General structure  Choose a subset of variables: the C-points such that every variable.
Numerical Algorithms • Matrix multiplication
CS 584. Review n Systems of equations and finite element methods are related.
Influence of (pointwise) Gauss-Seidel relaxation on the error Poisson equation, uniform grid Error of initial guess Error after 5 relaxation Error after.
CS267 Poisson 2.1 Demmel Fall 2002 CS 267 Applications of Parallel Computers Solving Linear Systems arising from PDEs - II James Demmel
03/09/06CS267 Lecture 16 CS 267: Applications of Parallel Computers Solving Linear Systems arising from PDEs - II James Demmel
Geometric (Classical) MultiGrid. Linear scalar elliptic PDE (Brandt ~1971)  1 dimension Poisson equation  Discretize the continuum x0x0 x1x1 x2x2 xixi.
CS267 L25 Solving PDEs II.1 Demmel Sp 1999 CS 267 Applications of Parallel Computers Lecture 25: Solving Linear Systems arising from PDEs - II James Demmel.
ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW II.
The Design and Analysis of Algorithms
Exercise where Discretize the problem as usual on square grid of points (including boundaries). Define g and f such that the solution to the differential.
Numerical Methods Due to the increasing complexities encountered in the development of modern technology, analytical solutions usually are not available.
The sequence of graph transformation (P1)-(P2)-(P4) generating an initial mesh with two finite elements GENERATION OF THE TOPOLOGY OF INITIAL MESH Graph.
Computer Engineering Majors Authors: Autar Kaw
ITERATIVE TECHNIQUES FOR SOLVING NON-LINEAR SYSTEMS (AND LINEAR SYSTEMS)
1 Numerical Integration of Partial Differential Equations (PDEs)
© Fluent Inc. 9/5/2015L1 Fluids Review TRN Solution Methods.
Solving Scalar Linear Systems Iterative approach Lecture 15 MA/CS 471 Fall 2003.
Multigrid for Nonlinear Problems Ferien-Akademie 2005, Sarntal, Christoph Scheit FAS, Newton-MG, Multilevel Nonlinear Method.
Hans De Sterck Department of Applied Mathematics University of Colorado at Boulder Ulrike Meier Yang Center for Applied Scientific Computing Lawrence Livermore.
Van Emden Henson Panayot Vassilevski Center for Applied Scientific Computing Lawrence Livermore National Laboratory Element-Free AMGe: General algorithms.
Using Partitioning in the Numerical Treatment of ODE Systems with Applications to Atmospheric Modelling Zahari Zlatev National Environmental Research Institute.
Introduction to Scientific Computing II From Gaussian Elimination to Multigrid – A Recapitulation Dr. Miriam Mehl.
The Finite Element Method A Practical Course
Multigrid Methods for Solving the Convection-Diffusion Equations Chin-Tien Wu National Center for Theoretical Sciences Mathematics Division Tsing-Hua University.
Administrivia: May 20, 2013 Course project progress reports due Wednesday. Reading in Multigrid Tutorial: Chapters 3-4: Multigrid cycles and implementation.
Illustration of FE algorithm on the example of 1D problem Problem: Stress and displacement analysis of a one-dimensional bar, loaded only by its own weight,
Multigrid Computation for Variational Image Segmentation Problems: Multigrid approach  Rosa Maria Spitaleri Istituto per le Applicazioni del Calcolo-CNR.
Linear System function [A,b,c] = assem_boundary(A,b,p,t,e); np = size(p,2); % total number of nodes bound = unique([e(1,:) e(2,:)]); % boundary nodes inter.
Implementing Hypre- AMG in NIMROD via PETSc S. Vadlamani- Tech X S. Kruger- Tech X T. Manteuffel- CU APPM S. McCormick- CU APPM Funding: DE-FG02-07ER84730.
Introduction to Scientific Computing II Overview Michael Bader.
Introduction to Scientific Computing II Multigrid Dr. Miriam Mehl Institut für Informatik Scientific Computing In Computer Science.
Introduction to Scientific Computing II Multigrid Dr. Miriam Mehl.
High Performance Computing 1 Multigrid Some material from lectures of J. Demmel, UC Berkeley Dept of CS.
Lecture 21 MA471 Fall 03. Recall Jacobi Smoothing We recall that the relaxed Jacobi scheme: Smooths out the highest frequency modes fastest.
Introduction to Scientific Computing II
Discretization for PDEs Chunfang Chen,Danny Thorne Adam Zornes, Deng Li CS 521 Feb., 9,2006.
MULTISCALE COMPUTATIONAL METHODS Achi Brandt The Weizmann Institute of Science UCLA
WORKSHOP ERCIM Global convergence for iterative aggregation – disaggregation method Ivana Pultarova Czech Technical University in Prague, Czech Republic.
Brain (Tech) NCRR Overview Magnetic Leadfields and Superquadric Glyphs.
Linear System expensive p=[0,0.2,0.4,0.45,0.5,0.55,0.6,0.8,1]; t=[1:8; 2:9]; e=[1,9]; n = length(p); % number of nodes m = size(t,2); % number of elements.
The Application of the Multigrid Method in a Nonhydrostatic Atmospheric Model Shu-hua Chen MMM/NCAR.
A Parallel Hierarchical Solver for the Poisson Equation Seung Lee Deparment of Mechanical Engineering
Optimizing 3D Multigrid to Be Comparable to the FFT Michael Maire and Kaushik Datta Note: Several diagrams were taken from Kathy Yelick’s CS267 lectures.
High Performance Computing Seminar II Parallel mesh partitioning with ParMETIS Parallel iterative solvers with Hypre M.Sc. Caroline Mendonça Costa.
Numerical Algorithms Chapter 11.
The Design and Analysis of Algorithms
بسم الله الرحمن الرحيم.
MultiGrid.
© Fluent Inc. 1/10/2018L1 Fluids Review TRN Solution Methods.
CSE 245: Computer Aided Circuit Simulation and Verification
Introduction to Multigrid Method
Introduction to Scientific Computing II
Numerical Algorithms • Parallelizing matrix multiplication
Numerical Analysis Lecture13.
Programming assignment #1 Solving an elliptic PDE using finite differences Numerical Methods for PDEs Spring 2007 Jim E. Jones.
Presentation transcript:

Geometric MultiGrid Mehod MULTIGRID METHOD MultiGrid Methods (MGM) Algebraic MultiGrid Method (AMG) Geometric MultiGrid Mehod (GMG)

MULTIGRID METHOD Remark: Given an approximate: We want to improve this approximate: Residual Equation: It means that if we replace the right hand side vector b in the main linear system, the solution of this new system is the exact error (residual) (error) But the cost of solving this system is the same as solving the original system. (update)

MULTIGRID METHOD (GMG) Two-Grid Cycle Algorithm 1) few GS iterations on the system to obtain an approximate solution Pre-smoothing step 2) Compute the residual 3) Restrict the residual Restriction step 4) Solve residual equation on coarse mesh ProloCorrection step 5) Interpolate Prolongation step 6) Update 7) few GS iterations on the system With initial approximate Post-smoothing step

MULTIGRID METHOD (GMG) W - Cycle postsmoothing restriction presmoothing prolongation V - Cycle Direct solver

MULTIGRID METHOD (GMG) Jacobi code function [sol]=jacobi(A,b,x0,steps) n=length(b); x=x0; xnew = sparse(n,1); for k=1:steps for i=1:n sum1=0; for j=1:i-1 sum1=sum1+A(i,j)*x(j); end sum2=0; for j=i+1:n sum2=sum2+A(i,j)*x(j); xnew(i)=(b(i)-sum1-sum2)/A(i,i); x=xnew; sol=xnew;

MULTIGRID METHOD (GMG) one-dimensional problems Example: Coarse mesh Fine mesh We have the inclusion

MULTIGRID METHOD (GMG)

MULTIGRID METHOD (GMG)

MULTIGRID METHOD (GMG) This means that the j-th column of P, corresponding to coarse grid node j, has the form

Two Grid TWO GRID METHOD nf=2*55-1; % number of fine nodes h=1/(nf+1); % fine mesh size xh=0:h:1; % fine mesh oneh=ones(nf,1); Ah=spdiags([-oneh 2*oneh -oneh],-1:1,nf,nf)/h; % fine stiffness matrix bh=ones(nf,1)*h; % fine load vector nc=(nf-1)/2; % coarse nodes H=1/(nc+1); % coarse mesh size xH=0:H:1; % coarse mesh oneH=ones(nc,1); AH=spdiags([-oneH 2*oneH -oneH],-1:1,nc,nc)/H; % coarse stiffness matrix uh=zeros(nf,1); % initial guess P=sparse(nf,nc); % prolongation matrix for i=1:nc P(2*i-1,i)=0.5; P(2*i,i)=1; P(2*i+1,i)=0.5; end R=P'; % Restriction matrix for k=1:5 [uh]=jacobi(Ah,bh,uh,2); rH=R*(bh-Ah*uh); % Restricted residual eH=AH\rH; % correction step uh =uh+P*eH; % update plot(xh,[0 ; uh ; 0]), xlabel('x'), ylabel('u'); grid on Two Grid

TWO GRID METHOD nf=2*55-1; % number of fine nodes h=1/(nf+1); % fine mesh size xh=0:h:1; % fine mesh oneh=ones(nf,1); Ah=spdiags([-oneh 2*oneh -oneh],-1:1,nf,nf)/h; % fine stiffness matrix bh=ones(nf,1)*h; % fine load vector nc=(nf-1)/2; % coarse nodes H=1/(nc+1); % coarse mesh size xH=0:H:1; % coarse mesh oneH=ones(nc,1); AH=spdiags([-oneH 2*oneH -oneH],-1:1,nc,nc)/H; % coarse stiffness matrix uh=zeros(nf,1); % initial guess P=sparse(nf,nc); % prolongation matrix for i=1:nc P(2*i-1,i)=0.5; P(2*i,i)=1; P(2*i+1,i)=0.5; end R=P'; % Restriction matrix for k=1:5 [uh]=jacobi(Ah,bh,uh,2); rH=R*(bh-Ah*uh); % Restricted residual eH=AH\rH; % correction step uh =uh+P*eH; % update plot(xh,[0 ; uh ; 0]), xlabel('x'), ylabel('u'); grid on

MULTIGRID METHOD (GMG) multigrid V-cycle is given by the following recursive algorithm: [Elman, Howard C., David Silvester, and Andy Wathen. Finite elements and fast iterative solvers: with applications in incompressible fluid dynamics. Oxford University Press, 2014.] page102 u = V_cycle(A,b,u,level) few GS iterations on the system Pre-smooth If coarsest level : solve else Restriction Recursive coarse grid correction Prolong & update endif few GS iterations on the system V - Cycle Post-smooth

MULTIGRID METHOD (GMG) u = V_cycle(A,b,u,level) few GS iterations on the system Pre-smooth If coarsest level : solve else Restriction V – Cycle 3 level Recursive coarse grid correction Prolong & update endif few GS iterations on the system Post-smooth

MULTIGRID METHOD (GMG) clear; clc kk=6; n1=4*kk+3; % --- linear system for level 1 h1=1/(n1+1); x1=0:h1:1; oneh1=ones(n1,1); A1=spdiags([-oneh1 2*oneh1 -oneh1],-1:1,n1,n1)/h1; b1=ones(n1,1)*h1; % --- linear system for level 2 n2=(n1-1)/2; h2=1/(n2+1); x2=0:h2:1; oneh2=ones(n2,1); A2=spdiags([-oneh2 2*oneh2 -oneh2],-1:1,n2,n2)/h2; b2=ones(n2,1)*h2; % --- linear system for level 3 n3=(n2-1)/2; h3=1/(n3+1); x3=0:h3:1; oneh3=ones(n3,1); A3=spdiags([-oneh3 2*oneh3 -oneh3],-1:1,n3,n3)/h3; b3=ones(n3,1)*h3; A(1).size = n1; A(1).h = h1; A(1).mat = A1; A(1).rhs = b1; A(2).size = n2; A(2).h = h2; A(2).mat = A2; A(2).rhs = b2; A(3).size = n3; A(3).h = h3; A(3).mat = A3; A(3).rhs = b3; b = b1; u = sparse(length(b),1); level =3; [u] = V_Cycle(A(1:level),b,u,level); V – Cycle 3 level

MULTIGRID METHOD (GMG) function [u] = V_Cycle(A,b,u,level) if level < 1; return ; end disp(['I am entering level ',num2str(level)]) if size(A,2) == 1 AA = A(1).mat; u = AA\b; disp(' ---coarset level done ---'); else [u]=jacobi(A(1).mat,b,u,3); % (3 pre-smoothing) nf = A(1).size; nc = A(2).size; P=sparse(nf,nc); for i=1:nc P(2*i-1,i)=0.5; P(2*i,i)=1; P(2*i+1,i)=0.5; end R=P'; rbar = R*(b-AA*u); % (restrict residual) ebar = sparse(length(rbar),1); Abar = A(2:level); % --------- recursive coarse grid correction ---- [ebar] = V_Cycle(Abar,rbar,ebar,size(Abar,2)); u = u + P*ebar; % prolong and update [u]=jacobi(A(1).mat,b,u,3); disp(['I am exiting level ',num2str(level)]) u = V_cycle(A,b,u,level) Pre-smooth few GS iterations on the system If coarsest level : solve else Restriction Recursive coarse grid correction Prolong & update endif few GS iterations on the system Post-smooth

Geometric MultiGrid Mehod MULTIGRID METHOD MultiGrid Methods (MGM) Algebraic MultiGrid Method (AMG) Geometric MultiGrid Mehod (GMG)

MULTIGRID METHOD (AMG) Algebraic MultiGrid Method (AMG) Can we apply multigrid techniques when there is no grid? For AMG, these components are required. sequence of grids, P and R smoothing coarse-grid versions of the fine-grid operator a solver for the coarsest grid.

MULTIGRID METHOD (AMG) Algebraic MultiGrid Method (AMG) Adjacency Graph Selecting the Coarse Grid we want to partition the grid points into C-pints and F-points. Denote by Si the set of points that strongly influence i; denote by ST the set of points that strongly depend on the point i.

MULTIGRID METHOD