Skip to content

Commit

Permalink
Merge pull request #38 from jrenaud90/0.8.2
Browse files Browse the repository at this point in the history
0.8.2
  • Loading branch information
jrenaud90 authored Sep 25, 2023
2 parents 8b074a4 + 724bce0 commit 75afcde
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
9 changes: 7 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@

## 2023

#### v0.8.2

New Features:
- Added a helper flag to control if `CySolver.reset_state` is called at the end of initialization.

#### v0.8.1

New Features:
- Added more interp functions that take pointers as arguments
- Added more interp functions that take pointers as arguments.

Changes:
- Converted interp functions to use each other where possible, rather than having separate definitions.
Expand All @@ -15,7 +20,7 @@ Performance:
- Moved some backend functionality for CyRK.interp to pure c file for performance gains.

Bug Fixes:
- Fixed issue with "cy/common.pyx" not having the correct cython flags during compliation.
- Fixed issue with "cy/common.pyx" not having the correct cython flags during compilation.

### v0.8.0

Expand Down
7 changes: 6 additions & 1 deletion CyRK/cy/cysolver.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ cdef class CySolver:
Py_ssize_t num_extra = 0,
bool_cpp_t interpolate_extra = False,
Py_ssize_t expected_size = 0,
bool_cpp_t call_first_reset = True,
bool_cpp_t auto_solve = True):
"""
Initialize new CySolver instance.
Expand Down Expand Up @@ -310,6 +311,9 @@ cdef class CySolver:
Used to build temporary storage arrays for the solution results.
If set to 0 (the default), then the solver will attempt to guess on a suitable expected size based on the
relative tolerances and size of the integration domain.
call_first_reset : bool, default=True
If set to True, then the solver will call its `reset_state` method at the end of initialization. This flag
is overridden by the `auto_solve` flag.
auto_solve : bool_cpp_t, default=True
If set to True, then the solver's `solve` method will be called at the end of initialization.
Otherwise, the user will have to call `solver_instance = CySolver(...); solver_instance.solve()`
Expand Down Expand Up @@ -583,7 +587,8 @@ cdef class CySolver:

# Parameters are initialized but may not be set to correct values.
# Call reset state to ensure everything is ready.
self.reset_state()
if call_first_reset or auto_solve:
self.reset_state()

# Run solver if requested
if auto_solve:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name='CyRK'
version = '0.8.1'
version = '0.8.2'
description='Runge-Kutta ODE Integrator Implemented in Cython and Numba.'
authors= [
{name = 'Joe P. Renaud', email = 'joe.p.renaud@gmail.com'}
Expand Down

0 comments on commit 75afcde

Please sign in to comment.