source: stable/2.4/ADOL-C/doc/short_ref.tex @ 417

Last change on this file since 417 was 109, checked in by kulshres, 9 years ago

Squashed merge of branch 'master' of 'gitclone' into svn

  • 'master' of 'gitclone': (5 commits) document the tape directory specification too allow to change the directory where tapes are written too. bring documentation of usrparms.h up to par allow compilation with pdflatex as well as latex Add hyperlinks in the manual pdf file

Details of the commits:

commit e7066ed0e6c85acd69e14ecbb736a4a5b1a105f8
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Tue Jul 13 11:14:22 2010 +0200

document the tape directory specification too

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 5405a01ec41b48c6dd25cde772913fbe9d717421
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Fri Jul 9 10:38:33 2010 +0200

allow to change the directory where tapes are written too.

this can be done for now in dvlparms.h before compiling adolc.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit d82f1eb1aa9dde55811ec1b978b2d6360b71d140
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Thu Jul 8 16:40:37 2010 +0200

bring documentation of usrparms.h up to par

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 28c9cf190fa165c80b19af3c38b409e05cffb9b6
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Wed Jul 7 16:08:18 2010 +0200

allow compilation with pdflatex as well as latex

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

commit 0e5d6bfcc3b5bae3d34b8ac99e29f18675fa8b1a
Author: Kshitij Kulshreshtha <kshitij@…>
Date: Wed Jul 7 15:43:24 2010 +0200

Add hyperlinks in the manual pdf file

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

  • Property svn:keywords set to Author Date Id Revision
