gedmd#
Functions
-
void sgedmd(const char *jobs, const char *jobz, const char *jobr, const char *jobf, const INT whtsvd, const INT m, const INT n, f32 *restrict X, const INT ldx, f32 *restrict Y, const INT ldy, const INT nrnk, const f32 tol, INT *k, f32 *restrict reig, f32 *restrict imeig, f32 *restrict Z, const INT ldz, f32 *restrict res, f32 *restrict B, const INT ldb, f32 *restrict W, const INT ldw, f32 *restrict S, const INT lds, f32 *restrict work, const INT lwork, INT *restrict iwork, const INT liwork, INT *info)#
SGEDMD computes the Dynamic Mode Decomposition (DMD) for a pair of data snapshot matrices.
For the input matrices X and Y such that Y = A*X with an unaccessible matrix A, SGEDMD computes a certain number of Ritz pairs of A using the standard Rayleigh-Ritz extraction from a subspace of range(X) that is determined using the leading left singular vectors of X. Optionally, SGEDMD returns the residuals of the computed Ritz pairs, the information needed for a refinement of the Ritz vectors, or the eigenvectors of the Exact DMD.
Parameters
injobsDetermines whether the initial data snapshots are scaled by a diagonal matrix. ‘S’ :: X and Y are multiplied with a diagonal matrix D so that X*D has unit nonzero columns. ‘C’ :: as ‘S’; additionally if X(:,i)=0 and Y(:,i)/=0 then Y(:,i) is set to zero and a warning raised. ‘Y’ :: X and Y are multiplied by a diagonal matrix D so that Y*D has unit nonzero columns. ‘N’ :: No data scaling.
injobzDetermines whether the eigenvectors (Koopman modes) will be computed. ‘V’ :: eigenvectors computed and returned in Z. ‘F’ :: eigenvectors returned in factored form X(:,1:K)*W. ‘N’ :: eigenvectors are not computed.
injobrDetermines whether to compute the residuals. ‘R’ :: residuals computed and stored in RES. ‘N’ :: residuals are not computed.
injobfSpecifies whether to store information needed for post-processing. ‘R’ :: matrix needed for the refinement of the Ritz vectors is stored in B. ‘E’ :: unscaled eigenvectors of the Exact DMD are stored in B. ‘N’ :: no eigenvector refinement data is computed.
inwhtsvdSelects the SVD algorithm from LAPACK, in {1,2,3,4}. 1 :: sgesvd, 2 :: sgesdd, 3 :: sgesvdq, 4 :: sgejsv.
inmThe state space dimension (rows of X, Y). m >= 0.
innThe number of data snapshot pairs. 0 <= n <= m.
inoutXSingle precision M-by-N array. On entry the data snapshot matrix X. On exit, the leading K columns contain a POD basis (leading K left singular vectors).
inldxThe leading dimension of X. ldx >= m.
inoutYSingle precision M-by-N array. On entry the data snapshot matrix Y. On exit, if jobr==’R’ the leading K columns contain the residual vectors; if jobr==’N’, Y contains the original input data, scaled per jobs.
inldyThe leading dimension of Y. ldy >= m.
innrnkDetermines how to compute the numerical rank. -1 :: sigma(i) truncated if sigma(i) <= tol*sigma(1). -2 :: sigma(i) truncated if sigma(i) <= tol*sigma(i-1). 0 < nrnk <= n :: at most nrnk largest singular values.
intolTolerance for truncating small singular values, 0 <= tol < 1.
outk0 <= k <= n. The dimension of the POD basis and the number of computed Ritz pairs.
outreigN-by-1 array. reig[0:K] contain the real parts of the computed eigenvalues.
outimeigN-by-1 array. imeig[0:K] contain the imaginary parts of the computed eigenvalues. Complex conjugate pairs have consecutive indices, positive imaginary part first.
outZM-by-N array. If jobz==’V’, contains the real Ritz vectors. If jobz==’F’, the descriptions hold for X(:,1:K)*W(1:K,1:K).
inldzThe leading dimension of Z. ldz >= m.
outresN-by-1 array. res[0:K] contain the residuals for the K computed Ritz pairs.
outBM-by-N array. If jobf==’R’, B(1:M,1:K) contains A*U(:,1:K). If jobf==’E’, B(1:M,1:K) contains A*U(:,1:K)*W(1:K,1:K). If jobf==’N’, not referenced.
inldbThe leading dimension of B. ldb >= m.
outWN-by-N array. On exit W(1:K,1:K) contains the K computed eigenvectors of the Rayleigh quotient. Also used as workspace for the right singular vectors of X.
inldwThe leading dimension of W. ldw >= n.
outSN-by-N array. S(1:K,1:K) is used for the Rayleigh quotient, overwritten during the eigenvalue decomposition by sgeev.
inldsThe leading dimension of S. lds >= n.
outworkWorkspace/output array. On exit work[0:N] contains the singular values of (scaled) X. If whtsvd==4, work[N] and work[N+1] contain a scaling factor. On workspace query, work[0] is the minimal and work[1] the optimal workspace length.
inlworkThe length of work. If lwork = -1, a workspace query is assumed.
outiworkInteger workspace, required only if whtsvd in {2,3,4}.
inliworkThe length of iwork. If liwork = -1, a workspace query is assumed.
outinfo= -i < 0 : the i-th argument had an illegal value. = 0 : successful return. = 1 : void input (m=0 or n=0), quick exit. = 2 : the SVD computation of X did not converge. = 3 : the computation of the eigenvalues did not converge. = 4 : data inconsistency detected and (for jobs==’C’) a column of Y was zeroed; warning flag.
void sgedmd(
const char* jobs,
const char* jobz,
const char* jobr,
const char* jobf,
const INT whtsvd,
const INT m,
const INT n,
f32* restrict X,
const INT ldx,
f32* restrict Y,
const INT ldy,
const INT nrnk,
const f32 tol,
INT* k,
f32* restrict reig,
f32* restrict imeig,
f32* restrict Z,
const INT ldz,
f32* restrict res,
f32* restrict B,
const INT ldb,
f32* restrict W,
const INT ldw,
f32* restrict S,
const INT lds,
f32* restrict work,
const INT lwork,
INT* restrict iwork,
const INT liwork,
INT* info
);
Functions
-
void dgedmd(const char *jobs, const char *jobz, const char *jobr, const char *jobf, const INT whtsvd, const INT m, const INT n, f64 *restrict X, const INT ldx, f64 *restrict Y, const INT ldy, const INT nrnk, const f64 tol, INT *k, f64 *restrict reig, f64 *restrict imeig, f64 *restrict Z, const INT ldz, f64 *restrict res, f64 *restrict B, const INT ldb, f64 *restrict W, const INT ldw, f64 *restrict S, const INT lds, f64 *restrict work, const INT lwork, INT *restrict iwork, const INT liwork, INT *info)#
DGEDMD computes the Dynamic Mode Decomposition (DMD) for a pair of data snapshot matrices.
For the input matrices X and Y such that Y = A*X with an unaccessible matrix A, DGEDMD computes a certain number of Ritz pairs of A using the standard Rayleigh-Ritz extraction from a subspace of range(X) that is determined using the leading left singular vectors of X. Optionally, DGEDMD returns the residuals of the computed Ritz pairs, the information needed for a refinement of the Ritz vectors, or the eigenvectors of the Exact DMD.
Parameters
injobsDetermines whether the initial data snapshots are scaled by a diagonal matrix. ‘S’ :: X and Y are multiplied with a diagonal matrix D so that X*D has unit nonzero columns. ‘C’ :: as ‘S’; additionally if X(:,i)=0 and Y(:,i)/=0 then Y(:,i) is set to zero and a warning raised. ‘Y’ :: X and Y are multiplied by a diagonal matrix D so that Y*D has unit nonzero columns. ‘N’ :: No data scaling.
injobzDetermines whether the eigenvectors (Koopman modes) will be computed. ‘V’ :: eigenvectors computed and returned in Z. ‘F’ :: eigenvectors returned in factored form X(:,1:K)*W. ‘N’ :: eigenvectors are not computed.
injobrDetermines whether to compute the residuals. ‘R’ :: residuals computed and stored in RES. ‘N’ :: residuals are not computed.
injobfSpecifies whether to store information needed for post-processing. ‘R’ :: matrix needed for the refinement of the Ritz vectors is stored in B. ‘E’ :: unscaled eigenvectors of the Exact DMD are stored in B. ‘N’ :: no eigenvector refinement data is computed.
inwhtsvdSelects the SVD algorithm from LAPACK, in {1,2,3,4}. 1 :: dgesvd, 2 :: dgesdd, 3 :: dgesvdq, 4 :: dgejsv.
inmThe state space dimension (rows of X, Y). m >= 0.
innThe number of data snapshot pairs. 0 <= n <= m.
inoutXDouble precision M-by-N array. On entry the data snapshot matrix X. On exit, the leading K columns contain a POD basis (leading K left singular vectors).
inldxThe leading dimension of X. ldx >= m.
inoutYDouble precision M-by-N array. On entry the data snapshot matrix Y. On exit, if jobr==’R’ the leading K columns contain the residual vectors; if jobr==’N’, Y contains the original input data, scaled per jobs.
inldyThe leading dimension of Y. ldy >= m.
innrnkDetermines how to compute the numerical rank. -1 :: sigma(i) truncated if sigma(i) <= tol*sigma(1). -2 :: sigma(i) truncated if sigma(i) <= tol*sigma(i-1). 0 < nrnk <= n :: at most nrnk largest singular values.
intolTolerance for truncating small singular values, 0 <= tol < 1.
outk0 <= k <= n. The dimension of the POD basis and the number of computed Ritz pairs.
outreigN-by-1 array. reig[0:K] contain the real parts of the computed eigenvalues.
outimeigN-by-1 array. imeig[0:K] contain the imaginary parts of the computed eigenvalues. Complex conjugate pairs have consecutive indices, positive imaginary part first.
outZM-by-N array. If jobz==’V’, contains the real Ritz vectors. If jobz==’F’, the descriptions hold for X(:,1:K)*W(1:K,1:K).
inldzThe leading dimension of Z. ldz >= m.
outresN-by-1 array. res[0:K] contain the residuals for the K computed Ritz pairs.
outBM-by-N array. If jobf==’R’, B(1:M,1:K) contains A*U(:,1:K). If jobf==’E’, B(1:M,1:K) contains A*U(:,1:K)*W(1:K,1:K). If jobf==’N’, not referenced.
inldbThe leading dimension of B. ldb >= m.
outWN-by-N array. On exit W(1:K,1:K) contains the K computed eigenvectors of the Rayleigh quotient. Also used as workspace for the right singular vectors of X.
inldwThe leading dimension of W. ldw >= n.
outSN-by-N array. S(1:K,1:K) is used for the Rayleigh quotient, overwritten during the eigenvalue decomposition by dgeev.
inldsThe leading dimension of S. lds >= n.
outworkWorkspace/output array. On exit work[0:N] contains the singular values of (scaled) X. If whtsvd==4, work[N] and work[N+1] contain a scaling factor. On workspace query, work[0] is the minimal and work[1] the optimal workspace length.
inlworkThe length of work. If lwork = -1, a workspace query is assumed.
outiworkInteger workspace, required only if whtsvd in {2,3,4}.
inliworkThe length of iwork. If liwork = -1, a workspace query is assumed.
outinfo= -i < 0 : the i-th argument had an illegal value. = 0 : successful return. = 1 : void input (m=0 or n=0), quick exit. = 2 : the SVD computation of X did not converge. = 3 : the computation of the eigenvalues did not converge. = 4 : data inconsistency detected and (for jobs==’C’) a column of Y was zeroed; warning flag.
void dgedmd(
const char* jobs,
const char* jobz,
const char* jobr,
const char* jobf,
const INT whtsvd,
const INT m,
const INT n,
f64* restrict X,
const INT ldx,
f64* restrict Y,
const INT ldy,
const INT nrnk,
const f64 tol,
INT* k,
f64* restrict reig,
f64* restrict imeig,
f64* restrict Z,
const INT ldz,
f64* restrict res,
f64* restrict B,
const INT ldb,
f64* restrict W,
const INT ldw,
f64* restrict S,
const INT lds,
f64* restrict work,
const INT lwork,
INT* restrict iwork,
const INT liwork,
INT* info
);
Functions
-
void cgedmd(const char *jobs, const char *jobz, const char *jobr, const char *jobf, const INT whtsvd, const INT m, const INT n, c64 *restrict X, const INT ldx, c64 *restrict Y, const INT ldy, const INT nrnk, const f32 tol, INT *k, c64 *restrict eigs, c64 *restrict Z, const INT ldz, f32 *restrict res, c64 *restrict B, const INT ldb, c64 *restrict W, const INT ldw, c64 *restrict S, const INT lds, c64 *restrict zwork, const INT lzwork, f32 *restrict rwork, const INT lrwork, INT *restrict iwork, const INT liwork, INT *info)#
CGEDMD computes the Dynamic Mode Decomposition (DMD) for a pair of data snapshot matrices.
For the input matrices X and Y such that Y = A*X with an unaccessible matrix A, CGEDMD computes a certain number of Ritz pairs of A using the standard Rayleigh-Ritz extraction from a subspace of range(X) that is determined using the leading left singular vectors of X. Optionally, CGEDMD returns the residuals of the computed Ritz pairs, the information needed for a refinement of the Ritz vectors, or the eigenvectors of the Exact DMD.
Parameters
injobsDetermines whether the initial data snapshots are scaled by a diagonal matrix (‘S’,’C’,’Y’,’N’).
injobzDetermines whether the eigenvectors (Koopman modes) will be computed (‘V’,’F’,’N’).
injobrDetermines whether to compute the residuals (‘R’,’N’).
injobfSpecifies whether to store information needed for post-processing (‘R’,’E’,’N’).
inwhtsvdSelects the SVD algorithm from LAPACK, in {1,2,3,4}. 1 :: cgesvd, 2 :: cgesdd, 3 :: cgesvdq, 4 :: cgejsv.
inmThe state space dimension (rows of X, Y). m >= 0.
innThe number of data snapshot pairs. 0 <= n <= m.
inoutXComplex M-by-N array. On entry the data snapshot matrix X. On exit, the leading K columns contain a POD basis.
inldxThe leading dimension of X. ldx >= m.
inoutYComplex M-by-N array. On entry the data snapshot matrix Y. On exit, if jobr==’R’ the leading K columns contain the residual vectors; otherwise Y contains the original input data scaled per jobs.
inldyThe leading dimension of Y. ldy >= m.
innrnkDetermines how to compute the numerical rank (-1, -2, or 0 < nrnk <= n).
intolTolerance for truncating small singular values, 0 <= tol < 1.
outk0 <= k <= n. The dimension of the POD basis and the number of computed Ritz pairs.
outeigsN-by-1 array. eigs[0:K] contain the computed eigenvalues LAMBDA(i).
outZM-by-N array. If jobz==’V’, the Ritz vectors; if jobz==’F’, the descriptions hold for X(:,1:K)*W(1:K,1:K).
inldzThe leading dimension of Z. ldz >= m.
outresN-by-1 real array. res[0:K] contain the residuals.
outBM-by-N array. Refinement / Exact DMD data (see jobf).
inldbThe leading dimension of B. ldb >= m.
outWN-by-N array. On exit W(1:K,1:K) contains the K eigenvectors of the Rayleigh quotient. Also used as workspace for the right singular vectors of X.
inldwThe leading dimension of W. ldw >= n.
outSN-by-N array. Used for the Rayleigh quotient, overwritten during the eigenvalue decomposition.
inldsThe leading dimension of S. lds >= n.
outzworkComplex workspace/output. On workspace query, zwork[0] is the minimal and zwork[1] the optimal length.
inlzworkThe length of zwork. If lzwork = -1, a workspace query.
outrworkReal workspace/output. On exit rwork[0:N] contains the singular values of (scaled) X. If whtsvd==4, rwork[N] and rwork[N+1] contain a scaling factor.
inlrworkThe length of rwork. If lrwork = -1, a workspace query.
outiworkInteger workspace, required only if whtsvd in {2,3,4}.
inliworkThe length of iwork. If liwork = -1, a workspace query.
outinfo= -i < 0 : the i-th argument had an illegal value. = 0 : successful return. = 1 : void input (m=0 or n=0), quick exit. = 2 : the SVD computation of X did not converge. = 3 : the computation of the eigenvalues did not converge. = 4 : data inconsistency detected and (for jobs==’C’) a column of Y was zeroed; warning flag.
void cgedmd(
const char* jobs,
const char* jobz,
const char* jobr,
const char* jobf,
const INT whtsvd,
const INT m,
const INT n,
c64* restrict X,
const INT ldx,
c64* restrict Y,
const INT ldy,
const INT nrnk,
const f32 tol,
INT* k,
c64* restrict eigs,
c64* restrict Z,
const INT ldz,
f32* restrict res,
c64* restrict B,
const INT ldb,
c64* restrict W,
const INT ldw,
c64* restrict S,
const INT lds,
c64* restrict zwork,
const INT lzwork,
f32* restrict rwork,
const INT lrwork,
INT* restrict iwork,
const INT liwork,
INT* info
);
Functions
-
void zgedmd(const char *jobs, const char *jobz, const char *jobr, const char *jobf, const INT whtsvd, const INT m, const INT n, c128 *restrict X, const INT ldx, c128 *restrict Y, const INT ldy, const INT nrnk, const f64 tol, INT *k, c128 *restrict eigs, c128 *restrict Z, const INT ldz, f64 *restrict res, c128 *restrict B, const INT ldb, c128 *restrict W, const INT ldw, c128 *restrict S, const INT lds, c128 *restrict zwork, const INT lzwork, f64 *restrict rwork, const INT lrwork, INT *restrict iwork, const INT liwork, INT *info)#
ZGEDMD computes the Dynamic Mode Decomposition (DMD) for a pair of data snapshot matrices.
For the input matrices X and Y such that Y = A*X with an unaccessible matrix A, ZGEDMD computes a certain number of Ritz pairs of A using the standard Rayleigh-Ritz extraction from a subspace of range(X) that is determined using the leading left singular vectors of X. Optionally, ZGEDMD returns the residuals of the computed Ritz pairs, the information needed for a refinement of the Ritz vectors, or the eigenvectors of the Exact DMD.
Parameters
injobsDetermines whether the initial data snapshots are scaled by a diagonal matrix (‘S’,’C’,’Y’,’N’).
injobzDetermines whether the eigenvectors (Koopman modes) will be computed (‘V’,’F’,’N’).
injobrDetermines whether to compute the residuals (‘R’,’N’).
injobfSpecifies whether to store information needed for post-processing (‘R’,’E’,’N’).
inwhtsvdSelects the SVD algorithm from LAPACK, in {1,2,3,4}. 1 :: zgesvd, 2 :: zgesdd, 3 :: zgesvdq, 4 :: zgejsv.
inmThe state space dimension (rows of X, Y). m >= 0.
innThe number of data snapshot pairs. 0 <= n <= m.
inoutXComplex M-by-N array. On entry the data snapshot matrix X. On exit, the leading K columns contain a POD basis.
inldxThe leading dimension of X. ldx >= m.
inoutYComplex M-by-N array. On entry the data snapshot matrix Y. On exit, if jobr==’R’ the leading K columns contain the residual vectors; otherwise Y contains the original input data scaled per jobs.
inldyThe leading dimension of Y. ldy >= m.
innrnkDetermines how to compute the numerical rank (-1, -2, or 0 < nrnk <= n).
intolTolerance for truncating small singular values, 0 <= tol < 1.
outk0 <= k <= n. The dimension of the POD basis and the number of computed Ritz pairs.
outeigsN-by-1 array. eigs[0:K] contain the computed eigenvalues LAMBDA(i).
outZM-by-N array. If jobz==’V’, the Ritz vectors; if jobz==’F’, the descriptions hold for X(:,1:K)*W(1:K,1:K).
inldzThe leading dimension of Z. ldz >= m.
outresN-by-1 real array. res[0:K] contain the residuals.
outBM-by-N array. Refinement / Exact DMD data (see jobf).
inldbThe leading dimension of B. ldb >= m.
outWN-by-N array. On exit W(1:K,1:K) contains the K eigenvectors of the Rayleigh quotient. Also used as workspace for the right singular vectors of X.
inldwThe leading dimension of W. ldw >= n.
outSN-by-N array. Used for the Rayleigh quotient, overwritten during the eigenvalue decomposition.
inldsThe leading dimension of S. lds >= n.
outzworkComplex workspace/output. On workspace query, zwork[0] is the minimal and zwork[1] the optimal length.
inlzworkThe length of zwork. If lzwork = -1, a workspace query.
outrworkReal workspace/output. On exit rwork[0:N] contains the singular values of (scaled) X. If whtsvd==4, rwork[N] and rwork[N+1] contain a scaling factor.
inlrworkThe length of rwork. If lrwork = -1, a workspace query.
outiworkInteger workspace, required only if whtsvd in {2,3,4}.
inliworkThe length of iwork. If liwork = -1, a workspace query.
outinfo= -i < 0 : the i-th argument had an illegal value. = 0 : successful return. = 1 : void input (m=0 or n=0), quick exit. = 2 : the SVD computation of X did not converge. = 3 : the computation of the eigenvalues did not converge. = 4 : data inconsistency detected and (for jobs==’C’) a column of Y was zeroed; warning flag.
void zgedmd(
const char* jobs,
const char* jobz,
const char* jobr,
const char* jobf,
const INT whtsvd,
const INT m,
const INT n,
c128* restrict X,
const INT ldx,
c128* restrict Y,
const INT ldy,
const INT nrnk,
const f64 tol,
INT* k,
c128* restrict eigs,
c128* restrict Z,
const INT ldz,
f64* restrict res,
c128* restrict B,
const INT ldb,
c128* restrict W,
const INT ldw,
c128* restrict S,
const INT lds,
c128* restrict zwork,
const INT lzwork,
f64* restrict rwork,
const INT lrwork,
INT* restrict iwork,
const INT liwork,
INT* info
);