Skip to content

Commit cf288c3

Browse files
authored
Release v0.0.5 (#15)
* Update version * Attempt to use brew instead * Try removing arm logic * Switch deployment target * Try ignoring version * Put version back * Update code to match pybamm * Update submodule url (#21) * Revert a change * Update docs
1 parent e3b7e10 commit cf288c3

File tree

7 files changed

+49
-5
lines changed

7 files changed

+49
-5
lines changed

.github/workflows/build_wheels.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ jobs:
173173
174174
export SDKROOT=${SDKROOT:-$(xcrun --show-sdk-path)}
175175
176-
# Can't download LLVM-OpenMP directly, use conda/mamba and set environment variables
176+
# Can't download LLVM-OpenMP directly, use conda and set environment variables
177177
brew install miniforge
178-
mamba create -n pybammsolvers-dev $OPENMP_URL
178+
conda create -n pybammsolvers-dev $OPENMP_URL
179179
if [[ $(uname -m) == "x86_64" ]]; then
180180
PREFIX="/usr/local/Caskroom/miniforge/base/envs/pybammsolvers-dev"
181181
elif [[ $(uname -m) == "arm64" ]]; then

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "pybind11"]
22
path = pybind11
3-
url = git@github.com:pybind/pybind11.git
3+
url = https://github.com/pybind/pybind11.git

README.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,48 @@
11
# IDAKLU solver
22

3-
Standalone repository for the IDAKLU solver used in PyBaMM
3+
Standalone repository for the C/C++ solvers used in PyBaMM
44

55
## Installation
66

77
```bash
88
pip install pybammsolvers
99
```
10+
11+
## Solvers
12+
13+
The following solvers are available:
14+
- PyBaMM's IDAKLU solver
15+
16+
## Local builds
17+
18+
For testing new solvers and unsupported architectures, local builds are possible.
19+
20+
### Nox
21+
22+
Nox can be used to do a quick build:
23+
```bash
24+
pip install nox
25+
nox
26+
```
27+
This will setup an environment and attempt to build the library.
28+
29+
### MacOS
30+
31+
Mac dependencies can be installed using brew
32+
```bash
33+
brew install libomp
34+
brew reinstall gcc
35+
python install_KLU_Sundials.py
36+
pip install .
37+
```
38+
39+
### Linux
40+
41+
Linux installs may vary based on the distribution, however, the basic build can
42+
be performed with the following commands:
43+
```bash
44+
sudo apt-get libopenblas-dev gcc gfortran make g++ build-essential
45+
pip install cmake casadi setuptools wheel
46+
python install_KLU_Sundials.py
47+
pip install .
48+
```

src/pybammsolvers/idaklu_source/IDAKLUSolverOpenMP.inl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ void IDAKLUSolverOpenMP<ExprSet>::SetSolverOptions() {
192192
// Initial step size
193193
CheckErrors(IDASetInitStep(ida_mem, solver_opts.dt_init));
194194

195+
// Minimum absolute step size
196+
CheckErrors(IDASetMinStep(ida_mem, solver_opts.dt_min));
197+
195198
// Maximum absolute step size
196199
CheckErrors(IDASetMaxStep(ida_mem, solver_opts.dt_max));
197200

src/pybammsolvers/idaklu_source/Options.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ SolverOptions::SolverOptions(py::dict &py_opts)
142142
max_order_bdf(py_opts["max_order_bdf"].cast<int>()),
143143
max_num_steps(py_opts["max_num_steps"].cast<int>()),
144144
dt_init(RCONST(py_opts["dt_init"].cast<double>())),
145+
dt_min(RCONST(py_opts["dt_min"].cast<double>())),
145146
dt_max(RCONST(py_opts["dt_max"].cast<double>())),
146147
max_error_test_failures(py_opts["max_error_test_failures"].cast<int>()),
147148
max_nonlinear_iterations(py_opts["max_nonlinear_iterations"].cast<int>()),

src/pybammsolvers/idaklu_source/Options.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ struct SolverOptions {
3131
int max_order_bdf;
3232
int max_num_steps;
3333
double dt_init;
34+
double dt_min;
3435
double dt_max;
3536
int max_error_test_failures;
3637
int max_nonlinear_iterations;

src/pybammsolvers/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.0.4"
1+
__version__ = "0.0.5"

0 commit comments

Comments
 (0)