I need to solve a tridiagonal linear sistem of partial differential equations using the tridiagonal algoritm. I used that described in "Numerical Recipes", but I think it doesn't work very well. I'm looking for an alternative solving way.
The book "Introduction to Fortran 90 for Scientists and Engineers" has also an example and FORTRAN code for solving tridiagonal system. You can check it.
The easiest way is the Thomas Algorithm. You basically sweep down the i-1 diagonal by using the i (main) diagonal. Then back substitute when you get to the bottom.
They are quite easy to code once you get a pseudo-code going of what you need to do.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.