\documentclass[class=report, float=false, crop=false]{standalone}

\input{preamble}

\graphicspath{{figures/images/}{figures/figs/}}

\begin{document}

\chapter{Shear strain correlation}
\label{chap:strain}

\section{Plastic deformation}
\label{section:plastic_deformation}

Current theories of plastic deformation of amorphous solids rely on the existence of \textit{shear transformation zones}, which are special sites, a few particles wide, where particles are able to rearrange themselves in response to applied stresses \cite{falk1998dynamics}. Plastic deformation is then the consequence of localised irreversible rearrangements, coupled by elastic strain fields \cite{nicolas2014spatiotemporal} which are solutions of the Eshelby inclusion problem \cite{eshelby1959elastic}.\\

These plastic rearrangements, coupled in an elastic medium, have also been observed in supercooled liquids near the glass transition \cite{chattoraj2013elastic, illing2016strain, hassani2018long}, hence the claim that supercooled liquids are "solids that flow" \cite{dyre2006colloquium}.\\

With $\varepsilon_{xy}(\vec{r}, t, t + \Delta t)$ the accumulated shear strain at position $\vec{r}$ and between times $t$ and $t + \Delta t$ (see section \ref{subsection:shear_strain}), we have in these systems that $C_{\varepsilon_{xy}\varepsilon_{xy}}(\Delta \vec{r}, \Delta t)$, its autocorrelation function (see section \ref{subsection:shear_strain_correlation}), has the same quadrupolar symmetry and algebraic decay far from the origin as the strain field \cite{illing2016strain, hassani2018long}, \textit{i.e.}
\begin{equation}
C_{\varepsilon_{xy}\varepsilon_{xy}}(\Delta \vec{r}, \Delta t) \underset{\frac{||\Delta \vec{r}||}{a} \gg 1}{\propto} \frac{\cos4\theta}{||\Delta \vec{r}||^2}
\label{css_eshelby}
\end{equation}
in 2 dimensions, with $a$ the average interparticle distance.\\

In this chapter, we aim at determining if the transition from the fluid to the phase separated regime is associated with the development of algebraically decaying shear strain correlations.

\section{Shear strain}

\subsection{Shear strain}
\label{subsection:shear_strain}

With $\vec{u}(\vec{r}, t, t + \Delta t) = \begin{pmatrix} u_x(\vec{r}, t, t + \Delta t) \\ u_y(\vec{r}, t, t + \Delta t) \end{pmatrix}$ the displacement of particle at position $\vec{r}$ at time $t$ between times $t$ and $t + \Delta t$, we introduce the linearised strain tensor $\rttensor{\varepsilon}$ \cite{landau1986theory}
\begin{equation}
\begin{aligned}
&\rttensor{\varepsilon}(\vec{r}, t, t + \Delta t)\\
\underset{\frac{||\vec{u}||}{L} \ll 1}{=} &\begin{pmatrix} \frac{\partial}{\partial x} u_x(\vec{r}, t, t + \Delta t) & \frac{1}{2} \left(\frac{\partial}{\partial y} u_x(\vec{r}, t, t + \Delta t) + \frac{\partial}{\partial x} u_y(\vec{r}, t, t + \Delta t)\right) \\ \frac{1}{2} \left(\frac{\partial}{\partial y} u_x(\vec{r}, t, t + \Delta t) + \frac{\partial}{\partial x} u_y(\vec{r}, t, t + \Delta t)\right) &  \frac{\partial}{\partial y} u_y(\vec{r}, t, t + \Delta t) \end{pmatrix}
\end{aligned}
\end{equation}
with $L$ the characteristic length of the system, in which we will consider only the diagonal terms, $\textit{i.e.}$ the linearised shear strain
\begin{equation}
\varepsilon_{xy}(\vec{r}, t, t + \Delta t) = \varepsilon_{yx} = \frac{1}{2} \left(\frac{\partial}{\partial y} u_x(\vec{r}, t, t + \Delta t) + \frac{\partial}{\partial x} u_y(\vec{r}, t, t + \Delta t)\right)
\label{linearised_shear_strain}
\end{equation}
which characterises the deformation of the system perpendicularly to the direction of deformation.

\subsection{Shear strain correlation}
\label{subsection:shear_strain_correlation}

We define the shear strain correlation, which is the auto-correlation function of the linearised shear strain introduced in equation \ref{linearised_shear_strain}
\begin{equation}
\begin{aligned}
C_{\varepsilon_{xy}\varepsilon_{xy}}(\Delta \vec{r}, \Delta t) &= \left<\varepsilon_{xy}(\vec{r}+\Delta\vec{r}, t, t + \Delta t)\varepsilon_{xy}(\vec{r}, t, t + \Delta t)\right>_{\vec{r}, t}\\
&= \frac{\int dt \int d^2\vec{r}~ \varepsilon_{xy}(\vec{r}, t, t+\Delta t)\varepsilon_{xy}(\vec{r} + \Delta \vec{r}, t, t+\Delta t)}{\int dt \int d^2\vec{r}~ |\varepsilon_{xy}(\vec{r}, t, t+\Delta t)|^2}\\
&= \frac{\mathcal{F}^{-1}\{\int dt~ |\mathcal{F}\{\varepsilon_{xy}\}(\vec{k}, t, t + \Delta t)|^2\}(\Delta \vec{r}, \Delta t)}{\int dt \int d^2\vec{r}~ ||\varepsilon_{xy}(\vec{r}, t, t+\Delta t)||^2}
\end{aligned}
\label{Css}
\end{equation}
where we refer to appendix \ref{field_auto_correlation} for calculation details leading to the last line of equation \ref{Css}.\\

As discussed in section \ref{section:plastic_deformation}, we expect $C_{\varepsilon_{xy}\varepsilon_{xy}}(\Delta \vec{r}, \Delta t)$ to have a four-fold symmetry. Inspired by \cite{illing2016strain}, we then introduce the projection of the shear strain correlation on $\cos4\theta$
\begin{equation}
C_4^4(\Delta r, \Delta t) = \frac{1}{\pi} \int_0^{2\pi} d\theta~ \cos(4\theta)~ C_{\varepsilon_{xy}\varepsilon_{xy}}(\Delta\vec{r}\equiv(\Delta r, \theta), \Delta t)
\label{c44_definition}
\end{equation}
which in a 2D elastic medium should decay algebraically far from the origin
\begin{equation}
C_4^4(\Delta r, \Delta t) \underset{\frac{\Delta r}{a} \gg 1}{\propto} \frac{1}{\Delta r^2}
\end{equation}
where $a$ is the average interparticle distance.

\section{Real space method}

\subsection{Method}
\label{subsection:real_space_method}

\myparagraph{Coarse-graining}

We only have access to discrete particle positions to calculate displacements. In order to obtain smooth strain fields, we then have to go through some sort of coarse-graining of these displacements.\\

On the basis of a method detailed in \cite{goldhirsch2002microscopic}, we define the coarse-graining operator $\mathcal{A}(\sigma, r_c)$ which associates to any particle-dependent variable $c_i(t)$ its coarse-grained version $\bar{c}(\vec{r}, t)$ such that
\begin{equation}
\bar{c}(\vec{r}, t) = \mathcal{A}(\sigma, r_c)\{c_i(t)\} = \sum_{i=1}^N c_i(t) \phi(\vec{r}-\vec{r}_i(t), \sigma, r_c)
\end{equation}
where $\phi(\vec{r}, \sigma, r_c)$ is a normalised non-negative coarse-graining function, with a single maximum at $\vec{r} = \vec{0}$, of width $\sigma$ -- the coarse-graining scale -- and cut-off radius $r_c$.\\

As has been done in \cite{illing2016strain}, we choose a Gaussian coarse-graining function $\phi(\vec{r}, \sigma, r_c)$ of width $\sigma$ with a cut-off radius $r_c$
\begin{equation}
\phi(\vec{r}, \sigma, r_c) = \frac{1}{\mathcal{N}(\sigma, r_c)} \begin{cases} \exp\left(-\frac{||\vec{r}||^2}{2\sigma^2}\right) &\text{ if } ||\vec{r}|| < r_c \\ 0 & \text{ otherwise} \end{cases}
\end{equation}
where $\mathcal{N}(\sigma, r_c)$ normalises the function, \textit{i.e.} is such that
\begin{equation}
\int_{\mathbb{R}^2} d^2\vec{r}~ \phi(\vec{r}, \sigma, r_c) = \frac{1}{\mathcal{N}(\sigma, r_c)}\int_0^{r_c} dr~ 2 \pi r \exp\left(-\frac{r^2}{2\sigma^2}\right) = 1 \Leftrightarrow \mathcal{N}(\sigma, r_c) = 2\pi\sigma^2\left(1 - \exp\left(-\frac{r_c^2}{2\sigma^2}\right)\right)
\end{equation}
It is straightforward to verify that this coarse-graining function satisfies the aforementioned conditions.\\

We then define the coarse-grained displacement field \cite{illing2016strain}
\begin{equation}
\bar{\vec{u}}(\vec{r}, t, t+\Delta t) = \frac{1}{\bar{\rho}(\vec{r}, t)} \mathcal{A}(\sigma, r_c)\{\vec{u}(\vec{r}_i(t), t, t+\Delta t)\} = \frac{1}{\bar{\rho}(\vec{r}, t)} \sum_{i=1}^N \vec{u}(\vec{r}_i(t), t, t+\Delta t) \phi(\vec{r}-\vec{r}_i(t), \sigma, r_c)
\label{coarse_grained_u}
\end{equation}
where $\bar{\rho}(\vec{r}, t)$ is the coarse-grained density
\begin{equation}
\bar{\rho}(\vec{r}, t) = \mathcal{A}(\sigma, r_c)\{m_i\} = \sum_{i=1}^N m_i \phi(\vec{r}-\vec{r}_i(t), \sigma, r_c)
\end{equation}
with $m_i$ the mass of particle $i$.\\

