OpenFAST
Wind turbine multiphysics simulator
Public Member Functions | List of all members
nwtc_lapack::lapack_gesvd Interface Reference

Compute the SVD for a general matrix A = USV^T. More...

Public Member Functions

subroutine lapack_dgesvd (JOBU, JOBVT, M, N, A, S, U, VT, WORK, LWORK, ErrStat, ErrMsg)
 Compute singular value decomposition (SVD) for a general matrix, A. More...
 
subroutine lapack_sgesvd (JOBU, JOBVT, M, N, A, S, U, VT, WORK, LWORK, ErrStat, ErrMsg)
 Compute singular value decomposition (SVD) for a general matrix, A. More...
 

Detailed Description

Compute the SVD for a general matrix A = USV^T.

Member Function/Subroutine Documentation

◆ lapack_dgesvd()

subroutine nwtc_lapack::lapack_gesvd::lapack_dgesvd ( character(1), intent(in)  JOBU,
character(1), intent(in)  JOBVT,
integer, intent(in)  M,
integer, intent(in)  N,
real(r8ki), dimension( :, : ), intent(inout)  A,
real(r8ki), dimension( : ), intent(out)  S,
real(r8ki), dimension( :, : ), intent(out)  U,
real(r8ki), dimension( :, : ), intent(out)  VT,
real(r8ki), dimension( : ), intent(inout)  WORK,
integer, intent(in)  LWORK,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

Compute singular value decomposition (SVD) for a general matrix, A.

use LAPACK_DGESVD (nwtc_lapack::lapack_dgesvd) instead of this specific function.

Parameters
[in]jobu'A': all M columns of U are returned in array U; 'S': the first min(m,n) columns of U (the left singular vectors) are returned in the array U; 'O': the first min(m,n) columns of U (the left singular vectors) are overwritten on the array A; 'N': no columns of U (no left singular vectors) are computed.
[in]jobvt'A': all N rows of V^T are returned in the array VT; 'S': the first min(m,n) rows of V^T (the right singular vectors) are returned in the array VT; 'O': the first min(m,n) rows of V^T (the right singular vectors) are overwritten on the array A; 'N': no rows of V**T (no right singular vectors) are computed.
[in]mThe number of rows of the input matrix A. M >= 0.
[in]nThe number of columns of the input matrix A. N >= 0.
[in,out]aA is DOUBLE PRECISION array, dimension (LDA,N) On entry, the M-by-N matrix A. On exit, if JOBU = 'O', A is overwritten with the first min(m,n) columns of U (the left singular vectors, stored columnwise); if JOBVT = 'O', A is overwritten with the first min(m,n) rows of V**T (the right singular vectors, stored rowwise); if JOBU .ne. 'O' and JOBVT .ne. 'O', the contents of A are destroyed.
[out]sS is DOUBLE PRECISION array, dimension (min(M,N)) The singular values of A, sorted so that S(i) >= S(i+1).
[out]uU is DOUBLE PRECISION array, dimension (LDU,UCOL) (LDU,M) if JOBU = 'A' or (LDU,min(M,N)) if JOBU = 'S'. If JOBU = 'A', U contains the M-by-M orthogonal matrix U; if JOBU = 'S', U contains the first min(m,n) columns of U (the left singular vectors, stored columnwise); if JOBU = 'N' or 'O', U is not referenced.
[out]vtVT is DOUBLE PRECISION array, dimension (LDVT,N) If JOBVT = 'A', VT contains the N-by-N orthogonal matrix V**T; if JOBVT = 'S', VT contains the first min(m,n) rows of V**T (the right singular vectors, stored rowwise); if JOBVT = 'N' or 'O', VT is not referenced.
[in,out]workdimension (MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
[in]lworkThe dimension of the array WORK. LWORK >= MAX(1,5*MIN(M,N)) for the paths (see comments inside code):
  • PATH 1 (M much larger than N, JOBU='N')
  • PATH 1t (N much larger than M, JOBVT='N') LWORK >= MAX(1,3*MIN(M,N) + MAX(M,N),5*MIN(M,N)) for the other paths For good performance, LWORK should generally be larger. If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.
[out]errstatError level
[out]errmsgMessage describing error

◆ lapack_sgesvd()

subroutine nwtc_lapack::lapack_gesvd::lapack_sgesvd ( character(1), intent(in)  JOBU,
character(1), intent(in)  JOBVT,
integer, intent(in)  M,
integer, intent(in)  N,
real(siki), dimension( :, : ), intent(inout)  A,
real(siki), dimension( : ), intent(out)  S,
real(siki), dimension( :, : ), intent(out)  U,
real(siki), dimension( :, : ), intent(out)  VT,
real(siki), dimension( : ), intent(inout)  WORK,
integer, intent(in)  LWORK,
integer(intki), intent(out)  ErrStat,
character(*), intent(out)  ErrMsg 
)

Compute singular value decomposition (SVD) for a general matrix, A.

use LAPACK_SGESVD (nwtc_lapack::lapack_sgesvd) instead of this specific function.

Parameters
[in]jobu'A': all M columns of U are returned in array U; 'S': the first min(m,n) columns of U (the left singular vectors) are returned in the array U; 'O': the first min(m,n) columns of U (the left singular vectors) are overwritten on the array A; 'N': no columns of U (no left singular vectors) are computed.
[in]jobvt'A': all N rows of V^T are returned in the array VT; 'S': the first min(m,n) rows of V^T (the right singular vectors) are returned in the array VT; 'O': the first min(m,n) rows of V^T (the right singular vectors) are overwritten on the array A; 'N': no rows of V**T (no right singular vectors) are computed.
[in]mThe number of rows of the input matrix A. M >= 0.
[in]nThe number of columns of the input matrix A. N >= 0.
[in,out]aA is SINGLE PRECISION array, dimension (LDA,N) On entry, the M-by-N matrix A. On exit, if JOBU = 'O', A is overwritten with the first min(m,n) columns of U (the left singular vectors, stored columnwise); if JOBVT = 'O', A is overwritten with the first min(m,n) rows of V**T (the right singular vectors, stored rowwise); if JOBU .ne. 'O' and JOBVT .ne. 'O', the contents of A are destroyed.
[out]sS is SINGLE PRECISION array, dimension (min(M,N)) The singular values of A, sorted so that S(i) >= S(i+1).
[out]uU is SINGLE PRECISION array, dimension (LDU,UCOL) (LDU,M) if JOBU = 'A' or (LDU,min(M,N)) if JOBU = 'S'. If JOBU = 'A', U contains the M-by-M orthogonal matrix U; if JOBU = 'S', U contains the first min(m,n) columns of U (the left singular vectors, stored columnwise); if JOBU = 'N' or 'O', U is not referenced.
[out]vtVT is SINGLE PRECISION array, dimension (LDVT,N) If JOBVT = 'A', VT contains the N-by-N orthogonal matrix V**T; if JOBVT = 'S', VT contains the first min(m,n) rows of V**T (the right singular vectors, stored rowwise); if JOBVT = 'N' or 'O', VT is not referenced.
[in,out]workdimension (MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
[in]lworkThe dimension of the array WORK. LWORK >= MAX(1,5*MIN(M,N)) for the paths (see comments inside code):
  • PATH 1 (M much larger than N, JOBU='N')
  • PATH 1t (N much larger than M, JOBVT='N') LWORK >= MAX(1,3*MIN(M,N) + MAX(M,N),5*MIN(M,N)) for the other paths For good performance, LWORK should generally be larger. If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.
[out]errstatError level
[out]errmsgMessage describing error

The documentation for this interface was generated from the following file: