The assignment is due Thursday, April 16 in class.
It is worth twice that of any individual assignment to date.
Please e-mail your Matlab script(s) to
Let S=(0,1)2.
Consider the Poisson equation
uxx + uyy = 0 in S subject to the
following boundary conditions:
| u(t,0) = u(0,t), | 0 < t < 1 |
| u(t,1) = u(1,t) = 1, | 0 < t < 1 |
| uy(t,0) = - ux(0,t), | 0 < t < 1 |
Hint: Do this for a very small problem first, draw the grid with the
Dirichlet points included, and number the points according to some logical
method.
This problem is a subset of problem 1 in Varga's book on page 192 (see the
syllabus).
Consider the variable coefficient elliptic equation:
| (a(x,y)ux)x + (a(x,y)uy)y + f(x,y) = 0, | in S=(0,1)2. |
| u = 0, | on the boundary of S. |
(1) Write down what the 5 point discretization is at an interior point of a
uniform mesh.
Any symbolic manipulation system is fair game to get this right, but simplify
your answer to be easy to read and computationally efficient.
(2) Using the conjugate gradient solver in Matlab, solve the problem on a 50
by 50 grid covering S.
Start with an initial guess of 0 and iterate until the residual norm has been
reduced by a factor of 10-6.
(3) Turn in a graph of the computed solution.
(4) What did it all cost? The person with the smallest number of flops will
get a bonus.
Cheers,
Craig C. Douglas