\newcommand{\W}[1]{ \; #1 \; }
\newcommand{\R}[1]{ {\rm #1} }
\newcommand{\B}[1]{ {\bf #1} }
\newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} }
\newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} }
\newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} }
\newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }This is cppad-20221105 documentation. Here is a link to its
current documentation
.
Atomic Linear ODE Hessian Sparsity Pattern: Example Implementation
Purpose
The hes_sparsity routine overrides the virtual functions
used by the atomic_four base class for Hessian sparsity calculations; see
hes_sparsity
.
wk(x)
Because we are using the Rosen34
solver, our actual sequence
of operations is only fourth order accurate.
So it suffices to compute the sparsity pattern for
\tilde{y} (x) = \sum_{k=0}^4 v^k (x)
Note that the factor
r / k
,
in the definition of
v^k (x)
,
is constant (with respect to the variables).
Hence it suffices to compute the sparsity pattern for
h (x) = \sum_{k=0}^4 w^k (x)
where
w^0 (x) = b(x)
and for
k = 1, 2, \ldots
,
w^k (x) = A(x) w^{k-1} (x)
.