Release notes¶
modred 2.1.0¶
[IN PROGRESS]
Now work only with arrays! Many method names have been changed.
Implemented the total least-squares variant of DMD, which deals with noise
better than standard DMD does. Also did a major rewrite of the unit tests,
which now check mathematical properties, rather than comparing the results of
modred
routines to alternate (e.g., brute force) implementations. The new
unit tests are more robust and fail much less often.
New features and improvements
- Can now compute adjoint DMD modes.
Bug fixes
hostname
is now determined using a Windows-friendly method.- OKID test files now included when installing using
pip
. - Fixed some minor bugs in example files, which now run.
- Correctly handle
mode_indices=None
option inVecSpaceHandles.lin_combine()
. - Complex-valued vectors are now correctly handled in
VecSpaceHandles.compute_inner_product_mat()
andVecSpaceHandles.compute_symmetric_inner_product_mat()
. [NOTE: is this fixed in the matrix versions???]
Interface changes
inner_product
is now a keyword argument inPODHandles
,BPODHandles
, andDMDHandles
, since sometimes instances of these classes are created to compute modes, which does not require computing any inner products.- Added “direct” to methods for projection coefficients in BPOD.
- Changed symmetric to symm, i.e.,
VecSpaceHandles.compute_symmetric_inner_product_array()
is nowVecSpaceHandles.compute_symm_inner_product_array()
. - Fixed order of return arguments in DMD matrix routines [which ones were changed??] to be consistent. (Also in TLSqrDMD matrix routines)
- Changed return arguments in array methods for all decomps. Now have a dict containing extra return arguments.
parallel
is now a module, not a class. [Also put in interface changes???] This way users don’t have to worry about using the default instance or accidentally creating new instances.- The attribute
summed_correlation_mats
has been renamedsum_correlation_mat
to make it clear that the attribute contains a single matrix. All corresponding methods have been renamed accordingly. - Added compute_adjoint_modes for DMD, TLSqrDMD.
- Added get method for POD projection coefficients.
- Added get method for BPOD projection coefficients.
- Added get methods for DMD handles.
- Added get methods for TLSqrDMD handles.
- Added
broadcast
method toparallel
module. mode_indices
is now optional in the various compute modes methods
Internal changes
- Removed trailing whitespace from files, as is often done automatically when using Emacs.
- Rewrote total-least squares DMD tests.
- Rewrote DMD tests.
- Rewrote BPOD tests.
- Rewrote POD tests.
modred 2.0.4¶
Fixed bug for Windows environments. Updated documentation to use Read the Docs.
Bug fixes
parallel
modules now usessocket
module instead ofos
module to find hostname, which is portable to Windows environments.
modred 2.0.3¶
Minor bug fix to OKID tests.
Bug fixes
- OKID files needed for tests are included in the source distribution. All doc files are also included.
modred 2.0.2¶
Minor bug fix.
Interface changes
- Order of returned values for
dmd.compute_DMD_matrices_snaps_method()
anddmd.compute_DMD_matrices_direct_method()
is now consistent for both values ofreturn_all
.
modred 2.0.1¶
Minor bug fix.
Bug fixes
dmd.DMDHandles.compute_spectrum()
now returns real numbers, as it should have before, instead of complex values.
modred 2.0.0¶
Main changes are an updated interface for DMD that matches the latest theory and support for Python 3. Python 3 support was primarily implemented by Pierre Augier (pa371 [-at-] damtp [-dot-] cam [-dot-] ac [-dot-] uk). Thanks, Pierre!
New features and improvements
Python 3 is now supported!
Documentation has been updated for clarity and consistency, and example code works with the latest interface.
DMD implementation now matches newest theory, laid out in a 2014 paper by Tu et al. in the Journal of Computational Dynamics. Features were only added, i.e., none were removed. Any DMD computations previously done using modred can be reproduced, though the names of some function calls have changed. Namely,
dmd.DMDHandles.compute_proj_modes()
replacesdmd.DMDHandles.compute_modes()
, anddmd.DMDHandles.put_eigvals()
replacesdmd.DMDHandles.put_ritz_vals()
. Generally, the term “projected modes” has replaced “modes,” and similarly “eigenvalues” has replaced “Ritz values.” “Exact modes” are now availble in addition to the projected modes.A full list of the new functions consists of:
dmd.DMDHandles.compute_exact_modes()
,dmd.DMDHandles.compute_proj_modes()
,dmd.DMDHandles.compute_spectrum()
,dmd.DMDHandles.compute_proj_coeffs()
,dmd.DMDHandles.compute_eigendecomp()
,dmd.DMDHandles.put_spectral_coeffs()
, anddmd.DMDHandles.put_eigvals()
.The
compute_decomp
step in DMD has been refactored, resulting in the new methoddmd.DMDHandles.compute_eigendecomp()
. This method can be used to restart DMD computations from saved correlation and cross-correlation matrices, or to compute a DMD using a truncated basis.Absolute and relative tolerances can now be passed in using the keyword arguments
atol
andrtol
, respectively, when callingcompute_decomp
in either POD, BPOD, or DMD. These are then passed on into internal computations of singular value decompositions or eigendecompositions of positive definite matrices. They allow the user to filter out singular values or eigenvalues that should be considered numerical artifacts. They can also be used to truncate the computations and limit the number of modes making up the decompositions.In DMD, truncation can also be achieved by setting the keyword argument
max_num_eigvals
in eitherdmd.DMDHandles.compute_decomp()
ordmd.DMDHandles.compute_eigendecomp()
.Added new methods that compute the projection of the original data vectors onto the modes, for POD, BPOD, and DMD, respectively:
pod.PODHandles.compute_proj_coeffs()
,bpod.BPODHandles.compute_proj_coeffs()
,bpod.BPODHandles.compute_adj_proj_coeffs()
,dmd.DMDHandles.compute_proj_coeffs()
.
Bug fixes
- Fixed minor bug in the function
util.impulse
. - Fixed minor bug in
testvectorspace.py
- Fixed minor bugs in loading/saving test files, some related to delimiters.
- Fixed bug in
testutil
whereeig_biorthog
was assuming the wrong number of return values. - Fixed minor bugs in DMD tests related to casting of matrices/arrays.
Interface changes
- Changed the returned values in
dmd.compute_DMD_matrices_snaps_method()
,dmd.compute_DMD_matrices_direct_method()
,dmd.DMDHandles.compute_decomp()
. - Changed the order of the returned values in
pod.PODHandles.compute_decomp()
.bpod.BPODHandles.compute_decomp()
. - Changed the order of the arguments in
pod.PODHandles.get_decomp()
,pod.PODHandles.put_decomp()
,bpod.BPODHandles.get_decomp()
,bpod.BPODHandles.put_decomp()
, andera.ERA.put_decomp()
. - Changed the arguments to
dmd.DMDHandles.get_decomp()
anddmd.DMDHandles.put_decomp()
. - Added the following new methods that compute projections onto modes:
pod.PODHandles.compute_proj_coeffs()
,bpod.BPODHandles.compute_proj_coeffs()
,bpod.BPODHandles.compute_adj_proj_coeffs()
, anddmd.DMDHandles.compute_proj_coeffs()
. - Added the following new methods that save projection coefficients:
pod.PODHandles.put_proj_coeffs()
,bpod.BPODHandles.put_direct_proj_coeffs()
,bpod.BPODHandles.put_adjoint_proj_coeffs()
, anddmd.DMDHandles.put_proj_coeffs()
. - Added the following new methods in the updated
DMDHandles
class:dmd.DMDHandles.compute_exact_modes()
,dmd.DMDHandles.compute_spectrum()
,dmd.DMDHandles.compute_eigendecomp()
,dmd.DMDHandles.put_R_low_order_eigvecs()
,dmd.DMDHandles.put_L_low_order_eigvecs()
,dmd.DMDHandles.put_correlation_mat_eigvals()
,dmd.DMDHandles.put_correlation_mat_eigvecs()
,dmd.DMDHandles.put_cross_correlation_mat()
, anddmd.DMDHandles.put_spectral_coeffs()
. dmd.DMDHandles.compute_proj_modes()
replacesdmd.DMDHandles.compute_modes()
.dmd.DMDHandles.put_eigvals()
replacesdmd.DMDHandles.put_ritz_vals()
.dmd.DMDHandles.put_build_coeffs()
anddmd.DMDHandles.put_mode_norms()
are now deprecated.- Optional
atol
andrtol
arguments were added topod.PODHandles.compute_decomp()
,bpod.BPODHandles.compute_decomp()
,dmd.DMDHandles.compute_decomp()
. - Optional
max_num_eigvals
argument added todmd.DMDHandles.compute_decomp()
. util.svd
,util.eigh
, andutil.eig_biorthog
now consistently return numpy matrices. Previously, the SVD method returned matrices but the eigendecompositions returned arrays.
Internal changes
- In DMD, the build coefficients are no longer considered part of the
decomposition and are no longer saved as internal attributes. Instead, its
constituent parts define the decomposition (and are saved as internal
attributes). Thus computation of the build coefficients in DMD has been moved
from the
compute_decomp
method to thecompute_exact_modes
andcompute_proj_modes
methods, respectively, which makes more sense mathematically. - Added
util.eig_biorthog()
method to compute both left and right eigenvectors of a matrix, scaled to yield a biorthogonal set. - Added optional
atol
andrtol
arguments toutil.svd()
andutil.eigh()
. - Updated tests for
util.svd
andutil.eigh
. Properties of the decompositions are now checked, rather than simply duplicating the computations using built-in numpy methods. This allows for better testing of truncated decompositions. Truncation levels are determined during testing, to ensure that truncation actually occurs and is tested. - Updated tests for
util.biorthog
to reduce number of failures. Some failures are to be expected due to the fact that we test on random data, but these are much less frequent now. - Changed how positive definite matrices are generated for use as inner product weight matrices. Previous implementation led to failed tests.
- Changed default delimiter when loading test arrays to
None
. - Improved type checking to allow for any iterable container, not just lists.
- Removed dependencies on
util.make_list
where possible. - Removed some duplicate code in
util
module, whereeig_biorthog
had been implemented twice. - The packaging has been improved.
- Ported to python >= 3.3 using python-future.
- Replaced instances of
xrange
withrange
for compatability with Python 3. (In Python 3,xrange
has been renamed asrange
.) This is not as efficient in Python 2, but only occurs in a few places and with small enough loops that the impact should be negligible. - Added a few more checks for
None
values, as Python 3 doesn’t allow comparisons of floats toNone
.
modred 1.0.2¶
We increased the speed of the BPOD implementations.
New features and improvements
- None
Bug fixes
- None
Interface changes
- None
Internal changes
- BPOD classes now compute fewer inner products. The number of inner products is now the sum of the number of direct vectors and the number of adjoint vectors, whereas previously it was the product. This is achieved by taking advantage of a property of the adjoint.
modred 1.0.1¶
Small changes mostly related to examples.
New features and improvements
- None
Bug fixes
- Changed a tutorial example.
Interface changes
- None
Internal changes
- None
modred 1.0.0¶
Many interface changes including new classes and functions for different sized data.
New features and improvements
- New functions and classes for data that fits entirely on one node’s memory.
These are
pod.compute_POD_matrices_snaps_method()
,pod.compute_POD_matrices_direct_method()
,bpod.compute_BPOD_matrices()
,dmd.compute_DMD_matrices_snaps_method()
,dmd.compute_DMD_matrices_direct_method()
,ltigalerkinproj.LTIGalerkinProjectionMatrices
, andvectorspace.VectorSpaceMatrices
. These replace thein_memory
member functions and improve computational efficiency for small data. - Added balanced truncation
util.balanced_truncation()
.
Bug fixes
- None
Interface changes
- The old classes
POD
,BPOD
,DMD
, are now only for large data and have their names appended with “Handles
”. - Old classes
LTIGalerkinProjection
, andVectorSpace
have been split into two, and names appended with “Matrices
” and “Handles
”. - All
in_memory
member functions have been removed, replaced by the functions and classes above. - Removed the
index_from
optional argument incompute_modes
functions. Mode numbers are now always indexed from zero and are renamed mode indices. - The
VectorSpace
member functioncompute_modes
has been removed and its functionality moved tolin_combine
. LTIGalerkinProjection
member functioncompute_model
uses the result of an operator on a vector, rather than the operator itself. Seeltigalerkinproj.LTIGalerkinProjectionHandles.compute_model()
. The operator classes have been removed.
Internal changes
- OKID now uses least squares instead of a pseudo-inverse for improved numerical stability.
- Added
util.InnerProductBlock
for testing.
modred 0.3.2¶
The main change is a bug fix in util.lsim()
.
New features and improvements
None
Bug fixes
- Function
util.lsim()
, which is only provided for the user’s convenience, is simplified and corrected.
Interface changes
util.lsim()
.
Internal changes
None
modred 0.3.1¶
The main change is a bug fix in the numpy.eigh
wrapper,
util.eigh()
.
New features and improvements
None
Bug fixes
- The POD and DMD classes now use
util.eigh()
with theis_positive_definite
flag set toTrue
. This eliminates the possibility of small negative eigenvalues that sometimes appear due to numerical precision which led to errors.
Interface changes
None
Internal changes
- Function
util.eigh()
now has a flag for positive definite matrices. WhenTrue
, the function will automatically adjust the tolerance such that only positive eigenvalues are returned.
modred 0.3.0¶
New features and improvements
- New class
ltigalerkinproj.LTIGalerkinProjection
for LTI Galerkin projections. Replaces and generalizes old classBPODLTIROM
. - Improved print messages to print every 10 seconds and be more informative.
Bug fixes
- Corrected small error in symmetric inner product matrix calculation (used by POD and DMD) where some very small matrix entries were double the true value.
- Fixed race condition in
vectorspace.VectorSpace.lin_combine()
by adding a barrier.
Interface changes
- Removed class
BPODLTIROM
. - Changed order of indices in Markov parameters returned by
okid.OKID()
. - Changed all uses of
hankel
toHankel
to be consistent with naming convention.
Internal changes
- Added
parallel.Parallel.call_and_bcast()
method toParallel
class. - Changed interface of
helper.add_to_path()
. dmd.DMD
no longer uses an instance ofpod.POD
.- The equals operator of vector handles now better deals with vectors which are numpy array objects.
modred 0.2.1¶
No noteworthy changes from v0.2.0, figuring out pypi website.
modred 0.2.0¶
First publicly available version.