Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[2.3.0]
Changed
Improve docs
Improve
Utils/benchmark_cscripts and visualizationMove
MathsandPhysicssubclasses outside of theGridclassMove
ETD4RKfromExamplestoUtils
Fixed
Error on a,b not integers in l_params
Fix a potential error where
plasticwas not supplied inl_paramsFix compiler warnings on
convolver.cFix signature of interactive functions in
plotLibImprove stability of windows installation
Removed
Remove obsolete
Examples/2D_basilisk/
[2.2.1]
Changed
Publish to pypi.org (used to be test.pypi.org)
Fixed
Fix Gitlab CI to only publish on new master tags
Fix docs
Fix
poetry installwhen compiled files already exist
[2.2.0]
Added
Add
A11 - 3D rotationto archiveAdd proper packaging to release on pypi. Update the documentation accordingly
Add support for MSVC in
convolver.c(MSVC isn’t supported in the installation yet though)
Changed
Change license
Change doc to Sphinx, and improve many docs
Rename
plotLib.pad_array_2DtoplotLib.rightpad_array_2DRename
LogGrid.convolvertoLogGrid.compute_convolution_kernelfor clarityUpdate requirements
Improve installation documentation
Fixed
Fix
pyyamlversionFix normalization of
datasci.randcomplex(was square instead of circular)Fix the documentation build for newer Sphinx versions
Fix files not being cleaned by makefiles
Fix docs in .gitignore
[2.1.0]
Added
Auto-lint with pre-commit
Add optional
fillarg todatasci.ragged_array_to_arrayAdd
HRB v7 edgeviscto archive
Changed
Tests use pyling fixtures
Return axes in
interactive_spectrumAuto-rescale
interactive_3D_logplot_positiveaxes for each stepRename
fields_to_lineartofields_to_1Dandlinear_to_fieldstoD1_to_fieldsto avoid a confusion with the linear equation part
Fixed
Fix TimeTracker output when time<1ms
Fix
RLIMIT_STACKsetting error
[2.0.0]
Added
Add test coverage
Add timers to evaluate the time spend reading/writing to disk, and convolving. Also measure time spent in DataExplorer.
Add a
TimeTrackerclass toLibs.miscto help with time-trackingAdd loading initial conditions from a step in a hdf5 file using
initial_conditions=["file.h5", step]Add a tool in
Utilsto find the fastest compiler flags for the convolverAdd a script in
Utilsto install gcc-12 from sourceAdd utests
Add deploy stage to CI to view latest benchmark result, + artifact
Add a generated doc page, replaces the wiki
Add
Grid.to_new_sizeandGrid.to_new_size_empty
Changed
Change the way spectra are normalized, now divided by the number of pts in each shell. This should straighten spectra.
Change the saving format to hdf5.
Rename
update_parameterstoupdate_json_settingsinLibs.IOLibChange the repo’s name from
Log GridtoPyLogGridMove the
initial_conditionsargument fromSolver()tosolver.solveand merge it withloadfromsave: theloadfromsaveargument is removed, to resume the simulation setinitial_conditions="loadfromsave".Improve the convolution, now compiled from C instead of Cython, and with several major improvements. Should now be >2x faster.
Improve the convolution’s multithreading. As part of this effort, the way convolutions are distributed changes. One can still call
convolveas before, but a new functionconvolve_batchthat takes a several (f,g) and computes their convolution in parallel now can be used.When
initial_conditions="loadfromsave", automatically loaddtfrom the latest timestep.Rename
equation_updatetoequation_landviscosity_updatetoequation_nlin all its implementations.Remove
N_pointsfromSolver()args, pass it withinitial_conditionsinstead.Change
Solver(fields_name=)toSolver.fields_namesto align withGrid.Move several attributes shared between
SolverandGridto be only owned byGrid.Remove
fieldsfrom the arguments ofequation_landequation_nl. They should now be accessed viagrid.field(...).Only recompute the missing fields in
DataExplorerifloadfromsave=Trueinstead of recomputing all the fields.Hardcode a (better) default size for
plotshowm(full=True)when the backend is non-interactive.initial_conditions="loadfromsave"now updatesend_simulation, solver_params, simu_paramsrather than loading them from the existing simulationMove
LibsandLogGridinto thepyloggridpackageChange docstrings from REST to google style for improved lisibility
Switch dependency management from
requirements.txttopoetry
Fixed
Increase the max recursion depth to avoid crashing simulations with a lot of grid size changes
Fix the save directory of a few tests
Fix a crash in windows related to the
resourcelibraryEnding a simulation no longer shows a stack trace of
InterruptedErrorif the grid size is adaptive.
Removed
Remove the
save_dataarg fromDataExplorer.display(now alwaysTrue)
[1.8.0]
Added
Add default MR template
Add LittlewoodP code in Examples
Add support in DataExplorer for varying grid sizes in outputs
Add support for “u” fields in
grid.physics.enstrophyAdd
HRB v5to archiveAdd a new solver based on https://github.com/whalenpt/rkstiff and made it default
Add an
axargument toplotLib.scatter, ifNonedefaults topltAdd
plotLib.interactive_spectrumAdd
datasci.logmean,datasci.fitAdd
gridparameter toDataExplorer.load_stepAdd new optional
solverparameter toSolver.solveto chose among the different solversAdd
Examples/ETD4RKAdd
interactive_grid_imshow, interactive_grid_3Dslice, interactive_3D_logplot_positiveinplotLibAdd optional
axargument toplotLib.legendsAdd
PlotFuncustom type inDataExplorerAdd
HRBv6to archiveAdd new generic bencharking util
Add a
saveargument toplot_interactive_XXinplotLibto save the interactive graphs as videos
Changed
Change the default solver (see above)
In
DataExplorer, a fieldtis automatically stored whenperstep=TrueFix
singlethread_npimport inDataExplorerGrid.fieldnow returns a single array when called with a single argumentMove
atol, rtol, exact_viscous_splittingto a dictsolver_paramswhich may take additional parametersThe very first and last steps of the simulation are now always saved
Rename
interactive_3D_logplottointeractive_3D_logplot_by_zUpdate the structure of save files, in which the order the fields is no longer relevant. This is not backwards-compatible, but legacy support has been added to read old save files.
end_simulationno longer defaults tot=1insolver.solvedatasci.meannow returns the mean and the varianceadd sliders to
Examples/LittlewoodPaley/proto_gamma.pyand update some plotsdatasci.meannow returns the mean and the stddefault ̀end_simulation
parameters no longer include{“t”: 1}`
Fixed
Fix
plotLib.scatterwhen supplyinglinestyleFix
interactive_3D_logplot_by_znot updating properlyFix saving duplicate steps on grid size update
[1.7.1]
Added
Add a
-sflag to the automatic installation scripts to skip the installation of the python executableAdd an option
exact_viscous_splitting: boolin the solver. If enabled, we solve the equation via “exact” viscous splitting, by multiplying dydt by exp(-visc * t). If the viscous term is big, this requires much smaller time steps, and is significantly less stable. Not recommended for use in everyday simulations, but more as a baseline for comparison.Add a function in
treat_3D.pyto plot the “theoretical” injection and dissipation of energy. Note that those formulas are only local derivatives, and therefore are expected to slightly differ from the RK estimates. In particuler, there might be a time shift of the order ofdt. /!\ The injection and viscosity need to be hardcoded in the treatment.Add0
grid.maths.div2dAdd utests for NS3D evolution of energy and div2d
Add
interactive_3D_logplot_by_ztoPlotLibto plot 2D/3D data in 3D with interactive visualisation (z slice / time)
Changed
Remove a hard to see marker from the default cycler in PlotLib
Update requirements
Change behavior of
drawablesargument passed by DataExplorer: wasdict, is now a function that can be called asdrawables(key1, key2, ...)̀
Fixed
Fix the new default method for calculating the viscous term (was not on by default)
Remove bad markers from default plotting cycle
Fix a sign error in
NS3D.py
[1.7.0]
Added
Add
launch_treat_batch.shas a template to launch/treat many simulations at onceAdd QG 1&2layer(s) to Archive
Add HRBv3 to the archive
Add missing HRBv2 .ods data and pdfs to the archive
Add Draft folder in Example
Add spectrum investigation code in Draft
Add benchmark_rust to Draft
Add
sys.path.insertto NS3D.py for compatibility when launched directly from pythonAdd options to select which steps to treat, the number of threads, and whether to save treatment results in DataExplorer
Add functions
cumulative_k,compute_by_shellto Grid.PhysicsAdd
enforce_grid_symmetry, used after each ode step to make sure there’s no driftAdd
simu_paramsto solverinitial_conditionsAdd
complete_array_with_nansinLibs/datasciAdd automated setup scripts for linux & windows. Those scripts install python, create a venv, install the requirements, and compile the convolver. They can be run on already existing installations to update them.
Add
tightoption topltshowmAdd a
scatterfunction to PlotLibAdd a
field(name)method toGrid
Changed
Bump pyparsing to >=3 since the Cython bug seems to have been fixed in newer versions
Update README to use python3.11
Update convolving utests to be faster (probe smaller grids in 3D)
Change the handling of absolute tolerance. Now, atol is relative to the max possible value of y.
Change
ujsontoorjson. This de-facto removes the support for serializing np.nan, np.inf as strings (now serialized asnull), but afaik it was not of any use.Cleanup requirements
Update the way custom colormaps are handled (was broken by this matplotlib commit)
Change default plot style (more article-like, automatic linestyle and marker, colorblind-friendly, perceptually uniform colormap)
Refactor the ViscDopri solver:
Change the signature of the
visc_update, which is now expected to return only the value of the viscous term for each fieldChange the computation of the viscous term, which should be significantly more precise as long as the timestep is not too big
Minor fixes
Split
visc_update_linusing the newsave_stepmethod
Fixed
Fix the way RK updated the derivative after the viscosity step. It is now recomputed every step. This changes the signature of the viscosity update, so update your code accordingly (doesn’t require/return the derivative anymore)
Fix spectrum calculation crash with k0=True
Fix Basilisk test missing fonts
Fix some edge cases in the ViscDopri solver
[1.6.0]
Added
Decorators to simply run tests on many parameters (N, D, l_params, k0)
Support for k=0 mode (set
grid.k0=True)Test for convolutions
Test for 3D Euler, which checks that the divergence is zero and the energy is conserved over 100 ode steps.
Added timings (instead of just speed) to benchmarking
Add rainbow desaturated colormap as default
Add min and max solver step size
Add “compact” option to pltshowm
The latest convolution kernel is automatically cached, ensuring that if the grid doesn’t change it’s only computed once.
Added
cumulative_kfunction in Grid.PhysicsAdded utests for k0 and many more parameter combinations
Changed
drastically changed the way convolutions are computed. We compute a convolution kernel on grid initialisation (which computes all the triads), then we simply iterate over this kernel. This results in a faster convolution (and it makes handling the k=0 mode easier).
update typing to py3.9 (
typing.Dict -> dict, …)solver.ode_stepno longer resets on a resumed run. It can now be used to set the end of the simulation.Changed
laplacian3D_invandlaplacian3Dtolaplacian_invandlaplacianinGrid.Mathsince the formula is genericChange all
Grid.Mathlinear operators to properties:M.dx(arr)becomesM.dx * arr. This allows to easily invert them, ex:M.laplacian_inv * arr = M.inv(M.laplacian) * arrSet default plot behavior to
initFormat
Fixed
Fixed the formula of
P_projectorAdded rough support for k0 mode in spectrum (not calculated for k=0, but won’t error anymore)
[1.5.0]
Added
Add
P_projectorinGrid(faster to use than going through the rotational)Add a
saveandlegendoption inpltshowmAdd the property
grid.ks_1D_midto represent k values of data averaged overks_1Dintervals (ex spectras)Add
initFormatfunction toplotLib.pyto easily make plots that are formatted for scientific publicationsAdd an
Examplesfolder that showcases the following features from the past months (none of which are polished): 2D basilisk code, JP Laval’s Fortran code and the visualisation of its .nc outputs, the newinitFormatfunction.Add
random_cmapinUtilsto generate a random colormap with N items (from SO)
Changed
Set default number of CPUs used to max//2 instead of max (which hogs all the resources and slows down a lot). We still recommend setting the numbr of threads manually for best performances.
Updated several libs in
requirements.txtMoved old files to the Archive, restructured the Archive for a clearer chronological browsing
Benchmarking now also tests running several convolutions at once using Joblib. The final graph has also been reworked.
Fixed
The end_simulation parameters now have proper default values
Grid fields get updated earlier in
visc_update_lin(was done later, could result in incorrect results)Fixed a sign in
P_projectorFix singlethreading import in
NS3D.py
[1.4.0]
Added
Unit tests for
datasci.py,custom_logger.py,IOLib.py,misc.py,Grid.pyexcept for Grid.Maths.convolveRequirements:
deepdiff->5.2.3function
randcomplexindatasci.pyto generate normal-random complex arrays from a shape
Changed
Requirements: numpy
1.20.1->1.20.2Renamed
rot_inv_3D_divfreetorot3D_inv,rot_inv_3Dtorot3D_inv(same 2D),laplacian_invtolaplacian3D_invpowerlaw_fitcan take an additional argumentato fit with a determined power lawmuch faster
spectrummethod. Spectrum’s callback now takes a bool mask of points as its secondary arg.
Fixed
powerlaw_fit’smaskargument now defaults toNonelaplacian3D_invnow has the correct signspectrumwas divided by a spurrious factor 2
Removed
Removed legacy support for
.npysave filesRemoved
energyspectrumnow that we have the more generalspectrumRemoved
wkmax(lack of utility)
[1.3.0]
Added
Log means in
treat_3D.pyfor Re and “epsilon” dissipation ratesInstall instructions in README
grid real-space length and volume are accessible via properties of the Grid() object
new function
plot2axesXinplotlibto get a figure with two X axis
Changed
pltshowm now plots with a grid (alpha=0.3)
Fixed
HRB Scalings in Reynolds and dissipation rates (epsilons)
[1.2.0]
Added
changelog
Fixed
Saved source now correctly saved as
.py.gitignore now properly ignores pycache
reflected previous namechanges in
launch_batch.shLibraries path added to simulation env. SImulation files can be run out-of-the-box without fiddling with the source dir
datasci.pynow properly singlethreads (was broken by a previous import of scipy)Python no longer errors if plotting on a backend that doesn’t support fullscreen
Missing rescaling time in several
treat_?Dfunctions
[1.1.0] - 2021-03-25
Added
Simulation source files (the “topmost” file ran) is saved as
source.pyin the save dir
[1.0.3_release] - 2021-03-25
Warning: this release is NOT backwards-compatible in any way.
Since it’s the first one of the changelog, I will not bother listing all the changes from the previous (undocumented) release.
Added
Proper gitlab CI (only lint for now)
Licence CC BY-NC-SA 4.0
Changed
Whole project linted, inline-documented, refactored (also structure-wise)
Numpy threads capped to 1
Prints replaced by logging
Fixed
Corrupted JSON files on a brutal stoppage are now backed up. Writing process is more robust.
Fix last step > max step in DataExplorer
Too many fixes to list here. Later changelog entries will be more precise.