CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Wiki > Tridiagonal matrix algorithm - TDMA (Thomas algorithm)

Tridiagonal matrix algorithm - TDMA (Thomas algorithm)

From CFD-Wiki

Revision as of 08:10, 27 September 2005 by Zxaar (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introduction

The Thomas Algorithm is a special form of Gauss elimination that can be used to solve tridiagonal systems of equations. When the matrix is tridiagonal, the solution can be obtained in O(n) operations, instead of O(n3/3). Example of such matrices are matrices arising from descretisation of 1D problems.

We can write the tri-diagonal system in the form:

math>

a_i x_{i - 1} + b_i x_i + c_i x_{i + 1} = d_i </math>
Where  a_1  = 0 and  c_n = 0

Algorithm

for k:= 2 step until n do
m = {{a_k } \over {b_{k - 1} }}
My wiki