File tree Expand file tree Collapse file tree 7 files changed +49
-5
lines changed Expand file tree Collapse file tree 7 files changed +49
-5
lines changed Original file line number Diff line number Diff line change @@ -173,9 +173,9 @@ jobs:
173
173
174
174
export SDKROOT=${SDKROOT:-$(xcrun --show-sdk-path)}
175
175
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
177
177
brew install miniforge
178
- mamba create -n pybammsolvers-dev $OPENMP_URL
178
+ conda create -n pybammsolvers-dev $OPENMP_URL
179
179
if [[ $(uname -m) == "x86_64" ]]; then
180
180
PREFIX="/usr/local/Caskroom/miniforge/base/envs/pybammsolvers-dev"
181
181
elif [[ $(uname -m) == "arm64" ]]; then
Original file line number Diff line number Diff line change 1
1
[submodule "pybind11 "]
2
2
path = pybind11
3
- url = git@ github.com: pybind/pybind11.git
3
+ url = https:// github.com/ pybind/pybind11.git
Original file line number Diff line number Diff line change 1
1
# IDAKLU solver
2
2
3
- Standalone repository for the IDAKLU solver used in PyBaMM
3
+ Standalone repository for the C/C++ solvers used in PyBaMM
4
4
5
5
## Installation
6
6
7
7
``` bash
8
8
pip install pybammsolvers
9
9
```
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
+ ```
Original file line number Diff line number Diff line change @@ -192,6 +192,9 @@ void IDAKLUSolverOpenMP<ExprSet>::SetSolverOptions() {
192
192
// Initial step size
193
193
CheckErrors (IDASetInitStep (ida_mem, solver_opts.dt_init ));
194
194
195
+ // Minimum absolute step size
196
+ CheckErrors (IDASetMinStep (ida_mem, solver_opts.dt_min ));
197
+
195
198
// Maximum absolute step size
196
199
CheckErrors (IDASetMaxStep (ida_mem, solver_opts.dt_max ));
197
200
Original file line number Diff line number Diff line change @@ -142,6 +142,7 @@ SolverOptions::SolverOptions(py::dict &py_opts)
142
142
max_order_bdf(py_opts[" max_order_bdf" ].cast<int >()),
143
143
max_num_steps(py_opts[" max_num_steps" ].cast<int >()),
144
144
dt_init(RCONST(py_opts[" dt_init" ].cast<double >())),
145
+ dt_min(RCONST(py_opts[" dt_min" ].cast<double >())),
145
146
dt_max(RCONST(py_opts[" dt_max" ].cast<double >())),
146
147
max_error_test_failures(py_opts[" max_error_test_failures" ].cast<int >()),
147
148
max_nonlinear_iterations(py_opts[" max_nonlinear_iterations" ].cast<int >()),
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ struct SolverOptions {
31
31
int max_order_bdf;
32
32
int max_num_steps;
33
33
double dt_init;
34
+ double dt_min;
34
35
double dt_max;
35
36
int max_error_test_failures;
36
37
int max_nonlinear_iterations;
Original file line number Diff line number Diff line change 1
- __version__ = "0.0.4 "
1
+ __version__ = "0.0.5 "
You can’t perform that action at this time.
0 commit comments