|
fortran-lapack
|
Solve a system of linear equations A * X = B. More...
Public Member Functions | |
| real(sp) function, dimension(:), allocatable, target | la_ssolve_one (a, b, overwrite_a, err) |
| Linear system solve, _one, real(sp) | |
| real(dp) function, dimension(:), allocatable, target | la_dsolve_one (a, b, overwrite_a, err) |
| Linear system solve, _one, real(dp) | |
| real(qp) function, dimension(:), allocatable, target | la_qsolve_one (a, b, overwrite_a, err) |
| Linear system solve, _one, real(qp) | |
| complex(sp) function, dimension(:), allocatable, target | la_csolve_one (a, b, overwrite_a, err) |
| Linear system solve, _one, complex(sp) | |
| complex(dp) function, dimension(:), allocatable, target | la_zsolve_one (a, b, overwrite_a, err) |
| Linear system solve, _one, complex(dp) | |
| complex(qp) function, dimension(:), allocatable, target | la_wsolve_one (a, b, overwrite_a, err) |
| Linear system solve, _one, complex(qp) | |
| real(sp) function, dimension(:,:), allocatable, target | la_ssolve_multiple (a, b, overwrite_a, err) |
| Linear system solve, _multiple, real(sp) | |
| real(dp) function, dimension(:,:), allocatable, target | la_dsolve_multiple (a, b, overwrite_a, err) |
| Linear system solve, _multiple, real(dp) | |
| real(qp) function, dimension(:,:), allocatable, target | la_qsolve_multiple (a, b, overwrite_a, err) |
| Linear system solve, _multiple, real(qp) | |
| complex(sp) function, dimension(:,:), allocatable, target | la_csolve_multiple (a, b, overwrite_a, err) |
| Linear system solve, _multiple, complex(sp) | |
| complex(dp) function, dimension(:,:), allocatable, target | la_zsolve_multiple (a, b, overwrite_a, err) |
| Linear system solve, _multiple, complex(dp) | |
| complex(qp) function, dimension(:,:), allocatable, target | la_wsolve_multiple (a, b, overwrite_a, err) |
| Linear system solve, _multiple, complex(qp) | |
Solve a system of linear equations A * X = B.
This function computes the solution to a real system of linear equations:
\( A \cdot X = B \)
where A is an n x n square matrix, and B is either a vector (n) or a matrix (n x nrhs). The solution X is returned as an allocatable array.
| [in,out] | A | The input square matrix of size n x n. If overwrite_a is true, the contents of A may be modified during computation. |
| [in] | B | The right-hand side vector (size n) or matrix (size n x nrhs). |
| [in] | overwrite_a | (Optional) If true, A may be overwritten and destroyed. Default is false. |
| [out] | err | (Optional) A state return flag. If an error occurs and err is not provided, the function will stop execution. |
n (for a single right-hand side) or n x nrhs.*GESV.overwrite_a is enabled, the original contents of A may be lost.Solve a system of linear equations A * X = B into a pre-allocated array.
Subroutine interface for solving a linear system through an LU factorization.
This interface solves the linear system
\( A \cdot X = B \)
writing the result into the caller's array x instead of returning a new one. Storage for the pivot indices may also be provided; when both x and pivot are given and overwrite_a is set, the call performs no internal allocation. One (b(:)) or many (b(:,:)) right-hand sides are solved at once.
| [in,out] | a | The input square matrix of size n x n. If overwrite_a is true, the contents of A may be modified during computation. |
| [in] | b | The right-hand side vector (size n) or matrix (size n x nrhs). |
| [in,out] | x | The solution vector (size n) or matrix (size n x nrhs), overwritten on return. |
| [in,out] | pivot | (Optional) Storage array for the n diagonal pivot indices. |
| [in] | overwrite_a | (Optional) If true, A may be overwritten and destroyed. Default is false. |
| [out] | err | (Optional) A state return flag. If an error occurs and err is not provided, the subroutine will stop execution. |
overwrite_a is enabled, the original contents of A may be lost.Solve a Hermitian positive definite system A * X = B.
Subroutine interface for factorizing and solving a Cholesky system in one call.
This interface computes the Cholesky factorization of the real symmetric or complex Hermitian positive definite matrix A and solves
\( A \cdot X = B \)
for one (b(:)) or many (b(:,:)) right-hand sides, writing the result into the caller's array x. Only the triangle lower selects is read.
| [in,out] | a | The input matrix of size n x n. If overwrite_a is true, it is overwritten with its Cholesky factor. |
| [in] | b | The right-hand side vector (size n) or matrix (size n x nrhs). |
| [in,out] | x | The solution vector (size n) or matrix (size n x nrhs), overwritten on return. |
| [in] | lower | (Optional) If true, the lower triangle of A is used. Default is true. |
| [in] | overwrite_a | (Optional) If true, A may be overwritten and destroyed. Default is false. |
| [out] | err | (Optional) A state return flag. If an error occurs and err is not provided, the subroutine will stop execution. |
overwrite_a is enabled, the original contents of A may be lost.Solve A * X = B from a pre-computed lower Cholesky factor.
Subroutine interface for solving with the lower triangular factor of \( A = L \cdot L^H \).
This interface solves \( A \cdot X = B \) for one or many right-hand sides, given the lower Cholesky factor of A as returned by cholesky with lower=.true.. The factor is not recomputed, so a repeated solve of the same system costs two triangular solves.
| [in] | l | The lower Cholesky factor of size n x n. |
| [in] | b | The right-hand side vector (size n) or matrix (size n x nrhs). |
| [in,out] | x | The solution vector (size n) or matrix (size n x nrhs), overwritten on return. |
| [out] | err | (Optional) A state return flag. If an error occurs and err is not provided, the subroutine will stop execution. |
Solve A * X = B from a pre-computed upper Cholesky factor.
Subroutine interface for solving with the upper triangular factor of \( A = U^H \cdot U \).
This interface solves \( A \cdot X = B \) for one or many right-hand sides, given the upper Cholesky factor of A as returned by cholesky with lower=.false.. The factor is not recomputed, so a repeated solve of the same system costs two triangular solves.
| [in] | u | The upper Cholesky factor of size n x n. |
| [in] | b | The right-hand side vector (size n) or matrix (size n x nrhs). |
| [in,out] | x | The solution vector (size n) or matrix (size n x nrhs), overwritten on return. |
| [out] | err | (Optional) A state return flag. If an error occurs and err is not provided, the subroutine will stop execution. |
| complex(sp) function, dimension(:,:), allocatable, target la_solve::solve::la_csolve_multiple | ( | complex(sp), dimension(:,:), intent(inout), target | a, |
| complex(sp), dimension(:,:), intent(in) | b, | ||
| logical(lk), intent(in), optional | overwrite_a, | ||
| type(la_state), intent(out), optional | err ) |
Linear system solve, _multiple, complex(sp)
| [in,out] | a | Input matrix a[n,n] |
| [in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
| [in] | overwrite_a | [optional] Can A data be overwritten and destroyed? |
| [out] | err | [optional] state return flag. On error if not requested, the code will stop |
| complex(sp) function, dimension(:), allocatable, target la_solve::solve::la_csolve_one | ( | complex(sp), dimension(:,:), intent(inout), target | a, |
| complex(sp), dimension(:), intent(in) | b, | ||
| logical(lk), intent(in), optional | overwrite_a, | ||
| type(la_state), intent(out), optional | err ) |
Linear system solve, _one, complex(sp)
| [in,out] | a | Input matrix a[n,n] |
| [in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
| [in] | overwrite_a | [optional] Can A data be overwritten and destroyed? |
| [out] | err | [optional] state return flag. On error if not requested, the code will stop |
| real(dp) function, dimension(:,:), allocatable, target la_solve::solve::la_dsolve_multiple | ( | real(dp), dimension(:,:), intent(inout), target | a, |
| real(dp), dimension(:,:), intent(in) | b, | ||
| logical(lk), intent(in), optional | overwrite_a, | ||
| type(la_state), intent(out), optional | err ) |
Linear system solve, _multiple, real(dp)
| [in,out] | a | Input matrix a[n,n] |
| [in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
| [in] | overwrite_a | [optional] Can A data be overwritten and destroyed? |
| [out] | err | [optional] state return flag. On error if not requested, the code will stop |
| real(dp) function, dimension(:), allocatable, target la_solve::solve::la_dsolve_one | ( | real(dp), dimension(:,:), intent(inout), target | a, |
| real(dp), dimension(:), intent(in) | b, | ||
| logical(lk), intent(in), optional | overwrite_a, | ||
| type(la_state), intent(out), optional | err ) |
Linear system solve, _one, real(dp)
| [in,out] | a | Input matrix a[n,n] |
| [in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
| [in] | overwrite_a | [optional] Can A data be overwritten and destroyed? |
| [out] | err | [optional] state return flag. On error if not requested, the code will stop |
| real(qp) function, dimension(:,:), allocatable, target la_solve::solve::la_qsolve_multiple | ( | real(qp), dimension(:,:), intent(inout), target | a, |
| real(qp), dimension(:,:), intent(in) | b, | ||
| logical(lk), intent(in), optional | overwrite_a, | ||
| type(la_state), intent(out), optional | err ) |
Linear system solve, _multiple, real(qp)
| [in,out] | a | Input matrix a[n,n] |
| [in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
| [in] | overwrite_a | [optional] Can A data be overwritten and destroyed? |
| [out] | err | [optional] state return flag. On error if not requested, the code will stop |
| real(qp) function, dimension(:), allocatable, target la_solve::solve::la_qsolve_one | ( | real(qp), dimension(:,:), intent(inout), target | a, |
| real(qp), dimension(:), intent(in) | b, | ||
| logical(lk), intent(in), optional | overwrite_a, | ||
| type(la_state), intent(out), optional | err ) |
Linear system solve, _one, real(qp)
| [in,out] | a | Input matrix a[n,n] |
| [in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
| [in] | overwrite_a | [optional] Can A data be overwritten and destroyed? |
| [out] | err | [optional] state return flag. On error if not requested, the code will stop |
| real(sp) function, dimension(:,:), allocatable, target la_solve::solve::la_ssolve_multiple | ( | real(sp), dimension(:,:), intent(inout), target | a, |
| real(sp), dimension(:,:), intent(in) | b, | ||
| logical(lk), intent(in), optional | overwrite_a, | ||
| type(la_state), intent(out), optional | err ) |
Linear system solve, _multiple, real(sp)
| [in,out] | a | Input matrix a[n,n] |
| [in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
| [in] | overwrite_a | [optional] Can A data be overwritten and destroyed? |
| [out] | err | [optional] state return flag. On error if not requested, the code will stop |
| real(sp) function, dimension(:), allocatable, target la_solve::solve::la_ssolve_one | ( | real(sp), dimension(:,:), intent(inout), target | a, |
| real(sp), dimension(:), intent(in) | b, | ||
| logical(lk), intent(in), optional | overwrite_a, | ||
| type(la_state), intent(out), optional | err ) |
Linear system solve, _one, real(sp)
| [in,out] | a | Input matrix a[n,n] |
| [in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
| [in] | overwrite_a | [optional] Can A data be overwritten and destroyed? |
| [out] | err | [optional] state return flag. On error if not requested, the code will stop |
| complex(qp) function, dimension(:,:), allocatable, target la_solve::solve::la_wsolve_multiple | ( | complex(qp), dimension(:,:), intent(inout), target | a, |
| complex(qp), dimension(:,:), intent(in) | b, | ||
| logical(lk), intent(in), optional | overwrite_a, | ||
| type(la_state), intent(out), optional | err ) |
Linear system solve, _multiple, complex(qp)
| [in,out] | a | Input matrix a[n,n] |
| [in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
| [in] | overwrite_a | [optional] Can A data be overwritten and destroyed? |
| [out] | err | [optional] state return flag. On error if not requested, the code will stop |
| complex(qp) function, dimension(:), allocatable, target la_solve::solve::la_wsolve_one | ( | complex(qp), dimension(:,:), intent(inout), target | a, |
| complex(qp), dimension(:), intent(in) | b, | ||
| logical(lk), intent(in), optional | overwrite_a, | ||
| type(la_state), intent(out), optional | err ) |
Linear system solve, _one, complex(qp)
| [in,out] | a | Input matrix a[n,n] |
| [in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
| [in] | overwrite_a | [optional] Can A data be overwritten and destroyed? |
| [out] | err | [optional] state return flag. On error if not requested, the code will stop |
| complex(dp) function, dimension(:,:), allocatable, target la_solve::solve::la_zsolve_multiple | ( | complex(dp), dimension(:,:), intent(inout), target | a, |
| complex(dp), dimension(:,:), intent(in) | b, | ||
| logical(lk), intent(in), optional | overwrite_a, | ||
| type(la_state), intent(out), optional | err ) |
Linear system solve, _multiple, complex(dp)
| [in,out] | a | Input matrix a[n,n] |
| [in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
| [in] | overwrite_a | [optional] Can A data be overwritten and destroyed? |
| [out] | err | [optional] state return flag. On error if not requested, the code will stop |
| complex(dp) function, dimension(:), allocatable, target la_solve::solve::la_zsolve_one | ( | complex(dp), dimension(:,:), intent(inout), target | a, |
| complex(dp), dimension(:), intent(in) | b, | ||
| logical(lk), intent(in), optional | overwrite_a, | ||
| type(la_state), intent(out), optional | err ) |
Linear system solve, _one, complex(dp)
| [in,out] | a | Input matrix a[n,n] |
| [in] | b | Right hand side vector or array, b[n] or b[n,nrhs] |
| [in] | overwrite_a | [optional] Can A data be overwritten and destroyed? |
| [out] | err | [optional] state return flag. On error if not requested, the code will stop |