cronos-mcpp 5.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. cronos_mcpp-5.0.0/.gitignore +12 -0
  2. cronos_mcpp-5.0.0/BUILD_CMAKE.md +93 -0
  3. cronos_mcpp-5.0.0/CMakeLists.txt +975 -0
  4. cronos_mcpp-5.0.0/INSTALL.md +193 -0
  5. cronos_mcpp-5.0.0/LICENSE +101 -0
  6. cronos_mcpp-5.0.0/LICENSES/GPL-2.0-or-later.txt +117 -0
  7. cronos_mcpp-5.0.0/PKG-INFO +122 -0
  8. cronos_mcpp-5.0.0/README.md +100 -0
  9. cronos_mcpp-5.0.0/THIRD_PARTY_NOTICES.txt +3995 -0
  10. cronos_mcpp-5.0.0/doc/CRONOS.dox +2817 -0
  11. cronos_mcpp-5.0.0/doc/CRONOS.txt +82 -0
  12. cronos_mcpp-5.0.0/doc/ENVIRONMENT.md +109 -0
  13. cronos_mcpp-5.0.0/notebook/FFModel_tutorial.ipynb +1323 -0
  14. cronos_mcpp-5.0.0/notebook/FFModel_tutorial.py +402 -0
  15. cronos_mcpp-5.0.0/notebook/OCFESLV_tutorial.ipynb +826 -0
  16. cronos_mcpp-5.0.0/notebook/OCFESLV_tutorial.py +375 -0
  17. cronos_mcpp-5.0.0/notebook/ODESLV_tutorial.ipynb +2164 -0
  18. cronos_mcpp-5.0.0/notebook/ODESLV_tutorial.py +358 -0
  19. cronos_mcpp-5.0.0/notebook/README.md +9 -0
  20. cronos_mcpp-5.0.0/notebook/pyproject.toml +17 -0
  21. cronos_mcpp-5.0.0/notebook/uv.lock +1464 -0
  22. cronos_mcpp-5.0.0/pyproject.toml +65 -0
  23. cronos_mcpp-5.0.0/src/base_cvodes.hpp +534 -0
  24. cronos_mcpp-5.0.0/src/base_sundials.hpp +47 -0
  25. cronos_mcpp-5.0.0/src/cronos.mk +86 -0
  26. cronos_mcpp-5.0.0/src/ffmodel.hpp +11617 -0
  27. cronos_mcpp-5.0.0/src/ffocfe.hpp +2275 -0
  28. cronos_mcpp-5.0.0/src/ffode.hpp +1092 -0
  29. cronos_mcpp-5.0.0/src/interface/check_ffmodel.py +337 -0
  30. cronos_mcpp-5.0.0/src/interface/check_ffocfe.py +212 -0
  31. cronos_mcpp-5.0.0/src/interface/check_ffodeslv.py +249 -0
  32. cronos_mcpp-5.0.0/src/interface/check_ocfeslv.py +273 -0
  33. cronos_mcpp-5.0.0/src/interface/check_odeslv.py +274 -0
  34. cronos_mcpp-5.0.0/src/interface/cronos.cpp +114 -0
  35. cronos_mcpp-5.0.0/src/interface/cronos.mk +64 -0
  36. cronos_mcpp-5.0.0/src/interface/ffdom.cpp +138 -0
  37. cronos_mcpp-5.0.0/src/interface/ffmodel.cpp +717 -0
  38. cronos_mcpp-5.0.0/src/interface/ffocfe.cpp +293 -0
  39. cronos_mcpp-5.0.0/src/interface/ffode.cpp +218 -0
  40. cronos_mcpp-5.0.0/src/interface/gen_cvodes_options.hpp +130 -0
  41. cronos_mcpp-5.0.0/src/interface/gen_environment.py +151 -0
  42. cronos_mcpp-5.0.0/src/interface/gen_ffmodel_options.hpp +195 -0
  43. cronos_mcpp-5.0.0/src/interface/gen_ocfeslv_options.hpp +448 -0
  44. cronos_mcpp-5.0.0/src/interface/gen_odeslv_options.hpp +25 -0
  45. cronos_mcpp-5.0.0/src/interface/gen_options.py +179 -0
  46. cronos_mcpp-5.0.0/src/interface/ocfeslv.cpp +433 -0
  47. cronos_mcpp-5.0.0/src/interface/odeslv.cpp +469 -0
  48. cronos_mcpp-5.0.0/src/makefile +64 -0
  49. cronos_mcpp-5.0.0/src/makeoptions.mk +53 -0
  50. cronos_mcpp-5.0.0/src/ocfeslv.hpp +28768 -0
  51. cronos_mcpp-5.0.0/src/ocplan.hpp +1982 -0
  52. cronos_mcpp-5.0.0/src/odeslv_base.hpp +1669 -0
  53. cronos_mcpp-5.0.0/src/odeslv_cvodes.hpp +1026 -0
  54. cronos_mcpp-5.0.0/src/odeslvs_base.hpp +894 -0
  55. cronos_mcpp-5.0.0/src/odeslvs_cvodes.hpp +1793 -0
  56. cronos_mcpp-5.0.0/tools/ci/check_notices.py +64 -0
  57. cronos_mcpp-5.0.0/tools/update_licence_header.py +84 -0
  58. cronos_mcpp-5.0.0/tools/wheel_variant.py +30 -0
