Math 6630, Spring 2016, Problem Set 3

advertisement
Math 6630, Spring 2016, Problem Set 3
Due Friday March 25, 2016.
1) Consider the following problem in the domain Ω = [0, 1] × [0, 1].
−(x, y)wxx − wyy = f (x, y)
(1)
The functions (x, y) and f (x, y) are inputs to the problem as is Dirichlet data for w(x, y) on ∂Ω.
(A) Write a multigrid V-cycle code which uses full-weighting restriction, bilinear interpolation,
and red-black Gauss Seidel smoothing to solve the problem for the case ≡ 1. Use the standard second order difference approximations for wxx and wyy on all grid levels. Let your finest
grid have h = 1/64. Use your V-cycle code to solve the problem for which the exact solution is
w(x, y) = sin(3πx) cos(4πy) exp(−(x − .5)2 + (y − .5)2 ). You will have to substitute this into the
PDE to determine what f you should use. Report the 2-norm and maximum norm of the errors
and residuals at the end of each V-cycle. By what factor are the error and residual reduced per
V-cycle? Explore how different choices for the number of presmoothing (ν1 ) and postsmoothing
(ν2 ) affect the performance of the method.
(B) Now consider the function (x, y) defined by
(x, y) = 1000 1 + tanh(10(x − 0.4)) 1 + tanh(10(y − 0.4)) .
which takes values from about .001 to 1000 in Ω. Solve the problem for which the solution is
w(x, y) = sin(3πx) cos(4πy) exp(−(x−.5)2 +(y −.5)2 ) after computing the corresponding function
f (x, y). How well do the V-cycles work for this problem?
(C) Implement an alternating Zebra Gauss Seidel smoother and use it instead of point Gause-Seidel
to solve the problem from (B). How well do V-cycles with the new method work for this problem?
Debugging advice: Numerically compute the smoothing factor (from your implemenation of GSRB) and compare it with the theoretical value. Check your restriction and interpolation operators
on functions for which you can easily compute the right answers by hand (or Maple). Be especially
careful near boundaries. Brigg’s Multigrid Tutorial offers practical advice on how to implement
multigrid methods. You may find this helpful.
2) Briggs Chapter 6
(A) Problem 2 Fixed Point Property
(B) Problem 3 Residual Equation
3) Write a Full-Approximation Scheme multigrid V-cycle code for the discrete version of the following one-dimensional non-linear problem on the interval [0,1] with homogeneous Dirichlet boundary
conditions:
−wxx (x) + λw(x)ew(x) = f (x).
(2)
Use your code to solve this problem with f such that the exact solution is w(x) = (x2 − x3 ) sin(πx)
and γ = 0, γ = 1, γ = 10, and γ = 100. Use h = 1/128 for your finest grid and use a tolerance
10−10 for the computed residual to decide when to stop iterating. For each γ, report the factor by
which the error and residual is reduced in each FAS-cycle, and how many FAS-cycles are required
to reduce the residual to the desired level.
The Full-Approximation Scheme is described in Briggs, Chapter 6. In particular the 2D version of
the assigned problem is described on pages 102-104.
1
Download