Processing math: 100%

linalg_cholesky Module


Uses


Interfaces

public interface cholesky_factor

  • private subroutine cholesky_factor_dbl(a, upper, err)

    Computes the Cholesky factorization of a symmetric, positive definite matrix.

    Arguments

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

    On input, the N-by-N matrix to factor. On output, the factored matrix is returned in either the upper or lower triangular portion of the matrix, dependent upon the value of upper.

    logical, intent(in), optional :: upper

    An optional input that, if specified, provides control over whether the factorization is computed as A=UTU (set to true), or as A=LLT (set to false). The default is true such that A=UTU.

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

    The error object to be updated.

  • private subroutine cholesky_factor_cmplx(a, upper, err)

    Computes the Cholesky factorization of a symmetric, positive definite matrix.

    Arguments

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

    On input, the N-by-N matrix to factor. On output, the factored matrix is returned in either the upper or lower triangular portion of the matrix, dependent upon the value of upper.

    logical, intent(in), optional :: upper

    An optional input that, if specified, provides control over whether the factorization is computed as A=UHU (set to true), or as A=LLH (set to false). The default is true such that A=UHU.

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

    The error object to be updated.

public interface cholesky_rank1_downdate

  • private subroutine cholesky_rank1_downdate_dbl(r, u, work, err)

    Computes the rank 1 downdate to a Cholesky factored matrix A=RTR such that A1=AuuT. This operation only works if the new matrix A1 is positive definite.

    Arguments

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

    On input, the N-by-N upper triangular matrix R. On output, the updated matrix R1.

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

    On input, the N-element vector u. On output, the rotation sines used to transform R to R1.

    real(kind=real64), intent(out), optional, target, dimension(:) :: work

    An optional argument that if supplied prevents local memory allocation. If provided, the array must have at least N elements.
    Additionally, this workspace array is used to contain the rotation cosines used to transform R to R1.

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

    An error object to report any errors that occur.

  • private subroutine cholesky_rank1_downdate_cmplx(r, u, work, err)

    Computes the rank 1 downdate to a Cholesky factored matrix A=RHR such that A1=AuuH. This operation only works if the new matrix A1 is positive definite.

    Arguments

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

    On input, the N-by-N upper triangular matrix R. On output, the updated matrix R1.

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

    On input, the N-element vector u. On output, the rotation sines used to transform R to R1.

    real(kind=real64), intent(out), optional, target, dimension(:) :: work

    An optional argument that if supplied prevents local memory allocation. If provided, the array must have at least N elements.
    Additionally, this workspace array is used to contain the rotation cosines used to transform R to R1.

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

    An error object to report any errors that occur.

public interface cholesky_rank1_update

  • private subroutine cholesky_rank1_update_dbl(r, u, work, err)

    Computes the rank 1 update to a Cholesky factored matrix A=RTR such that A1=A+uuT.

    Arguments

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

    On input, the N-by-N upper triangular matrix R. On output, the updated matrix R1.

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

    On input, the N-element vector u. On output, the rotation sines used to transform R to R1.

    real(kind=real64), intent(out), optional, target, dimension(:) :: work

    An optional argument that if supplied prevents local memory allocation. If provided, the array must have at least N elements.
    Additionally, this workspace array is used to contain the rotation cosines used to transform R to R1.

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

    An error object to report any errors that occur.

  • private subroutine cholesky_rank1_update_cmplx(r, u, work, err)

    Computes the rank 1 update to a Cholesky factored matrix A=RHR such that A1=A+uuH.

    Arguments

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

    On input, the N-by-N upper triangular matrix R. On output, the updated matrix R1.

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

    On input, the N-element vector u. On output, the rotation sines used to transform R to R1.

    real(kind=real64), intent(out), optional, target, dimension(:) :: work

    An optional argument that if supplied prevents local memory allocation. If provided, the array must have at least N elements.
    Additionally, this workspace array is used to contain the rotation cosines used to transform R to R1.

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

    An error object to report any errors that occur.

public interface solve_cholesky

  • private subroutine solve_cholesky_mtx(upper, a, b, err)

    Solves the system of Cholesky factored equations AX=RTRX=B or AX=LLTX=B.

    Arguments

    Type IntentOptional Attributes Name
    logical, intent(in) :: upper

    Set to true if A is factored such that A=RTR; else, set to false if A is factored such that A=LLT.

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

    The N-by-N Cholesky factored matrix as returned by cholesky_factor.

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

    On input, the N-by-NRHS matrix B. On output, the resulting N-by-NRHS matrix X.

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

    An error object to report any errors that occur.

  • private subroutine solve_cholesky_mtx_cmplx(upper, a, b, err)

    Solves the system of Cholesky factored equations AX=RHRX=B or AX=LLHX=B.

    Arguments

    Type IntentOptional Attributes Name
    logical, intent(in) :: upper

    Set to true if A is factored such that A=RHR; else, set to false if A is factored such that A=LLH.

    complex(kind=real64), intent(in), dimension(:,:) :: a

    The N-by-N Cholesky factored matrix as returned by cholesky_factor.

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

    On input, the N-by-NRHS matrix B. On output, the resulting N-by-NRHS matrix X.

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

    An error object to report any errors that occur.

  • private subroutine solve_cholesky_vec(upper, a, b, err)

    Solves the system of Cholesky factored equations Ax=RTRx=b or Ax=LLTx=b.

    Arguments

    Type IntentOptional Attributes Name
    logical, intent(in) :: upper

    Set to true if A is factored such that A=RTR; else, set to false if A is factored such that A=LLT.

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

    The N-by-N Cholesky factored matrix as returned by cholesky_factor.

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

    On input, the N-element vector b. On output, the resulting N-element vector x.

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

    An error object to report any errors that occur.

  • private module subroutine solve_cholesky_vec_cmplx(upper, a, b, err)

    Solves the system of Cholesky factored equations Ax=RHRx=b or Ax=LLHx=b.

    Arguments

    Type IntentOptional Attributes Name
    logical, intent(in) :: upper

    Set to true if A is factored such that A=RHR; else, set to false if A is factored such that A=LLH.

    complex(kind=real64), intent(in), dimension(:,:) :: a

    The N-by-N Cholesky factored matrix as returned by cholesky_factor.

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

    On input, the N-element vector b. On output, the resulting N-element vector x.

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

    An error object to report any errors that occur.