Skip to content

Commit ad9d2e0

Browse files
committedFeb 7, 2020
#759 merge with master
2 parents 067eb7b + 8f417cb commit ad9d2e0

39 files changed

+3929
-933
lines changed
 

‎.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ pyvenv.cfg
7070
# sundials
7171
sundials
7272
sundials4
73+
sundials-*
74+
SuiteSparse-*
75+
build_sundials
76+
77+
# downloads
78+
*.gz
7379

7480
# third party
7581
third-party

‎.travis.yml

+18-2
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,28 @@ before_install: |
200200
# without the packages from -dev and -doc!
201201
install:
202202
- pip install --upgrade pip
203+
# In order to download SUNDIALS and SuiteSparse
204+
- pip install wget
203205
- pip install .
204206
- if [[ $PYBAMM_DOCS == true ]]; then pip install -e .[docs]; fi;
205207
- if [[ $PYBAMM_STYLE == true || $PYBAMM_EXAMPLES ]]; then pip install -e .[dev]; fi;
206208
- if [[ $PYBAMM_COVER == true ]]; then pip install coverage codecov; fi;
207-
- if [[ $PYBAMM_SCIKITS_ODES == true ]]; then source scripts/install_scikits_odes.sh; fi;
208-
- if [[ $PYBAMM_KLU == true ]]; then source scripts/install_sundials_4.1.0.sh; fi;
209+
- |
210+
if [[ $PYBAMM_SCIKITS_ODES == true ]]; then
211+
python setup.py install_odes -f;
212+
export LD_LIBRARY_PATH=sundials/lib:$LD_LIBRARY_PATH
213+
fi;
214+
- |
215+
if [[ $PYBAMM_KLU == true ]]; then
216+
mkdir -p third-party;
217+
cd third-party;
218+
rm -rf pybind11;
219+
git clone https://github.com/pybind/pybind11.git;
220+
cd ../;
221+
python setup.py install_klu -f;
222+
export LD_LIBRARY_PATH=sundials/lib:$LD_LIBRARY_PATH
223+
export LD_LIBRARY_PATH=SuiteSparse-5.6.0/lib:$LD_LIBRARY_PATH
224+
fi;
209225
210226
before_script:
211227
- python --version

‎CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
## Optimizations
3838

39+
- Now simplifying objects that are constant as soon as they are created ([#801](https://github.com/pybamm-team/PyBaMM/pull/801))
3940
- Simplified solver interface ([#800](https://github.com/pybamm-team/PyBaMM/pull/800))
4041
- Added caching for shape evaluation, used during discretisation ([#780](https://github.com/pybamm-team/PyBaMM/pull/780))
4142
- Added an option to skip model checks during discretisation, which could be slow for large models ([#739](https://github.com/pybamm-team/PyBaMM/pull/739))

‎CMakeLists.txt

+6-5
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@ add_subdirectory(third-party/pybind11)
88
pybind11_add_module(idaklu pybamm/solvers/c_solvers/idaklu.cpp)
99

1010
# Sundials
11-
set(SUNDIALS_INCLUDE "sundials4/include")
11+
set(SUNDIALS_INCLUDE "sundials/include")
1212
TARGET_INCLUDE_DIRECTORIES(idaklu PRIVATE ${SUNDIALS_INCLUDE})
1313

14-
find_library(SUNMATSPARSE sundials_sunmatrixsparse PATHS "sundials4/lib" NO_DEFAULT_PATH)
15-
find_library(IDA sundials_ida PATHS "sundials4/lib" NO_DEFAULT_PATH)
16-
find_library(NVECTOR sundials_nvecserial PATHS "sundials4/lib" NO_DEFAULT_PATH)
17-
find_library(SUNKLU sundials_sunlinsolklu PATHS "sundials4/lib" NO_DEFAULT_PATH)
14+
find_library(SUNMATSPARSE sundials_sunmatrixsparse PATHS "sundials/lib" NO_DEFAULT_PATH)
15+
find_library(IDA sundials_ida PATHS "sundials/lib" NO_DEFAULT_PATH)
16+
find_library(NVECTOR sundials_nvecserial PATHS "sundials/lib" NO_DEFAULT_PATH)
17+
find_library(SUNKLU sundials_sunlinsolklu PATHS "sundials/lib" NO_DEFAULT_PATH)
1818
TARGET_LINK_LIBRARIES(idaklu PRIVATE ${SUNMATSPARSE} ${IDA} ${NVECTOR} ${SUNKLU})
1919

2020
# link suitesparse
2121
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})
22+
set(SuiteSparse_ROOT SuiteSparse-5.6.0)
2223
find_package(SuiteSparse OPTIONAL_COMPONENTS KLU AMD COLAMD BTF)
2324
include_directories(${SuiteSparse_INCLUDE_DIRS})
2425
target_link_libraries(idaklu PRIVATE ${SuiteSparse_LIBRARIES})

0 commit comments

Comments
 (0)
Please sign in to comment.