Adopt ordinary-diffeq's Tolerances trait #25

Closed
opened 2026-09-30 12:48:50 -04:00 by connor · 2 comments
Owner

propagation::Tolerances is a local workaround: ordinary-diffeq exposes a_tol/r_tol as inherent builder methods, so a generic S: Integrator<D> cannot set them.

The trait belongs upstream, where it also covers integrators added later. Written up as roadmap/features/40-tolerances-trait.md in ordinary-diffeq. Delete the local copy once that lands.

Related: roadmap/features/41-runtime-integrator-selection.md covers why the integrator has to be a type parameter rather than a runtime choice. Vern7 as a fixed default is fine here in the meantime.

`propagation::Tolerances` is a local workaround: `ordinary-diffeq` exposes `a_tol`/`r_tol` as inherent builder methods, so a generic `S: Integrator<D>` cannot set them. The trait belongs upstream, where it also covers integrators added later. Written up as `roadmap/features/40-tolerances-trait.md` in `ordinary-diffeq`. Delete the local copy once that lands. Related: `roadmap/features/41-runtime-integrator-selection.md` covers why the integrator has to be a type parameter rather than a runtime choice. Vern7 as a fixed default is fine here in the meantime.
connor added this to the M1 milestone 2026-09-30 12:48:50 -04:00
connor added the size/S label 2026-09-30 12:48:50 -04:00
Author
Owner

Blocked, deliberately. Tolerances is implemented in ordinary-diffeq and matches the spec, but that crate is still at 0.4.0 on crates.io so astrokit cannot see it.

Waiting for 0.4.1 and then 0.5.0, which will carry both roadmap items (40-tolerances-trait.md and 41-runtime-integrator-selection.md). A temporary path dependency was considered and rejected: it would have to come back out before astrokit is published.

0.5.0 bringing runtime integrator selection means this issue should also revisit Accuracy, which currently sets tolerances only because the integrator has to be a type parameter.

Blocked, deliberately. `Tolerances` is implemented in `ordinary-diffeq` and matches the spec, but that crate is still at 0.4.0 on crates.io so astrokit cannot see it. Waiting for 0.4.1 and then 0.5.0, which will carry both roadmap items (`40-tolerances-trait.md` and `41-runtime-integrator-selection.md`). A temporary path dependency was considered and rejected: it would have to come back out before astrokit is published. 0.5.0 bringing runtime integrator selection means this issue should also revisit `Accuracy`, which currently sets tolerances only because the integrator has to be a type parameter.
Author
Owner

Done. ordinary-diffeq 0.5.0 is published with both roadmap items, so the local Tolerances trait and its macro are deleted in favor of the upstream one, which also covers Rosenbrock23 and anything added later.

0.5.0's runtime integrator selection meant Propagation could drop a type parameter: it holds a Method<D> value instead of carrying S: Integrator<D>. method() takes a MethodName rather than changing the type, and method_name() returns it in a form serde reads and writes, which #12's provenance needs — the integrator used to be recordable but not settable from the record.

Accuracy still sets tolerances only. That is now a choice rather than a constraint.

Done. `ordinary-diffeq` 0.5.0 is published with both roadmap items, so the local `Tolerances` trait and its macro are deleted in favor of the upstream one, which also covers `Rosenbrock23` and anything added later. 0.5.0's runtime integrator selection meant `Propagation` could drop a type parameter: it holds a `Method<D>` value instead of carrying `S: Integrator<D>`. `method()` takes a `MethodName` rather than changing the type, and `method_name()` returns it in a form serde reads and writes, which #12's provenance needs — the integrator used to be recordable but not settable from the record. `Accuracy` still sets tolerances only. That is now a choice rather than a constraint.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: connor/astrokit#25