Skip to content

examples: trace ode_comparison through integrate_fixed and test its radius claim - #17

Merged
arclabs561 merged 1 commit into
mainfrom
examples/ode-test-20261104
Nov 4, 2026
Merged

arclabs561 merged 1 commit into
mainfrom
examples/ode-test-20261104

Conversation

@arclabs561

Copy link
Copy Markdown
Owner

The trajectory trace in ode_comparison re-implemented the Euler and Heun
steps by hand instead of calling the library integrator it demonstrates. It
now calls integrate_fixed for i steps to print step i; the printed rows are
identical to the hand-stepped ones (checked at steps 19 and 20).

The example's closing text says the radius grows by the per-step factor
sqrt(1 + h^2) for Euler and sqrt(1 + h^4/4) for Heun on the rotation field.
rotation_radius_grows_by_the_amplification_factor in
tests/ode_convergence_order.rs now checks that closed form to 1e-4 relative at
10, 20, 50 and 200 steps, so the claim is covered by cargo test rather than
only printed by an example.

cargo fmt --check, cargo clippy --all-targets --all-features -D warnings, the
ODE test file (5 tests) and the example run pass.

…adius claim

The trajectory trace in `ode_comparison` re-implemented the Euler and Heun
steps by hand instead of calling the library integrator it demonstrates. It
now calls `integrate_fixed` for i steps to print step i; the printed rows are
identical to the hand-stepped ones (checked at steps 19 and 20).

The example's closing text says the radius grows by the per-step factor
sqrt(1 + h^2) for Euler and sqrt(1 + h^4/4) for Heun on the rotation field.
`rotation_radius_grows_by_the_amplification_factor` in
tests/ode_convergence_order.rs now checks that closed form to 1e-4 relative at
10, 20, 50 and 200 steps, so the claim is covered by cargo test rather than
only printed by an example.

cargo fmt --check, cargo clippy --all-targets --all-features -D warnings, the
ODE test file (5 tests) and the example run pass.
@arclabs561
arclabs561 merged commit b3e7386 into main Nov 4, 2026
2 checks passed
@arclabs561
arclabs561 deleted the examples/ode-test-20261104 branch November 4, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant