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

Go to the source code of this file.

Functions

void API_cgejsv (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_dgejsv (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_sgejsv (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_zgejsv (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 jacobi (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)
 Jacobi iterative solver for A * X = B.
 
void jacobi (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)
 Jacobi iterative solver (double-precision).
 
void jacobi (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)
 Jacobi iterative solver (single-precision complex).
 
void jacobi (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)
 Jacobi iterative solver (double-precision complex).
 

Function Documentation

◆ API_cgejsv()

void API_cgejsv ( 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_dgejsv()

void API_dgejsv ( 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_sgejsv()

void API_sgejsv ( 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_zgejsv()

void API_zgejsv ( 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 
)

◆ jacobi() [1/4]

void jacobi ( 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 
)

Jacobi 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 Jacobi.h.

◆ jacobi() [2/4]

void jacobi ( 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 
)

Jacobi 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 Jacobi.h.

◆ jacobi() [3/4]

void jacobi ( 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 
)

Jacobi 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 Jacobi.h.

◆ jacobi() [4/4]

void jacobi ( 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 
)

Jacobi iterative solver for A * X = B.

Solves the linear system A * X = B using the iterative Jacobi method with optional relaxation. 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 Jacobi).

Definition at line 85 of file Jacobi.h.