OpenFAST
Wind turbine multiphysics simulator
|
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... | |
Compute the SVD for a general matrix A = USV^T.
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.
[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] | m | The number of rows of the input matrix A. M >= 0. |
[in] | n | The number of columns of the input matrix A. N >= 0. |
[in,out] | a | A 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] | s | S is DOUBLE PRECISION array, dimension (min(M,N)) The singular values of A, sorted so that S(i) >= S(i+1). |
[out] | u | U 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] | vt | VT 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] | work | dimension (MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal LWORK. |
[in] | lwork | The dimension of the array WORK. LWORK >= MAX(1,5*MIN(M,N)) for the paths (see comments inside code):
|
[out] | errstat | Error level |
[out] | errmsg | Message describing error |
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.
[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] | m | The number of rows of the input matrix A. M >= 0. |
[in] | n | The number of columns of the input matrix A. N >= 0. |
[in,out] | a | A 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] | s | S is SINGLE PRECISION array, dimension (min(M,N)) The singular values of A, sorted so that S(i) >= S(i+1). |
[out] | u | U 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] | vt | VT 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] | work | dimension (MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal LWORK. |
[in] | lwork | The dimension of the array WORK. LWORK >= MAX(1,5*MIN(M,N)) for the paths (see comments inside code):
|
[out] | errstat | Error level |
[out] | errmsg | Message describing error |