[ADOL-C] Jacobians at each time step for a PDE

Adam Poole a.j.poole at durham.ac.uk
Thu May 16 08:00:34 EDT 2013


Hello,

I have managed to get very close to what I am trying to achieve but have 
slight problem. I have a non-linear PDE model that I am trying to 
calibrate with real data, so I wish to get a jacobian at each time step. 
If I dothe following sudo code

for (t=0; t<tmax; t++)
     trace_on(1)
     set_independants
     model_step
     declare_dependants
     trace_off()
     jacobian(1,n_dep, n_ind, ind, J)

Then I get jacobians at each time step, but, the tape is restarted so my 
second iteration calculates a new jacobian ignoring the infulence of the 
previous time step. The model includes several functions of the form 
x(t+1)=f(x(t),u) but this method treats x(t) as a constant.

Is there a way to get trace_on to continue the tape from the previous 
iteration if I save it? Doing the following (which is also more 
efficient with declaring inds/deps)

trace_on(1)
set_independants
for (t=0; t<tmax; t++)
     model_step
declare_dependants
trace_off()
jacobian(1,n_dep, n_ind, ind, J)

produces the jacobian I expect for the last time step. I had a quick 
look at the check pointing example, but am I correct in believing this 
will only produce the final jacobian in a more effcient manner. Also, 
the definition would be unweildly to implement with the way the model 
code has been written.

Many Thanks,
Adam


More information about the ADOL-C mailing list