Skip to content

Releases: jrenaud90/CyRK

v0.12.1

02 Dec 19:57
70051f5
Compare
Choose a tag to compare

Changes

Fixes:

  • Added fix so that arrays returned by WrapCySolverResult class are not destroyed when class is. Instead they are managed by python's garbage collector once they are held by a python variable. This addresses Github issues #80 and #78

Tests:

  • Added test to check that arrays stay alive after underlying WrapCySolverResult class is destroyed.

GitHub Tracked Changes

Full Changelog: v0.12.0...v0.12.1

v0.12.0

02 Dec 18:18
b6f2ff2
Compare
Choose a tag to compare

Changes

New & Changes:

  • MAX_STEP can now be cimported from the top-level of CyRK: from CyRK cimport MAX_STEP
  • Changed uses of void* to char* for both diffeq additional args and pre-eval outputs. The signature of these functions has changed, please review documentation for correct usage.
  • Added new diagnostic info display tool to cysolve_ivp and pysolve_ivp output that you can access with <result>.print_diagnostics().

Fixes:

  • Fixed issue with cysolve_ivp (pysolve_ivp did not have this bug) where additional args are passed to diffeq and dense output is on and extra output is captured.
    • Calling the dense output when extra output is on requires additional calls to the diffeq. However, after integration there is no gurantee that the args pointer is pointing to the same memory or that the values in that memory have not changed.
    • Best case, this could cause unexpected results as new values are used for additional args; worst case it could cause access violations if the diffeq tries to access released memory.
    • Now the CySolverBase makes a copy of the additional argument structure so it always retains those values as long as it is alive. This requires an additional memory allocation at the start of integration. And it requires the user to provide the size of the additional argument structure to cysolve_ivp.

Tests:

  • Fixed tests where additional args were not being used.
  • Fixed issue with diffeq test 5.
    • This fixes GitHub Issue #67
  • Added tests to solve large number of diffeqs simultaneously to try to catch issues related to GitHub issue #78.

Documentation:

  • Updated the "Advanced CySolver.md" documentation that was out of date.

GitHub Tracked Changes

Full Changelog: v0.11.5...v0.12.0

CyRK v0.11.5

27 Nov 18:31
Compare
Choose a tag to compare

Changes

New:

  • Added a steps_taken tracking variable to the C++ class CySolverResult and the Cython wrapped WrapCySolverResult so that users can see how many steps were taken during integration even when using t_eval.

GitHub Tracked Changes

Full Changelog: v0.11.4...v0.11.5

CyRK v0.11.4

25 Nov 18:55
69b67f7
Compare
Choose a tag to compare

Changes

C++ Changes

  • Moved away from stack to heap allocated vectors for arrays that depend on the size of y0. Prior stack allocation required a hard upper limit which was a limitation for some use cases (Addresses GitHub Issue #74).

GitHub Tracked Changes

  • Moved to heap-allocated arrays for arrays that depend on y0 size by @jrenaud90 in #76

Full Changelog: v0.11.3...v0.11.4

CyRK v0.11.3

19 Nov 03:06
cfaeb91
Compare
Choose a tag to compare

Changes

New:

  • Added helper function to allow users to include CyRK headers during installation. CyRK.get_include() this returns a list which must be appended to your include list in "setup.py".
  • Some minor performance improvements when using dense output or t_eval.
  • Added new cysolve_ivp C++ function, baseline_cysolve_ivp_noreturn, and cython wrapped version, cysolve_ivp_noreturn, that require the storage class as input (then modify it) rather than provide it as output.

C++ Changes:

  • Major rework of the C++ Solver backend
    • The CySolverResult storage structure is now the owner of: the solution data, the dense outputs, and the solver itself (before the solver was stand alone). This ensures that the solver is alive for the dense outputs which, depending on settings, may need to make calls to the solver even after the integration is complete.
    • Removed many pointers in favor of direct access of variables. This was due to some variables moving and hanging pointers causing crashes.
    • Drastically reduced the size of CySolverDense and moved its state data to a heap allocated array. This has led to large performance gains when dense_output=True for integrations requiring a large number of steps.
  • num_y and num_extra are now size_t type instead of unsigned ints.
  • integration method is not int instead of unsigned int.

Fixes:

  • Fixed issue where if t_eval was less than t_end it could cause an access violation.
  • Fixed issue where dense output was sometimes being created twice when t_eval was provided.
  • Addressed several compile warnings.
  • Fixed issue where when t_eval is provided and dense output = true, cysolver may call a dense solution that has moved (hanging pointer).

GitHub Tracked Changes

Full Changelog: v0.11.2...v0.11.3

CyRK v0.11.2

13 Nov 14:55
ebcd01e
Compare
Choose a tag to compare

Changes

New:

  • Using extra output (via num_extra) with cysolve_ivp and pysolve_ivp now works when dense_output is set to true. CySolverSolution will now make additional calls to the differential equation to determine correct values for extra outputs which are provided alongside the interpolated y values.
    • Added relevant tests.

Other:

  • Refactored some misspellings in the cysolver c++ backend.

Fix:

  • Fixed missing np.import_array in cysolver backend.

GitHub Tracked Changes

Full Changelog: v0.11.1...v0.11.2

CyRK v0.11.1

12 Nov 14:19
Compare
Choose a tag to compare

Changes

Fixes:

  • MacOS was not correctly installing openmp version of the cython object files. Fixed this but...

Issues:

  • Cython prange was failing (for the array interps) only on MacOS on some versions of Python. Couldn't figure it out so removing prange for now.

GitHub Tracked Changes

Full Changelog: v0.11.0...v0.11.1

CyRK v0.11.0

08 Nov 19:02
37dc62f
Compare
Choose a tag to compare

Changes

New:

  • WrapCySolverResult result class now provides user access to attribute num_y.

Removed:

  • Removed previous cyrk_ode and older version of the CySolver class-based solver.
    • The functionality of cyrk_ode is now handled by the new (as of v0.10.0) pysolve_ivp function.
    • The functionality of CySolver is partly handled by the new (as of v0.10.0) cysolve_ivp function.
      • Note that the new cysolve_ivp is a functional approach. A class based approach like the older CySolver class supported is no longer available but could be easy to implement. If there is interest please create a Github issue for it.

Refactors:

  • Refactored the new cysolver and pysolver files to remove "New". This will break imports based on previous versions.
  • Broke up cysolver and pysolver into different files to isolate each other's code.

Other:

  • Changed the default ordering for diffeq function inputs to follow the scheme dydt(dy, t, y); previously it was dydt(t, y, dy). This affects the cy2nb and nb2cy helper functions.
  • Updated performance module to use new methods over old.

Demos:

  • Fixed typo in the type of the mixed-type args container.
  • Updated to work with new refactoring.

Tests:

  • Updated tests to use pysolver where cyrk_ode was used.
  • Changed tolerances and other inputs to try to make some tests faster.

Dependencies:

  • Tested that CyRK works with numpy v2.X; but a lot of other packages don't right now. So setting it as upper limit.
  • Tested that CyRK can not work with Python 3.13 yet due to numba dependence. See issue

GitHub Tracked Changes

Full Changelog: v0.10.2...v0.11.0

CyRK v0.10.2

07 Nov 22:04
ef06b9e
Compare
Choose a tag to compare

Changes

New:

  • Added new interpolate_from_solution_list function to help interpolate between multiple solutions across a domain.

Bugs:

  • Fixed issue where CyRK.test_cysolver() used incorrect kind and order of arguments.
  • Fixed MacOS compile issues when using OpenMP (for both x86-64 and arm64 macos).
  • Fixed issue where MacOS was failing certain tests.
  • Building new wheels to fix Github issue #62.

Tests:

  • Added tests to check all built in testers.

GitHub Tracked Changes

Full Changelog: v0.10.1...v0.10.2

CyRK v0.10.1

25 Jul 16:47
38082ec
Compare
Choose a tag to compare

Changes

C++ Back End:

  • Changed optional args from double pointer to void pointers to allow for arbitrary objects to be passed in.
    • Added description of this feature to "Documentation/Advanced CySolver.md" documentation and "Demos/Advanced CySolver Examples.ipynb" jupyter notebook.
  • Allow users to specify a "Pre-Eval" function that can be passed to the differential equation. This function should take in time, y, and args and update an output pointer which can then be used by the diffeq to solve for dydt.

cysolve_ivp`:

  • Change call signature to accept new pre_eval_func function.
  • Added more differential equations to tests.
  • Added tests to check new void arg feature.
  • Added tests to check new pre-eval function feature.

MacOS:

  • Going back to GCC for C and C++ compile instead of clang (ran into inconsistent test failures with clang).

GitHub Tracked Changes

Full Changelog: v0.10.0...v0.10.1