Triangular Factorization of Sparse Matrix: Creating Data Structure for L/U Lecture #10 EEE 574
130 likes | 224 Views
Learn the process of triangular factorization of sparse matrices without pivoting, including symbolic and numeric segments. Example steps for data structure creation and verification are provided.
Triangular Factorization of Sparse Matrix: Creating Data Structure for L/U Lecture #10 EEE 574
E N D
Presentation Transcript
Creating Data Structure for L/U Lecture #10 EEE 574 Dr. Dan Tylavsky
Triangular factorization of a sparse matrix: • Assume: Pivoting is not necessary. • Fact. code can be broken into two segments: Symbolic & Numeric • Symbolic • Ordering: Reorder rows to minimize fill.(We’ll talk about this later.) • Create data structure for L, (D), U factors. • Numeric • Perform numerical factorization storing result in data structure created in symbolic segment.
Symbolic Segment (Specific Example) • Assumptions: • Matrix is incidence symmetric • Matrix is stored in RR(C)U • No Pivoting is needed. • Matrix is stored in an unordered form • Desired Data Structure: • L stored by columns (ordered) • U stored by rows (ordered) • Diagonal values stored in compact form (ordered). • ( LC\O, D\O, UR\O)
1 4 3 7 5 6 2 Ex: Assuming no pivoting, construct arrays of pointers and indices for the L and U factors of the A matrix (stored in RR(C)\U) shown below. Assume the L/U factors will be stored in an LC\U-UR\U-D\O storage scheme.
Step 0: Zero ‘Link’,MinNod & ‘Switch’. i=1 Step 1: Copy from Orig Matrix (use ‘Switch’), update ‘MinNod’, ‘ERPU’. Step 2: Use ‘Link’ to Adjust for fill. Update ‘MinNod’, ‘ERPU’. Step 3: Add row 1 to Link node (MinNod). Reset ‘MinNod’. Step 1: i=1+1,Copy from Orig Matrix (use Switch), update MinNod, ERPU. Step 2: Use ‘Link’ to Adjust for fill. Update ‘MinNod’, ‘ERPU’. Step 3: Add row 2 to Link node (MinNod). Reset ‘MinNod’. Step 1: i=2+1,Copy from Orig Matrix (use Switch), update MinNod, ERPU. Step 2: Use ‘Link’ to Adjust for fill. Update ‘MinNod’, ‘ERPU’. Step 3: Add row 3 to Link node (MinNod). Reset ‘MinNod’. Step 1: i=3+1,Copy from Orig Matrix (use Switch), update MinNod, ERPU. Step 2: Use ‘Link’ to Adjust for fill. Update ‘MinNod’, ‘ERPU’. Step 3: Add row 4 to Link node (MinNod). Reset ‘MinNod’. Step 1: i=4+1,Copy from Orig Matrix (use Switch), update MinNod, ERPU. Step 2: Use ‘Link’ to Adjust for fill. Update ‘MinNod’, ‘ERPU’. Step 3: Add row 5 to Link node (MinNod). Reset ‘MinNod’. Step 1: i=5+1,Copy from Orig Matrix (use Switch), update MinNod, ERPU. Step 2: Use ‘Link’ to Adjust for fill. Update ‘MinNod’, ‘ERPU’. Step 3: Add row 6 to Link node (MinNod). Reset ‘MinNod’. Step 4: Since i=NoBus-1=6, terminate.
Team Problem: Verify that the data structure derived for the matrix shown below is correct.
Note that the L/U data structure is unordered. • In our LU factorization algorithm, it will be convenient to order this matrix. • we’ll use a by-row-to-by-column conversion routine to order the matrix. • The routine converts from storage by rows (cols.) to storage by cols. (rows.) • We’ll need to use the routine twice.
Step 0: Initialize pointer to beginnings of each column. (Accumulate number of elements in each column. Perform running sum on accumulator array starting with 1 and right shift results.) Step 2&3&4: For each row, enter row index in appropriate pos. Update NxColPt. Step 5: Subtract 1 from NxColPt to get ‘ECPU’.
Team Problem: Verify that the data structure derived in the previous example is correct. Then reconvert matrix to get U(L) stored by row (cols.)