Sie sind auf Seite 1von 4

Test 1: Test case: A is a square matrix which is not diagonally dominant A has no zeros on the main diagonal.

al. At least one of the Eigen values of C > 1

Test data: A=[ ]

Decomposing A into diagonal, sub diagonal and super diagonal matrices and calculating for C= - (D+L)-1 * U D+L = [ ]

- (D+L)-1 =[

[ )(

] )( )

Eigen values of C = (

One Eigen value in C > 1 i.e.; 7.671 Expected result: Since A is not diagonally dominant and spectral radius (r ) of C is >1, Therefore the iterations should not converge for this matrix A. Actual Result: The solution does not converge and reaches max iterations. Pass/fail : Test Passed

Test 2:
Test case: A is a square matrix which is not diagonally dominant A has no zeros on the main diagonal. At least one of the Eigen values of C <1

Test Data: A= [ ]

Decomposing A into diagonal, sub diagonal and super diagonal matrices and calculating for C= - (D+L)-1 * U D+L = [ ]

- (D+L)-1 =[

C=[

Eigen values of C =

)(

)(

All Eigen values in C < 1 = || = 0.75 =


( )

= 1.33

Expected result: Altough ( r) of C is < 1 and also 0< <2, but matrix A is not diagonally dominant so the solution should not converge at the given iteration limit. Actual Result: Iterations diverge. Pass/fail: Pass

Test 3:
Test case: A has zeros on the diagonal Test data: Let A = [ ]

The solution for iterations using SOR is calculated by using the equation Xik+1 = Xik + /aii (bi Expected result: The above equation gives an output for the new iteration. Now in the above matrix we have a zero as a11 element. If we divide by zero, we will get or an unidentified answer. So we cannot use a matrix which has a zero on the diagonal. The program should exit without going into the SOR. Actual Result: The program does not reach the algorithm and exits smoothly giving an output Zero on the diagonal. Pass/ Fail : Pass
ij

Xjk+1 -

ij

Xjk)

Test 4:
Test case: A is diagonally dominant Test data: A= [ ]

D+L =[

- (D+L)-1 = [

C=[

Eigen values of C = (0, 0) ( -0.04.0), (0.002, 0) r ( C ) = 0.04 < 1

Expected result: Since r ( C ) < 1 and the matrix is diagonally dominant. This fulfils two of the sufficient conditions for the convergence of the system therefore the solution should converge. Actual Result: The matrix converges at 7 iterations. Pass/Fail: Test passed.

Test 5
Test data: A large (say n= 1000 to 10,000) sparse diagonally dominant matrix Expected result: It is expected that there will be large number of iterations involved in this solution

Test 6:
Test case Ill conditioned matrix A=[ max = 1.98 min = 0 An ill conditioned matrix has a large condition number and the matrix is not diagonally dominant. Condition number = |max| / |min| Expected Result: The solution should not converge for this ill-conditioned matrix. Actual Result Max iterations reached. Pass/fail Test passed. ]

Das könnte Ihnen auch gefallen