185
\frametitle{The functional gradient of Example problem}
187
\includegraphics[width=0.45\textwidth]{pics/turbine_optimisation_forward}
188
\caption{The predicted velocity field. The velocity in the two turbine areas is clearly reduced.}
193
\includegraphics[width=0.45\textwidth]{pics/turbine_optimisation_gradient}
194
\caption{The sensitivity solution of the power output. More (Less) drag in the dark red (blue) areas leads to more power.}
200
\frametitle{Adjoint vs. finite differences for gradient computation}
201
\begin{block}{Adjoint \hspace{2cm} \hspace{2.5cm} Finite differences}
204
% TODO: Make a table out of it
205
\column[t]{.5\textwidth}
207
\item Computational expense \textbf{independent} of the number of controls.
208
\item Does \textbf{not} suffer from truncation error.
209
\item DOLFIN (Python) can \textbf{automatically} derive and solve the adjoint equation.
211
\column[t]{.5\textwidth}
213
\item Computational expense increases linearly with the number of controls.
214
\item Suffers from truncation error.
215
\item Easy to implement.
222
\item For 1: We saw that the computational expense using the adjoint is independent of the choice of $m$. The finite difference approach requires a functional evaluation for each control, hence its expense increases linearly with the number of controls.
223
\item For 2: Even for the optimal choice of h in [f(x+h) - f(x)] / h only about 1/2 to 2/3 of the digits are correct.
224
\item For 3: Finite difference has the advantage of its ease implementation. However, there are powerful tools available to facilitate the development of an adjoint model.
186
%\frametitle{Adjoint vs. finite differences for gradient computation}
187
%\begin{block}{Adjoint \hspace{2cm} \hspace{2.5cm} Finite differences}
190
% % TODO: Make a table out of it
191
% \column[t]{.5\textwidth}
193
% \item Computational expense \textbf{independent} of the number of controls.
194
% \item Does \textbf{not} suffer from truncation error.
195
% \item DOLFIN (Python) can \textbf{automatically} derive and solve the adjoint equation.
197
% \column[t]{.5\textwidth}
199
% \item Computational expense increases linearly with the number of controls.
200
% \item Suffers from truncation error.
201
% \item Easy to implement.
208
% \item For 1: We saw that the computational expense using the adjoint is independent of the choice of $m$. The finite difference approach requires a functional evaluation for each control, hence its expense increases linearly with the number of controls.
209
% \item For 2: Even for the optimal choice of h in [f(x+h) - f(x)] / h only about 1/2 to 2/3 of the digits are correct.
210
% \item For 3: Finite difference has the advantage of its ease implementation. However, there are powerful tools available to facilitate the development of an adjoint model.
228
214
\section{Applications}
260
%\frametitle{Cheap functional evaluation for linear problems}
262
%Consider a linear problem (i.e. $F$ and $J$ are linear in $u$) of the form:
264
% J(u) & = (j, u), & j \in \mathbb{R}^n, \\
265
% F(u, m) & = Au - b(m) = 0, & A \in \mathbb{R}^{n \times n}, b\in \mathbb{R}^n.
267
%The associated adjoint equation is $A^*\lambda = j$.
271
% J(u) = (A^*\lambda, u) = (\lambda, Au ) = (\lambda, b(m) ).
274
%$\to$ With the adjoint, the functional evaluation for \textbf{any} $m$ requires only an inner product! %TOO: Check if inner product is the right word ere
245
\frametitle{The turbine optimisation problem}
247
\includegraphics[width=0.4\textwidth]{50turbines/initial_turbines.png}
248
\includegraphics[width=0.4\textwidth]{50turbines/final_turbines.png}\\
249
\includegraphics[width=0.4\textwidth]{50turbines/functional_plot.png}
250
\caption{Initial and optimised turbine positions and the power increase.}
430
408
\includegraphics[width=0.8\textwidth]{pics/adjoint_types_continuous}
433
\begin{block}{The continuous adjoint is ...}
434
... a system of linear equations that can be discretised and solved in a similar manner to the forward model.
436
\item \color{darkgreen} No problems with non-differentiable numerical schemes in the forward discretisation.
437
\item \color{red} Specific to one problem.
411
%\begin{block}{The continuous adjoint is ...}
412
%... a system of linear equations that can be discretised and solved in a similar manner to the forward model.
414
%\item \color{darkgreen} No problems with non-differentiable numerical schemes in the forward discretisation.
415
%\item \color{red} Specific to one problem.
442
420
%\subsection{Automatic differentiation}
447
425
\includegraphics[width=0.8\textwidth]{pics/adjoint_types_AD}
450
\begin{block}{The adjoint of the source code...}
451
... is usually obtained by applying an AD tool.
453
\item \color{darkgreen} Can sometimes be obtained automatically from the source code
454
\item \color{red} Does not work for some models
428
%\begin{block}{The adjoint of the source code...}
429
%... is usually obtained by applying an AD tool.
431
%\item \color{darkgreen} Can sometimes be obtained automatically from the source code
432
%\item \color{red} Does not work for some models
459
437
The model is considered as a sequence of primitive instructions, each of which can be differentiated.
476
454
\includegraphics[width=0.8\textwidth]{pics/adjoint_types_libadjoint}
479
\begin{block}{Adjoint of the discretised equations}
481
\item \color{darkgreen} Consistent gradient
482
%\item \color{darkgreen} Circumvents many problems with the AD approach.
483
\item \color{red}{Complicated to develop by hand}
484
\item \color{darkgreen}{\texttt{Libadjoint} facilitates the development}
457
%\begin{block}{Adjoint of the discretised equations}
459
%\item \color{darkgreen} Consistent gradient
460
%%\item \color{darkgreen} Circumvents many problems with the AD approach.
461
%\item \color{red}{Complicated to develop by hand}
462
%\item \color{darkgreen}{\texttt{Libadjoint} facilitates the development}
489
467
similar to the "continuous adjoint" approach, but uses the discretised equations instead of the continuous equations.