@@ -0,0 +1,12 @@
1
+ # Generated documentation (cd doc && doxygen CRONOS.dox)
2
+ doc/html/
3
+
4
+ # CMake build trees (cmake -S . -B build ...)
5
+ build/
6
+ build-*/
7
+ build_*/
8
+
9
+ # Python
10
+ __pycache__/
11
+ *.pyc
12
+ .ipynb_checkpoints/
@@ -0,0 +1,93 @@
1
+ # Building CRONOS with CMake
2
+
3
+ The CMake build mirrors MC++ v5's: a header-only interface target (`cronos_headers`, alias `cronos::headers`)
4
+ carrying the include paths, compile definitions and link libraries; the `cronos` Python extension module; its
5
+ `cronos.pyi` type stub; optional test drivers registered with CTest.
6
+
7
+ ## Layout expected
8
+
9
+ ```
10
+ <cronosroot>/CMakeLists.txt
11
+ <cronosroot>/src/*.hpp the 11 CRONOS headers
12
+ <cronosroot>/src/interface/*.cpp the 7 binders (ffdom ffmodel odeslv ffode ocfeslv ffocfe cronos)
13
+ <cronosroot>/src/interface/gen_*_options.hpp the 4 generated option headers the binders include
14
+ <cronosroot>/extern/pybind11 optional vendored pybind11 (else an installed package is used)
15
+ <cronosroot>/test/ODESLVS/*.cpp ODESLV drivers
16
+ <cronosroot>/test/OCFESLV/*.cpp OCFESLV drivers (+ helpers such as test_deriv_utils.hpp)
17
+ <cronosroot>/notebook/ optional: tutorials, installed as-is
18
+ ```
19
+
20
+ ## Configure, build, install
21
+
22
+ ```
23
+ cmake -S <cronosroot> -B build \
24
+ -DMCPP_ROOT=<MC++ source tree, holding src/mc> \
25
+ -DSUNDIALS_DIR=<sundials prefix>/lib/cmake/sundials \
26
+ -DSUPERLU_ROOT=<SuperLU prefix> # if not on the default search path
27
+ cmake --build build -j $(nproc)
28
+ cmake --install build --prefix <prefix>
29
+ ```
30
+
31
+ `MCPP_ROOT`, `SUNDIALS_ROOT`, `SUITESPARSE_ROOT` and `SUPERLU_ROOT` are also read from the environment.
32
+
33
+ ## Options
34
+
35
+ | option | default | effect |
36
+ |---|---|---|
37
+ | `MC_INTERVAL_LIBRARY` | `BOOST` | interval backend, as MC++: BOOST, PROFIL (`PROFIL_HOME`), FILIB (`FILIB_HOME`), NONVERIFIED |
38
+ | `ENABLE_HSL` | OFF | MC13/MC21/MC33 (`MC__USE_HSL`), as MC++ |
39
+ | `MC__USE_FADBAD` | OFF | FADBAD++ forward AD (reads `MCPP_ROOT/src/3rdparty/fadbad++`) |
40
+ | `CRONOS_WITH_KLU` | ON | sparse KLU in CVODES (`CRONOS__WITH_KLU`): SuiteSparse KLU + SUNDIALS built with KLU |
41
+ | `CRONOS_WITH_UMFPACK` | **OFF** | UMFPACK sparse LU in OCFESLV's setup (`CRONOS__WITH_UMFPACK`) -- **GPL-2.0-or-later**: a binary linking it is subject to the GPL; without it the setup uses a dense inverse |
42
+ | `CRONOS_WITH_EIGEN` | ON | Eigen sparse QR in OCFESLV (`CRONOS__WITH_EIGEN`) |
43
+ | `CRONOS_WITH_SUPERLU` | ON | SuperLU through `arma::spsolve` (`ARMA_USE_SUPERLU`), OCFESLV's default factorization |
44
+ | `CRONOS_WITH_SPQR` | **OFF** | SPQR factorization in OCFESLV (`CRONOS__WITH_SPQR`) -- **GPL-2.0-or-later**: a binary linking it is subject to the GPL |
45
+ | `CRONOS_ARMA_WRAPPER` | OFF | link Armadillo's runtime wrapper library instead of using Armadillo header-only with BLAS/LAPACK (and SuperLU) linked directly; the wrapper also pulls in whatever Armadillo was built with, e.g. ARPACK and MPI |
46
+ | `ENABLE_PYTHON` | ON | the `cronos` module |
47
+ | `CRONOS_STUBS` | ON | generate and install `cronos.pyi` (needs `pybind11-stubgen` and `pymcpp` importable; `PYMCPP_DIR` points at the directory holding `pymcpp` if it is not on the Python path) |
48
+ | `ENABLE_EXAMPLES` | OFF | build every driver in `test/ODESLVS` and `test/OCFESLV`, register each with CTest (labels `ODESLVS`, `OCFESLV`) |
49
+ | `CRONOS_CXX_STANDARD` | 17 | as the Make setup; 20 accepted |
50
+ | `CUSTOM_PYTHON_PATH` | | Python executable or virtual-environment root, as MC++ |
51
+
52
+ Each library is found through its own CMake package where it installs one (SUNDIALS >= 6, SuiteSparse >= 7,
53
+ Eigen) and otherwise by a library and header search, so older SuiteSparse releases and hand-installed SUNDIALS
54
+ work too.
55
+
56
+ ## Python
57
+
58
+ * `cronos` uses `pymcpp`'s types (FFVar, FFGraph, FFPartial, ...) across the module boundary: **both modules must be
59
+ built with the same pybind11 release** (v3.0.4 today: v3.1.0 has the `keep_alive<0,N>` regression on rejected
60
+ overloads) and the same compiler; rebuild both after a pybind11 or header change.
61
+ * Installed into `${CMAKE_INSTALL_PREFIX}/lib` by default; for wheel builds with scikit-build-core, pass
62
+ `-DCRONOS_INSTALL_DIR=.` and install only the `python_modules` component.
63
+
64
+ ## Python checks: `make check`
65
+
66
+ ```
67
+ cmake --build build --target check # or: make -C build check
68
+ ```
69
+ builds the `cronos` module if needed, then runs `check_ffmodel.py`, `check_odeslv.py`, `check_ffodeslv.py`,
70
+ `check_ocfeslv.py` and `check_ffocfe.py` in turn, stopping at the first failure. They are taken from
71
+ `CRONOS_PYCHECK_DIR` (default `src/interface`) and find the modules through `CRONOS_PYPATH`, which the target sets
72
+ to the build directory followed by `PYMCPP_DIR`, so `pymcpp` must be importable from there (or from the Python
73
+ path). Both modules must have been built from the same MC++ headers and pybind11 release.
74
+
75
+ ## Tests
76
+
77
+ ```
78
+ cmake -S <cronosroot> -B build -DENABLE_EXAMPLES=ON ...
79
+ cmake --build build -j $(nproc)
80
+ ctest --test-dir build -LE slow --output-on-failure # the quick set
81
+ ctest --test-dir build -L OCFESLV -j4 --output-on-failure # one directory (labels: ODESLV, OCFESLV)
82
+ ctest --test-dir build -L slow --output-on-failure # the long drivers only
83
+ ```
84
+ Each driver `X` is built from `X.cpp` in `test/ODESLV` (or `test/ODESLVS`) and `test/OCFESLV`, as the Make setup;
85
+ the OCFESLV drivers are compiled with `OCFE_OCFESLV_HEADER="ocfeslv.hpp"`. Drivers taking 30 s or more on the
86
+ 3 Oct 2026 sweep are labelled `slow` (`CRONOS_SLOW_TESTS`: PDE5, PDE5b, PSA7, PSA10, MBC3, MBC4, the MBC5/MBC6
87
+ family) with a timeout of `CRONOS_SLOW_TEST_TIMEOUT` (1800 s); the others time out after `CRONOS_TEST_TIMEOUT`
88
+ (300 s).
89
+
90
+ ## MC++
91
+
92
+ MC++ v5's CMake installs headers but exports no package, so CRONOS reads them from `MCPP_ROOT/src/mc`. The
93
+ CRONOS header set ships an updated `ocbase.hpp` (FFDom): it belongs in MC++ and must be pushed there.