Multigrid Methods The Implementation - PowerPoint PPT Presentation

1 / 31
About This Presentation
Title:

Multigrid Methods The Implementation

Description:

Where f(x,y) is the right-hand side calculated by the quantities in the previous ... b) interpolate_fine() stands for a higher order interpolator. ... – PowerPoint PPT presentation

Number of Views:53
Avg rating:3.0/5.0
Slides: 32
Provided by: Eri7265
Category:

less

Transcript and Presenter's Notes

Title: Multigrid Methods The Implementation


1
Multigrid MethodsThe Implementation
  • Wei E
  • CSE_at_Technische Universität München.
  • Ferien Akademie 19th Sep. 2005

2
Content
  • Introduction
  • Algorithm
  • Results Performance
  • A Failing Example
  • Conclusion

3
Content
  • Introduction
  • Algorithm
  • Results Performance
  • A Failing Example
  • Conclusion

4
Introduction
  • Fluid Dynamics
  • Solving PDEs
  • Computational Fluid Dynamics
  • Numerical Solution

5
The Navier-Stokes Equations (1)
  • Non-stationary incompressible viscous fluids
  • 2D Cartesian coordinates
  • system of partial differential equations
  • two momentum equations continuity equation

6
The Navier-Stokes Equations (2)
7
Poisson Equation
  • Where f(x,y) is the right-hand side calculated by
    the quantities in the previous time step
  • the unknown u is to be solved in the current time
    step.

8
Discretization (1)
  • Finite Difference Scheme

9
Discretization (2)
  • The corresponding matrix representation is
  • where

10
Content
  • Introduction
  • Algorithm
  • Results Performance
  • A Failing Example
  • Conclusion

11
Multigrid Implementation
  • The two classical schemes
  • V-Cycle
  • Full Multigrid (FMG)

12
V-Cycle The Algorithm
  • grid double Ddim_array f // the right hand
    side
  • double Ddim_array v // the current
    approximation
  • Grid array of structure grid.
  • for j 0 to coarsest - 1
  • Gridj.v lt- relax(Gridj.v, Gridj.f,
    num_sweeps_down)
  • Gridj1.f lt- restrict(Gridj.f-
    calculate_rhs(Gridj.v))
  • endfor
  • Gridcoarsest.v direct_solve(Gridcoarsest.v,
    Gridcoarsest.f)
  • for j coarsest 1 to 0
  • Gridj.v lt- Gridj.v interpolate(Gridj1.
    v)
  • Gridj.v lt- relax(Gridj.v, Gridj.f,
    num_sweeps_up)
  • endfor

13
V-Cycle Comments (1)
  • a) Non-recursive structure
  • b) Gauss-Seidel is used as the relaxation method
  • c) calculate_rhs() is a function to calculate the
    right-hand side based on current approximation
  • d) Several methods can be used to solve the
    small-size problem, we choose SOR (successive
    over relaxation)

14
V-Cycle Comments (2)
  • e) For restriction, we take the mean value of the
    four neighbors as the result
  • f) For interpolation, we use the similar method
    as restriction spreading the value into its
    four neighbors.
  • restriction interpolation

15
FMG The Algorithm
  • Once we have the V-cycle, FMG would be rather
    easy to implement
  • for j 0 to coarsest - 1
  • Gridcoarsest-j1.v lt- Gridcoarsest-j1.v
    interpolate_fine(Gridcoarsest-j.v)
  • Gridcoarsest-j1.v lt- V-cycle(Gridcoarsest-j
    1.v, Gridcoarsest-j1.f)
  • endfor

16
FMG Comments
  • a) Initialization for all the approximations and
    right-hand sides should be made before executing
    the FMG main loop
  • b) interpolate_fine() stands for a higher order
    interpolator. In practice, we use the
    interpolation matrix

17
Content
  • Introduction
  • Algorithm
  • Results Performance
  • A Failing Example
  • Conclusion

18
Model Problem (1) Hidden Step
  • Fluid flows with a constant velocity through a
    channel with a hidden obstacle on one side.
    No-slip conditions are imposed at the upper and
    lower walls.

19
Simulation result (1)
  • The Hidden Step

20
Model Problem (2) Karman Vortex
  • The flow in a channel can meet a tilted plate. At
    the left boundary, the fluid inflow has a
    constant velocity profile, while at the upper and
    lower boundaries no-slip conditions are imposed.

21
Simulation result (2)
  • Von Karman Vortex

22
Performance (1)
Testing platform P4 2.4GHz, 1GB Memory, SUSE
Linux 9.3
23
Performance (2)
24
Content
  • Introduction
  • Algorithm
  • Results Performance
  • A Failing Example
  • Conclusion

25
A Failing Example
  • Throttle

26
Simulation Result
27
The Reason
28
Content
  • Introduction
  • Algorithm
  • Results Performance
  • A Failing Example
  • Conclusion

29
Conclusion
  • An Optimal (i.e., O(N)) Solver.
  • Highly Modular Program Structure
  • Advanced Debugging Technique

30
Reference
  • 1 Practical Course Scientific Computing and
    Visualization Worksheet, Lehrstuhl für Informatik
    mit Schwerpunkt Wissenschaftliches Rechnen,
    TU-Muenchen, 2005.
  • 2 Krzysztof J. Fidkowski, A High-Order
    Discontinuous Galerkin Multigrid Solver for
    Aerodynamic Applications, Master Thesis in
    Aerospace Engineering at the MASSACHUSETTS
    INSTITUTE OF TECHNOLOGY
  • 3 S. McCormick, B. Briggs, and V. Henson, "A
    Multigrid Tutorial, second edition,
    SIAM,Philadelphia, June 2000.

31
Thank You!
Write a Comment
User Comments (0)
About PowerShow.com