Thomas algorithm to solve tridiagonal matrices - PowerPoint PPT Presentation

About This Presentation
Title:

Thomas algorithm to solve tridiagonal matrices

Description:

Iterative methods for solving matrix equations. 1. Jacobi. 2. Gauss-Seidel ... Solve for u's. Leads to this system of equations. Choose an initial u=[1 1 1 1 ...1] ... – PowerPoint PPT presentation

Number of Views:4807
Avg rating:3.0/5.0
Slides: 30
Provided by: tonyc7
Category:

less

Transcript and Presenter's Notes

Title: Thomas algorithm to solve tridiagonal matrices


1
Thomas algorithm to solve tridiagonal matrices
2
Basically sets up an LU decomposition three
parts 1) decomposition 2) forward substitution 3)
backward substitution
3
1) decomposition loop from rows 2 to n ai
ai/bi-1 bi bi-aici-1 end loop 2) forward
substitution loop from 2 to n ri ri -
airi-1 end loop
4
3) back substitution xn rn/bn loop from n-1 to
1 xi (ri-cixi1)/bi end loop
5
Example
First decompose T
6
loop from rows 2 to 5 ai ai/bi-1 bi
bi-aici-1 end loop
7
forward substitution loop from 2 to n ri ri -
airi-1 end loop
8
back substitution xn rn/bn loop from n-1 to
1 xi (ri-cixi1)/bi end loop
9
Crout algorithm - alternate LU decomposition Inste
ad of 1s on diagonal of L, get 1s on diagonal
of U Operate on rows and columns sequentially,
narrowing down to single element
10
Algorithm
for j2 to n-1
11
Cholesky decomposition A decomposition for
symmetric matrices Symmetric matrix e.g. a
covariance matrix
12
For symmetric matrices, can write
Can develop relationships for l
13
Example
1st row
Skip this equation
14
Row 2
15
Row 3
16
Row 4
17
(No Transcript)
18
Iterative methods for solving matrix equations 1.
Jacobi 2. Gauss-Seidel 3. Successive
overrelaxation (SOR)
19
What are C and d?
20
Rewrite matrix equation in same way
becomes
21
Then
22
Jacobi method is like fixed point
iteration Example Shape of a stretched membrane
23
Shape can be described by potential function
Let us give some boundary conditions
24
Problem look likes this
Solve for us
25
Leads to this system of equations
26
Choose an initial u1 1 1 1 1
Iterate using xCxd
27
Matlab solution, 49 iterations
28
Gauss-Seidel method differs from Jacobi by
sequential updating - use new xis as they become
available
29
Example
Jacobi
Gauss-Seidel
Write a Comment
User Comments (0)
About PowerShow.com