Entry points
| entry point | problem | numerical core | article |
|---|---|---|---|
cppODE() |
ODE \(\dot x = f(x, p, t)\) | in-tree integrator,
inst/include/cppde/
|
Stepping to Second derivatives |
cvode() |
ODE \(\dot x = f(x, p, t)\) | SUNDIALS CVODE/CVODES | cvode() and the CVODES adjoint |
cppFUN() |
algebraic \(y = g(x, p)\) | none | Derivative directions of cppFUN() |
ptc() |
steady state \(f(x, p) = 0\), \(C x = b\) | pseudo-transient continuation on a
cppFUN() object |
Steady states by pseudo-transient continuation |
cppODE() and cvode() take the same model
arguments (rhs, events, rootfunc,
fixed, forcings) and return the same object
for solveODE() (comparison).
cppFUN() derivatives are "forward" (second
order with deriv2 = TRUE), "reverse" or
"forward-reverse".
Order of the articles
- Code generation: expression graph and emitted C++ of all entry points.
-
Stepping and error control: the
four methods of
cppODE(), error control, dense output. - Forward sensitivities: dual numbers.
- Events, switches and saltation: sensitivities across resets, root events and switches.
- Reverse mode: the discrete adjoint: gradients at a cost independent of the parameter count.
- Events in reverse mode: adjoint of a jump, to second order.
-
Grid and refinement of the
sweep: the adjoint grid and
refine. - Second derivatives: forward over reverse: Hessian-vector products.
- cvode() and the CVODES adjoint: the SUNDIALS backend.
- Derivative directions of cppFUN(): observation maps and reparameterizations.
-
Steady states by pseudo-transient
continuation:
ptc()under conservation laws, stability test. - Method coefficients: appendix.
Batches of conditions: Batches of conditions. Benchmarks compares the integrators and the derivative modes.
Notation
| symbol | meaning |
|---|---|
| \(t\), \(t_0\), \(T\) | time, initial time, last output time |
| \(x \in \mathbb{R}^{n_x}\) | state; \(x_0 = x(t_0)\) |
| \(p \in \mathbb{R}^{n_p}\) | parameters of the right-hand side |
| \(f(x, p, t)\) | right-hand side, \(\dot x = f\) |
| \(J = \partial f/\partial x\) | state Jacobian |
| \(y = g(x, p)\) | observables, the prediction compared with data; the
algebraic function of cppFUN()
|
| \(\theta \in \mathbb{R}^{M}\) | parameters of the derivatives, with \(x_0(\theta)\), \(p(\theta)\); \(\theta = (x_0, p)\), \(M = n_x + n_p\) under the identity tangent |
| \(\partial(x_0, p)/\partial\theta\) | tangent of the inputs, argument tangent of
solveODE()
|
| \(S = \partial x/\partial\theta \in \mathbb{R}^{n_x \times M}\) | sensitivity matrix |
| \(t_o\), \(o = 1, \dots, n_{\mathrm{obs}}\) | output times, rows of the returned trajectory |
| \(w \in \mathbb{R}^{n_{\mathrm{obs}} \times n_x}\) | cotangent of the outputs, row \(w_o\) at \(t_o\) |
| \(\lambda \in \mathbb{R}^{n_x}\) | adjoint state |
| \(\bar\theta\), \(\bar x_0\), \(\bar p\) | cotangent of the inputs, the gradient of \(\sum_o w_o^{\mathsf T} x(t_o)\) |
| \(\mathcal{J}(\theta)\) | objective function of a fit, a scalar functional of the outputs; \(\bar\theta = \nabla_\theta \mathcal{J}\) for \(w_o = \partial\mathcal{J}/\partial x(t_o)\) |
| \(t_n\), \(x_n\) | step points and computed states |
| \(h_n = t_{n+1} - t_n\) | step size |
| \(q\), \(q_{\max}\) | order, maximum order |
| \(e_{n+1}\) | local error estimate of the step from \(t_n\) |
| \(\lVert\cdot\rVert_{\mathrm{WRMS}}\) | weighted root-mean-square norm, Stepping (8) |
| \(W\) | iteration matrix of an implicit step, a shift of \(-J\) |
| \(h_e(x, t, \theta)\) | root function of an event or switch |
| \(t_e(\theta)\) | firing time of a time-triggered event, an expression |
| \(t^{*}\), \(t_*^{(0)}\) | firing time; the value of \(t^{*}\) without derivatives, the grid time |
| \(\delta t^{*} = t^{*} - t_*^{(0)}\) | firing-time residual: zero in value, holds the derivatives of \(t^{*}\) |
| \(\dot h_e = \partial h_e/\partial t + \nabla_x h_e \cdot f\) | rate of the root function along the trajectory |
| \(R(x, t)\) | reset map of an event |
| \(x^{-}\), \(x^{+}\); \(f^{-}\), \(f^{+}\) | state and right-hand side before and after an event |