Let A be the tridiagonal matrix with main diagonals l,a,u. Let x be the vector of temperatures (unknowns), and let b accumulate the right hand side terms. The system is equivalent to solving A x = b for each time level.
The Algorithm for tridiagonal systems consist of the following steps:
Gaussian Elimination
Part I: Forward Elimination:
Loop on i from
if , set singularity indicator, exit
End Loop on i
Part II: Back substitution
Loop on i from
End Loop on i