Expand description
Dynamic dispatch ODE wrapper — the primary entry point for the dynamic dispatch API.
This module defines OdeWrapper, a thread-safe handle around an internal ODE solver.
OdeWrapper erases the generic type parameters of the core diffsol solver (matrix type,
codegen backend, linear solver, solver method) so that they can be chosen at runtime rather
than compile time. The internal state is stored behind an Arc<Mutex<...>> for safe sharing
across threads.
§Constructors
new_jit— JIT-compile DiffSL code (requiresdiffsl-craneliftordiffsl-llvm).new_external— use statically linked pre-compiled DiffSL symbols (requiresexternal).new_external_dynamic— load pre-compiled DiffSL symbols from a shared library (requiresdiffsl-external-dynamic).
§Configuration
Tolerances: OdeWrapper::set_rtol, OdeWrapper::set_atol, OdeWrapper::set_t0, OdeWrapper::set_h0, OdeWrapper::set_integrate_out. Sensitivity tolerances: OdeWrapper::set_sens_rtol, OdeWrapper::set_sens_atol, OdeWrapper::set_out_rtol, OdeWrapper::set_out_atol, OdeWrapper::set_param_rtol, OdeWrapper::set_param_atol. Solver selection: OdeWrapper::set_ode_solver, OdeWrapper::set_linear_solver.
§Solving
- OdeWrapper::solve — adaptive-time integration.
- OdeWrapper::solve_dense — integration to specified time points.
- OdeWrapper::solve_fwd_sens — forward sensitivity analysis.
- OdeWrapper::solve_continuous_adjoint — continuous adjoint.
- OdeWrapper::solve_adjoint_fwd / OdeWrapper::solve_adjoint_bkwd — discrete adjoint.
§Low-level evaluation
- OdeWrapper::y0 — compute initial state.
- OdeWrapper::rhs — evaluate the RHS function.
- OdeWrapper::rhs_jac_mul — evaluate the Jacobian-vector product.
§Serialization
OdeWrapper implements Serialize/Deserialize for JIT-backed solvers.