Implementation of the Tridiagonal Matrix Algorithm (TDMA) in C: A Practical Approach

Notice

This is an unedited manuscript accepted for publication and provided as an Article in Press for early access at the author’s request. The article will undergo copyediting, typesetting, and galley proof review before final publication. Please be aware that errors may be identified during production that could affect the content. All legal disclaimers of the journal apply.

Year : 2024 | Volume :11 | Issue : 03 | Page : –
By

Navya Jain,

Rishika Chauhan,

Pankaj Dumka,

  1. Student, Department of Computer Science and Engineering, Jaypee University of Engineering and Technology, Raghogarh-Vijaypur, Guan, Madhya Pradesh, India
  2. Assistant Professor, Department of Electronics and Communication Engineering, Jaypee University of Engineering and Technology, Raghogarh-Vijaypur, Guan, Madhya Pradesh, India
  3. Assistant Professor, Department of Mechanical Engineering, Jaypee University of Engineering and Technology, Raghogarh-Vijaypur, Guan, Madhya Pradesh, India

Abstract

This paper presents a practical implementation of the Tridiagonal Matrix Algorithm (TDMA), also known as the Thomas Algorithm, using the C programming language. The TDMA is a commonly used algorithm for solving systems of linear equations where the coefficient matrix is tridiagonal. The paper draws a detailed step-by-step process of the algorithm’s development, from forward elimination to backward substitution, with a focus on minimizing computational difficulty compared to standard Gaussian elimination. The simplicity and efficiency of TDMA make it a ideal choice in many engineering applications, such as structural analysis, heat conduction, and fluid dynamics, where large tridiagonal systems often arise. The C programming language is highlighted as an standard platform for implementing the TDMA due to its performance benefits, low-level memory management, and precision in handling numerical problems. The paper provides a comprehensive explanation of the algorithm’s core components, including vector initialization, solution printing, and the main TDMA solver function. Several practical examples were used to demonstrate the effectiveness of the implementation, validating the approach with commonly met tridiagonal systems in engineering scenarios. This study contributes to numerical analysis and engineering computation by offering a robust and efficient solution to tridiagonal systems. The implementation’s modularity and clear function structure also make it adaptable for educational and professional purposes, allowing for easy integration into more complex numerical simulations.

Keywords: TDMA, Thomas Algorithm, C Programming, Tridiagonal Matrix, Numerical Analysis

[This article belongs to Recent Trends in Programming languages (rtpl)]

How to cite this article:
Navya Jain, Rishika Chauhan, Pankaj Dumka. Implementation of the Tridiagonal Matrix Algorithm (TDMA) in C: A Practical Approach. Recent Trends in Programming languages. 2024; 11(03):-.
How to cite this URL:
Navya Jain, Rishika Chauhan, Pankaj Dumka. Implementation of the Tridiagonal Matrix Algorithm (TDMA) in C: A Practical Approach. Recent Trends in Programming languages. 2024; 11(03):-. Available from: https://journals.stmjournals.com/rtpl/article=2024/view=180914

References

  1. Strang G. Introduction to linear algebra. Wellesley-Cambridge Press; 2022.
  2. Salih A. Tridiagonal matrix algorithm. Dep Aerosp Eng Indian Inst Sp Sci Technol Thiruvananthapuram. 2010 Oct;1:229.
  3. Dumka P, Dumka R, Mishra DR. Numerical Methods using Python (For scientists and Engineers). Blue Rose Publishers; 2022 Nov 21.
  4. Strikwerda JC. Finite difference schemes and partial differential equations. Society for Industrial and Applied Mathematics; 2004 Jan 1.
  5. Teukolsky SA, Flannery BP, Press WH, Vetterling W. Numerical recipes in C. SMR. 1992;693(1):59-70.
  6. Samant SS, Xia J, Muyan‐Özçelik P, Owens JD. High performance computing for deformable image registration: Towards a new paradigm in adaptive radiotherapy. Medical physics. 2008 Aug;35(8):3546-53.
  7. Dumka P, Dumka R. Basics of C for Engineers: A Quick Introduction. 1st ed. Apna Publisher; https://apnapublisher.in/product/basics-of-c-for-engineers-a-quick-introduction/
  8. Barnett RH, Cox S, O’Cull L. Embedded C programming and the Atmel AVR. Thomson Delmar Learning; 2006 Jun 1.
  9. Epperson JF. An introduction to numerical methods and analysis. John Wiley & Sons; 2013 Oct 7.

Regular Issue Subscription Review Article
Volume 11
Issue 03
Received 09/10/2024
Accepted 14/10/2024
Published 04/11/2024