File size: 18.8 KB
Line 
1% Latex file containing the short reference of ADOL-C version 2.0.0
2%
3% Copyright (C) Andrea Walther, Andreas Griewank, Andreas Kowarz,
4%               Hristo Mitev, Sebastian Schlenkrich, Jean Utke, Olaf Vogel
5%
6% This file is part of ADOL-C. This software is provided as open source.
7% Any use, reproduction, or distribution of the software constitutes
8% recipient's acceptance of the terms of the accompanying license file.
9%++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10
11\documentclass[12pt,oneside,a4paper]{article}
12\usepackage{amsmath,amsthm,amssymb}
13\usepackage{fancyhdr}
14
15%\setlength{\hoffset}{2.0cm}
16\setlength{\oddsidemargin}{-0.5cm}
17\setlength{\evensidemargin}{-0.5cm}
18\setlength{\topmargin}{-0.5cm}
19%\setlength{\headheight}{0cm}
20\setlength{\headsep}{1cm}
21\setlength{\textwidth}{17.0cm}
22\setlength{\textheight}{25.0cm}
23%\setlength{\parindent}{0pt}
24%\setlength{\parskip}{2.5ex plus 0.5ex minus 0.5ex}
25%\renewcommand{\baselinestretch}{1.2}
26
27\pagestyle{fancy}
28\lhead{\sc \bf ADOL-C}
29\chead{}
30\rhead{\sc {\bf A}utomatic {\bf D}ifferentiation by {\bf O}ver{\bf L}oading
31       in {\bf C}++}
32\renewcommand{\headrulewidth}{0.02cm}
33\renewcommand{\footrulewidth}{0.02cm}
34
35\newcommand{\R}{{ {\rm I} \kern -.225em {\rm R} }}
36
37\begin{document}
38%-----------------------------------------------------------------------
39%-----------------------------------------------------------------------
40\begin{center}\Large
41{\Huge \bf The Basic Idea}\\[2ex]
42
43\fbox{\hspace{1mm} 
44  {\bf Vector function} in {\bf C/C++}:\rule[-4mm]{0cm}{12mm}\hspace{0.4cm}
45  $F:\R^n\rightarrow\R^m:x\mapsto y=F\!\left(x\right)$
46}\\[2ex] 
47{\Huge$\Downarrow$} Operator overloading (C++)\\[2ex]
48\fbox{\hspace{2mm} 
49  {\bf Internal representation} of $F$ ($\equiv$\emph{tape})\rule[-4mm]{0cm}{12mm}
50}\\[2ex] 
51{\Huge$\Downarrow$}\hspace{1.5cm}Interpretation\hspace{1.5cm}{\Huge$\Downarrow$}\\[2ex]
52\fbox{\begin{minipage}[h]{80mm}
53{\bf \underline{Forward mode}}
54\begin{align*}
55  x\left(t\right)& =\sum_{j=0}^{d} x_j t^j\\[1ex]
56  & \Downarrow\\[1ex]
57  y\left(t\right)&   = \sum_{j=0}^{d} y_j t^j
58  + O\left(t^{d+1}\right)
59\end{align*}
60{\bf $\Longrightarrow$ Directional derivatives\\[-2.2ex]}
61\end{minipage}}
62\fbox{\begin{minipage}[h]{80mm}
63{\bf \underline{Reverse mode}}
64\begin{align*}
65  y_j & = y_j\left(x_0,x_1,\ldots,x_j\right)\\[1ex]
66  & \Downarrow\\[1ex]
67  \frac{\partial y_j}{\partial x_i} & =
68  \frac{\partial y_{j-i}}{\partial x_0} \\[1ex]
69    & = A_{j-i}\left(x_0,x_1,\ldots,x_{j-i}\right)
70\end{align*}\\[-0.85ex]
71{\bf $\Longrightarrow$ Gradients (adjoints)}
72\end{minipage}}
73
74\begin{minipage}[h]{160mm}
75\small
76\begin{align*}
77  y_0 & = F\left(x_0\right) \\
78  y_1 & = F'\left(x_0\right) x_1 \\
79  y_2 & = F'\left(x_0\right) x_2 + \frac{1}{2}F''\left(x_0\right)x_1 x_1 \\
80  y_3 & = F'\left(x_0\right) x_3 + F''\left(x_0\right)x_1 x_2
81          + \frac{1}{6}F'''\left(x_0\right)x_1 x_1 x_1\\
82  & \ldots\\
83  \frac{\partial y_0}{\partial x_0} =
84  \frac{\partial y_1}{\partial x_1} =
85  \frac{\partial y_2}{\partial x_2} =
86  \frac{\partial y_3}{\partial x_3} =
87  A_0 & = F'\left(x_0\right) \\
88  \frac{\partial y_1}{\partial x_0} =
89  \frac{\partial y_2}{\partial x_1} =
90  \frac{\partial y_3}{\partial x_2} =
91  A_1 & = F''\left(x_0\right) x_1 \\
92  \frac{\partial y_2}{\partial x_0} =
93  \frac{\partial y_3}{\partial x_1} =
94  A_2 & = F''\left(x_0\right) x_2 + \frac{1}{2}F'''\left(x_0\right)x_1 x_1 \\
95  \frac{\partial y_3}{\partial x_0} =
96  A_3 & = F''\left(x_0\right) x_3 + F'''\left(x_0\right)x_1 x_2
97          + \frac{1}{6}F^{(4)}\left(x_0\right)x_1 x_1 x_1 \\
98  & \ldots
99\end{align*}
100
101
102\end{minipage}
103\end{center}
104
105\newpage
106%-----------------------------------------------------------------------
107%-----------------------------------------------------------------------
108\begin{center}\Large
109{\Huge \bf Application}\\[2ex]
110{\bf Operator overloading concept $\Rightarrow$ Code modification}\\[2ex]
111\fbox{\parbox{170mm}{
112\begin{itemize}\setlength{\itemsep}{0cm}\setlength{\parsep}{0cm}
113\item Inclusion of appropriate ADOL-C headers
114\item Retyping of all involved variables to active data type {\tt adouble}
115\item Marking active section to be ``taped'' 
116      ({\tt trace\_on}/{\tt trace\_off})
117\item Specification of independent and dependent variables
118      ({\tt <<=}/{\tt >>=})
119\item Specification of differentiation task(s)
120\item Recompilation and Linking with ADOL-C library {\tt libad.a}
121\end{itemize}}}\\[5ex]
122%
123\begin{minipage}[h]{160mm}
124\small
125\underline{Example:}
126\begin{verbatim}
127#include "adolc.h"                      // inlusion of ADOL-C headers
128...
129adouble foo ( adouble x )               // some activated function
130{ adouble tmp;
131  tmp = log(x);
132  return 3.0*tmp*tmp + 2.0;
133}
134...
135int main (int argc, char* argv[])       // main program or other procedure
136{ ...
137  double   x[2],  y;               
138  adouble ax[2], ay;                    // declaration of active variables
139  x[0]=0.3; x[1]=2.3;     
140  trace_on(1);                          // starting active section
141    ax[0]<<=x[0]; ax[1]<<=x[1];         // marking independent variables
142    ay=ax[0]*sin(ax[1])+ foo(ax[1]);    // function evaluation
143    ay>>=y;                             // marking dependend variables
144  trace_off();                          // ending active section
145  ...
146  double g[2];   
147  gradient(1,2,x,g);                    // application of ADOL-C routine
148  ...
149  x[0]+=0.1; x[1]+=0.3;                 // application at different argument
150  gradient(1,2,x,g);
151  ...
152}
153\end{verbatim}
154\end{minipage}
155\end{center}
156
157\newpage
158%-----------------------------------------------------------------------
159%-----------------------------------------------------------------------
160\begin{center}\Large
161{\Huge \bf Drivers for Optimization and Nonlinear Equations (C/C++)}\\[-0.5ex]
162\begin{align*}
163     \min_{x}f\left(x\right),\qquad & f:\R^n\rightarrow\R\\
164     F\left(x\right)=0_m, \qquad  & F:\R^n\rightarrow\R^m
165\end{align*}\\[0.5ex]
166
167\begin{tabular}{|p{13.3cm}|p{3.3cm}|}
168\hline & \\[-2.0ex]
169{\tt function(tag,m,n,x[n],y[m])} & $F\left(x_0\right)$ \\[1.0ex]
170\hline& \\[-2.0ex] 
171{\tt gradient(tag,n,x[n],g[n])} & $\nabla f\left(x_0\right)$ \\[0.5ex]
172{\tt hessian(tag,n,x[n],H[n][n])} & $\nabla^2 f\left(x_0\right)$ \\[1.0ex]
173\hline & \\[-2.0ex] 
174{\tt jacobian(tag,m,n,x[n],J[m][n])} & $F'\left(x_0\right)$ \\[0.5ex]
175{\tt vec\_jac(tag,m,n,repeat?,x[n],u[m],z[n])} & $u^TF'\left(x_0\right)$ \\[0.5ex]
176{\tt jac\_vec(tag,m,n,x[n],v[n],z[m])} & $F'\left(x_0\right)v$ \\[1.0ex]
177\hline & \\[-2.0ex] 
178{\tt hess\_vec(tag,n,x[n],v[n],z[n])} & $\nabla^2f\left(x_0\right)v$ \\[0.5ex]
179{\tt lagra\_hess\_vec(tag,m,n,x[n],v[n],u[m],h[n])} & $u^TF''\left(x_0\right)v$ \\[1.0ex]
180\hline & \\[-2.0ex] 
181{\tt jac\_solv(tag,n,x[n],b[n],sparse?,mode?)} & $F'\left(x_0\right)w=b$ \\[1.0ex]
182\hline
183\end{tabular}\\[5ex]
184%
185\begin{minipage}[h]{160mm}
186\small
187\underline{Example:}  \hspace{0.5cm} Solution of $F(x)=0$ by Newton's method
188\begin{verbatim}
189...
190double x[n], r[n];
191int i;
192...
193initialize(x);                         // setting up the initial x
194...
195function(ftag,n,n,x,r);                // compute residuum r
196while (norm(r) > EPSILON)              // terminate if small residuum
197{ jac_solv(ftag,n,x,r,0,2);            // compute r:=F'(x)^(-1)*r
198  for (i=0; i<n; i++)                  // update x
199    x[i] -= r[i];
200  function(ftag,n,n,x,r);              // compute residuum r
201}
202...
203\end{verbatim}
204\end{minipage}
205\end{center}
206
207\newpage
208%-----------------------------------------------------------------------
209%-----------------------------------------------------------------------
210\begin{center}\Large
211{\Huge \bf Lowest-level Differentiation Routines}\\[-0.5ex]
212\begin{align*}
213   & F:\R^n\rightarrow\R^m
214\end{align*}\\[0.5ex]
215{\Large \bf  Forward Mode (C/C++)}\\[2ex]
216%
217\fbox{\parbox{17.5cm}{\begin{center}
218  {\tt zos\_forward(tag,m,n,keep,x[n],y[m])}
219\end{center}}}\\[2ex]
220\begin{minipage}[h]{14cm}
221\small 
222\begin{itemize}
223\item zero-order scalar forward; computes $y=F\left(x\right)$
224\item $0\leq\text{\tt keep}\leq 1$;
225      $\text{\tt keep}=1\;\text{prepares for {\tt fos\_reverse}
226                                          or {\tt fov\_reverse}}$
227\end{itemize}
228\end{minipage}\\[2ex]
229%
230\fbox{\parbox{17.5cm}{\begin{center}
231  {\tt fos\_forward(tag,m,n,keep,x0[n],x1[n],y0[m],y1[m])}
232\end{center}}}\\[2ex]
233\begin{minipage}[h]{14cm}
234\small 
235\begin{itemize}
236\item first-order scalar forward; computes $y_0=F\left(x_0\right)$,
237      $y_1=F'\left(x_0\right)x_1$
238\item $0\leq\text{\tt keep}\leq 2$;
239      $\text{\tt keep} = \left\{\begin{array}{cl}
240       1 & \text{prepares for {\tt fos\_reverse} or {\tt fov\_reverse}} \\
241       2 & \text{prepares for {\tt hos\_reverse} or {\tt hov\_reverse}}
242       \end{array}\right.$ 
243\end{itemize}
244\end{minipage}\\[2ex]
245%
246\fbox{\parbox{17.5cm}{\begin{center}
247  {\tt fov\_forward(tag,m,n,p,x[n],X[n][p],y[m],Y[m][p])}
248\end{center}}}\\[2ex]
249\begin{minipage}[h]{14cm}
250\small 
251\begin{itemize}
252\item first-order vector forward; computes $y=F\left(x\right)$,
253      $Y=F'\left(x\right)X$
254\end{itemize}
255\end{minipage}\\[2ex]
256%
257\fbox{\parbox{17.5cm}{\begin{center}
258  {\tt hos\_forward(tag,m,n,d,keep,x[n],X[n][d],y[m],Y[m][d])}
259\end{center}}}\\[2ex]
260\begin{minipage}[h]{14cm}
261\small 
262\begin{itemize}
263\item higher-order scalar forward; computes $y_0=F\left(x_0\right)$,
264      $y_1=F'\left(x_0\right)x_1$, \ldots, where $x=x_0$,
265      $X=[x_1,x_2,\ldots,x_d]$ and  $y=y_0$,
266      $Y=[y_1,y_2,\ldots,y_d]$ 
267\item $0\leq\text{\tt keep}\leq d+1$;
268      $\text{\tt keep} \left\{\begin{array}{cl}
269       = 1  & \text{prepares for {\tt fos\_reverse} or {\tt fov\_reverse}} \\
270       > 1 & \text{prepares for {\tt hos\_reverse} or {\tt hov\_reverse}}
271       \end{array}\right.$ 
272\end{itemize}
273\end{minipage}\\[2ex]
274%
275\fbox{\parbox{17.5cm}{\begin{center}
276  {\tt hov\_forward(tag,m,n,d,p,x[n],X[n][p][d],y[m],Y[m][p][d])}
277\end{center}}}\\[2ex]
278\begin{minipage}[h]{14cm}
279\small 
280\begin{itemize}
281\item higher-order vector forward; computes $y_0=F\left(x_0\right)$,
282      $Y_1=F'\left(x_0\right)X_1$, \ldots, where $x=x_0$,
283      $X=[X_1,X_2,\ldots,X_d]$ and  $y=y_0$,
284      $Y=[Y_1,Y_2,\ldots,Y_d]$ 
285\end{itemize}
286\end{minipage}\\[2ex]
287\end{center}
288
289\newpage
290%-----------------------------------------------------------------------
291%-----------------------------------------------------------------------
292\begin{center}\Large
293{\Large \bf  Reverse Mode (C/C++)}\\[2ex]
294%
295\fbox{\parbox{17.5cm}{\begin{center}
296  {\tt fos\_reverse(tag,m,n,u[m],z[n])}
297\end{center}}}\\[2ex]
298\begin{minipage}[h]{14cm}
299\small 
300\begin{itemize}
301\item first-order scalar reverse; computes $z^T=u^T F'\left(x\right)$
302\item after calling  {\tt zos\_forward}, {\tt fos\_forward}, or
303      {\tt hos\_forward} with $\text{\tt keep}=1$
304\end{itemize}
305\end{minipage}\\[2ex]
306%
307\fbox{\parbox{17.5cm}{\begin{center}
308  {\tt fov\_reverse(tag,m,n,q,U[q][m],Z[q][n])}
309\end{center}}}\\[2ex]
310\begin{minipage}[h]{14cm}
311\small 
312\begin{itemize}
313\item first-order vector reverse; computes $Z=U F'\left(x\right)$
314\item after calling  {\tt zos\_forward}, {\tt fos\_forward}, or
315      {\tt hos\_forward} with $\text{\tt keep}=1$
316\end{itemize}
317\end{minipage}\\[2ex]
318%
319%
320\fbox{\parbox{17.5cm}{\begin{center}
321  {\tt hos\_reverse(tag,m,n,d,u[m],Z[n][d+1])}
322\end{center}}}\\[2ex]
323\begin{minipage}[h]{14cm}
324\small 
325\begin{itemize}
326\item higher-order scalar reverse; computes the adjoints
327      \mbox{$z_0^T=u^T F'\left(x_0\right)=u^T A_0$},
328      \mbox{$z_1^T=u^T F''\left(x_0\right)x_1=u^T A_1$},
329      \ldots, where $Z=[z_0,z_1,\ldots,z_d]$
330\item after calling  {\tt fos\_forward} or
331      {\tt hos\_forward} with $\text{\tt keep}=d+1>1$
332\end{itemize}
333\end{minipage}\\[2ex]
334%
335\fbox{\parbox{17.5cm}{\begin{center}
336  {\tt hov\_reverse(tag,m,n,d,q,U[q][m],Z[q][n][d+1],nz[q][n])}
337\end{center}}}\\[2ex]
338\begin{minipage}[h]{14cm}
339\small 
340\begin{itemize}
341\item higher-order vector reverse; computes the adjoints
342      \mbox{$Z_0=U F'\left(x_0\right)=U A_0$},
343      \mbox{$Z_1=U F''\left(x_0\right)x_1=U A_1$},
344      \ldots, where $Z=[Z_0,Z_1,\ldots,Z_d]$
345\item after calling  {\tt fos\_forward} or
346      {\tt hos\_forward} with $\text{\tt keep}=d+1>1$
347\item optional nonzero pattern {\tt nz} ($\Rightarrow$ manual)
348\end{itemize}
349\end{minipage}\\[3ex]
350%
351\begin{minipage}[h]{160mm}
352\small
353\underline{Example:}
354\begin{verbatim}
355...
356double x[n], y[m], **I, **J;
357I=myallocI2(m);                        // allocation of identity matrix
358J=myalloc2(m,n);                       // allocation of Jacobian matrix
359...
360initialize(x);                         // setting up the argument x
361...
362zos_forward(ftag,m,n,1,x,y);           // computing the Jacobian by
363fos_reverse(ftag,m,n,m,I,J);           // reverse mode of AD
364...
365\end{verbatim}
366\end{minipage}
367\end{center}
368
369\newpage
370%-----------------------------------------------------------------------
371%-----------------------------------------------------------------------
372\begin{center}\Large
373{\Huge \bf Low-level Differentiation Routines}\\[3ex]
374{\Large \bf  Forward Mode (C++ interfaces)}\\[2ex]
375\begin{tabular}{|p{13.6cm}|p{3.0cm}|}
376\hline & \\[-2.0ex]
377{\tt forward(tag,m,n,d,keep,X[n][d+1],Y[m][d+1])} & 
378           {\large {\tt hos}, {\tt fos}, {\tt zos}} \\[0.5ex]
379{\tt forward(tag,m=1,n,d,keep,X[n][d+1],Y[d+1])} & 
380           {\large {\tt hos}, {\tt fos}, {\tt zos}} \\[1.0ex]
381\hline& \\[-2.0ex] 
382{\tt forward(tag,m,n,d=0,keep,x[n],y[m])} & 
383           {\large {\tt zos}} \\[0.5ex]
384{\tt forward(tag,m,n,keep,x[n],y[m])} & 
385           {\large {\tt zos}} \\[1.0ex]
386\hline& \\[-2.0ex] 
387{\tt forward(tag,m,n,p,x[n],X[n][p],y[m],Y[m][p])} &
388           {\large {\tt fov}} \\[1.0ex]
389\hline& \\[-2.0ex] 
390{\tt forward(tag,m,n,d,p,x[n],X[n][p][d],} & {\large {\tt hov}} \\[0.5ex]
391\hspace{8.7cm}{\tt y[m],Y[m][p][d])} & \\[1.0ex]
392\hline
393\end{tabular}\\[4ex]
394%
395{\Large \bf  Reverse Mode (C++ interfaces)}\\[2ex]
396\begin{tabular}{|p{15.6cm}|p{0.8cm}|}
397\hline & \\[-2.0ex]
398{\tt reverse(tag,m,n,d,u[m],Z[n][d+1])} & 
399           {\large {\tt hos}} \\[0.5ex]
400{\tt forward(tag,m=1,n,d,u,Z[n][d+1])} & 
401           {\large {\tt hos}} \\[1.0ex]
402\hline& \\[-2.0ex] 
403{\tt reverse(tag,m,n,d=0,u[m],z[n])} & 
404           {\large {\tt fos}} \\[0.5ex]
405{\tt reverse(tag,m=1,n,d=0,u,z[n])} & 
406           {\large {\tt fos}} \\[1.0ex]
407\hline& \\[-2.0ex] 
408{\tt reverse(tag,m,n,d,q,U[q][m],Z[q][n][d+1],nz[q][n])} & 
409           {\large {\tt hov}} \\[0.5ex]
410{\tt reverse(tag,m=1,n,d,q,U[q],Z[q][n][d+1],nz[q][n])} & 
411           {\large {\tt hov}} \\[0.5ex]
412{\tt reverse(tag,m=1,n,d,Z[m][n][d+1],nz[m][n])} ($U=I_m$) & 
413           {\large {\tt hov}} \\[0.5ex]
414\hline& \\[-2.0ex] 
415{\tt reverse(tag,m,n,d=0,q,U[q][m],Z[q][n])} & 
416           {\large {\tt fov}} \\[0.5ex]
417{\tt reverse(tag,m,n,q,U[q][m],Z[q][n]} & 
418           {\large {\tt fov}} \\[0.5ex]
419{\tt reverse(tag,m=1,n,d=0,q,U[q],Z[q][n])} & 
420           {\large {\tt fov}} \\[1.0ex]
421\hline
422\end{tabular}
423%
424\end{center}
425
426\newpage
427%-----------------------------------------------------------------------
428%-----------------------------------------------------------------------
429\begin{center}\Large
430{\Huge \bf Drivers for Ordinary Differential Equations
431           (C/C++)}\\[-0.5ex]
432\begin{align*}
433      \text{{\bf ODE}:}\qquad 
434      x'\left(t\right)=y\left(t\right)=F\left(x\left(t\right)\right),
435      \qquad x\left(0\right) = x_0
436\end{align*}\\[2ex]
437%
438\fbox{\parbox{17.5cm}{\begin{center}
439  {\tt  forodec(tag,n,tau,dold,d,X[n][d+1])}
440\end{center}}}\\[2ex]
441\begin{minipage}[h]{15cm}
442\small 
443\begin{itemize}
444\item recursive forward computation of $x_{d_{old}+1},\ldots,x_d$ from
445      $x_0,\ldots,x_{d_{old}}$ (by $x_{i+1} = \frac{1}{1+i}y_i$)
446\item application with $d_{old}=0$ delivers truncated Taylor series
447      $\sum_0^d x_j t^j$ at base point $x_0$
448\end{itemize}
449\end{minipage}\\[2ex]
450%
451\fbox{\parbox{17.5cm}{\begin{center}
452  {\tt   hov\_reverse(tag,n,n,d-1,n,I[n][n],A[n][n][d],nz[n][n])}
453\end{center}}}\\[2ex]
454\begin{minipage}[h]{15cm}
455\small 
456\begin{itemize}
457\item reverse computation of $A_j=\frac{\partial y_j}{\partial x_0}$,
458  $j=0,\ldots,d$ after calling {\tt forodec} with degree $d$ 
459\item  optional nonzero pattern {\tt nz} ($\Rightarrow$ manual)
460\end{itemize}
461\end{minipage}\\[2ex]
462%
463\fbox{\parbox{17.5cm}{\begin{center}
464  {\tt   accodec(n,tau,d-1,A[n][n][d],B[n][n][d],nz[n][n])}
465\end{center}}}\\[2ex]
466\begin{minipage}[h]{15cm}
467\small 
468\begin{itemize}
469\item accumulation of total derivatives $B_j=\frac{d x_j}{d x_0}$,
470 $j=0,\ldots,d$ from the partial derivatives
471 $A_j=\frac{\partial y_j}{\partial x_0}$, $j=0,\ldots,d$
472 after calling {\tt hov\_reverse} 
473\item  optional nonzero pattern {\tt nz} ($\Rightarrow$ manual)
474\end{itemize}
475\end{minipage}\\[4ex]
476%
477\begin{minipage}[h]{160mm}
478\small
479\underline{C++:} \hspace{0.5cm} Special C++ interfaces can be found in
480                 file {\tt SRC/DRIVERS/odedrivers.h}!\\[3ex]
481\underline{Example:}
482\begin{verbatim}
483...
484double x[n], **I, **X, ***A, ***B;
485I=myallocI2(n);                        // allocation of identity matrix
486X=myalloc2(n,5);                       // allocation of matrix X
487A=myalloc3(n,n,4); B=myalloc3(n,n,4);  // allocation of tensors A and B
488...
489initialize(X);                         // setting up the argument x_0
490...
491forodec(ftag,n,1.0,0,4,X);             // compute x_1,...,x_4
492hov_reverse(ftag,n,n,3,n,I,A,NULL);    // compute A_0,...,A_3
493accodec(ftag,n,1.0,3,A,B,NULL);        // accumulate B_0,...,B_3
494...
495\end{verbatim}
496\end{minipage}
497%
498\end{center}
499
500\newpage
501%-----------------------------------------------------------------------
502%-----------------------------------------------------------------------
503\begin{center}\Large
504{\bf ADOL-C provides}\\[1ex]
505\fbox{\parbox{170mm}{
506\begin{itemize}\setlength{\itemsep}{0cm}\setlength{\parsep}{0cm}
507\item Low-level~differentiation~routines ({\tt forward}/{\tt reverse})
508\item Easy-to-use driver routines for
509      \begin{itemize}\setlength{\itemsep}{0cm}\setlength{\parsep}{0cm}
510      \item the solution of optimization problems and nonlinear equations
511      \item the integration of ordinary differential equations
512      \item the evaluation of higher derivative tensors
513            ($\Rightarrow$ manual)
514      \end{itemize}
515\item Derivatives of implicit and inverse functions ($\Rightarrow$ manual)
516\item Forward and backward dependence analysis ($\Rightarrow$ manual)
517\end{itemize}}}\\[2ex]
518{\bf Recent developments}\\[1ex]
519\fbox{\parbox{17cm}{
520\begin{itemize}\setlength{\itemsep}{0cm}\setlength{\parsep}{0cm}
521\item Efficient detection of Jacobian/Hessian sparsity structure
522\item Exploitation of Jacobian/Hessian sparsity by matrix compression
523\item Integration of checkpointing routines
524\item Exploitation of fixpoint iterations
525\item Differentiation of OpenMP parallel programs
526\end{itemize}}}\\[2ex]
527{\bf Future developments}\\[1ex]
528\fbox{\parbox{17cm}{
529\begin{itemize}\setlength{\itemsep}{0cm}\setlength{\parsep}{0cm}
530\item Internal optimizations to reduce storage needed for reverse mode
531\item Recovery of structure for internal function representation
532\item Differentiation of MPI parallel programs
533\end{itemize}}}\\[2ex]
534{\bf Contact/Resources}\\[1ex]
535\fbox{\parbox{17cm}{
536\begin{itemize}\setlength{\itemsep}{0cm}\setlength{\parsep}{0cm}
537\item E-mail: \hspace{0.6cm}{\tt adol-c@list.coin-or.org}
538\item WWW:    \hspace{0.5cm}{\tt http://www.coin-or.org/projects/ADOL-C.xml}
539\end{itemize}}}
540\end{center}
541
542\end{document}
543
544
Note: See TracBrowser for help on using the repository browser.