[SOLVED] CS6210 Assignment 2

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Homework2-vndn0e.zip (879.5 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (1 vote)

Note: Please use Matlab, or a public domain approximation to it in this assignment. The code must compile on one of the lab machines with your instructions. Document your code thoroughly!

1.

This is practical example of a small but real-life-type ill-conditioned problem The flow of water through two very different materials gives this system of linear equations :

−𝐻1 −2 1 h1 0 1 −2 1 h2 01−21 h3

⋮1⋱⋱⋱⋮ 0 =∆𝑥2 1 −(1+𝑎) 𝑎 h𝑖

0⋮ ⋱⋱⋱⋮

The coefficient a can be very small indeed a = 1.0e-7 giving an ill-conditioned matrix.

Use ∆𝑥 = 1 .If 𝐻1 = 8 𝑎𝑛𝑑 𝐻𝑟 = 4 Solve the system of equations for n= 161, where a = 1.0, a = 1.0e-5, a = 1.0e-10 and a = 1.0e-15. Use iterative refinement to check and improve your answer if possible. Compute the estimated condition number using the matlab condition number estimator. How does the condition number vary with the value of a

1

2. (i) The web page has a zip file with a multigrid solver that solves the problem

2u2u (sin(88x)sin(72y),(x,y)[0,1]x[0,1]withsolutionand x2 y2

and (zero) boundary conditions given by u (x, y)  (sin(88 x)  sin(72 y) true (88)2 (72)2

Investigate how large a mesh this this can run on (mine failed at 16Kx16K) and time the code to verify the linear complexity of multiugrid. Note the accuracy achieved.

Modify the program given on the web page Laplace2D.m which uses the Jacobi method

2u  2u  0,(x, y)[0,1]x[0,1] with solution and to solve x2 y2

to solve

boundary conditions given by u

true

(x, y)  sin( x)e( y)

the above (multigrid problem) using the Jacobi method and the red-black Gauss Seidel method. Try and achieve the accuracy of the multigrid method and compare performance if possible by modifying the program to include the convergence test given in the lecture notes with an infinity norm and a user-supplied tolerance, Tol

  • Homework2-vndn0e.zip