It follows, from equations \ref{linearised_shear_strain} and \ref{coarse_grained_u}, the expression of the linearised shear strain from the coarse-grained displacements
\begin{equation}
\begin{aligned}
\varepsilon_{xy}(\vec{r}, t, t + \Delta t) &= \frac{1}{2} \left(\frac{\partial}{\partial x}\bar{u}_y(\vec{r}, t, t + \Delta t) + \frac{\partial}{\partial y}\bar{u}_x(\vec{r}, t, t + \Delta t)\right)\\
&= \frac{1}{2}\begin{aligned}[t]\Bigg[&\frac{\partial}{\partial x}\left(\frac{1}{\bar{\rho}(\vec{r}, t)}\right)\underbrace{\sum_{i=1}^N u_y(\vec{r}_i(t), t, t + \Delta t)\phi(\vec{r} - \vec{r}_i(t), \sigma, r_c)}_{\displaystyle\mathcal{A}(\sigma, r_c)\{u_y(\vec{r}_i(t), t, t + \Delta t)\}}\\
&+ \frac{1}{\bar{\rho}(\vec{r}, t)}\sum_{i=1}^N u_y(\vec{r}_i(t), t, t + \Delta t) \frac{\partial}{\partial x}\left(\phi(\vec{r} - \vec{r}_i(t), \sigma, r_c)\right)\\
&+ \frac{\partial}{\partial y}\left(\frac{1}{\bar{\rho}(\vec{r}, t)}\right)\underbrace{\sum_{i=1}^N u_x(\vec{r}_i(t), t, t + \Delta t)\phi(\vec{r} - \vec{r}_i(t), \sigma, r_c)}_{\displaystyle\mathcal{A}(\sigma, r_c)\{u_x(\vec{r}_i(t), t, t + \Delta t)\}}\\
&+ \frac{1}{\bar{\rho}(\vec{r}, t)}\sum_{i=1}^N u_x(\vec{r}_i(t), t, t + \Delta t) \frac{\partial}{\partial x}\left(\phi(\vec{r} - \vec{r}_i(t), \sigma, r_c)\right)\Bigg]\end{aligned}
\end{aligned}
\end{equation}
where we have, $\forall \vec{r}$ such that $||\vec{r}|| < r_c$,
\begin{equation}
\begin{aligned}
\frac{\partial}{\partial \vec{r}}\phi(\vec{r} - \vec{r}_i(t), \sigma, r_c) &= \frac{1}{\mathcal{N}(\sigma, r_c)}\frac{\partial}{\partial\vec{r}} \exp\left(-\frac{||\vec{r} - \vec{r}_i(t)||^2}{2\sigma^2}\right)\\
&= - \frac{\vec{r} - \vec{r}_i(t)}{\mathcal{N}(\sigma, r_c)\sigma^2} \exp\left(-\frac{||\vec{r} - \vec{r}_i(t)||^2}{2\sigma^2}\right)\\
&= - \frac{\vec{r} - \vec{r}_i(t)}{\sigma^2}\phi(\vec{r} - \vec{r}_i(t), \sigma, r_c)
\end{aligned}
\end{equation}
which result can be extrapolated to any $\vec{r}$, and from which it directly follows for any particle-dependent variable $c_i(t)$ that
\begin{equation}
\begin{aligned}
\frac{\partial}{\partial \vec{r}} \bar{c}(\vec{r}, t) &= \sum_{i=1}^N c_i(t) \frac{\partial}{\partial \vec{r}} \phi(\vec{r} - \vec{r}_i(t), \sigma, r_c)\\
&= -\frac{1}{\sigma^2} \sum_{i=1}^N c_i(t) (\vec{r} - \vec{r}_i(t)) \phi(\vec{r} - \vec{r}_i(t), \sigma, r_c)\\
&= -\frac{1}{\sigma^2} \mathcal{A}(\sigma, r_c)\left\{c_i(t)(\vec{r} - \vec{r}_i(t))\right\}
\end{aligned}
\end{equation}
and thus for the coarse-grained density in particular
\begin{equation}
\begin{aligned}
\frac{\partial}{\partial\vec{r}} &= -\frac{1}{\bar{\rho}^2(\vec{r}, t)} \frac{\partial}{\partial\vec{r}} \bar{\rho}(\vec{r}, t)\\
&= \frac{1}{\bar{\rho}^2(\vec{r}, t)\sigma^2} \mathcal{A}(\sigma, r_c)\left\{m_i(\vec{r} - \vec{r}_i(t))\right\}
\end{aligned}
\end{equation}
which finally leads to the expression of the linearised shear strain as function of the positions, masses and displacements of the particles, and the coarse-grained density
\begin{equation}
\begin{aligned}
\varepsilon_{xy}(\vec{r}, t, t + \Delta t) = \frac{1}{2}
&\begin{aligned}[t]\Bigg[\frac{1}{\bar{\rho}^2(\vec{r}, t)\sigma^2} \Big(&\mathcal{A}(\sigma, r_c)\left\{m_i(y - y_i(t))\right\} \times \mathcal{A}(\sigma, r_c)\left\{u_x(\vec{r}_i(t), t, t + \Delta t)\right\} \\ + &\mathcal{A}(\sigma, r_c)\left\{m_i(x - x_i(t))\right\} \times \mathcal{A}(\sigma, r_c)\left\{u_y(\vec{r}_i(t), t, t + \Delta t)\right\}\Big)\end{aligned}\\
& \begin{aligned}[t]-\frac{1}{\bar{\rho}(\vec{r}, t)\sigma^2} \Big(&\mathcal{A}(\sigma, r_c)\left\{u_x(\vec{r}_i(t), t, t + \Delta t)(y - y_i(t))\right\} \\ + &\mathcal{A}(\sigma, r_c)\left\{u_y(\vec{r}_i(t), t, t + \Delta t)(x - x_i(t))\right\}\Big)\Bigg]\end{aligned}
\end{aligned}
\label{linearised_cg_shear_strain}
\end{equation}

\myparagraph{Computation details}

We divide the system square box in $N_{cases} \times N_{cases}$ linearly spaced square boxes with centres $(\vec{R}_{kl})_{1 \leq k,l \leq N_{cases}}$. We then choose $S_{max}$ times $(t_m)_{1 \leq m \leq S_{max}}$, with $\forall m$, $t_m \geq S_{init}$.\\

In our model, we consider $\forall i \in \llbracket 1; N \rrbracket$, $m_i = 1$.\\

We then have $S_{max}$ grids of linearised shear strain $(\varepsilon_{xy,kl}(t_m, t_m + \Delta t))_{1 \leq k, l \leq N_{cases}}$, defined $\forall k,l \in \llbracket 1; N_{cases} \rrbracket$ by
\begin{equation}
\begin{aligned}
\varepsilon_{xy,kl}(t_m, t_m + \Delta t) = \frac{1}{2}
&\begin{aligned}[t]\Bigg[\frac{1}{\bar{\rho}^2(\vec{R}_{kl} ,t_m)\sigma^2} \Big(&\mathcal{A}(\sigma, r_c)\left\{Y_{kl} - y_i(t_m)\right\} \times \mathcal{A}(\sigma, r_c)\left\{u_x(\vec{r}_i(t_m), t_m, t_m + \Delta t)\right\} \\ + &\mathcal{A}(\sigma, r_c)\left\{X_{kl} - x_i(t)\right\} \times \mathcal{A}(\sigma, r_c)\left\{u_y(\vec{r}_i(t_m), t_m, t_m + \Delta t)\right\}\Big)\end{aligned}\\
& \begin{aligned}[t]-\frac{1}{\bar{\rho}(\vec{R}_{kl}, t_m)\sigma^2} \Big(&\mathcal{A}(\sigma, r_c)\left\{u_x(\vec{r}_i(t), t_m, t_m + \Delta t)(Y_{kl} - y_i(t))\right\} \\ + &\mathcal{A}(\sigma, r_c)\left\{u_y(\vec{r}_i(t), t_m, t_m + \Delta t)(X_{kl} - x_i(t))\right\}\Big)\Bigg]\end{aligned}
\end{aligned}
\label{linearised_cg_shear_strain_grid}
\end{equation}
according to equation \ref{linearised_cg_shear_strain}.\\

Since we have a cut-off radius $r_c$, we can resort to neighbour lists to speed up coarse-graining steps, \textit{i.e.} evaluations of $\mathcal{A}(\sigma, r_c)\{\ldots\}$ expressions. We have thus implemented cell lists \cite{frenkel2001understanding}.\\

We can now take the Fourier transforms of the linearised shear strain grids of equation \ref{linearised_cg_shear_strain_grid}
\begin{equation}
(\tilde{\varepsilon}_{xy,kl}(t_m, t_m + \Delta t))_{1 \leq k, l \leq N_{cases}} = \mathcal{F}\left\{(\varepsilon_{xy,pq}(t_m, t_m + \Delta t))_{1 \leq p, q \leq N_{cases}}\right\}(\vec{K}_{kl}, t_m, t_m + \Delta t)
\end{equation}
with $(\vec{K}_{kl})_{1 \leq k, l \leq N_{cases}}$ the grid of wave vectors, then compute the linearised shear strain correlation grid
\begin{equation}
C_{\varepsilon_{xy}\varepsilon_{xy}}(\vec{R}_{kl}, \Delta t) = \frac{\mathcal{F}^{-1}\left\{\left(\sum_m |\tilde{\varepsilon}_{xy,pq}(t_m, t_m + \Delta t)|^2\right)_{1 \leq p, q \leq N_{cases}}\right\}(\vec{R_{kl})}}{\sum_m\sum_{p, q} \varepsilon_{xy, pq}^2(t_m, t_m + \Delta t)}
\end{equation}
\mbox{}\\

