https://github.com/sciml/scimlbase.jl
The Base interface of the SciML ecosystem
https://github.com/sciml/scimlbase.jl
dae dde differentialequations julia ode ordinary-differential-equations scientific-machine-learning sciml sde
Last synced: 16 days ago
JSON representation
The Base interface of the SciML ecosystem
- Host: GitHub
- URL: https://github.com/sciml/scimlbase.jl
- Owner: SciML
- License: mit
- Created: 2021-01-26T03:30:55.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2026-02-06T20:33:19.000Z (3 months ago)
- Last Synced: 2026-02-06T21:18:40.099Z (3 months ago)
- Topics: dae, dde, differentialequations, julia, ode, ordinary-differential-equations, scientific-machine-learning, sciml, sde
- Language: Julia
- Homepage: https://docs.sciml.ai/SciMLBase/stable
- Size: 41.3 MB
- Stars: 165
- Watchers: 9
- Forks: 116
- Open Issues: 103
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SciMLBase
[](https://julialang.zulipchat.com/#narrow/stream/279055-sciml-bridged)
[](https://docs.sciml.ai/SciMLBase/stable)
[](https://codecov.io/gh/SciML/SciMLBase.jl)
[](https://github.com/SciML/SciMLBase.jl/actions?query=workflow%3ACI)
[](https://github.com/SciML/ColPrac)
[](https://github.com/SciML/SciMLStyle)
SciMLBase.jl is the core interface definition of the SciML ecosystem. It is a
low dependency library made to be depended on by the downstream libraries to
supply the common interface and allow for interexchange of mathematical problems.
## v3.0 Breaking Changes
#### RecursiveArrayTools v4: Solution types are now AbstractArrays (#1297)
**Most impactful change.** `AbstractVectorOfArray` (and thus `ODESolution`, `DDESolution`, `RODESolution`, `DAESolution`) now subtypes `AbstractArray`:
- **`sol[i]` returns the `i`th scalar element** (column-major), not the `i`th timestep. Use `sol.u[i]` or `sol[:, i]` for timesteps.
- **`length(sol)` returns total elements** (`prod(size(sol))`). Use `length(sol.u)` for number of timesteps.
- **`iterate(sol)` iterates scalar elements**. Use `sol.u` for timestep iteration.
- **`map(f, sol)` maps over elements**. Use `map(f, sol.u)` for timesteps.
#### Ensemble RNG redesign (#1252)
- `prob_func(prob, i, repeat)` → `prob_func(prob, ctx)` where `ctx::EnsembleContext`
- `output_func(sol, i)` → `output_func(sol, ctx)`
- `EnsembleContext` includes `sim_id`, `repeat`, `rng`, `sim_seed`, `worker_id`, `master_rng`
- New `seed`/`rng`/`rng_func` kwargs on `solve()` for deterministic, thread-count-independent ensemble solves
#### Removed deprecated APIs
- `u_modified!` renamed to `derivative_discontinuity!` (#1289)
- Removed `deprecated.jl`: old type aliases (`DEAlgorithm`, `DEProblem`, `DESolution`, etc.), constructors, deprecated accessors (#1291)
- Removed backward compat shims in `remake.jl` and MLStyle extension (#1292)
- Removed old iterators: `tuples`, `intervals`, `TimeChoiceIterator` (#1290)
#### Simplified getproperty
- Removed redundant `getproperty` overloads on solution abstract types (#1293)
- Removed deprecated `getproperty` aliases (`.destats`, `.x`, `.lb`/`.ub`, `.minimizer`, `.minimum`) (#1294)
#### Other breaking changes
- Replaced Moshi with plain Julia structs for Clocks — 23% precompilation improvement (#1295)
- `ODEFunction` uses `DEFAULT_SPECIALIZATION` (AutoSpecialize) for convenience constructors (#1300)
- Propagate `interp`/`dense` to DiffEqArrays from solution callables (#1297)
- `is_discrete_time_domain(nothing)` now returns `false` (#1306)
#### Migration Guide
| Old (v2) | New (v3) |
|----------|----------|
| `sol[i]` (timestep) | `sol.u[i]` or `sol[:, i]` |
| `length(sol)` (timesteps) | `length(sol.u)` |
| `for u in sol` | `for u in sol.u` |
| `u_modified!(integrator, true)` | `derivative_discontinuity!(integrator, true)` |
| `prob_func(prob, i, repeat)` | `prob_func(prob, ctx)` — use `ctx.sim_id`, `ctx.repeat` |
| `output_func(sol, i)` | `output_func(sol, ctx)` |
| `sol.destats` | `sol.stats` |
| `ODEFunction{true}(f)` (FullSpecialize) | Now uses AutoSpecialize by default |
## v2.0 Breaking Changes
The breaking changes in v2.0 are:
- `IntegralProblem` has moved to an interface with `IntegralFunction` and `BatchedIntegralFunction` which requires specifying `prototype`s for the values to be modified
instead of `nout` and `batch`. https://github.com/SciML/SciMLBase.jl/pull/497
- `ODEProblem` was made temporarily into a `mutable struct` to allow for EnzymeRules support. Using the mutation throws a warning that this is only experimental and should not be relied on.
https://github.com/SciML/SciMLBase.jl/pull/501
- `BVProblem` now has a new interface for `TwoPointBVProblem` which splits the bc terms for the two sides, forcing a true two-point BVProblem to allow for further specializations and to allow
for wrapping Fortran solvers in the interface. https://github.com/SciML/SciMLBase.jl/pull/477
- `SDEProblem` constructor was changed to remove an anti-pattern which required passing the diffusion function `g` twice, i.e. `SDEProblem(SDEFunction(f,g),g, ...)`.
Now this is simply `SDEProblem(SDEFunction(f,g),...)`. https://github.com/SciML/SciMLBase.jl/pull/489