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

Go to the source code of this file.

Functions

void API_cgegssv (fortran_int *N, fortran_complex *A, fortran_complex *B, fortran_complex *X, fortran_int *MAX_ITER, fortran_real *TOL, fortran_real *OMEGA, fortran_int *STATUS)
 
void API_dgegssv (fortran_int *N, fortran_double *A, fortran_double *B, fortran_double *X, fortran_int *MAX_ITER, fortran_double *TOL, fortran_double *OMEGA, fortran_int *STATUS)
 
void API_sgegssv (fortran_int *N, fortran_real *A, fortran_real *B, fortran_real *X, fortran_int *MAX_ITER, fortran_real *TOL, fortran_real *OMEGA, fortran_int *STATUS)
 
void API_zgegssv (fortran_int *N, fortran_double_complex *A, fortran_double_complex *B, fortran_double_complex *X, fortran_int *MAX_ITER, fortran_double *TOL, fortran_double *OMEGA, fortran_int *STATUS)
 
void gaussSeidel (fortran_int *N, fortran_real *A, fortran_real *B, fortran_real *X, fortran_int *MAX_ITER, fortran_real *TOL, fortran_int *STATUS, fortran_real OMEGA=1.0)
 Gauss-Seidel iterative solver for A * X = B.
 
void gaussSeidel (fortran_int *N, fortran_double *A, fortran_double *B, fortran_double *X, fortran_int *MAX_ITER, fortran_double *TOL, fortran_int *STATUS, fortran_double OMEGA=1.0)
 Gauss-Seidel iterative solver (double-precision).
 
void gaussSeidel (fortran_int *N, fortran_complex *A, fortran_complex *B, fortran_complex *X, fortran_int *MAX_ITER, fortran_real *TOL, fortran_int *STATUS, fortran_real OMEGA=1.0)
 Gauss-Seidel iterative solver (single-precision complex).
 
void gaussSeidel (fortran_int *N, fortran_double_complex *A, fortran_double_complex *B, fortran_double_complex *X, fortran_int *MAX_ITER, fortran_double *TOL, fortran_int *STATUS, fortran_double OMEGA=1.0)
 Gauss-Seidel iterative solver (double-precision complex).
 

Function Documentation

◆ API_cgegssv()

void API_cgegssv ( fortran_int N,
fortran_complex A,
fortran_complex B,
fortran_complex X,
fortran_int MAX_ITER,
fortran_real TOL,
fortran_real OMEGA,
fortran_int STATUS 
)

◆ API_dgegssv()

void API_dgegssv ( fortran_int N,
fortran_double A,
fortran_double B,
fortran_double X,
fortran_int MAX_ITER,
fortran_double TOL,
fortran_double OMEGA,
fortran_int STATUS 
)

◆ API_sgegssv()

void API_sgegssv ( fortran_int N,
fortran_real A,
fortran_real B,
fortran_real X,
fortran_int MAX_ITER,
fortran_real TOL,
fortran_real OMEGA,
fortran_int STATUS 
)

◆ API_zgegssv()

void API_zgegssv ( fortran_int N,
fortran_double_complex A,
fortran_double_complex B,
fortran_double_complex X,
fortran_int MAX_ITER,
fortran_double TOL,
fortran_double OMEGA,
fortran_int STATUS 
)

◆ gaussSeidel() [1/4]

void gaussSeidel ( fortran_int N,
fortran_complex A,
fortran_complex B,
fortran_complex X,
fortran_int MAX_ITER,
fortran_real TOL,
fortran_int STATUS,
fortran_real  OMEGA = 1.0 
)

Gauss-Seidel iterative solver (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 size of the matrix (N x N).
[in]AFlat row-major input matrix of size N*N.
[in]BRight-hand side vector of size N.
[in,out]XOn input: initial guess. On output: solution vector.
[in]MAX_ITERPointer to the maximum number of iterations.
[in]TOLPointer to the convergence tolerance (REAL).
[out]STATUSPointer to the return code.
[in]OMEGARelaxation factor (default = 1.0).

Definition at line 121 of file GaussSeidel.h.

◆ gaussSeidel() [2/4]

void gaussSeidel ( fortran_int N,
fortran_double A,
fortran_double B,
fortran_double X,
fortran_int MAX_ITER,
fortran_double TOL,
fortran_int STATUS,
fortran_double  OMEGA = 1.0 
)

Gauss-Seidel iterative solver (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 size of the matrix (N x N).
[in]AFlat row-major input matrix of size N*N.
[in]BRight-hand side vector of size N.
[in,out]XOn input: initial guess. On output: solution vector.
[in]MAX_ITERPointer to the maximum number of iterations.
[in]TOLPointer to the convergence tolerance.
[out]STATUSPointer to the return code.
[in]OMEGARelaxation factor (default = 1.0).

Definition at line 103 of file GaussSeidel.h.

◆ gaussSeidel() [3/4]

void gaussSeidel ( fortran_int N,
fortran_double_complex A,
fortran_double_complex B,
fortran_double_complex X,
fortran_int MAX_ITER,
fortran_double TOL,
fortran_int STATUS,
fortran_double  OMEGA = 1.0 
)

Gauss-Seidel iterative solver (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 size of the matrix (N x N).
[in]AFlat row-major input matrix of size N*N.
[in]BRight-hand side vector of size N.
[in,out]XOn input: initial guess. On output: solution vector.
[in]MAX_ITERPointer to the maximum number of iterations.
[in]TOLPointer to the convergence tolerance (DOUBLE).
[out]STATUSPointer to the return code.
[in]OMEGARelaxation factor (default = 1.0).

Definition at line 139 of file GaussSeidel.h.

◆ gaussSeidel() [4/4]

void gaussSeidel ( fortran_int N,
fortran_real A,
fortran_real B,
fortran_real X,
fortran_int MAX_ITER,
fortran_real TOL,
fortran_int STATUS,
fortran_real  OMEGA = 1.0 
)

Gauss-Seidel iterative solver for A * X = B.

Solves the linear system A * X = B using the iterative Gauss-Seidel method with optional successive over-relaxation (SOR). A is a square N x N matrix in flat row-major array format.

On input, X contains the initial guess. On output, X contains the computed solution. Convergence is based on maximum absolute difference per iteration.

Parameters
[in]NPointer to the size of the matrix (N x N).
[in]AFlat row-major input matrix of size N*N.
[in]BRight-hand side vector of size N.
[in,out]XOn input: initial guess. On output: solution vector.
[in]MAX_ITERPointer to the maximum number of iterations.
[in]TOLPointer to the convergence tolerance.
[out]STATUSPointer to the return code:
  • 0: success (converged)
  • > 0: did not converge within MAX_ITER iterations
  • < 0: zero diagonal element detected at row |STATUS|
[in]OMEGARelaxation factor (default = 1.0, i.e. standard Gauss-Seidel).

Definition at line 85 of file GaussSeidel.h.