Our computation script is available at \href{https://github.com/yketa/active_particles/blob/master/analysis/css.py}{{\faGithub~ yketa/active\_particles/analysis/css.py}}.

\subsection{Results}
\label{subsection:real_method_results}

\myparagraph{High activity ($\text{Pe} > \text{Pe}_t$)}

We investigate shear strain correlations in a system in phase separated state at high activity.\\

We observe in the shear strain map of figure \ref{css_map_real} that the highest values of shear strain in absolute value are found at the interface between the dense fluid and the active gas. This finding is not surprising since we are dealing here with an interface between phases of very different motilities.\\

We then observe in the shear strain correlation map of figure \ref{css_map_real} that $C_{\varepsilon_{xy}\varepsilon_{xy}}(\Delta \vec{r}, \Delta t)$ effectively has a quadropular symmetry as reported in the litterature \cite{illing2016strain, hassani2018long}. This confirms the relevance of the introduction of the $C_4^4(\Delta r, \Delta t)$ function (see equation \ref{c44_definition}).\\

We have graphically checked that there existed a region of the system where an active gas hole never opened and found that it was the case for a square region of centre $(x=-150, y=150)$ and length $L=300$. We have then looked at strain correlations restricted to this area only. We show in figure \ref{css_map_real_quarter} the resulting strain correlation map. By comparison with figure \ref{css_map_real}, we find that the strain correlation map is sharper if active gas holes are removed.\\

We however stress that this kind of manipulation is not possible for all our systems in the phase separated regime. Indeed, just above the transition from fluid states to phase separated states, multiple smaller and transient active gas holes appear in the system. These holes get bigger as the activity increases until, as in the system we are currently strudying, a single hole appears, which size and position hardly vary during the simulation time. This observation has also already been made for other active systems \cite{wysocki2014cooperative, levis2014clustering}.\\

\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{figures/figs/Cssb_Dk8000_Vj1000_Rg2000_Nq1000_Io5000_Tl1000_Ml1000_Cn5000_RCUTl2000_SIGMl2000.eps}
\vspace{-1cm}
\caption{Shear strain correlations, calculated with the real space method (see section \ref{subsection:real_space_method}), at packing fraction $\phi = 0.80$, self-propulsion velocity $\tilde{v} = 1\cdot10^{-2}$, and rotational diffusion rate $\tilde{\nu}_r = 2\cdot10^{—5}$ (phase separated regime). We have the average particle separation $a \approx 2$. \textbf{(left)} Shear strain map, $\varepsilon_{xy}(\vec{r} \equiv (x, y), t, t + \Delta t)$. There is an open active gas hole in the system, visible on the top and bottom right corners. \textbf{(right)} Shear strain correlation map, $C_{\varepsilon_{xy}\varepsilon_{xy}}(\Delta\vec{r} \equiv (x, y), \Delta t)$.}
\label{css_map_real}
\end{figure}

\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{figures/figs/Cssb_Dk8000_Vj1000_Rg2000_Nq1000_In5000_Tl1000_Ml1000_Co1000_Bn3000_XN1500_Yn1500_grid_circle.eps}
\caption{Shear strain correlations, calculated with the real space method (see section \ref{subsection:real_space_method}), at packing fraction $\phi = 0.80$, self-propulsion velocity $\tilde{v} = 1\cdot10^{-2}$, and rotational diffusion rate $\tilde{\nu}_r = 2\cdot10^{—5}$ (phase separated regime), from the square box of centre $(x=-150, y=150)$ and length $L=300$ in the system of figure \ref{css_map_real}. We have the average particle separation $a \approx 2$. \textbf{(left)} Shear strain correlation map, $C_{\varepsilon_{xy}\varepsilon_{xy}}(\Delta\vec{r} \equiv (x, y), \Delta t)$. The black circle materialises the radial projection of the shear strain correlation. \textbf{(right)} Radial projection of the shear strain correlation on a circle of radius $r=3.09$, $C_{\varepsilon_{xy}\varepsilon_{xy}}(\Delta\vec{r} \equiv (r=3.09, \theta), \Delta t)$.}
\label{css_map_real_quarter}
\end{figure}

We calculated shear strain correlations $C_{\varepsilon_{xy}\varepsilon_{xy}}(\Delta \vec{r}, \Delta t)$ for the subsystem of figure \ref{css_map_real_quarter} at different lag times $\Delta t$, then projected them on $\cos4\theta$ according to equation \ref{c44_definition} to obtain $C_4^4(\Delta r, \Delta t)$. These are shown in figure \ref{c44_real}.\\

Our curves are quite similar to the equivalent ones reported in \cite{illing2016strain, hassani2018long}. We have a peak of $C_4^4(\Delta r, \Delta t)$ close to 2 units of average particle separation and curves collapse, at least for $nD_0\Delta t \lessapprox 30$. Our most revelant observation is that our curves are quite consistent with an algebraic decay $(r/a)^{—2}$, indicating scale free correlations reminiscent of a glass-forming material at low temperature, as discussed in section \ref{section:plastic_deformation}.\\

We however have smooth but large fluctuations around this fit, which origin is still unknowsn.\\

\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{c44_comparison_Dk8000_Vj1000_Rg2000_Nq1000_Ll2000.eps}
\caption{Projection of shear strain correlations on $\cos4\theta$, $C_4^4(\Delta r, \Delta t)$, according to equation \ref{c44_definition}, at packing fraction $\phi = 0.80$, self-propulsion velocity $\tilde{v} = 1\cdot10^{-2}$, and rotational diffusion rate $\tilde{\nu}_r = 2\cdot10^{—5}$ (phase separated regime), for a subsystem containing no active gas holes, for different lag times $\Delta t$. We have $n = N/L^2$ the number density of particles and $D_0 = V_0^2/2\nu_r$ the diffusion constant of a single particle, introduced for matter of comparison of lag times between different systems as suggested in \cite{illing2016strain}. The dashed line corresponds to an arbitrary fit to a power law $(r/a)^{—2}$.}
\label{c44_real}
\end{figure}

\myparagraph{Low activity ($\text{Pe} < \text{Pe}_t$)}

We calculated shear strain correlations $C_{\varepsilon_{xy}\varepsilon_{xy}}(\Delta \vec{r}, \Delta t)$ for a system in fluid state, at different lag times $\Delta t$, then projected them on $\cos4\theta$ according to equation \ref{c44_definition} to obtain $C_4^4(\Delta r, \Delta t)$. These are shown in figure \ref{c44_real_fluid}.\\

We still observe a peak of $C_4^4(\Delta r, \Delta t)$ close to 2 units of average particle separation, however, contrarily to the phase separated state (see figure \ref{c44_real}), we observe here an exponential decay of the shear strain correlation, which length scale is approximately equal to 2 units of average particle separation. A simple exponential decay of correlations is indeed what we would expect in a liquid above the melting point \cite{debenedetti2001supercooled}. We finally add that the length scale of this decay increases sensitively with increasing lag time $\Delta t$.\\

There must then be a transition from an exponential to an algebraic decay of shear strain correlations as activity increases which we need to characterise.

\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{c44_comparison_Dk8000_Vj1000_Ri2000_Nq1000_Ll0000.eps}
\caption{Projection of shear strain correlations on $\cos4\theta$, $C_4^4(\Delta r, \Delta t)$, according to equation \ref{c44_definition}, at packing fraction $\phi = 0.80$, self-propulsion velocity $\tilde{v} = 1\cdot10^{-2}$, and rotational diffusion rate $\tilde{\nu}_r = 2\cdot10^{—3}$ (fluid regime), for different lag times $\Delta t$. We have $n = N/L^2$ the number density of particles and $D_0 = V_0^2/2\nu_r$ the diffusion constant of a single particle, introduced for matter of comparison of lag times between different systems as suggested in \cite{illing2016strain}. The dashed line corresponds to an arbitrary fit to an exponential $\exp(-r/2a)$.}
\label{c44_real_fluid}
\end{figure}

\myparagraph{Issue}

Despite this method giving interesting and encouraging results, we deplore its exceptional slowliness despite our best computational efforts. We introduce in section \ref{section:collective_mean_square_displacement_method} new quantities enabling us to compute shear strain correlations more quickly and efficiently.

\section{Collective mean square displacement method}
\label{section:collective_mean_square_displacement_method}

\subsection{Collective mean square displacement}
\label{subsection:cmsd}

\myparagraph{Definition}

We take the Fourier transform of the displacement of the particle at position $\vec{r}$ at time $t$ between times $t$ and $t + \Delta t$, evaluated at wave vector $\vec{k}$ such that $k = ||\vec{k}|| \neq 0$
\begin{equation}
\tilde{\vec{u}}(\vec{k}, t, t + \Delta t) = \mathcal{F}\{\vec{u}(\vec{r}, t, t + \Delta t)\}(\vec{k})
\end{equation}
and introduce
\begin{equation}
\begin{aligned}
\vec{e}_{||} &= \vec{k}/k &&~\parallelsum \vec{k}\\
\vec{e}_{\perp} &= (\vec{e}_z\wedge\vec{k})/k &&\perp \vec{k}
\end{aligned}
\end{equation}
with $\phi = (\vec{e}_x ; \vec{e}_{||})$, such that we can decompose $\tilde{\vec{u}}(\vec{k}, t, t + \Delta t)$ in this base \cite{stackexchange}
\begin{equation}
\begin{aligned}
\begin{pmatrix} \tilde{u}_x(\vec{k}, t, t + \Delta t) \\ \tilde{u}_y(\vec{k}, t, t + \Delta t) \end{pmatrix} &= \begin{pmatrix} \cos\phi & -\sin\phi \\ \sin\phi & \cos\phi \end{pmatrix} \begin{pmatrix} \tilde{u}_{||}(\vec{k}, t, t + \Delta t) \\ \tilde{u}_{\perp}(\vec{k}, t, t + \Delta t) \end{pmatrix}\\
&= \begin{pmatrix} k_x/k & -k_y/k \\ k_y/k & k_x/k \end{pmatrix} \begin{pmatrix} \tilde{u}_{||}(\vec{k}, t, t + \Delta t) \\ \tilde{u}_{\perp}(\vec{k}, t, t + \Delta t) \end{pmatrix}
\label{u_cmsd}
\end{aligned}
\end{equation}
\mbox{}\\

With these notations, we introduce the longitudinal and transversal mean square displacements \cite{illing2016strain, klix2012glass}, respectively $C^{||}(k, \Delta t)$ and $C^{\perp}(k, \Delta t)$, defined by
\begin{equation}
\begin{aligned}
C^{||}(k, \Delta t) &= \left<|\tilde{u}_{||}(\vec{k}, t, t + \Delta t)|^2\right>\\
C^{\perp}(k, \Delta t) &= \left<|\tilde{u}_{\perp}(\vec{k}, t, t + \Delta t)|^2\right>
\end{aligned}
\label{cmsd_definition}
\end{equation}
where $\left<\ldots\right>$ denotes an average over time $t$ and directions of $\vec{k}$ at fixed norm $k$. These functions are collective and spatially resolved generalisations of the mean square displacement \cite{illing2016strain}.\\

We note in \cite{illing2016strain} that for an incompressible glass
\begin{equation}
\begin{aligned}
C^{||}(k, \Delta t) &= 0\\
C^{\perp}(k, \Delta t) \underset{\frac{2\pi}{k} \gg a}&{\propto} k^{-2}
\end{aligned}
\end{equation}
with $a$ the average interparticle distance. Authors of \cite{leonforte2005continuum} also report
\begin{equation}
\begin{aligned}
C^{||}(k, \Delta t) \underset{\frac{2\pi}{k} \gg a}&{\propto} k^{-2}\\
C^{\perp}(k, \Delta t) \underset{\frac{2\pi}{k} \gg a}&{\propto} k^{-2}
\end{aligned}
\end{equation}
in a polydisperse Lennard-Jones mixture under shear.

\myparagraph{Shear strain correlation}

We have from \cite{illing2016strain} a simple relation between shear strain correlations and collective mean square displacements
\begin{equation}
C_{\varepsilon_{xy}\varepsilon_{xy}}(\Delta \vec{r}, \Delta t) = \mathcal{F}^{-1}\left\{-\frac{k_x^2k_y^2}{k^2}\left(C^{\perp}(k, \Delta t) - C^{||}(k, \Delta t)\right) + \frac{k^2}{4}C^{\perp}(k, \Delta t)\right\}(\Delta \vec{r})
\label{css_cmsd}
\end{equation}
hence our interest in these functions.\\

This relation can be derived from
\begin{equation}
C_{\varepsilon_{xy}\varepsilon_{xy}}(\Delta \vec{r}, \Delta t) = \mathcal{F}^{-1}\left\{\left<|\mathcal{F}\left\{\varepsilon_{xy}(\vec{r}, t, t + \Delta t)\right\}(\vec{k})|^2\right>_t\right\}(\Delta \vec{r})
\label{css_from_ft}
\end{equation}
according to appendix \ref{field_auto_correlation}, in which we can replace $u_x(\vec{r}, t, t + \Delta t)$ and $u_y(\vec{r}, t, t + \Delta t)$ by their expressions in terms of $\tilde{u}_{||}(\vec{k}, t, t + \Delta t)$ and $\tilde{u}_{\perp}(\vec{k}, t, t + \Delta t)$ with equation \ref{u_cmsd}, leading to equation \ref{css_cmsd} \cite{stackexchange}.

\myparagraph{Computation details}

First of all, we can note that
\begin{equation}
\begin{aligned}
C^{||}(k, \Delta t) &= \frac{1}{k^2}\left<|\vec{k}\cdot\tilde{\vec{u}}(\vec{k}, t, t + \Delta t)|^2\right>\\
C^{\perp}(k, \Delta t) &= \frac{1}{k^2}\left<||\vec{k}\wedge\tilde{\vec{u}}(\vec{k}, t, t + \Delta t)||^2\right>
\end{aligned}
\label{cmsd_k}
\end{equation}
which expressions are used in \cite{leonforte2005continuum}.\\

We divide the system square box in $N_{cases} \times N_{cases}$ linearly spaced square boxes with centres $(\vec{R}_{kl})_{1 \leq k, l \leq N_{cases}}$. With $dL$ the length of each box, we introduce
\begin{equation}
\vec{u}_{kl}(t, t + \Delta t) = \text{mean}\left(\left\{\vec{u}(\vec{r}_i(t), t, t + \Delta t), ||\vec{r}_i(t) - \vec{R}_{kl}||_{+\infty} \leq \frac{dL}{2}\right\}\right)
\end{equation}
the average displacement of particles in each box between times $t$ and $t + \Delta t$. We then choose $S_{max}$ times $(t_m)_{1 \leq m \leq S_{max}}$, with $\forall m, t_m \geq S_{init}$.\\

We now have $\forall m$, a displacement grid $(\vec{u}_{kl}(t_m, t_m + \Delta t))_{1 \leq k, l \leq N_{cases}}$ of which we can take the Fast Fourier Transform
\begin{equation}
(\tilde{\vec{u}}_{kl}(t_m, t_m + \Delta t))_{1 \leq k, l \leq N_{cases}} = \mathcal{F}\left\{(\vec{u}_{pq}(t_m, t_m + \Delta t))_{1 \leq p, q \leq N_{cases}}\right\}(\vec{K}_{kl}, t_m, t_m + \Delta t)
\end{equation}
with $(\vec{K}_{kl})_{1 \leq k, l \leq N_{cases}}$ the grid of wave vectors, then compute the collective mean square displacements
\begin{equation}
\begin{aligned}
C^{\perp}(\vec{K}_{kl}, \Delta t) &= \frac{1}{S_{max}||\vec{K}_{kl}||^2}\sum_m ||\vec{K}_{kl}\wedge\tilde{\vec{u}}_{kl}(t_m, t_m + \Delta t) ||^2\\
C^{||}(\vec{K}_{kl}, \Delta t) &= \frac{1}{S_{max}||\vec{K}_{kl}||^2}\sum_m |\vec{K}_{kl}\cdot\tilde{\vec{u}}_{kl}(t_m, t_m + \Delta t)|^2
\end{aligned}
\end{equation}
according to equation \ref{cmsd_k}. Please note that these functions are slightly different than the ones introduced in equation \ref{cmsd_definition} since they now depend on the wave vector rather than its sole norm. We have verified that either definitions gave consistent results and kept this version for algorithmic simplicity.\\

We can then compute the Fourier transform of the shear strain correlation
\begin{equation}
F_{kl}(\Delta t) = -\frac{K_{kl,x}^2K_{kl,y}^2}{K_{kl}^2}\left(C^{\perp}(\vec{K}_{kl}, \Delta t) - C^{||}(\vec{K}_{kl}, \Delta t)\right) + \frac{K_{kl}^2}{4}C^{\perp}(\vec{K}_{kl}, \Delta t)
\label{css_ft}
\end{equation}
according to equation \ref{css_cmsd}, and finally obtain the shear strain correlation through inverse Fast Fourier Transform
\begin{equation}
C_{\varepsilon_{xy}\varepsilon_{xy}}(\vec{R}_{kl}, \Delta t) = \frac{\mathcal{F}^{-1}\left\{\left(F_{pq}(\Delta t)\right)_{1 \leq p, q \leq N_{cases}}\right\}(\vec{R}_{kl})}{\mathcal{F}^{-1}\left\{\left(F_{pq}(\Delta t)\right)_{1 \leq p, q \leq N_{cases}}\right\}(\vec{0})}
\end{equation}
\mbox{}

Our computation script is available at \href{https://github.com/yketa/active_particles/blob/master/analysis/ctt.py}{{\faGithub~ yketa/active\_particles/analysis/ctt.py}}.

\subsection{Results}

\myparagraph{Preliminary results}

First of all, we point out that computing collective mean square displacements is orders of magnitude quicker than computing coarse-grained displacements as described in section \ref{subsection:real_space_method}. This method then seems better suited to systematically analyse shear strain correlations within our model.

\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{Cttb_Dk8000_Vj1000_Rg2000_Nq1000_Io5000_Tl1000_Mn1000_Cn5000_Bn3000_XN1500_Yn1500.eps}
\vspace{-1cm}
\caption{Collective mean square displacements according to equation \ref{cmsd_definition}, at packing fraction $\phi = 0.80$, self-propulsion velocity $\tilde{v} = 1\cdot10^{-2}$, and rotational diffusion rate $\tilde{\nu}_r = 2\cdot10^{—5}$ (phase separated regime). Dashed lines correspond to arbitrary fits to a power law $\lambda^2$. \textbf{(top left)} Transversal collective mean square displacement $C^{\perp}(k, \Delta t) = \left<||\vec{k}\wedge\tilde{\vec{u}}(\vec{k}, t, t + \Delta t)||^2\right>$ as function of the wavelength $\lambda = 2\pi/k$. \textbf{(bottom left)} Longitudinal collective mean square displacement $C^{||}(k, \Delta t) = \left<|\vec{k}\cdot\tilde{\vec{u}}(\vec{k}, t, t + \Delta t)|^2\right>$ as function of the wavelength $\lambda = 2\pi/k$. \textbf{(right)} Superimposition of the transversal \textit{(blue)} and longitudinal \textit{(orange)} collective mean square displacements.}
\label{preliminary_cmsd}
\end{figure}

We first calculated collective mean square displacements in a system in the phase separated state. This calculation has been performed on the whole system, \textit{i.e.} including the active gas phase. We present our results in figure \ref{preliminary_cmsd}.\\

We observe in figure \ref{preliminary_cmsd} that the longitudinal collective mean square displacement $C^{||}(k, \Delta t)$ is a strictly positive function, indicating that our system is compressible \cite{illing2016strain} which was an expected finding. We however note that the longitudinal part $C^{||}(k, \Delta t)$ is about an order of magnitude lesser than the transversal part $C^{\perp}(k, \Delta t)$ of the collective mean square displacement, as reported in \cite{leonforte2005continuum}.\\

Both $C^{||}(k, \Delta t)$ and $C^{\perp}(k, \Delta t)$ are quite well fitted with a power law $k^{-2}$ for about a decade ($10 \lessapprox \lambda = 2\pi/k \lessapprox 20$), which was also reported in \cite{leonforte2005continuum} and may indicate elastic properties of the system. This algebraic behaviour is limited at high wavelengths by finite-size effects and at low wavelengths by the discrete microscopic structure of the system. Indeed, we have that the peak in both $C^{||}(k, \Delta t)$ and $C^{\perp}(k, \Delta t)$ at $\lambda = 2\pi/k \approx a \approx 2$ with $a$ the average particle separation is a consequence of the discreteness of the displacement field.

\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{Cttb_Dk8000_Vj1000_Ri7000_Nq1000_Io5000_Tl1000_Mn1000_Cn5000.eps}
\caption{Collective mean square displacements according to equation \ref{cmsd_definition}, at packing fraction $\phi = 0.80$, self-propulsion velocity $\tilde{v} = 1\cdot10^{-2}$, and rotational diffusion rate $\tilde{\nu}_r = 7\cdot10^{—3}$ (fluid regime). Dashed lines correspond to arbitrary fits to a power law $\lambda$. \textbf{(top left)} Transversal collective mean square displacement $C^{\perp}(k, \Delta t) = \left<||\vec{k}\wedge\tilde{\vec{u}}(\vec{k}, t, t + \Delta t)||^2\right>$ as function of the wavelength $\lambda = 2\pi/k$. \textbf{(bottom left)} Longitudinal collective mean square displacement $C^{||}(k, \Delta t) = \left<|\vec{k}\cdot\tilde{\vec{u}}(\vec{k}, t, t + \Delta t)|^2\right>$ as function of the wavelength $\lambda = 2\pi/k$. \textbf{(right)} Superimposition of the transversal \textit{(blue)} and longitudinal \textit{(orange)} collective mean square displacements.}
\label{preliminary_cmsd_low_activity}
\end{figure}

We then calculated collective mean square displacements in a system in the fluid state. We present our results in figure \ref{preliminary_cmsd_low_activity}.\\

As in the high activity case (see figure \ref{preliminary_cmsd}), we observe that the longitudinal collective mean square displacement $C^{||}(k, \Delta t)$ is a strictly positive function. Nonetheless, we notice in this low activity case that the values of $C^{||}(k, \Delta t)$ and $C^{\perp}(k, \Delta t)$ are of the same order of magnitude.\\

Both $C^{||}(k, \Delta t)$ and $C^{\perp}(k, \Delta t)$ are quite well fitted with a power law $k^{-1}$ for about a decade ($6 \lessapprox \lambda = 2\pi/k \lessapprox 60$). However, this exponent for the power law decay of the collective mean square displacements with increasing wave vector norm is puzzling and further investigations are needed to understand it.

\newpage
\myparagraph{Necessity of filtering}

We use the collective mean square displacements presented in figure \ref{preliminary_cmsd} to compute shear strain correlations $C_{\varepsilon_{xy}\varepsilon_{xy}}(\Delta \vec{r}, \Delta t)$ according to equation \ref{css_cmsd}. Our results are presented in figure \ref{non_filtered_css}.

\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{Cttb_Dk8000_Vj1000_Rg2000_Nq1000_Io5000_Tl1000_Mn1000_Cn5000_Bn3000_XN1500_Yn1500_strain_correlations_RCUTl0000.eps}
\caption{\textbf{(left)} Shear strain correlation map  $C_{\varepsilon_{xy}\varepsilon_{xy}}(\vec{r} \equiv (x, y), \Delta t)$, obtained from the collective mean square displacements of the right panel, according to the method described in section \ref{subsection:cmsd}. \textbf{(right)} Transversal $C^{\perp}(k, \Delta t) = \left<||\vec{k}\wedge\tilde{\vec{u}}(\vec{k}, t, t + \Delta t)||^2\right>$  and longitudinal $C^{||}(k, \Delta t) = \left<|\vec{k}\cdot\tilde{\vec{u}}(\vec{k}, t, t + \Delta t)|^2\right>$ collective mean square displacements as functions of the wavelength $\lambda = 2\pi/k$.}
\label{non_filtered_css}
\end{figure}

We have that shear strain correlations are completely drowned under a pattern of concentric waves which spatial period is close to the average particle separation $a \approx 2$. As we had discussed on figure \ref{cuu_oscillations}, these waves originate from the fact that our griding is so tight that we are resolving the microscopic structure of the system. This is visible in the collective mean square displacement curves (figures \ref{preliminary_cmsd} and \ref{preliminary_cmsd_low_activity}) in the form of a peak near $\lambda = a$.\\

As a solution to this inconvenience, we propose to filter out low wavelengths corresponding to the microscopic structure. This is a form of coarse-graining since it means to eliminate short range degrees of freedom. A first attempt has been to set all Fourier components under a given wavelength to 0, yet this was doomed to failure since completely depriving a signal of its high frequency components is a cause of ringing artifacts \cite{ringing}. A better solution is to perform, as we have done for displacements in the real space methode (see section \ref{subsection:real_space_method}), a Gaussian coarse-graining of the shear strain.\\

We introduce the Gaussian filtering function
\begin{equation}
\mathcal{G}(\vec{r}, r_c) = \frac{1}{2\pi\sigma^2}\exp\left(-\frac{||\vec{r}||^2}{2\sigma^2}\right)
\end{equation}
where $r_c$ is the spatial extent of the function, such that the coarse-grained version of the shear strain, $\varepsilon_{xy}^{(cg)}(\vec{r}, t, t + \Delta t)$, is obtained by convolution
\begin{equation}
\varepsilon_{xy}^{(cg)}(\vec{r}, t, t + \Delta t) = \int_{\mathbb{R}^2} d^2\vec{r}^{\prime}~ \mathcal{G}(\vec{r}^{\prime} - \vec{r}, r_c) \varepsilon_{xy}^{(cg)}(\vec{r}^{\prime}, t, t + \Delta t) = \left[\mathcal{G}\ast\varepsilon_{xy}\right](\vec{r}, t, t + \Delta t)
\end{equation}
\mbox{}\\

We thus obtain in equation \ref{css_from_ft}, when deriving shear strain correlations from coarse-grained shear strain
\begin{equation}
\begin{aligned}
C_{\varepsilon_{xy}\varepsilon_{xy}}(\Delta \vec{r}, \Delta t) &= \mathcal{F}^{-1}\left\{\left<|\mathcal{F}\left\{\varepsilon_{xy}^{(cg)}(\vec{r}, t, t + \Delta t)\right\}(\vec{k})|^2\right>_t\right\}(\Delta \vec{r})\\
&= \mathcal{F}^{-1}\left\{\left<|\mathcal{F}\left\{\left[\mathcal{G}\ast\varepsilon_{xy}\right](\vec{r}, t, t + \Delta t)\right\}(\vec{k})|^2\right>_t\right\}(\Delta \vec{r})\\
&= \mathcal{F}^{-1}\left\{\left<|\mathcal{F}\left\{\varepsilon_{xy}(\vec{r}, t, t + \Delta t)\right\}(\vec{k})|^2\right>_t\tilde{\mathcal{G}}(\vec{k}, r_c)^2\right\}(\Delta \vec{r})
\end{aligned}
\end{equation}
where we have used the convolution theorem, and with $\tilde{\mathcal{G}}(\vec{k}, r_c)$ the Fourier transform of the Gaussian filtering function
\begin{equation}
\tilde{\mathcal{G}}(\vec{k}, r_c) =  \frac{1}{2\pi\sigma^2} \int_{\mathbb{R}^2} d^2\vec{r}~ e^{-i\vec{k}\cdot\vec{r}}\exp\left(-\frac{||\vec{r}||^2}{2r_c^2}\right) = \exp\left(-\frac{1}{2}r_c^2||\vec{k}||^2\right)
\label{gaussian_filter_ft}
\end{equation}
\mbox{}\\

Coarse-graining is then performed by multiplying the shear strain correlation Fourier transform in equation \ref{css_ft} with the square of the Gaussian filtering function Fourier transform in equation \ref{gaussian_filter_ft}.

\myparagraph{Results with Gaussian filter}

We use the collective mean square displacements presented in figure \ref{preliminary_cmsd} to compute shear strain correlations $C_{\varepsilon_{xy}\varepsilon_{xy}}(\Delta \vec{r}, \Delta t)$ according to equation \ref{css_cmsd}, this time using a Gaussian filter. Our results are presented in figure \ref{c44_cmsd_high}.\\

For this system in phase separated state, we recover the results of figure \ref{c44_real}, \textit{i.e.} we have a peak of $C_4^4(\Delta r, \Delta t)$ close to 2 units of average particle separation and curves collapse, at least for $nD_0\Delta t \lessapprox 130$. Moreover, our curves are quite consistent with an algebraic decay $(r/a)^{-2}$, indicating scale free correlations reminiscent of a glass-forming material at low temperature.

\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{c44_chi_cmsd_comparison_Dk8000_Vj1000_Rg2000_Nq1000_Ll3000_RCUTk4200_interpolated_loglog.eps}
\caption{Projection of shear strain correlations on $\cos4\theta$, $C_4^4(\Delta r, \Delta t)$ according to equation \ref{c44_definition}, normalised by its susceptibility $\chi = \int dr~ 2 \pi r~ C_4^4(r, \Delta t)$, at packing fraction $\phi = 0.80$, self-propulsion velocity $\tilde{v} = 1\cdot10^{-2}$, and rotational diffusion rate $\tilde{\nu}_r = 2\cdot10^{—5}$ (phase separated regime), for different lag times $\Delta t$. A linear interpolation between grid boxes has been performed in the step from the shear strain correlation grid to the $C_4^4(\Delta r, \Delta t)$ function to smooth the curve. We have $n = N/L^2$ the number density of particles and $D_0 = V_0^2/2\nu_r$ the diffusion constant of a single particle, introduced for matter of comparison of lag times between different systems as suggested in \cite{illing2016strain}. The dashed line corresponds to an arbitrary fit to a power law $(r/a)^{—2}$.}
\label{c44_cmsd_high}
\end{figure}

We perform the same calculations for a system of lower activity, in the fluid regime. Our results are presented in figure \ref{c44_cmsd_low}.\\

For this system in fluid state, we recover the results of figure \ref{c44_real_fluid}, \textit{i.e.} we have a peak of $C_4^4(\Delta r, \Delta t)$ close to 2 units of average particle separation and curves collapse. Moreover, we observe an exponential decay of the correlations, with a length scale of a few particles and which is an increasing function of increasing lag time $\Delta t$.

\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{c44_chi_cmsd_comparison_Dk8000_Vj1000_Ri2000_Nq1000_Ll0000_Mo1000_RCUTk4200_interpolated_linlog.eps}
\caption{Projection of shear strain correlations on $\cos4\theta$, $C_4^4(\Delta r, \Delta t)$ according to equation \ref{c44_definition}, normalised by its susceptibility $\chi = \int dr~ 2 \pi r~ C_4^4(r, \Delta t)$, at packing fraction $\phi = 0.80$, self-propulsion velocity $\tilde{v} = 1\cdot10^{-2}$, and rotational diffusion rate $\tilde{\nu}_r = 2\cdot10^{—3}$ (fluid regime), for different lag times $\Delta t$. A linear interpolation between grid boxes has been performed in the step from the shear strain correlation grid to the $C_4^4(\Delta r, \Delta t)$ function to smooth the curve. We have $n = N/L^2$ the number density of particles and $D_0 = V_0^2/2\nu_r$ the diffusion constant of a single particle, introduced for matter of comparison of lag times between different systems as suggested in \cite{illing2016strain}. The dashed line corresponds to an arbitrary fit to an exponential $\exp(-0.362(r/a))$.}
\label{c44_cmsd_low}
\end{figure}

We then conclude here as we have concluded in section \ref{subsection:real_method_results}: more analyses are needed to characterise the transition from exponential to algebraic decay of the shear strain correlations with increasing activity.

\end{document}


\section{Conclusion}
\label{sec:conclusion}

In this paper, we presented a weakly-supervised, learning-based approach to 3D shape completion. After using a variational auto-encoder (\VAE) \cite{Kingma2013ARXIV} to learn a shape prior on synthetic data, we formulated shape completion as maximum likelihood (\ML) problem. We fixed the learned generative model, \ie the \VAE's decoder, and trained a new, deterministic encoder to amortize, \ie \emph{learn}, the \ML problem. This encoder can be trained in an unsupervised fashion. Compared to related data-driven approaches, the proposed amortized maximum likelihood (\AML) approach offers fast inference and, in contrast to related learning-based approaches, does not require full supervision.

On newly created, synthetic 3D shape completion benchmarks derived from ShapeNet \cite{Chang2015ARXIV} and ModelNet \cite{Wu2015CVPR}, we demonstrated that \AML outperforms a state-of-the-art data-driven method \cite{Engelmann2016GCPR} (while significantly reducing runtime) and generalizes across object categories.
Motivated by related learning-based approaches, we also compared our approach to a fully-supervised baseline. We showed that \AML is able to compete with the fully-supervised model both quantitatively and qualitatively while using $9\%$ or less supervision.
On real data from KITTI \cite{Geiger2012CVPR}, both \AML and \cite{Engelmann2016GCPR} predict reasonable shapes. However, \AML demonstrates significantly lower runtime, and runtime is independent of the observed points. Additionally, \AML allows to learn from KITTI's unlabeled data and, thus, outperforms the fully-supervised baseline which is not able to generalize well.
Overall, our experiments demonstrate the benefits of the proposed \AML approach: reduced runtime compared to data-driven approaches and training on unlabeled, real data compared to learning-based approaches.

\boldparagraph{Acknowledgements}
%
We thank Francis Engelmann for help with the approach of \cite{Engelmann2016GCPR}.


\documentclass[main.tex]{subfiles}
\begin{document}

\chapter{Early Universe}

\section{Basics of cosmology}

\marginpar{Tuesday\\ 2020-5-5, \\ compiled \\ \today}

The classic textbook to be used for this part is Kolb-Turner \cite[]{kolbEarlyUniverse1994}.
For something more recent, we have Gorbunov and Rubakov \cite[]{gorbunovIntroductionTheoryEarly2011}.
The first part was also discussed in the course in Fundamentals of Astrophysics and Cosmology (whose notes are still being reviewed, they are more in-depth on these topics).

We establish some basic notions in cosmology. We use natural units \(\hbar = c = k_B = 1\), so that we have the equivalence of mass, energy, temperature and angular frequency.

The Planck units are defined by also setting \(G =1\).
Conventionally, we do not do so and instead define a Planck mass by \(G = 1 / M_P^2\), so that \(M_P \approx \SI{1.2e19}{GeV}\).
Because of all the equivalencies we have, this also defines a length, a time, and an actual mass.

\subsection{Homogeneous and isotropic universe}

Our description of the universe begins with the simplest model, in which the metric only has one parameter, whose variation scales the size of the spatial coordinates. This is the Friedmann - Lemaître - Robertson - Walker (FLRW) metric, given by
%
\begin{align}
\dd{s^2} = \dd{t}^2  - a^2(t) \gamma_{ij} \dd{x^{i}} \dd{x^{j}}
\,,
\end{align}
%
where \(\gamma_{ij}\) is the metric of a unit 3-sphere, 3-hyperboloid or 3-plane.
Which of these three we have determines the \emph{spatial curvature} of the universe, described by a single parameter \(k\) which can be \(-1\) for an open universe, \(0\) for a flat universe and \(+1\) for a closed universe.

The Hubble parameter is given in terms of \(a\), by \(H(t) = \dot{a}(t) / a(t)\). It describes the rate of expansion of the universe.
If it is written with an index \(0\), it means we are measuring it \emph{now}.

Our model is general-relativistic, so we must solve the Einstein equations, which read
%
\begin{align}
R_{\mu \nu } - \frac{1}{2} g_{\mu \nu } R= 8 \pi G T_{\mu \nu }
\,.
\end{align}

The pressure is assumed to linearly scale with the density, following the law \(P = w \rho \), and fluids are characterized by their value of \(w\):
\begin{enumerate}
    \item matter has \(w = 0\);
    \item radiation has \(w = 1/3\);
    \item the vacuum has \(w = -1\).
\end{enumerate}

The stress-energy tensor is \(T^{\mu}_{ \nu } = \diag{\rho, -P, -P, -P}\) \cite[eq.\ 3.4]{kolbEarlyUniverse1994}.\footnote{Note that we must be careful with the signs of the stress-energy tensor: if we lower or raise both the indices the sign of the pressure changes. It is negative only when the tensor is \((1, 1)\).}

The Friedmann equations are what we get if we substitute in the FRLW metric into the Einstein equations:
%
\begin{subequations}
\begin{align}
\qty( \frac{\dot{a}}{a})^2 &= \frac{8 \pi G}{3} \rho - \frac{k}{a^2}  \\
\dot{\rho} + 3 \frac{\dot{a}}{a}(\rho + P) &=0  \\
P &= P(\rho )
\,.
\end{align}
\end{subequations}

Only two of these equations are independent;
we can interpret the dynamical \(\ddot{a}\) Friedmann equation as a consequence of the first two, which makes things easier since it is second order.

The density \(\rho \) which appears in the equations is the sum of all the ones which make up the universe, we must account for the \(w\) of all the fluids in the model we are considering.

Now we will discuss solutions to the Friedmann equations. Ones with \(k = 0\) are \emph{spatially flat models}, and for them the first Friedmann equation reads:
%
\begin{align}
H^2 = \frac{8 \pi G}{3} \rho
\,,
\end{align}
%
so in this case the absolute value of \(a\) at a specific time does not matter, only ratios of values of \(a\) at different times have physical meaning.
This can be seen from the fact that the equation has a conformal global symmetry: if we map \(a \to C a\) for some constant \(C\) the equation does not change.
Also, the Friedmann equation is invariant under time translations.

\subsubsection{Dust solution}

If we have nonrelativistic matter, which is commonly called ``dust'', with \(w = 0 \implies P = 0\), we get \(\rho \propto a^{-3}\) and \(a(t) \sim t^{2/3}\) (for time starting at a certain \(t_s = 0\)).
So, the energy density scales like \(\rho (t) \sim t^{-2}\).

The Hubble parameter, on the other hand, is given by \(H(t) = 2 / (3 t)\).
This model predicts the current age of the universe to be \(t_0 = 2/ (3 H_0 ) \approx 9 \text{ billion years}\), which is too short (regardless of the value we take for \(H_0 \), this does not work).

\subsubsection{Radiation solution}

For relativistic matter, we have \(P = \rho /3\), so the density scales like \(\rho \sim a^{-4}\), \(a(t) \sim t^{1/2}\), \(H = 1/(2t)\) and \(\rho = \frac{3}{32 \pi G t^2} \).

Let us assume that all the particles in the universe are in thermal equilibrium.
Then, the density will scale like
%
\begin{align}
\rho = \frac{\pi^2}{30} g_{*} T^{4}
\,,
\end{align}
%
where
%
\begin{align}
g_{*} = \sum _{b} g_b + \frac{7}{8} \sum _{f} g_f
\,,
\end{align}
%
where the two sums are over all the bosons and fermions respectively whose masses are smaller than the current temperature (so, which are still relativistic): it is the effective number of degrees of freedom.
The objects being summed are the number of spin states of each boson or fermion.
This relation comes from integrating thermal distributions in momentum space in the ultrarelativistic limit (so that the particles we are considering are ``radiation''); the particulars of the different statistics makes it so that the contribution for fermions to the density is smaller than that of bosons by a factor \(7/8\).

So, the Hubble parameter scales like
%
\begin{align}
H^2 &= \frac{8\pi G}{3} \rho   \\
&= \frac{8 \pi }{3} \frac{1}{M_P^2} \frac{\pi^2 }{30} g_{*} T^{4}  \\
&= \frac{8}{90} \pi^3 g_{*} \frac{T^{4}}{M_P^2}
\,.
\end{align}

Then, we can define a new reduced Planck mass \(M_P^{*}\), such that \(H = T^2 / M_P^{*}\): it will need to be
%
\begin{align} \label{eq:reduced-planck-mass}
M_{P}^{*} = \sqrt{\frac{90}{8 \pi^3 g_{*}}} M_P \approx \frac{M_P}{\num{1.66}\sqrt{g_*}}
\,.
\end{align}

Now, since we know \(\rho \sim a^{-4}\) and \(\rho \sim T^{4}\) we can write \(T \sim 1/ a\), keeping in mind however that the constant in front is not truly so for the whole evolution of the universe, instead it varies depending on which particles are decoupled at that point.

\subsubsection{Vacuum}

Let us consider the vacuum. In flat spacetime, its stress-energy tensor is given by
%
\begin{align}
T_{\mu \nu } = \rho _{\text{vac}} \eta_{\mu \nu }
\,,
\end{align}
%
so that \(P _{\text{vac}} = - \rho _{\text{vac}}\).

This is equivalent to the introduction of a \(- 8 \pi G \Lambda g_{\mu \nu }\) term to the left-hand side of the field equations: a ``cosmological constant'' with \(\Lambda = \rho _{\text{vac}}\).

If we only had this fluid in our model universe we would see \(a \sim e^{H _{\text{dS}}t}\), where
%
\begin{align}
H _{\text{dS}} = \sqrt{\frac{8 \pi G}{3} r _{\text{vac}}}
\,.
\end{align}

Our spacetime will then be described by a metric like
%
\begin{align}
\dd{s^2} = \dd{t^2} - e^{2H _{\text{dS}}t } \dd{x}^2
\,,
\end{align}
%
which is called \textbf{de Sitter} spacetime.
In this case we will have \(\ddot{a} > 0\), there will be no initial singularity.

\section{The \(\Lambda \)CDM model}

The ingredients are:
\begin{enumerate}
    \item Nonrelativistic matter: baryons, dark matter, and also neutrinos with masses \(m_{\nu } \gtrsim \SI{-3}{eV}\). Its density is denoted as \(\rho_{M}\).
    \item Relativistic matter: photons and neutrinos with \(m_\nu \lesssim \SI{e-4}{eV}\). Its density is denoted as \(\rho _{\text{rad}}\).
    \item Dark energy: is it vacuum energy? Its density is denoted as \(\rho_{\Lambda }\).
\end{enumerate}

The Hubble parameter is given by the first Friedmann equation, by accounting for all of these plus curvature:
%
\begin{align}
H^2 = \frac{8 \pi G}{3} \qty(\rho_{M} + \rho _{\text{rad}} + \rho_{\Lambda } + \rho _{\text{curv}})
\,,
\end{align}
%
where
%
\begin{align}
\rho _{\text{curv}} = - \frac{k}{a^2} \frac{3}{8 \pi G}
\,.
\end{align}

The critical density is given by
%
\begin{align}
\rho_{c} = \frac{3}{8 \pi G} H_0^2 \approx \SI{5e-6}{GeV / cm^3} \approx \frac{5 m_P}{\SI{}{m^3}}
\,,
\end{align}
%
where the numerical value is obtained by taking \(h = \num{.7}\).

By construction, if \(\rho = \rho_{c}\) for our universe then it is spatially flat.

We can take the ratios of \(\rho_{i} / \rho_{c} = \Omega_{i}\), this quantifies how much of the density of the universe is in the form of a certain kind of fluid.
If we also include \(\Omega _{\text{curv}}\), we get \(\sum _{i} \Omega_{i} = 1\) always.

Let us give some values for them: for photons, we consider the CMB photons, which closely follow a thermal distribution at \(T_0 \approx \SI{2.7}{K}\). By looking at these, we find
%
\begin{align}
\Omega_{\gamma } \approx \SI{2.5e-5}{\littleh^2} \approx \num{5e-5}
\,.
\end{align}

\todo[inline]{Why do we only look at CMB photons? stellar fusion has an efficiency of the order of \SI{1}{\percent}, so I'd imagine a considerable (compared to \num{5e-5}) fraction of its mass is radiated away as high energy photons (compared to the CMB)\dots}

Even if we had neutrinos with small masses such that they are radiation today, their \(\Omega \) would be smaller than the photons', so negligible overall.

For the matter and dark energy contributions we get
%
\begin{align}
\Omega_{M} = \Omega_{B} + \Omega_{DM} \approx \num{.05} + \num{.27} \approx \num{.32}
\qquad \text{and} \qquad
\Omega_{\Lambda } \approx \num{.68}
\,.
\end{align}

How do these depend on time? We have
\begin{enumerate}
    \item \(\rho _{\text{rad}} \sim a^{-4}\);
    \item \(\rho _M \sim a^{-3}\);
    \item \(\rho _{\text{curv}} \sim a^{-2}\);
    \item \(\rho _\Lambda  \sim a^{0} = \const\).
\end{enumerate}

Then, the Friedmann equation in the \(\Lambda \)CDM model looks like
%
\begin{align}
H^2 &= \frac{8 \pi G}{3} \rho_{c}
\qty[
    \Omega_{\text{rad}} \qty(\frac{a_0 }{a})^4
    +\Omega_{M} \qty(\frac{a_0 }{a})^3
    +\Omega_{\text{curv}} \qty(\frac{a_0 }{a})^2
    +\Omega_\Lambda
]  \\
&= H_0^2 \qty[
    \Omega_{\text{rad}} \qty(1 + z)^4
    +\Omega_{M} \qty(1 + z)^3
    +\Omega_{\text{curv}} \qty(1 + z)^2
    +\Omega_\Lambda
]
\,,
\end{align}
%
where we used \(1 + z = a_0 / a\), where \(z\) is the redshift, defined by
%
\begin{align}
1 + z = \frac{\lambda _{\text{absorption}}}{\lambda _{\text{emission}}}
\,.
\end{align}

For close objects (with small \(z\)) we recover Hubble's law: \(z = H_0 \tau \).

\subsection{On the vacuum energy}

In particle physics, we use the vacuum energy as our reference point from which to measure other energies; energies of particles are excitations from that vacuum.

In GR, instead, \textbf{the vacuum energy gravitates}: there is no such thing as defining energy up to a constant, it all contributes to the gravitational field.
The vacuum energy is present everywhere always and it does not cluster, so it is a good candidate for dark energy and \(\rho _{\text{vac}}\).

What is the vacuum energy prediction by the Standard Model, after symmetry breaking?

What remains when we take the VEV are the scalar terms, since the vector fields are zero in the vacuum. Specifically, we are left with
%
\begin{align}
\mu^2 \phi^2 + \lambda \phi^{4}
\,.
\end{align}

The order of magnitude of the VEV of the Higgs is around \SI{100}{GeV}.

The dimensions of \(\rho = E / L^3\) are those of an energy to the fourth power.
So, our estimate could be of \(\rho \sim \qty(\SI{100}{GeV})^{4}\).

Alternatively, we could consider the characteristic energy scales of the various interactions: the strong interaction is around \SI{1}{GeV}, the weak interaction is around \SI{100}{GeV}, the gravitational interaction is around \(M_P \sim \SI{e19}{GeV}\).
All of these have to be taken to the fourth power to recover the dimensions of an energy density.

The estimate from cosmology is \(\SI{e-46}{GeV^{4}} \approx (\SI{e11}{GeV})^{4}\): the one from particle physics is 45, 50 or even 120 orders of magnitude larger, depending on whether we are looking at the strong, electroweak or gravitational interaction.

\end{document}


\section{Planar Subdivisions}

\ifCPy

\cvclass{CvSubdiv2D}\label{CvSubdiv2D}

Planar subdivision.

\ifC
\begin{lstlisting}
#define CV_SUBDIV2D_FIELDS()    \
    CV_GRAPH_FIELDS()           \
    int  quad_edges;            \
    int  is_geometry_valid;     \
    CvSubdiv2DEdge recent_edge; \
    CvPoint2D32f  topleft;      \
    CvPoint2D32f  bottomright;

typedef struct CvSubdiv2D
{
    CV_SUBDIV2D_FIELDS()
}
CvSubdiv2D;
\end{lstlisting}
\else
\begin{description}
\cvarg{edges}{A \cross{CvSet} of \cross{CvSubdiv2DEdge}}
\end{description}
\fi

Planar subdivision is the subdivision of a plane into a set of
non-overlapped regions (facets) that cover the whole plane. The above
structure describes a subdivision built on a 2d point set, where the points
are linked together and form a planar graph, which, together with a few
edges connecting the exterior subdivision points (namely, convex hull points)
with infinity, subdivides a plane into facets by its edges.

For every subdivision there exists a dual subdivision in which facets and
points (subdivision vertices) swap their roles, that is, a facet is
treated as a vertex (called a virtual point below) of the dual subdivision and
the original subdivision vertices become facets. On the picture below
original subdivision is marked with solid lines and dual subdivision
with dotted lines.

\includegraphics[width=0.5\textwidth]{pics/subdiv.png}

OpenCV subdivides a plane into triangles using Delaunay's
algorithm. Subdivision is built iteratively starting from a dummy
triangle that includes all the subdivision points for sure. In this
case the dual subdivision is a Voronoi diagram of the input 2d point set. The
subdivisions can be used for the 3d piece-wise transformation of a plane,
morphing, fast location of points on the plane, building special graphs
(such as NNG,RNG) and so forth.

\ifC
\cvclass{CvQuadEdge2D}\label{CvQuadEdge2D}

Quad-edge of planar subdivision.

\begin{lstlisting}
/* one of edges within quad-edge, lower 2 bits is index (0..3)
   and upper bits are quad-edge pointer */
typedef long CvSubdiv2DEdge;

/* quad-edge structure fields */
#define CV_QUADEDGE2D_FIELDS()     \
    int flags;                     \
    struct CvSubdiv2DPoint* pt[4]; \
    CvSubdiv2DEdge  next[4];

typedef struct CvQuadEdge2D
{
    CV_QUADEDGE2D_FIELDS()
}
CvQuadEdge2D;

\end{lstlisting}

Quad-edge is a basic element of subdivision containing four edges (e, eRot, reversed e and reversed eRot):

\includegraphics[width=0.5\textwidth]{pics/quadedge.png}
\fi

\cvclass{CvSubdiv2DPoint}\label{CvSubdiv2DPoint}

\ifC
Point of original or dual subdivision.

\begin{lstlisting}
#define CV_SUBDIV2D_POINT_FIELDS()\
    int            flags;      \
    CvSubdiv2DEdge first;      \
    CvPoint2D32f   pt;         \
    int id;

#define CV_SUBDIV2D_VIRTUAL_POINT_FLAG (1 << 30)

typedef struct CvSubdiv2DPoint
{
    CV_SUBDIV2D_POINT_FIELDS()
}
CvSubdiv2DPoint;
\end{lstlisting}

\begin{itemize}
\item[id] This integer can be used to index auxillary data associated with each vertex of the planar subdivision
\end{itemize}
\else
Point of original or dual subdivision.

\begin{description}
\cvarg{first}{A connected \cross{CvSubdiv2DEdge}}
\cvarg{pt}{Position, as a \cross{CvPoint2D32f}}
\end{description}

\fi

\cvCPyFunc{CalcSubdivVoronoi2D}
Calculates the coordinates of Voronoi diagram cells.

\cvdefC{
void cvCalcSubdivVoronoi2D( \par CvSubdiv2D* subdiv );
}
\cvdefPy{CalcSubdivVoronoi2D(subdiv)-> None}

\begin{description}
\cvarg{subdiv}{Delaunay subdivision, in which all the points are already added}
\end{description}

The function calculates the coordinates
of virtual points. All virtual points corresponding to some vertex of the
original subdivision form (when connected together) a boundary of the Voronoi
cell at that point.

\cvCPyFunc{ClearSubdivVoronoi2D}
Removes all virtual points.

\cvdefC{
void cvClearSubdivVoronoi2D( CvSubdiv2D* subdiv );
}\cvdefPy{ClearSubdivVoronoi2D(subdiv)-> None}

\begin{description}
\cvarg{subdiv}{Delaunay subdivision}
\end{description}

The function removes all of the virtual points. It
is called internally in \cvCPyCross{CalcSubdivVoronoi2D} if the subdivision
was modified after previous call to the function.

\cvCPyFunc{CreateSubdivDelaunay2D}
Creates an empty Delaunay triangulation.

\cvdefC{
CvSubdiv2D* cvCreateSubdivDelaunay2D( \par CvRect rect,\par CvMemStorage* storage );
}\cvdefPy{CreateSubdivDelaunay2D(rect,storage)-> delaunay\_triangulation}

\begin{description}
\cvarg{rect}{Rectangle that includes all of the 2d points that are to be added to the subdivision}
\cvarg{storage}{Container for subdivision}
\end{description}

The function creates an empty Delaunay
subdivision, where 2d points can be added using the function
\cvCPyCross{SubdivDelaunay2DInsert}. All of the points to be added must be within
the specified rectangle, otherwise a runtime error will be raised.

Note that the triangulation is a single large triangle that covers the given rectangle.  Hence the three vertices of this triangle are outside the rectangle \texttt{rect}.

\cvCPyFunc{FindNearestPoint2D}
Finds the closest subdivision vertex to the given point.

\cvdefC{
CvSubdiv2DPoint* cvFindNearestPoint2D( \par CvSubdiv2D* subdiv,\par CvPoint2D32f pt );
}\cvdefPy{FindNearestPoint2D(subdiv,pt)-> point}

\begin{description}
\cvarg{subdiv}{Delaunay or another subdivision}
\cvarg{pt}{Input point}
\end{description}

The function is another function that
locates the input point within the subdivision. It finds the subdivision vertex that
is the closest to the input point. It is not necessarily one of vertices
of the facet containing the input point, though the facet (located using
\cvCPyCross{Subdiv2DLocate}) is used as a starting
point. The function returns a pointer to the found subdivision vertex.

\cvCPyFunc{Subdiv2DEdgeDst}
Returns the edge destination.

\cvdefC{
CvSubdiv2DPoint* cvSubdiv2DEdgeDst( \par CvSubdiv2DEdge edge );
}
\cvdefPy{Subdiv2DEdgeDst(edge)-> point}

\begin{description}
\cvarg{edge}{Subdivision edge (not a quad-edge)}
\end{description}

The function returns the edge destination. The
returned pointer may be NULL if the edge is from dual subdivision and
the virtual point coordinates are not calculated yet. The virtual points
can be calculated using the function \cvCPyCross{CalcSubdivVoronoi2D}.

\cvCPyFunc{Subdiv2DGetEdge}
Returns one of the edges related to the given edge.

\cvdefC{
CvSubdiv2DEdge  cvSubdiv2DGetEdge( CvSubdiv2DEdge edge, CvNextEdgeType type );

}\cvdefPy{Subdiv2DGetEdge(edge,type)-> CvSubdiv2DEdge}

\begin{description}
\cvarg{edge}{Subdivision edge (not a quad-edge)}
\cvarg{type}{Specifies which of the related edges to return, one of the following:}
\begin{description}
  \cvarg{CV\_NEXT\_AROUND\_ORG}{next around the edge origin (\texttt{eOnext} on the picture below if \texttt{e} is the input edge)}
  \cvarg{CV\_NEXT\_AROUND\_DST}{next around the edge vertex (\texttt{eDnext})}
  \cvarg{CV\_PREV\_AROUND\_ORG}{previous around the edge origin (reversed \texttt{eRnext})}
  \cvarg{CV\_PREV\_AROUND\_DST}{previous around the edge destination (reversed \texttt{eLnext})}
  \cvarg{CV\_NEXT\_AROUND\_LEFT}{next around the left facet (\texttt{eLnext})}
  \cvarg{CV\_NEXT\_AROUND\_RIGHT}{next around the right facet (\texttt{eRnext})}
  \cvarg{CV\_PREV\_AROUND\_LEFT}{previous around the left facet (reversed \texttt{eOnext})}
  \cvarg{CV\_PREV\_AROUND\_RIGHT}{previous around the right facet (reversed \texttt{eDnext})}
\end{description}
\end{description}

\includegraphics[width=0.5\textwidth]{pics/quadedge.png}

The function returns one of the edges related to the input edge.

\cvCPyFunc{Subdiv2DNextEdge}
Returns next edge around the edge origin

\cvdefC{
CvSubdiv2DEdge  cvSubdiv2DNextEdge( CvSubdiv2DEdge edge );
}
\cvdefPy{Subdiv2DNextEdge(edge)-> CvSubdiv2DEdge}

\begin{description}
\cvarg{edge}{Subdivision edge (not a quad-edge)}
\end{description}

\includegraphics[width=0.5\textwidth]{pics/quadedge.png}

The function returns the next edge around the edge origin: \texttt{eOnext} on the picture above if \texttt{e} is the input edge)

\cvCPyFunc{Subdiv2DLocate}
Returns the location of a point within a Delaunay triangulation.

\cvdefC{
CvSubdiv2DPointLocation  cvSubdiv2DLocate( \par CvSubdiv2D* subdiv,\par CvPoint2D32f pt,\par CvSubdiv2DEdge* edge,\par CvSubdiv2DPoint** vertex=NULL );
}
\cvdefPy{Subdiv2DLocate(subdiv, pt) -> (loc, where)}

\begin{description}
\cvarg{subdiv}{Delaunay or another subdivision}
\cvarg{pt}{The point to locate}
\cvC{\cvarg{edge}{The output edge the point falls onto or right to}}
\cvC{\cvarg{vertex}{Optional output vertex double pointer the input point coinsides with}}
\cvPy{\cvarg{loc}{The location of the point within the triangulation}}
\cvPy{\cvarg{where}{The edge or vertex.  See below.}}
\end{description}

The function locates the input point within the subdivision. There are 5 cases:

\ifC
\begin{itemize}
 \item The point falls into some facet. The function returns \texttt{CV\_PTLOC\_INSIDE} and \texttt{*edge} will contain one of edges of the facet.
 \item The point falls onto the edge. The function returns \texttt{CV\_PTLOC\_ON\_EDGE} and \texttt{*edge} will contain this edge.
 \item The point coincides with one of the subdivision vertices. The function returns \texttt{CV\_PTLOC\_VERTEX} and \texttt{*vertex} will contain a pointer to the vertex.
 \item The point is outside the subdivsion reference rectangle. The function returns \texttt{CV\_PTLOC\_OUTSIDE\_RECT} and no pointers are filled.
 \item One of input arguments is invalid. A runtime error is raised or, if silent or "parent" error processing mode is selected, \texttt{CV\_PTLOC\_ERROR} is returnd.
\end{itemize}
\fi

\ifPy
\begin{itemize}
 \item The point falls into some facet.                          \texttt{loc} is \texttt{CV\_PTLOC\_INSIDE} and \texttt{where} is one of edges of the facet.
 \item The point falls onto the edge.                            \texttt{loc} is \texttt{CV\_PTLOC\_ON\_EDGE} and \texttt{where} is the edge.
 \item The point coincides with one of the subdivision vertices. \texttt{loc} is \texttt{CV\_PTLOC\_VERTEX} and \texttt{where} is the vertex.
 \item The point is outside the subdivsion reference rectangle.  \texttt{loc} is \texttt{CV\_PTLOC\_OUTSIDE\_RECT} and \texttt{where} is None.
 \item One of input arguments is invalid. The function raises an exception.
\end{itemize}
\fi

\cvCPyFunc{Subdiv2DRotateEdge}
Returns another edge of the same quad-edge.

\cvdefC{
CvSubdiv2DEdge  cvSubdiv2DRotateEdge( \par CvSubdiv2DEdge edge,\par int rotate );
}\cvdefPy{Subdiv2DRotateEdge(edge,rotate)-> CvSubdiv2DEdge}

\begin{description}
\cvarg{edge}{Subdivision edge (not a quad-edge)}
\cvarg{rotate}{Specifies which of the edges of the same quad-edge as the input one to return, one of the following:
\begin{description}
  \cvarg{0}{the input edge (\texttt{e} on the picture below if \texttt{e} is the input edge)}
  \cvarg{1}{the rotated edge (\texttt{eRot})}
  \cvarg{2}{the reversed edge (reversed \texttt{e} (in green))}
  \cvarg{3}{the reversed rotated edge (reversed \texttt{eRot} (in green))}
\end{description}}
\end{description}

\includegraphics[width=0.5\textwidth]{pics/quadedge.png}

The function returns one of the edges of the same quad-edge as the input edge.

\cvCPyFunc{SubdivDelaunay2DInsert}
Inserts a single point into a Delaunay triangulation.

\cvdefC{
CvSubdiv2DPoint*  cvSubdivDelaunay2DInsert( \par CvSubdiv2D* subdiv,\par CvPoint2D32f pt);
}\cvdefPy{SubdivDelaunay2DInsert(subdiv,pt)-> point}

\begin{description}
\cvarg{subdiv}{Delaunay subdivision created by the function \cvCPyCross{CreateSubdivDelaunay2D}}
\cvarg{pt}{Inserted point}
\end{description}

The function inserts a single point into a subdivision and modifies the subdivision topology appropriately. If a point with the same coordinates exists already, no new point is added. The function returns a pointer to the allocated point. No virtual point coordinates are calculated at this stage.

\fi


\chapter{Multiple Integrals}
\input{./multipleIntegrals/doubleIntegrals}
\input{./multipleIntegrals/tripleIntegras}