1 / 13

Creating Data Structure for L/U

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

weston
Download Presentation

Creating Data Structure for L/U

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Creating Data Structure for L/U Lecture #10 EEE 574 Dr. Dan Tylavsky

  2. 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.

  3. 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)

  4. 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.

  5. 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.

  6. Team Problem: Verify that the data structure derived for the matrix shown below is correct.

  7. 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.

  8. 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’.

  9. 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.)

  10. The End

More Related