exercise where

4
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 equation is Implement V(2,1) cycles using n levels, with a random initial guess. Use full-weighted restriction, bi-linear interpolation, and the following relaxation methods: 1 2 1 2 n n y x u 2 sin sin 2 ; 1 0 1. Damped Jacobi, 2. Gauss-Seidel in natural order; 3. Gauss-Seidel in Red-Black order. . 1 , 0 1 , 0 , , , , , , u y x g u u y x f u u u yy xx

Upload: yazid

Post on 05-Jan-2016

26 views

Category:

Documents


1 download

DESCRIPTION

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 equation is - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Exercise where

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 equation is

Implement V(2,1) cycles using n levels, with a random initial guess. Use full-weighted restriction, bi-linear interpolation, and the following relaxation methods:

1212 nn

yxu 2sinsin2

;10 1. Damped Jacobi,

2. Gauss-Seidel in natural order;

3. Gauss-Seidel in Red-Black order.

.1,01,0

,,,

,,,

uyxgu

uyxfuuu yyxx

Page 2: Exercise where

Perform many V-cycles (until convergence slows down and stops due to round-off errors). Compute the L2 norm (root-mean-square) of the residual after each cycle. Plot the residual reduction rate per cycle:

where is the iteration number. (Each V-cycle is one iteration). Use your code to answer the following questions. Explain all the results. Use at least n = 5 (but use at least n = 6 for Question 3).

2

1

2

hh rr

Page 3: Exercise where

1. For which is the best relaxation method? Which is the worst? What is the optimal for Jacobi relaxation found in practice? How do the results of damped Jacobi and Gauss-Seidel in natural order compare with the predictions of smoothing analysis?

2. For , what is the influence of (only positive) . Compare

3. For compare between the convergence behavior of the residual norm and that of the “differential error”, how are these behaviors influenced by the resolution? Give quantitative answers and explain if they match our expectations.

0.1,1,1

,0,1

,0,1

.~2

huu

Page 4: Exercise where

4. For what is the influence of (positive, negative, big, small). Starting with , reduce gradually until the two-grid convergence deteriorates. Use the IR/ICG two-grid analysis to determine the cause of the problem. Explain.

5. For discretize the problem using the skew Laplacian:

Test the residual convergence. Use the IR/ICG two-grid analysis to determine the cause of the problem. Explain.

,1

0

,0,1

2

1 0 11

0 4 02

1 0 1h