2.0 KiB
Feature: Jacobian Computation
Overview
Finite difference and auto-diff Jacobians
Note - 2026-09-29
Forward-mode AD arrived by a different route than this entry assumes. On the
feature/generic-scalar branch, state, time and step size became generic over a
Scalar trait, implemented by f64 and by num-dual's dual numbers. That gives
differentiation through the whole solve - d y(t_f)/d y0, d/d t0, d/d t_end and
d/d params, so a full 6x6 state transition matrix comes out of one propagation.
This entry is framed around the narrower case, df/dy at a point for implicit
methods, which now falls out of the same machinery.
What that leaves:
rosenbrock::compute_jacobianis still forward finite differences (eps = sqrt(machine_eps) * max(|y[j]|, 1), D+1 evaluations, ~8 digits). Pointing it at a dual evaluation is now a small change, not a large one.- Sparse Jacobian support: untouched.
- The Effort: Large estimate below predates the genericisation and wants revisiting.
Deferred deliberately, as scope creep against the genericisation: how a Jacobian
should be obtained for whichever algorithms need one. Whether the integrator
requests it through a trait, whether AD or finite differences is a per-problem
choice, and how either interacts with the JacobianUpdateStrategy reuse policy
already in rosenbrock.rs. To be thought through properly on its own.
Why This Feature Matters
(To be detailed)
Dependencies
(To be detailed)
Implementation Approach
(To be detailed)
Implementation Tasks
- Core implementation
- Integration with existing code
- Testing
- Documentation
- Benchmarking
Testing Requirements
(To be detailed)
References
- Julia implementation: OrdinaryDiffEq.jl
- (Additional references to be added)
Complexity Estimate
Effort: Large
Risk: (To be assessed)
Success Criteria
- Implementation complete
- Tests pass
- Documentation written
- Performance acceptable
Future Enhancements
(To be identified)