Skip to content

Commit

Permalink
Updating docs and various READMEs; Various cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterMeisrimelModelon committed Jan 17, 2024
1 parent f63052e commit 3b5ca2a
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 31 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
--- CHANGELOG ---
--- Assimulo-3.4.4 ---
--- Assimulo-3.5.0 ---
* Changed "numpy.float" to equivalent "numpy.float64" due to DeprecationWarnings in numpy >= 1.20.
* Improved examples with sparse jacobians by omitting the zeros in the jacobians.
* Upgraded to Cython >= 3.

--- Assimulo-3.4.3 ---
* Improved compliance with newer scipy version by instead using corresponding numpy calls when more suitable.
Expand Down
4 changes: 2 additions & 2 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ INSTALL
=======

*REQUIREMENTS
- Python-2.7/3.* (with headers)
- Python-3 (with headers)
- Numpy, Scipy, Pylab
- Sundials-2.5/2.6/3.1/4.1
- Cython >= 0.18
- Cython >= 3
- C-compiler
- Fortran-compiler
- BLAS
Expand Down
17 changes: 17 additions & 0 deletions doc/sphinx/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@
Changelog
==========

--- Assimulo-3.5.0 ---
* Changed "numpy.float" to equivalent "numpy.float64" due to DeprecationWarnings in numpy >= 1.20.
* Improved examples with sparse jacobians by omitting the zeros in the jacobians.
* Upgraded to Cython >= 3.

--- Assimulo-3.4.3 ---
* Improved compliance with newer scipy version by instead using corresponding numpy calls when more suitable.

--- Assimulo-3.4.2 ---
* Updated an import statement in one of the examples to resolve compliance issues with scipy 1.10.1.

--- Assimulo-3.4.1 ---
* Restored functionality of CVode with 'external_event_detection' = True, which broke with 3.4.0.
* CVode now allows rtol = 0.
* Added support for CVode (without sensitivities) with non-negative relative tolerance vector.
Requires a SUNDIALS installation supporting this, see README.

--- Assimulo-3.4.0 ---
* Removed Radau5ODE Fortran implementation.
This change should be seamless since the C implementation is numerically equivalent.
Expand Down
8 changes: 4 additions & 4 deletions doc/sphinx/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ Installation

Dependencies:

- `Python-2.7 / 3.* <http://www.python.org/>`_
- `Numpy <http://www.scipy.org/Download/>`_ (>1.6.1 for the solver DASP3)
- `Python-3 <http://www.python.org/>`_
- `Numpy <http://www.scipy.org/Download/>`_
- `Scipy <http://www.scipy.org/Download/>`_
- `Pylab <http://matplotlib.sourceforge.net/>`_

Additional dependencies for compiling from source:

- `Python-2.7 / 3.* <http://www.python.org/>`_ with headers (python-dev package for Ubuntu)
- `Python-3 <http://www.python.org/>`_ with headers (python-dev package for Ubuntu)
- `Sundials-2.6/2.7/3.1/4.1 <http://computation.llnl.gov/casc/sundials/main.html>`_ (for 64bits machines, install Sundials using -fPIC)
- `Cython 0.18 <http://www.cython.org/>`_
- `Cython 3.0.7 <http://www.cython.org/>`_
- C compiler
- Fortran compiler
- BLAS (only needed for the solver GLIMDA)
Expand Down
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[options]
setup_requires =
setuptools
numpy >= 1.17
numpy >= 1.26.3
cython >= 3.0.7

install_requires =
python >= 3.11
numpy >= 1.17
scipy >= 1.3
numpy >= 1.26.3
scipy >= 1.11.4
cython >= 3.0.7
nose >= 1.3.7
matplotlib > 3
20 changes: 6 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,18 @@ def remove_prefix(name, prefix):
import numpy.distutils as nd

try:
# from Cython.Distutils import build_ext ## TODO: obsolete?
from Cython.Distutils import build_ext
from Cython.Build import cythonize
except ImportError:
msg="Please upgrade to a newer Cython version, >= 0.18."
msg="Please upgrade to a newer Cython version, >= 3"
logging.error(msg)
raise Exception(msg)

#Verify Cython version
import Cython
cython_version = Cython.__version__.split(".")
if not (cython_version[0] > '0' or (cython_version[0] == '0' and cython_version[1] >= '18')):
msg="Please upgrade to a newer Cython version, >= 0.18."
if not cython_version[0] >= '3':
msg="Please upgrade to a newer Cython version, >= 3"
logging.error(msg)
raise Exception(msg)

Expand Down Expand Up @@ -661,14 +661,6 @@ def fortran_extensionlists(self):
change_dir = False

ext_list = prepare.cython_extensionlists()

#MAJOR HACK DUE TO NUMPY CHANGE IN VERSION 1.6.2 THAT DOES NOT SEEM TO
#HANDLE EXTENSIONS OF BOTH TYPE (DISTUTILS AND NUMPY DISTUTILS) AT THE
#SAME TIME.
for e in ext_list:
e.extra_f77_compile_args = []
e.extra_f90_compile_args = []

ext_list += prepare.fortran_extensionlists()

# distutils part
Expand All @@ -677,7 +669,7 @@ def fortran_extensionlists(self):
NAME = "Assimulo"
AUTHOR = u"C. Winther (Andersson), C. Führer, J. Åkesson, M. Gäfvert"
AUTHOR_EMAIL = "[email protected]"
VERSION = "trunk" if version_number_arg == "Default" else version_number_arg
VERSION = "3.5.0" if version_number_arg == "Default" else version_number_arg
LICENSE = "LGPL"
URL = "http://www.jmodelica.org/assimulo"
DOWNLOAD_URL = "http://www.jmodelica.org/assimulo"
Expand Down Expand Up @@ -709,7 +701,7 @@ def fortran_extensionlists(self):
http://www.jmodelica.org/assimulo .
The package requires Numpy, Scipy and Matplotlib and additionally for
compiling from source, Cython 0.18, Sundials 2.6/2.7/3.1/4.1, BLAS and LAPACK
compiling from source, Cython >=3, Sundials 2.6/2.7/3.1/4.1, BLAS and LAPACK
together with a C-compiler and a FORTRAN-compiler.
"""

Expand Down
6 changes: 2 additions & 4 deletions src/lib/sundials_includes.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ see also Jon Olav Vik:
http://codespeak.net/pipermail/cython-dev/2009-June/005947.html
"""
#import numpy as N
#cimport numpy as N

from numpy cimport NPY_DOUBLE, npy_intp, NPY_INT

Expand Down Expand Up @@ -393,8 +391,8 @@ cdef extern from "cvodes/cvodes.h":


#Statistics
int CVodeGetEstLocalErrors(void *cvode_mem, N_Vector ele) #Estimated local errors
int CVodeGetErrWeights(void *cvode_mem, N_Vector eweight) #Estimated local errors
int CVodeGetEstLocalErrors(void *cvode_mem, N_Vector ele) #Estimated local errors
int CVodeGetErrWeights(void *cvode_mem, N_Vector eweight) #Estimated local errors
int CVodeGetSensNumRhsEvals(void *cvode_mem, long int *nfSevals)
int CVodeGetNumRhsEvalsSens(void *cvode_mem, long int *nfevalsS)
int CVodeGetSensNumErrTestFails(void *cvode_mem, long int *nSetfails)
Expand Down
3 changes: 0 additions & 3 deletions src/solvers/radar5.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,9 +736,6 @@ def _get_rtol(self):
rtol=property(_get_rtol,_set_rtol)

def _get_grid(self):
"""
TODO
"""
return self._grid
def _set_grid(self, grid):
self._grid
Expand Down

0 comments on commit 3b5ca2a

Please sign in to comment.