[ADOL-C] Activate/deactivate adoubles

Andreas Puettmann andreas.puettmann at rwth-aachen.de
Sat Jun 19 07:20:35 EDT 2010


Hi everyone!

I want to use ADOL-C to compute PDE solution sensitivities w.r.t. a 
bunch of model parameters. Altogether, we are talking here about a 
number of approximately 20 parameters. However, in one single run of my 
solver, the user is usually not interested in partial derivatives w.r.t. 
all of these 20 parameters, but only say 5 of them (arbitrarily chosen 
from the whole set).

I already integrated the ADOL-C tapeless mode into my code, and it works 
fine. I made all of my model parameters adoubles, thus being able to 
activate derivative computation w.r.t. a specific parameter by just 
setting its ADValue to 1, or otherwise leaving at 0. This approach is 
probably not really high-performance because in any case all parameters 
are in fact active although most of them may have a 0 ADValue. Anyway, 
it works and so far I am fine with it.

However, now I want to change to taping mode to be able to use the 
drivers for Hessian matrices etc. What would be the best way to realize 
this?
I definitely want to keep all of my parameters as adoubles because the 
user should potentially be able to compute derivates w.r.t. all of them 
at the same time, although this will usually not be the case. I fear 
that especially the computation of second order derivatives will be 
significantly slower if all parameters are active, although only 
derivatives w.r.t. a few parameters are desired.

Is there a means to activate and deactive adoubles? In my case, it would 
be perfect if I could make ADOL-C treat some (in fact most) of the 
adoubles just like regular doubles.

Thanks for any help!
Andreas



More information about the ADOL-C mailing list