linalg_lu Module



Interfaces

public interface form_lu

  • private subroutine form_lu_all(lu, ipvt, u, p, err)

    Extracts the L and U matrices from the condensed [L\U] storage format used by the lu_factor.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(inout), dimension(:,:) :: lu

    On input, the N-by-N matrix as output by lu_factor. On output, the N-by-N lower triangular matrix L.

    integer(kind=int32), intent(in), dimension(:) :: ipvt

    The N-element pivot array as output by lu_factor.

    real(kind=real64), intent(out), dimension(:,:) :: u

    An N-by-N matrix where the U matrix will be written.

    real(kind=real64), intent(out), dimension(:,:) :: p

    An N-by-N matrix where the row permutation matrix will be written.

    class(errors), intent(inout), optional, target :: err

    The error object to be updated.

  • private subroutine form_lu_all_cmplx(lu, ipvt, u, p, err)

    Extracts the L and U matrices from the condensed [L\U] storage format used by the lu_factor.

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=real64), intent(inout), dimension(:,:) :: lu

    On input, the N-by-N matrix as output by lu_factor. On output, the N-by-N lower triangular matrix L.

    integer(kind=int32), intent(in), dimension(:) :: ipvt

    The N-element pivot array as output by lu_factor.

    complex(kind=real64), intent(out), dimension(:,:) :: u

    An N-by-N matrix where the U matrix will be written.

    real(kind=real64), intent(out), dimension(:,:) :: p

    An N-by-N matrix where the row permutation matrix will be written.

    class(errors), intent(inout), optional, target :: err

    The error object to be updated.

  • private subroutine form_lu_only(lu, u, err)

    Extracts the L and U matrices from the condensed [L\U] storage format used by the lu_factor.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(inout), dimension(:,:) :: lu

    On input, the N-by-N matrix as output by lu_factor. On output, the N-by-N lower triangular matrix L.

    real(kind=real64), intent(out), dimension(:,:) :: u

    An N-by-N matrix where the U matrix will be written.

    class(errors), intent(inout), optional, target :: err

    The error object to be updated.

  • private subroutine form_lu_only_cmplx(lu, u, err)

    Extracts the L and U matrices from the condensed [L\U] storage format used by the lu_factor.

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=real64), intent(inout), dimension(:,:) :: lu

    On input, the N-by-N matrix as output by lu_factor. On output, the N-by-N lower triangular matrix L.

    complex(kind=real64), intent(out), dimension(:,:) :: u

    An N-by-N matrix where the U matrix will be written.

    class(errors), intent(inout), optional, target :: err

    The error object to be updated.

public interface lu_factor

  • private subroutine lu_factor_dbl(a, ipvt, err)

    Computes the LU factorization of an M-by-N matrix.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(inout), dimension(:,:) :: a

    On input, the M-by-N matrix on which to operate. On output, the LU factored matrix in the form [L\U] where the unit diagonal elements of L are not stored.

    integer(kind=int32), intent(out), dimension(:) :: ipvt

    An MIN(M, N)-element array used to track row-pivot operations. The array stored pivot information such that row I is interchanged with row IPVT(I).

    class(errors), intent(inout), optional, target :: err

    An error object to report any errors that occur.

  • private subroutine lu_factor_cmplx(a, ipvt, err)

    Computes the LU factorization of an M-by-N matrix.

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=real64), intent(inout), dimension(:,:) :: a

    On input, the M-by-N matrix on which to operate. On output, the LU factored matrix in the form [L\U] where the unit diagonal elements of L are not stored.

    integer(kind=int32), intent(out), dimension(:) :: ipvt

    An MIN(M, N)-element array used to track row-pivot operations. The array stored pivot information such that row I is interchanged with row IPVT(I).

    class(errors), intent(inout), optional, target :: err

    An error object to report any errors that occur.

  • private subroutine csr_lu_factor(a, lu, ju, droptol, err)

    Factors a matrix using an LU decomposition.

    Arguments

    Type IntentOptional Attributes Name
    class(csr_matrix), intent(in) :: a

    The matrix to factor.

    type(msr_matrix), intent(out) :: lu

    The LU matrix.

    integer(kind=int32), intent(out), dimension(:) :: ju

    The row tracking array.

    real(kind=real64), intent(in), optional :: droptol

    The drop tolerance for the ILUT factorization.

    class(errors), intent(inout), optional, target :: err

    The error object to be updated.

public interface solve_lu

  • private subroutine solve_lu_mtx(a, ipvt, b, err)

    Solves a system of LU-factored equations.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in), dimension(:,:) :: a

    The N-by-N LU factored matrix as output by lu_factor.

    integer(kind=int32), intent(in), dimension(:) :: ipvt

    The N-element pivot array as output by lu_factor.

    real(kind=real64), intent(inout), dimension(:,:) :: b

    On input, the N-by-NRHS right-hand-side matrix. On output, the N-by-NRHS solution matrix.

    class(errors), intent(inout), optional, target :: err

    The error object to be updated.

  • private subroutine solve_lu_mtx_cmplx(a, ipvt, b, err)

    Solves a system of LU-factored equations.

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=real64), intent(in), dimension(:,:) :: a

    The N-by-N LU factored matrix as output by lu_factor.

    integer(kind=int32), intent(in), dimension(:) :: ipvt

    The N-element pivot array as output by lu_factor.

    complex(kind=real64), intent(inout), dimension(:,:) :: b

    On input, the N-by-NRHS right-hand-side matrix. On output, the N-by-NRHS solution matrix.

    class(errors), intent(inout), optional, target :: err

    The error object to be updated.

  • private subroutine solve_lu_vec(a, ipvt, b, err)

    Solves a system of LU-factored equations.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in), dimension(:,:) :: a

    The N-by-N LU factored matrix as output by lu_factor.

    integer(kind=int32), intent(in), dimension(:) :: ipvt

    The N-element pivot array as output by lu_factor.

    real(kind=real64), intent(inout), dimension(:) :: b

    The N-element right-hand-side array.

    class(errors), intent(inout), optional, target :: err

    The error object to be updated.

  • private subroutine solve_lu_vec_cmplx(a, ipvt, b, err)

    Solves a system of LU-factored equations.

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=real64), intent(in), dimension(:,:) :: a

    The N-by-N LU factored matrix as output by lu_factor.

    integer(kind=int32), intent(in), dimension(:) :: ipvt

    The N-element pivot array as output by lu_factor.

    complex(kind=real64), intent(inout), dimension(:) :: b

    The N-element right-hand-side array.

    class(errors), intent(inout), optional, target :: err

    The error object to be updated.

  • private subroutine csr_lu_solve(lu, ju, b, x, err)

    Solves a linear system using an LU decomposition.

    Arguments

    Type IntentOptional Attributes Name
    class(msr_matrix), intent(in) :: lu

    The LU matrix.

    integer(kind=int32), intent(in), dimension(:) :: ju

    The row tracking array.

    real(kind=real64), intent(in), dimension(:) :: b

    The right-hand side.

    real(kind=real64), intent(out), dimension(:) :: x

    The solution.

    class(errors), intent(inout), optional, target :: err

    The error object to be updated.