NULAPACK
NUmerical Linear Algebra PACKage
Loading...
Searching...
No Matches
Functions
Thomas.h File Reference
#include "types.h"
#include "mangling.h"
Include dependency graph for Thomas.h:

Go to the source code of this file.

Functions

void API_cgttsv (fortran_int *N, fortran_complex *A, fortran_complex *B, fortran_complex *X, fortran_int *INFO)
 
void API_dgttsv (fortran_int *N, fortran_double *A, fortran_double *B, fortran_double *X, fortran_int *INFO)
 
void API_sgttsv (fortran_int *N, fortran_real *A, fortran_real *B, fortran_real *X, fortran_int *INFO)
 
void API_zgttsv (fortran_int *N, fortran_double_complex *A, fortran_double_complex *B, fortran_double_complex *X, fortran_int *INFO)
 
void thomas (fortran_int *N, fortran_real *A, fortran_real *B, fortran_real *X, fortran_int *INFO)
 Thomas algorithm (tridiagonal solver) for A * X = B.
 
void thomas (fortran_int *N, fortran_double *A, fortran_double *B, fortran_double *X, fortran_int *INFO)
 Thomas algorithm (double-precision).
 
void thomas (fortran_int *N, fortran_complex *A, fortran_complex *B, fortran_complex *X, fortran_int *INFO)
 Thomas algorithm (single-precision complex).
 
void thomas (fortran_int *N, fortran_double_complex *A, fortran_double_complex *B, fortran_double_complex *X, fortran_int *INFO)
 Thomas algorithm (double-precision complex).
 

Function Documentation

◆ API_cgttsv()

void API_cgttsv ( fortran_int N,
fortran_complex A,
fortran_complex B,
fortran_complex X,
fortran_int INFO 
)

◆ API_dgttsv()

void API_dgttsv ( fortran_int N,
fortran_double A,
fortran_double B,
fortran_double X,
fortran_int INFO 
)

◆ API_sgttsv()

void API_sgttsv ( fortran_int N,
fortran_real A,
fortran_real B,
fortran_real X,
fortran_int INFO 
)

◆ API_zgttsv()

void API_zgttsv ( fortran_int N,
fortran_double_complex A,
fortran_double_complex B,
fortran_double_complex X,
fortran_int INFO 
)

◆ thomas() [1/4]

void thomas ( fortran_int N,
fortran_complex A,
fortran_complex B,
fortran_complex X,
fortran_int INFO 
)

Thomas algorithm (single-precision complex).

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
[in]NPointer to the matrix size (N x N).
[in,out]AFlat row-major tridiagonal matrix of size N*N (modified on output).
[in,out]BRight-hand side vector of size N (modified on output).
[out]XSolution vector of size N.
[out]INFOPointer to the return code.

Definition at line 104 of file Thomas.h.

◆ thomas() [2/4]

void thomas ( fortran_int N,
fortran_double A,
fortran_double B,
fortran_double X,
fortran_int INFO 
)

Thomas algorithm (double-precision).

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
[in]NPointer to the matrix size (N x N).
[in,out]AFlat row-major tridiagonal matrix of size N*N (modified on output).
[in,out]BRight-hand side vector of size N (modified on output).
[out]XSolution vector of size N.
[out]INFOPointer to the return code.

Definition at line 90 of file Thomas.h.

◆ thomas() [3/4]

void thomas ( fortran_int N,
fortran_double_complex A,
fortran_double_complex B,
fortran_double_complex X,
fortran_int INFO 
)

Thomas algorithm (double-precision complex).

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
[in]NPointer to the matrix size (N x N).
[in,out]AFlat row-major tridiagonal matrix of size N*N (modified on output).
[in,out]BRight-hand side vector of size N (modified on output).
[out]XSolution vector of size N.
[out]INFOPointer to the return code.

Definition at line 118 of file Thomas.h.

◆ thomas() [4/4]

void thomas ( fortran_int N,
fortran_real A,
fortran_real B,
fortran_real X,
fortran_int INFO 
)

Thomas algorithm (tridiagonal solver) for A * X = B.

Direct solver for tridiagonal linear systems A * X = B using the Thomas algorithm. A is supplied as a full N x N matrix in flat row-major storage and is overwritten during computation.

On output, X contains the solution vector. No pivoting is performed; zero diagonal entries produce failure.

Parameters
[in]NPointer to the matrix size (N x N).
[in,out]AFlat row-major tridiagonal matrix of size N*N (modified on output).
[in,out]BRight-hand side vector of size N (modified on output).
[out]XSolution vector of size N.
[out]INFOPointer to the return code:
  • 0: success
  • < 0: zero diagonal detected at row |INFO|

Definition at line 76 of file Thomas.h.