Write a program implementing the conjugate gradient method (un-preconditioned). Solve the matrix equation corresponding to a finite difference node-spacing, h = 0.02m in x and y directions for the same one-quarter cross-section of the system shown in Figure. Use a starting solution of zero.
(a) Test your matrix using your Choleski decomposition program that you wrote for Question 1 of Assignment 1 to ensure that it is positive definite. If it is not, suggest how you could modify the matrix equation in order to use the conjugate gradient method for this problem.
(b) Once you have modified the problem so that the matrix is positive definite, solve the matrix equation first using the Choleski decomposition program from Assignment 1,and then the conjugate gradient program written for this assignment.
(c) Plot a graph of the infinity norm and the 2-norm of the residual vector versus the number of iterations for the conjugate program.
(d) What is the potential at (x,y) = (0.06, 0.04), using the Choleski decomposition and the conjugate gradient programs, and how do they it compare with the value you computed in Question 2(b) above. How do they compare with the value at the same (x,y) location and for the same node spacing that you computed in Assignment 1 using SOR.
(e) Suggest how you could compute the capacitance per unit length of the system from the finite difference solution.