The purpose of the elimination procedure is to find therelationships between P,, O, with A, B,, C, D,Multiplying Eq.(b) by C, and adding to Eq.(a) :(a)AT, = B,T+I +CT-I + D,(b)C,T- =C,P,T, +C,Q,-IAT -C,P-,T, = B,T+I +D, +C,Q-B,D, +C,Qi2)Ti+ +Yielding, -C,P-A-C,P,P-T+Comparing with T,-, =6/58
6/58 The purpose of the elimination procedure is to find the relationships between Pi , Qi with Ai , Bi , Ci , Di: Multiplying Eq.(b) by Ci , and adding to Eq.(a): AT BT C T D i i i i i i i 1 1 (a) (b) Ci T P i 1 1 1 C C i i T Q i i i AT C P T i i i i i 1 BT D C Q i i i i i 1 1 1 1 1 1 ( ) i i i i i i i i i i i i B D C Q T T A C P A C P Comparing with T P T Q i i i i 1 1 1 Yielding
B,D, +C,Qi--C,P-1A, -C,Pi-1The above equations are recursive (递归的)一ie..In order to get P, Qi, P, and Q, must be known.In order to get Pj, Qr, use Eq.(a)AT =BT+ +CT- +D, i=1,2,...M1 (a)and the left end condition: i-l, C,=-0Applying Eq.(a) to i=-1, and comparing it with Eq.(b)T-I = P-,T, +Q,-the expressions of Pj, Q, can be obtained:7/58
7/58 1 ; i i i i i B P A C P 1 1 ; i i i i i i i D C Q Q A C P The above equations are recursive (递归的)-i.e., In order to get Pi , Qi , P1 and Q1 must be known. 1 1 , 1,2,. 1 AT BT CT D i M i i i i i i i (a) and the left end condition:i=1, Ci =0 In order to get P1,Q1,use Eq.(a) Applying Eq.(a) to i=1, and comparing it with Eq.(b) the expressions of P1,Q1 can be obtained: T P T Q i i i i 1 1 1
From i= 1,C, = O, Eq.(a) becomes: AT = B,T, +D+DB,BiT,DAAAA(2)Back substitution(回代-StartingfromM1via1(顺序地)Eq.(b) to get T, sequentiallyB,TMI=PMTMI+I +QM1, P=A, -C,P-IEnd condition:PMi= 0i=Ml,B,=0to get: TM.-1....T2,T,.TMI =QMIT-1 = P-,T +Q,-8/58
8/58 1 i C 1, 0, AT BT D 1 1 1 2 1 1 1 1 2 1 1 B D T T A A 1 1 1 ; B P A 1 1 1 D Q A (2) Back substitution(回代)-Starting from M1 via Eq.(b) to get Ti sequentially(顺序地) 1 1 1 1 1 , T P T Q M M M M End condition: i=M1, Bi =0 T Q M M 1 1 1 ; i i i i i B P A C P 1 0 PM T P T Q i i i i 1 1 1 to get: 1 1 2 1 ,. , . T T T M From Eq.(a) becomes:
3.Implementationof Thomasalgorithmfor 1stkind B.C.For 1st kind B.C., the solution region is from i-2...to M1-1=M2.because T, and Tm are known.Applying Eq(b) to i=1 with given T1,given :T = PT, +Q → P =0; Q =T,givenBecause Tm, is known, back substitution should be started fromM2:TM2=PM2TM +Q2When the ASTM is adopted to deal with B.C. of the 2nd and 3rdkind, the numerical B.C. for all cases is regarded as Ist kind, and theabovetreatment should be adopted9/58
9/58 3. Implementation of Thomas algorithm for 1st kind B.C. For 1st kind B.C., the solution region is from i=2.to M1-1=M2, because T1 and TM1 are known. Applying Eq.(b) to i =1 with given T1,given: T PT Q 1 1 2 1 1P 0 ; Q T 1 1, given Because TM1 is known,back substitution should be started from M2: T P T Q M M M 2 2 1 2 When the ASTM is adopted to deal with B.C. of the 2nd and 3rd kind, the numerical B.C. for all cases is regarded as 1st kind, and the above treatment should be adopted
3.4.2ADlmethodforsolvingmulti-dimensionalproblem1.Introductiontothematrixof2-Dproblem1-Dstorage(一维存储)of variables and its relation to matrixcoefficients10/58
10/58 3.4.2 ADI method for solving multi-dimensional problem 1. Introduction to the matrix of 2-D problem W P E N S S W P N E 1-D storage (一维存储)of variables and its relation to matrix coefficients