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

Year : 2024 | Volume : 11 | Issue : 03 | Page : 36-43
    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 an 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 a 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 ]

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):36-43.
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):36-43. Available from: https://journals.stmjournals.com/rtpl/article=2024/view=180914


References

  1. Strang G. Introduction to Linear Algebra, 5th edition. Wellesley, Massachusetts: Wellesley-Cambridge Press; Cambridge Press; 2022.
  2. Salih A. Tridiagonal matrix algorithm. Department of Aerospace Engineering, Indian Institute of Space Science and Technology, Thiruvananthapuram. October 2010.
  3. Dumka P, Dumka R, Mishra DR. Numerical methods using Python (for scientists and engineers). Noida, India: Blue Rose Publishers; 2022.
  4. Strikwerda JC. Finite Difference Schemes and Partial Differential Equations. 2nd ed. Philadelphia: Society for Industrial and Applied Mathematics; 2004. DOI: 10.1137/1.9780898717938.fm.
  5. Press WH, Teukolsky SA, Vetterling WT, Flannery BP. Numerical Recipes in C: The Art of Scientific Computing. 2nd ed. New York: Cambridge University Press; 1992.
  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. Med Phys. 2008;35:3546–53. DOI: 10.1118/1.2948318, PubMed: 18777915.
  7. Dumka P, Dumka R. Basics of C for Engineers: A Quick Introduction. New Delhi: Apna Publisher; 2023.
  8. Barnett RH, Cox S, O’Cull L. Embedded C Programming and the Atmel AVR. Boston, Massachusetts, United States: Delmar Cengage Learning; 2002.
  9. Epperson JF. An Introduction to Numerical Methods and Analysis. New Jersey, United States: Wiley–Blackwell; 2007.

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


My IP

PlumX Metrics