# Increased performance in DDM analysis by calculating structure functions
through Fourier transform in time

M. Norouzisadeh  Universite de Pau et des Pays de l’Adour, E2S UPPA, CNRS,
TOTAL, LFCR UMR5150, Anglet, France  Université Orléans, ISTO, CNRS, 1A rue de
la Férollerie, 45071 Orléans, France  G. Cerchiari  Institut für
Experimentalphysik, Universität Innsbruck, Technikerstrasse 25, 6020
Innsbruck, Austria  Corresponding author<EMAIL_ADDRESS>F.
Croccolo  Universite de Pau et des Pays de l’Adour, E2S UPPA, CNRS, TOTAL,
LFCR UMR5150, Anglet, France

###### Abstract

Differential Dynamic Microscopy (DDM) is the combination of optical microscopy
to statistical analysis to obtain information about the dynamical behaviour of
a variety of samples spanning from soft matter physics to biology. In DDM, the
dynamical evolution of the samples is investigated separately at different
length scales and extracted from a set of images recorded at different times.
A specific result of interest is the structure function that can be computed
via spatial Fourier transforms and differences of signals. In this work, we
present an algorithm to efficiently process a set of images according to the
DDM analysis scheme. We bench-marked the new approach against the state-of-
the-art algorithm reported in previous work. The new implementation computes
the DDM analysis faster, thanks to an additional Fourier transform in time
instead of performing differences of signals. This allows obtaining very fast
analysis also in CPU based machine. In order to test the new code, we
performed the DDM analysis over sets of more than 1000 images with and without
the help of GPU hardware acceleration. As an example, for images of $512\times
512$ pixels, the new algorithm is 10 times faster than the previous GPU code.
Without GPU hardware acceleration and for the same set of images, we found
that the new algorithm is 300 faster than the old one both running only on the
CPU.

##  I Introduction

In the latest decade, Differential Dynamic Microscopy (DDM) has gained
popularity in the field of soft matter physics due to its robustness and easy
implementations in all the laboratories already equipped with a microscope
Cerbino and Trappe (2008); Germain et al. (2016); Cerbino and Cicuta (2017).
The technique allows investigating the dynamics of rather different samples
ranging from colloidal particles Cerbino and Trappe (2008) to bacteria Wilson
et al. (2011), but also from biological cells Sentjabrskaja et al. (2016) to
density fluctuations in and outside thermal equilibrium Giavazzi et al.
(2016); Croccolo et al. (2007) and many others as witnessed in several review
articles Cerbino and Cicuta (2017); Brader (2010); Poon et al. (2012). Other
techniques make use of similar image analysis, like the dynamic shadowgraph
that some of us currently use to investigate non-equilibrium fluctuations in
complex fluids out of equilibrium and to extract information about transport
properties of the mixtures Croccolo et al. (2007, 2012, 2019); Garcia-
Fernández et al. (2019).

The implementation of DDM requires, as stated, a microscope to acquire series
of images by transmitted light Cerbino and Trappe (2008), fluorescence-based
Lu et al. (2012), dark-field Bayles et al. (2016) or any other visualisation
scheme. The series of images need then to be treated by custom-made software
to compute the so-called structure function, as defined by Schultz-Dubois and
Rehberg Schulz-DuBois and Rehberg (1981) and implemented to Schlieren Croccolo
et al. (2006) and shadowgraph Croccolo et al. (2006) imaging and to optical
microscopy Cerbino and Trappe (2008); Giavazzi et al. (2009). The different
available software share common features and in particular calculate the
difference of images and then Fourier transform that signal in space over the
2D Germain et al. (2016), or in other cases they first compute 2D-FFT and
after compute differences of the image FFTs Cerchiari et al. (2012).

Since the amount of acquired images and their ’weight’ have considerably
increased in the latest two decades, the computational time needed to compute
the structure function should have also increased. Of course, also the
computational capabilities of modern computers have largely increased, but a
major breakthrough has been achieved when researchers have started to
implement the computation of the structure function on graphic processor units
(GPU) Cerchiari et al. (2012). The implementation of the cited computational
task on GPU allowed a decrease of the computational time by a factor 10–30;
thus, reducing the data analysis time from several hours to a few tens of
minutes.

In the present article, we present a further optimisation step consisting in
performing the calculation of the structure function by Fourier transform in
time rather than calculating differences of spatial FFTs. This implementation
has also been tested on the Central Processing Unit (CPU) in order to test the
GPU acceleration in different experimental conditions.

The source code of the program developed for the tests reported in this work,
which executes the algorithm both for CPU and GPU, is released under the GNU
General Public License v.3 gpl  and is freely available for download at
Cerchiari and Norouzisadeh (2020).

##  II The algorithm

In DDM experiments, the light modulations generated by the sample are acquired
by a camera in the form of a set of images $I_{n}$ at regular time intervals.
To measure the dynamical and spatial properties of the specimen, the recorded
$N$ images are processed to calculate the structure function $d$. The
structure function is defined as follows Croccolo et al. (2006):

$d\left(m\right)=\frac{1}{N-m}\sum_{n=m}^{N-1}\lvert
F_{xy}\left(I_{n-m}-I_{m}\right)\rvert^{2}\;,$ (1)

where the indices $n$ and $m$ run from $0$ to $N-1$ and $F_{xy}$ indicates the
bi-dimensional fast Fourier transform (FFT) of the images. The absolute value
operation $\lvert\ldots\rvert$ is intended for every wave vector component of
the FFT.

In previously described implementations Cerchiari et al. (2012), computing eq.
1 was approached via a two-step algorithm. First, all FFTs of the images
$\tilde{I}_{n}=F_{xy}I_{n}$ were calculated and stored in the local memory.
Second, each structure-function for a specific time delay $m$ was evaluated
via an in-place average scheme updating the matrices $d\left(m\right)$ while
calculating the differences of image FFTs
$\left(\tilde{I}_{n-m}-\tilde{I}_{n}\right)$. This algorithm exploited the
linearity of the FFT operation and the available hardware memory to reduce the
computational load and achieve a faster execution time than by applying eq. 1
directly. The speedup was possible because the FFTs of the images could be re-
used several times for different $m$ values instead of calculating a FFT for
every difference $\left(\tilde{I}_{n-m}-\tilde{I}_{n}\right)$. After the FFTs
were calculated and saved, the wave vector components of the FFTs remained
independent of one another. Each wave vector was elaborated independently by a
parallel algorithm designed for graphic processing units (GPU) to efficiently
perform the operation of difference, squared modulus and average.

In this work, we present a modified algorithm for computing the operations on
the wave vectors, i.e. the operations after the image bi-dimensional FFTs are
evaluated and stored in the local memory. The new approach optimizes the
calculations by computing an additional Fourier transform of the data in time.
To describe the new algorithm, we will refer to the vector obtained by
concatenating the complex amplitudes of subsequent FFTs at a specific wave
vector in the bi-dimensional Fourier space of spatial frequencies with the
name time sequence. The computation can be described for a single time
sequence and iterated over all the wave vectors to obtain the final result. We
will show that the new algorithm is suited for both GPU and CPU hardware
platforms.

We expand the square modulus operation of eq. 1 to obtain:

$\displaystyle d\left(m\right)$
$\displaystyle=\frac{1}{N-m}\sum_{n=m}^{N-1}\left(\lvert\tilde{I}_{n-m}\rvert^{2}+\lvert\tilde{I}_{m}\rvert^{2}-2\textrm{Re}\left(\tilde{I^{*}}_{n-m}\tilde{I}_{m}\right)\right)\;,$
(2)

where the apex “$*$” indicates complex conjugation. The first two terms in the
sum are averages of the modulus-squared elements of each time sequence. The
first term containing $\lvert\tilde{I}_{n-m}\rvert^{2}$ is the average of the
first $N-m$ squared elements of the sequence. Likewise, the second term
containing $\lvert\tilde{I}_{m}\rvert^{2}$ is the average of the last $N-m$
components. Both averages have a computational complexity of
$O\left(N\right)$. The last term identified by the product
$\tilde{I^{*}}_{n-m}\tilde{I}_{m}$ is the real part of the auto-correlation of
the time sequences. As widely known in signal processing, the auto-correlation
can be evaluated via the power spectrum by using the FFT operation over the
time sequence. The advantage of computing the auto-correlation via Fourier
transform in time is the speed-up of the FFT algorithm. Given $N$ images, with
$N$ being a power of two, the FFT transforms $O\left(N\times N\right)$
operations (the summation over $n$ for all $m$), into $O\left(2\times
N\times\log_{2}\left(N\right)\right)$ plus $O\left(N\right)$ (the direct and
inverse FFTs plus the elementwise square modulus). Thus, it is possible to
reduce the computational complexity of the algorithm from
$O\left(N^{2}\right)$ to $O\left(N\times\log_{2}\left(N\right)\right)$ by
calculating the auto-correlation with the help of Fourier analysis of the data
over time. More details about our Fourier analysis approach over time are
reported in Appendix B.

To compare the new algorithm with the one described in Ref. Cerchiari et al.
(2012), we prepared a program that implements both algorithms on CPU and GPU
hardware for a total of four execution modes. To distinguish the two
algorithms we will refer to the method reported in Ref. Cerchiari et al.
(2012) as WITHOUT_FT and the technique discussed in this article as WITH_FT.
Both methods calculate the final result in two steps. The first step is common
and consists in calculating and storing the FFTs of the images in the
available free memory: RAM for the CPU versions and global G-RAM for the GPU
implementations. In the second step, the wave vectors are analyzed
independently according to the different schemes. If the wave vector data
exceeds the capacity of the available memory, both algorithms split the job
into several groups at the price of recalculating the image FFTs several times
(see Appendix C for more details). The program is written in C++11 and CUDA
v.10.2 with graphical support of the OpenCV 3.0 library. We tested the program
with the Fourier transform libraries CUFFT (version provided in CUDA v.10.2)
for GPU execution and FFTW 3.3.3 Frigo and Johnson (2005) for the CPU
implementations. The code was compiled with MS compiler v120 and the compiler
of CUDA v.10.2 in Visual Studio 2019 and executed on a machine with the
following specifications:

  * •

CPU: Intel® Core™ i9-9880H

  * •

32 GB DDR4 RAM

  * •

Graphic card: NVIDIA Quadro RTX 4000 with 8GB of dedicated G-RAM memory

  * •

512 GB SSD drive - PCIe, performance class 40

Figure 1: Execution time as a function of the total number of images for
images of $512\times 512$ pixels. The curves corresponding to the WITH_FT
algorithm have square markers and the curves of the WITHOUT_FT algorithm have
circular markers. The markers have colored filling for the GPU modes and have
white filling for the CPU modes.

In our tests, we considered image sets composed by maximum $2^{14}=16384$
images with 16 bit depth and we limited the execution times to less than
$10^{5}$ s. In the first test, we ran all the algorithms on CPU and GPU with
images composed by $512\times 512$ pixels. For comparison, we made use of 8 GB
of RAM for executing the program on CPU so that the CPU and the GPU could
access the same amount of RAM and G-RAM, respectively. The execution times of
the programs in these conditions are presented in fig. 1, in which the times
for all the four execution modes are plotted as a function of the number of
images used for the test. As expected from the results reported in Ref.
Cerchiari et al. (2012), the WITHOUT_FT algorithm executes more than 30 times
faster on GPU than CPU. The GPU hardware is also faster than the CPU in
executing the WITH_FT algorithm, but the speed-up factor never exceeds a
factor of 2. Comparing the WITH_FT with the WITHOUT_FT scheme, the WITH_FT
scheme is faster than the WITHOUT_FT method in processing more than $\sim
1000$ images. After this threshold, both CPU and GPU versions of the WITH_FT
algorithm execute quicker than the GPU–WITHOUT_FT implementation, reaching a
maximum speed-up factor of $10-12$ for $16384$ images.

Figure 2: Fractional execution time of the different tasks of the program as a
function of the total number of images. The length of the colored bars
represents the fractional time spent by the program to execute the different
operations: disk IO, host–device data transfers, step 1 and step 2. In this
test, we used images of $512\times 512$ pixels. The first row (graphs (a) and
(b)) presents the fractional times spent in CPU mode and the second row
(graphs (c) and (d)) in GPU mode. The first column shows the fractional times
of the WITH_FT algorithm (graphs (a) and (c)) and the second column of the
WITHOUT_FT algorithm (graphs (b) and (d)). Data of the CPU WITHOUT_FT version
for 16384 images are not reported because the total execution time was
exceeding $>10^{5}$ s.

Figure 2 presents the fractional time spent by the program in the four modes
to compute the image FFT (step one), process the time sequences (step two) and
perform memory IO operations (disk and host-device). The IO operations named
host-device include the data transfers between the RAM and the G-RAM and they
only exists in the GPU implementations. In the figure, we normalized the
fractional times by the total execution time to highlight the different
workloads for executing each part of the program. As a function of increasing
number of images, the workload of step two compared to the other operations
remains balanced in the CPU-WITH_FT implementation and it reduces in GPU-
WITH_FT implementation. Conversely, the WITHOUT_FT algorithm spends more
fractional time during the second step as the number of images increases both
in the CPU and the GPU modes. Combining the information of figs. 1 and 2, we
see the advantage of the new implementation applied to the problem of
calculating the structure function: the WITH_FT algorithm is faster than the
WITHOUT_FT scheme for a large number of images as a consequence of the
reduction in computational complexity in processing the time sequences of the
wave vectors.

In a second test, we analyzed the execution performance of the GPU–WITH_FT and
GPU–WITHOUT_FT algorithms for squared images of different sizes. Figure 3
presents the ratio of execution times between GPU–WITH_FT over GPU–WITHOUT_FT
for different number of images and image size. In analogy to the $512\times
512$ example, the WITH_FT method is faster than the WITHOUT_FT technique for
more than $\sim 500-1000$ images. The red plane in the figure marks the
condition in which both algorithms complete execution in the same amount of
time. We notice that small image sizes obtain a larger speedup gain as
compared to large images. For example, images composed of $128\times 128$
pixels obtain up to a $\sim 100$ speed-up gain in the execution time, against
only $\sim 4$ of the $1024\times 1024$. In fact, the number of pixels per
image affects the load of data-transfer and FFT of the images (step one and
memory operations). While processing large images, both the WITH_FT and
WITHOUT_FT algorithm must spend an increasingly large fraction of time to
prepare the time sequences before their analysis. Considering for example the
WITH_FT at processing 16384 images, the first step and memory IO occupy 44% of
the execution time with images composed of $1024\times 1024$ pixels, and they
occupy 62% of the execution time for the $2048\times 2048$ pixel pictures. Two
reasons determine this fractional increase of the time spent by the program to
compute the first step and performing memory IO operations. First, calculating
the bidimensional FT requires more time for larger image size. Second, as
mentioned, the FFTs are calculated several times if the wave vectors
components of all the images exceed the available memory (see Appendix C for
further details). The latter effect can be reduced by adopting larger memory
areas to store the image FFTs. For this reason, as a final test, we executed
the CPU–WITH_FT algorithm with images of $512\times 512$ pixels releasing to
the program 23 GB of RAM. Compared to the previous tests in which the RAM was
limited to 8 GB, we obtained a speedup factor of 2 thanks to the larger
available memory area. In fact, the image’s FT are recalculated six times by
using 8 GB of RAM but only two times by using 23 GB of RAM.

Figure 3: Ratio of execution times on GPU of the WITHOUT_FT against the
WITH_FT algorithm as a function of different number and size of images. The
transparent red plane marks the condition in which both algorithm process the
images in the same time.

##  III Conclusion

In this work, we presented a new algorithm to process image sets of
Differential Dynamic Microscopy experiments which is based on the temporal FFT
of the images. We developed a program to compare our new approach with the
state-of-the-art algorithm reported in Ref. Cerchiari et al. (2012). The
program features the possibility to execute both algorithms on GPU and CPU
hardware. While the old approach executes $\sim 30$ times faster in GPU mode
compared to CPU mode, the new method performs similarly on GPU and CPU.
Comparing the two algorithms, the new method outperforms the GPU-based
implementation of the old scheme at processing $\gtrsim 1000$ images. We
recorded a 10-fold reduction in the execution time of the program by
processing images of $512\times 512$ pixels with the new algorithm in place of
the old one. This speedup is obtained by both the CPU and the GPU
implementations of the new scheme against the GPU-base implementation of the
old algorithm. Thus, a computer with no GPU hardware can process the same
images $\sim 300$ times faster by applying the new algorithm instead of the
old one.

The program makes use of the RAM memory to avoid recalculating the bi-
dimensional FFTs of the images. Therefore, if the image FTs cannot be saved
completely on the RAM, the execution time of the program increases. To reduce
the impact on the execution time of large data-sets, in the final program, we
implemented the possibility to reduce the number of wave vectors that are
considered in calculating the structure function $d\left(m\right)$. The user
may decide to limit the analysis to low-frequency wave vectors; thus, reducing
the effective size of the images’ FFTs to be stored on the local memory. This
feature can help reducing the computation time of the program in DDM
applications in which the high-frequency spatial components of the images can
be neglected.

Acknowledgements. This work has received funding from the European Union’s
Horizon 2020 research and innovation program under the Marie Skłodowska-Curie
grant agreement No 801110 and the Austrian Federal Ministry of Education,
Science and Research (BMBWF). It reflects only the author’s view, the EU
Agency is not responsible for any use that may be made of the information it
contains. We thank Julia Braun for proofreading the manuscript.

##  IV Authors contributions

G.C. designed the algorithm. N.M. and G.C. developed the program. N.M.
acquired and analyzed the data. All the authors were involved in the
preparation of the manuscript. All the authors have read and approved the
final manuscript.

## References

  * Cerbino and Trappe (2008) R. Cerbino and V. Trappe, Phys. Rev. Lett. 100, 188102 (2008), URL https://doi.org/10.1103/PhysRevLett.100.188102.
  * Germain et al. (2016) D. Germain, M. Leocmach, and T. Gibaud, Am. J. Phys. 84, 202 (2016), URL https://doi.org/10.1119/1.4939516.
  * Cerbino and Cicuta (2017) R. Cerbino and P. Cicuta, J. Chem. Phys. 147, 110901 (2017), URL https://doi.org/10.1063/1.5001027.
  * Wilson et al. (2011) L. G. Wilson, V. A. Martinez, J. Schwarz-Linek, J. Tailleur, G. Bryant, P. N. Pusey, and W. C. K. Poon, Phys. Rev. Lett. 106, 018101 (2011), URL https://doi.org/10.1103/PhysRevLett.106.018101.
  * Sentjabrskaja et al. (2016) T. Sentjabrskaja, E. Zaccarelli, C. De Michele, F. Sciortino, P. Tartaglia, T. Voigtmann, S. U. Egelhaaf, and M. Laurati, Nat. Commun. 7, 11133 (2016), ISSN 2041-1723, URL https://doi.org/10.1038/ncomms11133.
  * Giavazzi et al. (2016) G. Giavazzi, F. Savorana, A. Vailati, and R. Cerbino, Soft Matter 12, 6588 (2016), URL https://doi.org/10.1039/C6SM00935B.
  * Croccolo et al. (2007) F. Croccolo, D. Brogioli, A. Vailati, M. Giglio, and D. S. Cannell, Phys. Rev. E 76, 041112 (2007), URL https://doi.org/10.1103/PhysRevE.76.041112.
  * Brader (2010) J. M. Brader, J. Phys. Condens. Matter 22, 363101 (2010), URL https://doi.org/10.1088/0953-8984/22/36/363101.
  * Poon et al. (2012) W. C. K. Poon, E. R. Weeks, and C. P. Royall, Soft Matter 8, 21 (2012), URL http://dx.doi.org/10.1039/C1SM06083J.
  * Croccolo et al. (2012) F. Croccolo, H. Bataller, and F. Scheffold, J. Chem. Phys. 137, 234202 (2012), URL https://doi.org/10.1063/1.4771872.
  * Croccolo et al. (2019) F. Croccolo, L. Garcia-Fernández, H. Bataller, A. Vailati, and J. Ortiz de Zárate, Phys. Rev. E 99, 012602 (2019), URL https://doi.org/10.1103/PhysRevE.99.012602.
  * Garcia-Fernández et al. (2019) L. Garcia-Fernández, P. Fruton, H. Bataller, J. Ortiz de Zárate, and F. Croccolo, Eur. Phys. J. E 42, 124 (2019), URL https://doi.org/10.1140/epje/i2019-11889-4.
  * Lu et al. (2012) P. J. Lu, F. Giavazzi, T. E. Angelini, E. Zaccarelli, F. Jargstorff, A. B. Schofield, J. N. Wilking, M. B. Romanowsky, D. A. Weitz, and R. Cerbino, Phys. Rev. Lett. 108, 218103 (2012), URL https://doi.org/10.1103/PhysRevLett.108.218103.
  * Bayles et al. (2016) A. V. Bayles, T. M. Squires, and M. E. Helgeson, Soft Matter 12, 2440 (2016), URL https://doi.org/10.1039/C5SM02576A.
  * Schulz-DuBois and Rehberg (1981) E. O. Schulz-DuBois and I. Rehberg, Applied physics 24, 323 (1981), ISSN 1432-0630, URL https://doi.org/10.1007/BF00899730.
  * Croccolo et al. (2006) F. Croccolo, D. Brogioli, A. Vailati, M. Giglio, and D. S. Cannell, Appl. Opt. 45, 2166 (2006), URL https://doi.org/10.1364/AO.45.002166.
  * Giavazzi et al. (2009) F. Giavazzi, D. Brogioli, V. Trappe, T. Bellini, and R. Cerbino, Phys. Rev. E 80, 031403 (2009), URL https://doi.org/10.1103/PhysRevE.80.031403.
  * Cerchiari et al. (2012) G. Cerchiari, F. Croccolo, F. Cardinaux, and F. Scheffold, Rev. Sci. Instrum. 83, 106101 (2012), URL https://doi.org/10.1063/1.4755747.
  * (19) _Gnu general public license_ , URL http://www.gnu.org/licenses/gpl.html.
  * Cerchiari and Norouzisadeh (2020) G. Cerchiari and M. Norouzisadeh, _Diffmicro_ (2020), URL https://zenodo.org/badge/latestdoi/315379294.
  * Frigo and Johnson (2005) M. Frigo and S. G. Johnson, Proceedings of the IEEE 93, 216 (2005), special issue on “Program Generation, Optimization, and Platform Adaptation”, URL https://doi.org/10.1109/JPROC.2004.840301.

##  V Appendix A. Number of threads

As discussed in the main text, the WITHOUT_FT algorithm performs efficiently
by adopting a parallel computing scheme on GPU hardware. This does not apply
to the WITH_FT scheme. To analyze the influence of parallel computing on the
execution time of the WITH_FT algorithm, we implemented the WITH_FT method
with a user-configurable number of threads both in the CPU mode and the GPU
mode. The number of threads in the CPU mode refers to the number of threads
spawned to execute a particular task, such as the FFT operations. In the GPU
mode, the number of threads selects the amount of CUDA threads of each CUDA
kernel. In both CPU and GPU modes, the number of threads also determines the
number of time sequences that are processed in parallel. fig. A.1 presents the
total execution times of the program as a function of the different number of
threads for 8192 and 16384 images of $512\times 512$ pixels. Parallel
computing achieves a minimal or detrimental impact on the speed-up factor in
the CPU mode. In GPU mode, the performance gain saturates at around 32 threads
for the CUDA kernels with a peak performance at 256 GPU–threads. Based on the
results of this test, we selected the optimal number of two CPU-threads and
256 GPU-threads for all other tests presented in this work.

Figure A.1: Execution time of the WITH_FT algorithm as a function of different
number of threads. The total number of images is indicated in the legend
together with the hardware platform of execution. The images size is
$512\times 512$ pixels.

##  VI Appendix B. Analysis of the time sequences

In the main text we presented a new algorithm for the analysis of DDM images.
This method approaches the analysis of DDM images via eq. 2 and by using the
fast Fourier transform (FFT) algorithm both in 2D-space and, eventually, in
time. In the second step, we applied eq. 2 to each time sequence of the wave
vectors separately. In this appendix, we describe how we implemented the
computation on a single time sequence by using eq. 2 to obtain the final
result.

We split the calculation on the time sequence in two parts
$d\left(m\right)=d_{a}\left(m\right)+d_{c}\left(m\right)$ where

$\displaystyle d_{a}\left(m\right)$
$\displaystyle=\frac{1}{N-m}\sum_{n=m}^{N-1}\left(\lvert\tilde{I}_{n-m}\rvert^{2}+\lvert\tilde{I}_{m}\rvert^{2}\right)\;,$
(B.1) $\displaystyle d_{c}\left(m\right)$
$\displaystyle=\frac{2}{N-m}\sum_{n=m}^{N-1}\textrm{Re}\left(\tilde{I^{*}}_{n-m}\tilde{I}_{m}\right)\;.$
(B.2)

The term $d_{a}\left(m\right)$ is calculated by using the following iterative
formula:

$d_{a}\left(N-n-1\right)=\frac{n}{n+1}d_{a}\left(N-n\right)+\frac{\lvert
I_{n}\rvert^{2}+\lvert I_{N-n-1}\rvert^{2}}{n+1}\;,$ (B.3)

where the index $n\in\left[0,N-1\right]$.

The term $d_{c}\left(m\right)$ expresses the autocorrelation of the time
sequences. We implemented the autocorrelation by using the FFT in time
considering two requirements. First, the maximum performance gain is expected
if the support points of the time sequences are a power of two to take
advantage of the FFT speedup. Second, the summation over $n$ of eq. B.2 takes
into account only $N-m$ pairs of $\tilde{I}_{n}$ functions which is
incompatible with evaluating the FFT directly on $N$ support points. The
incompatibility emerges because of the periodical boundary conditions imposed
by the FFT. To meet both requirements, we zero-padded the time sequences to
$N_{2}$ support points solving the equation:

$\log_{2}{N_{2}}=\lceil\log_{2}{\left(N\right)}\rceil+1\;,$ (B.4)

where “$\lceil\ldots\rceil$” denotes the ceiling operation. This padding
operation allows us to use the FFT and calculate exactly eq. 2 without any
influence caused by the periodical boundary conditions. The calculation of
$d_{c}\left(m\right)$ for a single time sequence can be broken down in the
following operations.

  * •

The time sequence is zero-padded to $N_{2}$ complex support points.

  * •

The padded sequence is Fourier transformed by FFT in time.

  * •

Each element of the FFT is squared in modulus obtaining the power spectrum of
the time sequence.

  * •

The inverse FFT is applied to the power spectrum.

  * •

The real part of the first N elements of the resulting time sequence are
normalized by the ramp vector $1/\left(N-m\right)$.

Finally, $d_{a}\left(m\right)$ and $d_{c}\left(m\right)$ are added together to
obtain $d\left(m\right)$.

##  VII Appendix C. Group execution

Figure C.1: Execution time of the WITH_FT algorithm on CPU hardware on images
of $512\times 512$ pixels and 23 GB of RAM. The vertical line marks the
crossing point in which the algorithm divides the execution from one into two
groups.

The program described in this work splits the calculations in groups if the
data of all the wave vector components for all the images exceeds the
available storage memory. The method WITHOUT_FT uses a first-in-first-out
(FIFO) memory scheme already described in Ref. Cerchiari et al. (2012). This
approach aims to calculate groups of complete $d\left(m\right)$ matrices. The
WITH_FT algorithm, instead, operates sequentially on different groups of wave
vectors for all the $d\left(m\right)$ and saves the partial results of each
group on the hard-drive. The partial results are merged at the final stage of
the program. In practice, in both algorithms, the images are loaded and
Fourier transformed one time for each group because only a part of the FFTs
data can be saved on the local memory. The impact of repeating these
operations over the entire execution time is presented in fig. C.1, in which
we present the execution time as a function of the number of images to
process. In this test, we executed the WITH_FT algorithm on CPU hardware with
images of $512\times 512$ pixels by releasing to the program 23 GB of RAM. In
the figure, the vertical red line marks the crossing point from one-group to
two-group execution. We see that the time spent by the program in memory
operations and step one suddenly doubles by crossing the line because the bi-
dimensional FFTs of the images and the corresponding IO operations must be
executed two times instead of only one.


# Mimetic gravity in $(2+1)$-dimensions

Ahmad<EMAIL_ADDRESS>Physics Department and Biruni
Observatory, Shiraz University, Shiraz 71454, Iran
Research Institute for Astronomy and Astrophysics of Maragha (RIAAM), P.O. Box
55134-441, Maragha, Iran
Max-Planck-Institute for Gravitational Physics (Albert-Einstein-Institute), Am
M$\ddot{u}$hlenberg 1, DE-14476 Potsdam-Golm, Germany

###### Abstract

One of the most important achievements in general relativity has been
discovery of the $(2+1)$-dimensional black hole solutions of Einstein gravity
in anti-de Sitter (AdS) spacetime [Phys. Rev. Lett. 69, 1849 (1992)]. In this
paper, we construct, for the first time, the $(2+1)$-dimensional solutions of
mimetic theory of gravity. These solutions may provide a powerful background
to investigate the physical properties of mimetic gravity and examine its
viability in lower spacetime dimensions. In particular, some physical
properties of stationary black hole solutions of this theory in the presence
of charge or angular momentum are investigated.

##  I Introduction

Black holes are perhaps the most fascinating and amazing astrophysical objects
that have ever emerged as the solutions of gravitational theories. These
wonderful and enrich structures provide a powerful background for exploring
different branches of physics including quantum gravity, thermodynamics,
superconducting phase transition, paramagnetism-ferromagnetism phase
transition, superfluids, condensed matter physics, spectroscopy, information
theory, holographic hypothesis, etc. This powerfully is mainly due to the
discovery of the well established correspondence between gravity in
$d$-dimensional anti-de Sitter (AdS) spacetime and the conformal field theory
(CFT) living on the boundary of $(d-1)$-dimensional spacetime, known as
$AdS_{d}/CFT_{d-1}$ correspondence or gauge/gravity duality. Recently, black
holes have also received a renewed attention after some significant steps
toward understanding the puzzle of information paradox HPS1  as well as the
shadow of the supermassive black holes as the first results of $M87$ Event
Horizon Telescope EHT . It was shown that there exist soft hairs, including
soft gravitons and/or soft photons, on the black hole horizon and the complete
information about their quantum state is stored on a holographic plate at the
future boundary of the horizon HPS1 . Black hole entropy and microscopic
structure near the horizon can be understood through these soft hairs Afshar ;
HHPS ; HPS2 ; Grum .

One of the most significant achievements in black hole physics has been the
discovery of three dimensional solutions of general relativity in AdS
spacetime known as BTZ (Banados-Teitelboim-Zanelli) black holes BTZ1 . In
fact, the $(2+1)$-dimensional solution of Einstein gravity provides a
simplified model to investigate and find some conceptual issues such as black
hole thermodynamics, quantum gravity, string and gauge/gravity duality,
holographic superconductors in the context of the $AdS_{3}/CFT_{2}$ Car1 ; Ash
; Sar ; Wit1 ; Car2 . It has been shown that the quasinormal modes in this
spacetime coincide with the poles of the correlation function in the dual CFT.
This gives quantitative evidence for $AdS_{3}/CFT_{2}$ Bir . Furthermore, BTZ
black holes play a crucial role for improving our perception of gravitational
interaction in low dimensional spacetimes Wit2 . In particular, it might shed
some light on the quantum gravity in three dimensions. Geometry of the
spinning $(2+1)$-dimensional black holes has been explored in BTZ2 . It was
shown that the surface $r=0$ is not a curvature singularity but, rather, a
singularity in the causal structure which is everywhere constant and
continuing beyond it would produce closed timelike curves BTZ2 . The extension
to include an electric charge in addition to the mass and angular momentum
have been performed BTZ3 ; Fern . The $(2+1)$-dimensional black holes also
provide a powerful background to explore one-dimensional holographic
superconductors Ren ; Liu ; Kord ; mahya ; Bina . The studies on
$(2+1)$-dimensional solutions of gravitational field equations have been
extensively carried out in the literatures (see e.g. rin1 ; rin2 ; Clem ; Car
; Noj3D ; Emp ; Cad ; Par ; Hendi ; She ; Xu ; Grum2 ).

In this paper, we introduce the $(2+1)$-dimensional black hole solutions in
the context of mimetic gravity. The theory of mimetic gravity was proposed a
few years ago, as an alternative description for the dark matter puzzle Mim1 .
It was argued that the mimetic field can encodes an extra longitudinal degree
of freedom to the gravitational field. Thus, the gravitational field achieves,
in addition to two transverse degrees of freedom, a dynamical longitudinal
degree of freedom which can play the role of mimetic dark matter. Latter, it
was shown that a modified version of mimetic gravity can resolve the
cosmological singularities MimCos1  as well as the singularity in the center
of a black hole Cham3 . Besides, it has been confirmed that the original
setting of the mimetic theory predicts that gravitational wave (GW) propagates
at the speed of light, ensuring agreement with the results of the event
GW170817 and its optical counterpart Sunny1 ; Sunny2 . It has also been shown
that this theory can explain the flat rotation curves of spiral galaxies
MimMOND ; ShSa . Mimetic theory of gravity has arisen a lot of enthusiasm in
the past few years both from the cosmological viewpoint MimCos ; Dutta ; Sep ;
Zh ; Mat ; Odin0 ; Odin1 ; Odin2 ; MimCos2 ; Gorj1 ; Gorj2 ; Gorj3 ; Gorj4 ;
Fir ; Leb ; Cham2  as well as black holes physics Der ; Myr1 ; Myr2 ; OdinP ;
Odinfr1 ; Odinfr2 ; Oik ; Gorji2 ; Nash1 ; Ch ; Nash3 ; jibril ; Yunlong1 ;
Yunlong2 ; Shey .

Till now, black hole solutions of mimetic gravity in $(2+1)$-dimensions have
not been explored. Our purpose here is to construct static and stationary
analytical black hole solutions of mimetic gravity in three dimensional
spacetime and investigate their properties. These new solutions provide a set
up, for future investigations, to examine mimetic theory of gravity and its
physical consequences in lower spacetime dimensions and examine the viability
of this theory. In particular, it may be useful for investigating one-
dimensional holographic superconductors in the context of mimetic gravity. We
shall consider several cases including whether or not there is a coupling to
the Maxwell field or whether or not there is an angular momentum associated
with the spacetime. We study the effects of the mimetic field on the casual
structure and physical properties of the solutions and disclose that, in
contrast to the three dimensional solution of general relativity, in mimetic
gravity a curvature singularity emerges at $r=0$ even in the absence of
Maxwell field. This essential singularity might be due to the extra
longitudinal degree of freedom of the gravitational field encoded by the
mimetic field. Surprisingly, the curvature singularity disappears by adding an
angular momentum to the spacetime.

This paper is organized as follows. Section II is devoted to introducing the
basic field equations of mimetic gravity in $(2+1)$-dimensions. For simplicity
we first ignore the coupling to the Maxwell field in this section and
construct three dimensional black hole solutions. In Sec. III, we take into
account the Maxwell field and explore charged mimetic black holes in three
dimensions. In Sec. IV, we add an angular momentum to the back hole and
investigate rotating $(2+1)$-dimensional solution of mimetic gravity. We
summarize our results in Sec. V.

##  II Field equations and solutions

We start with the following action

$\displaystyle
S=\int{d^{3}x\sqrt{-{g}}\left(\mathcal{R}+{\lambda}(g^{\mu\nu}\partial_{\mu}\phi\partial_{\nu}\phi-\epsilon)+\frac{2}{l^{2}}-F_{\mu\nu}F^{\mu\nu}\right)},$
(1)

where $\mathcal{R}$ is the Ricci scalar, $\lambda$ is the Lagrange multiplier,
and $l$ is related to the cosmological constant by $-\Lambda=l^{-2}$.
$F_{\mu\nu}=\partial_{\mu}A_{\nu}-\partial_{\nu}A_{\mu}$ is the
electromagnetic field tensor and $A_{\mu}$ is the gauge potential. In the
above action, $\epsilon=\pm 1$, in which the positive and negative sign refer
to, respectively, spacelike and timelike nature of vector
$\partial_{\mu}\phi$. We adopt $(-,+,+)$ as our signature and set $8\pi
G_{N}=1$ throughout this work. The equations of motion can be derived from
varying action (1), yielding

$\displaystyle{G}_{\mu\nu}$ $\displaystyle=$
$\displaystyle\lambda\partial_{\mu}\phi\partial_{\nu}\phi+\frac{g_{\mu\nu}}{l^{2}}+T_{\mu\nu}$
(2)
$\frac{1}{\sqrt{-g}}\partial_{\kappa}(\lambda\sqrt{-g}\partial^{\kappa}\phi)=\nabla_{\kappa}(\lambda\partial^{\kappa}\phi)=0,$
(3) $\partial_{\mu}\left(\sqrt{-g}F^{\mu\nu}\right)=0.$ (4)
$g^{\mu\nu}\partial_{\mu}\phi\partial_{\nu}\phi=\epsilon.$ (5)

where

$T_{\mu\nu}=2F_{\mu\gamma}F_{\nu}^{\
\gamma}-\frac{1}{2}g_{\mu\nu}F_{\alpha\beta}F^{\alpha\beta},$ (6)

being the Maxwell energy-momentum tensor. Equation (5) restricts the evolution
of the mimetic field $\phi$ and indicates that the scalar field is not
dynamical by itself, nevertheless it makes the longitudinal degree of freedom
of the gravitational field dynamical Mim1 . It was argued Mim1  that if one
assume $g_{\mu\nu}=g_{\mu\nu}(\phi,\tilde{g}_{\mu\nu})$, in such a way that
$g_{\mu\nu}=\epsilon(\tilde{g}^{\alpha\beta}\partial_{\alpha}\phi\partial_{\beta}\phi)\tilde{g}_{\mu\nu}$,
then one recovers (5) immediately (see also Der ; Fir ). Tracing Eq. (2),
combining with Eq. (5), yields $\lambda=\epsilon\left(G-T-3/l^{2}\right),$
where $G$ and $T$ are, the trace of the Einstein tensor and energy momentum
tensor, respectively. Substituting $\lambda$ in the field equations (2) and
(3), they transform to

$\displaystyle{G}_{\mu\nu}=\epsilon\left(G-T-\frac{3}{l^{2}}\right)\partial_{\mu}\phi\partial_{\nu}\phi+\frac{g_{\mu\nu}}{l^{2}}+T_{\mu\nu},$
(7)
$\displaystyle\partial_{\kappa}\left[\sqrt{-g}\left(G-T-\frac{3}{l^{2}}\right)\partial^{\kappa}\phi\right]=0,$
(8)

Our aim here is to derive static $(2+1)$-dimensional black hole solutions of
the above field equations. We assume the metric of spacetime as

$\displaystyle ds^{2}$ $\displaystyle=$
$\displaystyle-f(r)g^{2}(r)dt^{2}+\frac{dr^{2}}{f(r)}+r^{2}d\varphi^{2},$ (9)

where an additional degree of freedom is incorporated in the line element
through the metric function $g(r)$ which is expected to reflect an extra
degree of freedom of gravitation encoded by the mimetic field $\phi$. With
metric (9), the constraint Eq. (5) transforms to $f(r)\phi^{\prime
2}=\epsilon$, which has solution of the form

$\phi(r)=\int{\frac{dr}{\sqrt{|\epsilon f(r)|}}},$ (10)

where we have chosen the positive sign and set the integration constant equal
to zero, without loss of generality. Equation (10) shows the explicit
dependence of the mimetic field on the metric function and reveals that it is
not an independent dynamical variable. Let us first consider the uncharged
solution. In this case the field equations (7) and (8), have the following
solutions

$\displaystyle f(r)$ $\displaystyle=$ $\displaystyle-M+\frac{r^{2}}{l^{2}},$
(11) $\displaystyle g(r)$ $\displaystyle=$ $\displaystyle 1+\frac{b\
r}{\sqrt{|r^{2}-Ml^{2}|}},$ (12)

where $b$ is the constant of integration which incorporates the impact of the
mimetic field into the solutions. In general $b$ could be either positive or
negative. For $b=0$, our solutions reduce to the $(2+1)$-dimensional BTZ black
holes of Einstein gravity BTZ1 . The horizon is located at $r_{+}=l\sqrt{M}$
where $f(r_{+})=0$, while $g(r_{+})$ diverges. However, $r=r_{+}$ is a
coordinate singularity and both Kretschmann and Ricci scalars have finite
values at $r_{+}$. The sign of $|r^{2}-Ml^{2}|$ depends on whether one
considers interior solution ($r<r_{+}$) or exterior solution ($r>r_{+}$).
Expanding $g(r)$ for large $r$ leads to

$g(r)\approx 1+b+\frac{bMl^{2}}{2r^{2}}+O\left(\frac{1}{r^{4}}\right).$ (13)

Therefore as $r\rightarrow\infty$, we have $g(r)\approx 1+b$, which implies
that the remnant of the mimetic field $\phi$ contributes to the metric
function $g(r)$ through constant $b$. Nevertheless the asymptotic behavior of
the solutions is still AdS since the constant $1+b$ can be absorbed by
redefinition of the time at the asymptotic region.

The ($tt$) component of the metric is given by

$\displaystyle{-\textbf{g}_{tt}(r)}=f(r)g^{2}(r)=\frac{1}{l^{2}}\left[\sqrt{|r^{2}-Ml^{2}|}+b\
r\right]^{2},$ (14)

where its expansion for large $r$ is given by

$\displaystyle{-\textbf{g}_{tt}(r)}\approx-(1+b)M+(1+b)^{2}\frac{r^{2}}{l^{2}}-\frac{bM^{2}l^{2}}{4r^{2}}+O\left(\frac{1}{r^{4}}\right).$
(15)

This confirms that in large $r$ limit, we have
$-\textbf{g}_{tt}\neq\textbf{g}^{rr}$. On the other hand when $r\rightarrow
0$, we have $g(r)=1$ and $-\textbf{g}_{tt}=\textbf{g}^{rr}=f(r)$. The infinite
redshift surface can be obtained by setting $\textbf{g}_{tt}(r)=0$, which
yields

$\displaystyle r_{s_{i}}=\frac{r_{+}}{\sqrt{1\pm b^{2}}},$ (16)

where $i=1,2$ and $-$ for $r_{s_{1}}>r_{+}$ and $+$ for $r_{s_{2}}<r_{+}$.
This means that we have 2 infinite redshift surfaces and the black hole
horizon is located between them, $r_{s_{2}}<r_{+}<r_{s_{1}}$. Besides,
$r_{s_{1}}$ exists provided $b^{2}<1$.

We now calculate the scalar curvatures of the spacetime. It is a matter of
calculations to show that the Ricci scalar and the Kretschmann invariant are
given by

$\displaystyle
R=\frac{2\left[b(Ml^{2}-3r^{2})-3r\sqrt{|r^{2}-Ml^{2}|}\right]}{rl^{2}\left(\sqrt{|r^{2}-Ml^{2}|}+br\right)},$
(17) $\displaystyle
R_{\mu\nu\rho\sigma}R^{\mu\nu\rho\sigma}=\frac{4\Big{\\{}3r^{2}(r^{2}-Ml^{2})+2br(3r^{2}-Ml^{2})\sqrt{|r^{2}-Ml^{2}|}+b^{2}(3r^{4}-2Ml^{2}r^{2}+M^{2}l^{4})\Big{\\}}}{r^{2}l^{4}\left(\sqrt{|r^{2}-Ml^{2}|}+br\right)^{2}},$
(18)

Thus, as $r\rightarrow 0$, both Ricci and Kretschmann invariants diverge, they
are finite at $r\neq 0$ and go to $R=-6/l^{2}$ and
$R_{\mu\nu\rho\sigma}R^{\mu\nu\rho\sigma}=12/l^{4}$ as $r\rightarrow\infty$.
Therefore, the spacetime has an essential singularity at $r=0$. This is in
contrast to the $(2+1)$-dimensional black holes of Einstein gravity where
$r=0$ is not a curvature singularity but, rather, a singularity in the causal
structure BTZ2 . Indeed, for Einstein gravity where $b=0$, the curvature
invariants have constant values anywhere, namely $R=-6/l^{2}$ and
$R_{\mu\nu\rho\sigma}R^{\mu\nu\rho\sigma}=12/l^{4}$, and the curvature
singularity disappears.

In the next section, we shall consider the $(2+1)$-dimensional charged black
hole of mimetic gravity.

##  III Charged mimetic black holes in 3D

In the presence of coupling to the Maxwell field, the gauge potential and the
non-vanishing component of the electromagnetic tensor become

$A_{\mu}=h(r)\delta^{0}_{\mu},\ \ \ F_{tr}=h^{\prime}(r),$ (19)

where prime indicates derivative with respect to $r$. Then it is easy to show
that the Maxwell equation (4) transforms to

$rh^{\prime\prime}(r)g(r)-rh^{\prime}(r)g^{\prime}(r)+h^{\prime}(r)g(r)=0,$
(20)

which has the following solution

$F_{tr}=h^{\prime}(r)=\frac{q}{r}g(r),$ (21)

where $q$ is an integration constant which is indeed the electric charge of
the black hole. Substituting metric (9), condition (10), and the electric
field (21) into Eq. (7), we find

$\displaystyle l^{2}rf^{\prime}-2r^{2}+2q^{2}l^{2}=0,$ (22) $\displaystyle
l^{2}gf^{\prime}+3l^{2}rf^{\prime}g^{\prime}+2l^{2}rfg^{\prime\prime}+l^{2}rgf^{\prime\prime}-4rg=0,$
(23) $\displaystyle
3l^{2}r^{2}f^{\prime}g^{\prime}+2l^{2}r^{2}fg^{\prime\prime}+l^{2}r^{2}gf^{\prime\prime}-2r^{2}g-2q^{2}l^{2}g=0.$
(24)

These equations have the following solutions

$\displaystyle f(r)$ $\displaystyle=$
$\displaystyle-M-2q^{2}\ln(r)+\frac{r^{2}}{l^{2}},$ (25) $\displaystyle g(r)$
$\displaystyle=$ $\displaystyle
1+b_{1}\int{\frac{dr}{\sqrt{|r^{2}-2q^{2}\ln(r)-Ml^{2}|^{3}}}},$ (26)

where $b_{1}$ is again an integration constant which reflects the imprint of
the mimetic field on the spacetime. Clearly for $b_{1}=0$, one recovers the
$(2+1)$-dimensional charged black holes of general relativity BTZ3 . One can
easily check that these solutions also satisfy Eq. (8) for the mimetic scalar
field. The horizons are given by the roots of $f(r_{h})=0$. Depending on the
parameters this equation may have at most two real roots corresponding to
inner and outer horizon of the black hole. Of course, one may choose the
parameters such that the solutions also describe extremal black hole with one
horizon, or a naked singularity (see Fig. 1). The integrand in expression (26)
also diverges at $r_{h}$ indicating that we encounter singularity. However,
$r=r_{h}$ is only a coordinate singularity and both Kretschmann and Ricci
scalars have finite values on the horizon. The integral in $g(r)$ function
cannot be analytically performed for arbitrary values of $r$, however, it is
instructive to study the large $r$ limit of $g(r)$. In this case, one can
write

$\displaystyle g(r)$ $\displaystyle\approx$ $\displaystyle
1+b_{1}\int{\frac{dr}{r^{3}}}\approx 1-\frac{b_{1}}{2r^{2}},$ (27)
$\displaystyle-\textbf{g}_{tt}(r)$ $\displaystyle\approx$
$\displaystyle\left(-M-2q^{2}\ln(r)+\frac{r^{2}}{l^{2}}\right)\left(1-\frac{b_{1}}{2r^{2}}\right)^{2}$
$\displaystyle\approx$
$\displaystyle-M-\frac{b_{1}}{l^{2}}-2q^{2}\ln(r)+\frac{r^{2}}{l^{2}}+\frac{2b_{1}q^{2}ln(r)}{r^{2}}+\left(Mb_{1}+\frac{b_{1}^{2}}{4l^{2}}\right)\frac{1}{r^{2}}+O\left(\frac{1}{r^{4}}\right).$

Therefore, as $r\rightarrow\infty$ we have
$-\textbf{g}_{tt}\neq\textbf{g}^{rr}$, and the remnant of the mimetic field
contributes to the metric function $\textbf{g}_{tt}$ through constant $b_{1}$.
It is also interesting to take a close look on the roots of
$\textbf{g}_{tt}=0$ which define the infinite redshift surfaces. Since there
is no any physical reason to avoid negative $b_{1}$, thus one can choose
either $b_{1}>0$ or $b_{1}<0$. For $b_{1}\leq 0$, the infinite redshift
surfaces $r_{s_{i}}$ coincide with the horizons $r_{h}=r_{\pm}$, namely the
roots of $f(r_{h})=0$. However, for $b_{1}>0$, the function $\textbf{g}_{tt}$
admits an additional root $r_{s_{3}}=\sqrt{b_{1}/2}$ (see Fig. 2). Note that
$r_{s_{3}}$ can be either larger, equal or smaller than $r_{-}$ depending on
the values of $b_{1}$. It is easy to show that, for all values of $b_{1}$,
both Ricci and Kretschmann scalars diverge at $r=0$, they are finite at $r\neq
0$ and as $r\rightarrow\infty$ they tend to constant values, $R=-6/l^{2}$ and
$R_{\mu\nu\rho\sigma}R^{\mu\nu\rho\sigma}=12/l^{4}$, similar to 3D solutions
of Einstein gravity. This analysis confirms that there is a curvature
singularity at $r=0$, regardless of the value of $b_{1}$. The behaviour of the
electric field for the large $r$ is also given by

$F_{tr}\approx\frac{q}{r}\left(1-\frac{b_{1}}{2r^{2}}\right).$ (29)

We have also plotted the behavior of the electric field $F_{tr}$ in Fig. 3.
This figure shows that the electric field diverges for small $r$ and goes to
zero in large $r$ limit. For $b_{1}>0$, the electric field has a maximum at
finite $r$ which can be easily seen from expression (29). Expression (29) also
shows that, compared to the case of Einstein gravity, the electric field of
three dimensional charged mimetic black hole get modified due to the presence
of mimetic field.

Figure 1: The behavior of $f(r)$ for charged mimetic black holes in 3D and
different $M$. Here we have taken $l=1$ and $q=1.5$. Figure 2: The behavior of
$-\textbf{g}_{tt}=f(r)g^{2}(r)$ for charged mimetic black holes in 3D and
different $b$. Here we have taken $M=2$, $l=1$, $q=1.5$. Figure 3: The
behavior of the electric field $F_{tr}=E(r)$ for 3D charged mimetic black
holes with $q=2$.

##  IV Rotating mimetic black holes in 3D

Now we consider spinning solutions of mimetic gravity in $(2+1)$-dimensions.
We take the spinning metric as

$\displaystyle ds^{2}$ $\displaystyle=$
$\displaystyle-f(r)g^{2}(r)dt^{2}+\frac{dr^{2}}{f(r)}+r^{2}(JN(r)dt+d\varphi^{2})^{2},$
(30)

where functions $f(r)$, $g(r)$ and $N(r)$ are determined by solving the field
equations. Clearly, in the limiting case where the mimetic gravity reduces to
Einstein gravity, one expects to have $g(r)=1$ and $N(r)=-1/2r^{2}$ BTZ1 . The
$(t\phi)$ component of the field equations (7) yields

$\displaystyle
rg(r)N^{\prime\prime}(r)+3g(r)N^{\prime}(r)-rN^{\prime}(r)g^{\prime}(r)=0,$
(31)

which implies $g(r)=r^{3}N^{\prime}(r)$. Combining with $(tt)$ component of
the field equation we arrive at

$\displaystyle l^{2}J^{2}+2l^{2}r^{3}f^{\prime}(r)-4r^{4}=0,$ (32)

with the following solution

$\displaystyle f(r)=-M+\frac{r^{2}}{l^{2}}+\frac{J^{2}}{4r^{2}}.$ (33)

Finally, the $(rr)$ component of the field equations (7) can be solved to give

$\displaystyle N(r)$ $\displaystyle=$
$\displaystyle-\frac{1}{2r^{2}}+\frac{b_{0}}{r^{2}}\sqrt{|l^{2}J^{2}-4Ml^{2}r^{2}+4r^{4}|},$
(34) $\displaystyle g(r)$ $\displaystyle=$ $\displaystyle
r^{3}N^{\prime}(r)=1+\frac{2b_{0}Ml^{2}\left(2r^{2}-\frac{J^{2}}{M}\right)}{\sqrt{|l^{2}J^{2}-4Ml^{2}r^{2}+4r^{4}|}}.$
(35)

One can easily show that these solutions fully satisfy the field equations (7)
and (8). In the limiting case where $b_{0}=0$, the obtained solutions reduce
to the $(2+1)$-dimensional rotating black hole solutions of general relativity
BTZ1 . When $J=0$, they restore the solutions (11) and (12) provided we define
$b=2b_{0}Ml^{2}$. It is a matter of calculations to check that $f(r)$ vanishes
for two values of $r$ given by

$\displaystyle
r_{\pm}=l\sqrt{\frac{M}{2}\left(1\pm\sqrt{1-\frac{J^{2}}{M^{2}l^{2}}}\right)},$
(36)

where $r_{+}$ is the black hole horizon. In order for the solution to describe
a black hole, one must have

$\displaystyle M>0,\ \ \ \ |J|\leq Ml.$ (37)

In the extremal case where $|J|=Ml$, the two roots coincide and we have
$r_{+}=r_{-}=l\sqrt{M/2}$.

The surface of infinite redshift can be given by finding the positive real
roots of the following equation

$\displaystyle\textbf{g}_{tt}(r)=4b_{0}^{2}r^{2}(J^{2}-M^{2}l^{2})+M-2Mb_{0}\sqrt{l^{2}J^{2}-4Ml^{2}r^{2}+4r^{4}}-\frac{r^{2}}{l^{2}}=0,$
(38)

with following solution

$\displaystyle
r_{s}=l{\sqrt{\frac{M(1+2b_{0}lJ)}{1+4b_{0}lJ+4b_{0}^{2}l^{2}(J^{2}-M^{2}l^{2})}}}.$
(39)

Therefore, the solution admits a surface of infinite redshift, similar to the
$(2+1)$-dimensional rotating black hole of general relativity BTZ2  which has
an infinite redshift surface located at $r_{s}=l\sqrt{M}$. In the limiting
case where $b_{0}=0$ the infinite redshift surface coincides with one of
Einstein gravity, while for the extremal case ($|J|=Ml$) the infinite redshift
surface becomes

$\displaystyle
r^{ext}_{s}=l{\sqrt{\frac{M(1+2b_{0}Ml^{2})}{1+4b_{0}Ml^{2}}}}.$ (40)

In general the location of $r^{ext}_{s}$ depends on the value of $b_{0}Ml^{2}$
and it is easy to check that it is located out of horizon, namely
$r^{ext}_{s}>r_{+}$ where $r_{+}=l\sqrt{M/2}$ is the horizon radius of
extremal case.

Next we study the scalar invariants. It is easy to check that as $r\rightarrow
0$, the Ricci and Kretschmann invariants behave as

$\displaystyle\lim_{r\rightarrow
0}R=\frac{2[2b_{0}lJ^{2}+4b_{0}l^{3}M^{2}-3J]}{l^{2}J(1-2b_{0}lJ)},$ (41)
$\displaystyle\lim_{r\rightarrow
0}R_{\mu\nu\rho\sigma}R^{\mu\nu\rho\sigma}=\frac{4\left[3J^{2}(1+4b_{0}^{2}l^{2}J^{2})-16b_{0}^{2}l^{4}M^{2}(J^{2}-M^{2}l^{2})-4b_{0}lJ(J^{2}+2M^{2}l^{2})\right]}{l^{4}J^{2}(1-2b_{0}lJ)^{2}},$
(42)

which have finite values unless for the static case ($J=0$), where both of
them diverge at $r=0$. This is a very interesting result which reveals that in
$(2+1)$-dimensional mimetic gravity, adding the angular momentum $J$ to the
spacetime removes the curvature singularity at $r=0$. Indeed for $J=0$, the
Ricci and Kretschmann invariants reduce to (17) and (18) with replacement
$b=2b_{0}Ml^{2}$ and both of them diverge at $r=0$. On the other hand, in the
asymptotic region where $r\rightarrow\infty$ we have still $R=-6/l^{2}$ and
$R_{\mu\nu\rho\sigma}R^{\mu\nu\rho\sigma}=12/l^{4}$ for rotating solutions
($J\neq 0$), which confirms that the solutions are asymptotically AdS similar
to $(2+1)$-dimensional rotating solutions of general relativity.

Figure 4: The behavior of $f(r)$ for rotating black hole in 3D with different
$M$, where we have taken $l=1$ and $J=2$. Figure 5: The behavior of $g(r)$ for
rotating black hole in 3D with different $J$, where we have taken $l=1$,
$b_{0}=0.5$ and $M=2$. Figure 6: The behavior of $g(r)$ for rotating black
hole in 3D with different $b_{0}$, where we have taken $l=1$, $J=3$ and $M=2$.
Figure 7: The behavior of $N(r)$ for rotating black hole in 3D with different
$J$, where we have taken $l=b_{0}=1$ and $M=2$. Figure 8: The behavior of
$N(r)$ for rotating black hole in 3D with different $b_{0}$, where we have
taken $l=1$, $J=4$ and $M=2$.

Let us remind that for $b_{0}=0$ the curvature invariants have finite values
at the origin for both static and rotating solutions, namely $R=-6/l^{2}$ and
$R_{\mu\nu\rho\sigma}R^{\mu\nu\rho\sigma}=12/l^{4}$ BTZ2 . In mimetic gravity,
however, we observed that while for static solutions they diverge at $r=0$,
but for rotating solution they have finite values at $r=0$. In other words,
imprint of mimetic field to the spacetime structure in mimetic theory of
gravity makes the spacetime singular at the origin $r=0$, while the
combination of angular momentum $J$ and mimetic field remove the curvature
singularity at the origin.

The behavior of the metric functions $f(r)$, $g(r)$ and $N(r)$ for rotating
mimetic black holes in three dimensions are plotted in Figs. 4-8. From Fig. 4,
we see that depending on the metric parameters, our solutions can represent
black hole with one horizon, two horizon or naked singularity. Figs. 5 and 6
reveal that the metric function $g(r)$ tends to a constant value far from the
black hole. The value of this constant depends on $b_{0}$, $M$ and $l$ but
independent of $J$. The intersection of all curves in Fig. 6 is the point in
which $g(r)=1$ which occurs at $r=J/\sqrt{2M}$ independent of $b_{0}$. We have
also depicted the behavior of $N(r)$ in Figs. 7 and 8 where it can be seen
that $N(r)\rightarrow\infty$ as $r\rightarrow 0$, while for large values of
$r$ we have $N(r)\rightarrow 2b_{0}$.

##  V Summary

To sum up, using a scalar mimetic field for isolation the conformal degree of
freedom of the gravitational field in a covariant way, it has been
demonstrated that the scalar field can encode an extra dynamical longitudinal
degree of freedom to the gravitation field which can play the role of mimetic
dark matter even in the absence of particle dark matter Mim1 . In this paper,
we have focused on mimetic gravity in $(2+1)$-dimensional spacetime and
constructed various static and spinning black hole solutions of this theory.
In contrast to the three dimensional solutions of Einstein gravity which has
only causal singularity and scalar invariants are constant everywhere, in
mimetic gravity the spacetime admits a curvature singularity. We confirmed
that both Ricci and Kretschmann curvatures of three dimensional mimetic black
holes diverge at $r=0$ even in the absence of Maxwell field. Interestingly,
when the angular momentum is added to the spacetime, the singularity at $r=0$
disappears and the scalar invariants become constant.

###### Acknowledgements.

I thank Shiraz University Research Council. I am grateful to Max-Planck-
Institute for Gravitational Physics (AEI), where this work written and
completed, for hospitality. This work has been financially supported by the
Research Institute for Astronomy & Astrophysics of Maragha (RIAAM), Iran.

## References

  * (1) S. W. Hawking, M. J. Perry, A. Strominger, Soft Hair on Black Holes, Phys. Rev. Lett. 116, 231301 (2016), [arXiv:1601.00921].
  * (2) The Event Horizon Telescope Collaboration,  ”First M87 Event Horizon Telescope Results. I. The Shadow of the Supermassive Black Hole”. The Astrophys. J. Lett. 875, L1 (2019), [arXiv:1906.11238].
  * (3) H. Afshar, et. al., Soft Heisenberg hair on black holes in three dimensions, Phys. Rev. D 93, 101503 (2016), [arXiv:1603.04824].
  * (4) S. Haco, S. W. Hawking, M. J. Perry, A. Strominger, Black Hole Entropy and Soft Hair, JHEP 12, 098 (2018), [arXiv:1810.01847].
  * (5) S. Haco, M. J. Perry, A. Strominger, Kerr-Newman Black Hole Entropy and Soft Hair,[arXiv:1902.02247].
  * (6) D. Grumiller, et.al., Spacetime Structure near Generic Horizons and Soft Hair, Phys. Rev. Lett. 124, 041601 (2020), [arXiv:1908.09833].
  * (7) M. Ba$\check{n}$ados, C. Teitelboim and J. Zanelli,  Black hole in three-dimensional spacetimes, Phys. Rev. Lett. 69, 1849 (1992), [hep-th/9204099].
  * (8) S. Carlip, The $(2+1)$-dimensional black hole, Class. Quant. Grav. 12, 2853 (1995) [gr-qc/9506079].
  * (9) A. Ashtekar, J. Wisniewski and O. Dreyer, Isolated horizons in $(2+1)$ gravity, Adv. Theor. Math. Phys. 6, 507 (2002) [gr-qc/0206024].
  * (10) T. Sarkar, G. Sengupta and B. Nath Tiwari, On the thermodynamic geometry of BTZ black holes, JHEP 0611, 015 (2006) [hep-th/0606084].
  * (11) E. Witten, Anti-de Sitter space, thermal phase transition and confinement in gauge theories, Adv. Theor. Math. Phys. 2, 505 (1998) [hep-th/9803131].
  * (12) S. Carlip, Conformal field theory, $(2+1)$-dimensional gravity and the BTZ black hole, Class. Quant. Grav. 22, R 85 (2005) [gr-qc/0503022].
  * (13) D. Birmingham, I. Sachs and S.N. Solodukhin, Conformal field theory interpretation of black hole quasi-normal modes, Phys. Rev. Lett. 88, 151301 (2002) [hep-th/0112055].
  * (14) E. Witten, [arXiv:0706.3359].
  * (15) M. Ba$\check{n}$ados, M. Henneaux, C. Teitelboim and J. Zanelli, Geometry of the $2+1$ black hole, Phys. Rev. D 48, 4 (1993).
  * (16) C. Mart$\check{i}$nez, C. Teitelboim and J. Zanelli, Charged rotating black hole in three spacetime dimensions, Phys. Rev. Lett. 61, 104013 (2000).
  * (17) S. Fernando, F. Mansouri, Rotating Charged Solutions to Einstein-Maxwell-ChernSimons Theory in 2+1 Dimensions, Comm. Math. Theor. Phys. 1, 14 (1998), [arXiv:gr-qc/9705016].
  * (18) J. Ren, One-dimensional holographic superconductor from $AdS_{3}$/$CFT_{2}$ correspondence, JHEP 1011 , 055 (2010) [arXiv:1008.3904].
  * (19) Y. Liu, Q. Pan and B. Wang, Holographic superconductor developed in BTZ black hole background with backreactions, Phys. Lett. B 702, 94 (2011) [arXiv:1106.4353].
  * (20) M. Kord Zangeneh, Y. C. Ong and B. Wang, Entanglement entropy and complexity for one-dimensional holographic superconductors, Phys. Lett. B 771, 235 (2017) [arXiv:1704.00557].
  * (21) M. Mohammadi, A. Sheykhi and M. Kord Zangeneh, Analytical and numerical study of backreacting one-dimensional holographic superconductors in the presence of Born-Infeld electrodynamics, Eur. Phys. J. C 78, 654 (2018), [arXiv:1805.07377].
  * (22) B. Binaei Ghotbabadi, M. Kord Zangeneh, A. Sheykhi, One-dimensional backreacting holographic superconductors with exponential nonlinear electrodynamics, Eur. Phys. J. C 78, (2018) 381.
  * (23) G. Panotopoulos and A. Rincon, Greybody factors for a minimally coupled scalar field in three-dimensional Einstein-power-Maxwell black hole background, Phys. Rev. D 97, 085014 (2018) [arXiv:1804.04684].
  * (24) A. Rincon and G. Panotopoulos, Quasinormal modes of scale dependent black holes in (1+2)-dimensional Einstein-power-Maxwell theory, Phys. Rev. D 97, 024027 (2018) [arXiv:1801.03248].
  * (25) G. Clement, Spinning charged BTZ black holes and self dual particle-like solutions, Phys. Lett. B 367, 70 (1996). [arXiv:gr-qc/9510025].
  * (26) S. Carlip, The $(2+1)$-dimensional black hole, Class. Quant. Grav. 12 (1995) 2853 [gr-qc/9506079].
  * (27) S. Nojiri and S.D. Odintsov, Can quantum corrected BTZ black hole anti-evaporate?, Mod. Phys. Lett. A 13, 2695 (1998), [gr-qc/9806034].
  * (28) R. Emparan, G.T. Horowitz and R.C. Myers, Exact description of black holes on branes II: Comparison with BTZ black holes and black strings, JHEP 01, 021 (2000), [hep-th/9912135].
  * (29) M. Cadoni and M.R. Setare, Near-horizon limit of the charged BTZ black hole and $AdS_{2}$ quantum gravity, JHEP 07, 131 (2008) ,[arXiv:0806.2754].
  * (30) J. Parsons and S.F. Ross, Strings in extremal BTZ black holes, JHEP 04, 134 (2009), [arXiv:0901.3044].
  * (31) S.H. Hendi, Asymptotic charged BTZ black hole solutions, JHEP 03, 065 (2012)065, [arXiv:1405.4941].
  * (32) A. Sheykhi, S. H. Hendi, S. Salarpour, Thermodynamic stability of BTZ dilaton black holes, Phys. Scr. 89, 105003 (2014).
  * (33) W. Xu, Exact black hole formation in three dimensions, Phys. Lett. B 738, 472 (2014), [arXiv:1409.3368].
  * (34) D. Grumiller, W. Merbis, Near horizon dynamics of three dimensional black holes, SciPost Phys. 8, 010 (2020), [arXiv:1906.10694].
  * (35) A. H. Chamseddine and V. Mukhanov, Mimetic Dark Matter, JHEP 1311 (2013) 135, [arXiv:1308.5410].
  * (36) A. H. Chamseddine and V. Mukhanov, Resolving Cosmological Singularities, JCAP 03, 009 (2017), [arXiv:1612.05860].
  * (37) A. H. Chamseddine, V. Mukhanov, Nonsingular black hole, Eur. Phys. J. C 77, 183 (2017), [arXiv:1612.05861].
  * (38) A. Casalino, M. Rinaldi, L. Sebastiani, S. Vagnozzi, Mimicking dark matter and dark energy in a mimetic model compatible with GW170817, Phys. Dark Univ. 22, 108 (2018), [arXiv:1803.02620].
  * (39) A. Casalino, M. Rinaldi, L. Sebastiani, S. Vagnozzi, Alive and well: mimetic gravity and a higher-order extension in light of GW170817, Class. Quant. Grav. 36 (2019) 017001, [arXiv:1811.06830].
  * (40) S. Vagnozzi, Recovering a MOND-like acceleration law in mimetic gravity, Class. Quant. Grav. 34, 185006 (2017), [arXiv:1708.00603].
  * (41) A. Sheykhi, G. Saskia, Topological black holes in mimetic gravity, [arXiv:1911.13072].
  * (42) A. H. Chamseddine, V. Mukhanov and A. Vikman, Cosmology with Mimetic Matter, JCAP 1406, 017 (2014), [arXiv:1403.3961].
  * (43) J. Dutta, et. al., Cosmological dynamics of mimetic gravity, JCAP 1802, 041 (2018), [arXiv:1711.07290].
  * (44) M. H. Abbassi, A. Jozani, Anisotropic Mimetic Cosmology, H. R. Sepangi, Phys. Rev. D 97, 123510 (2018), [arXiv:1803.00209].
  * (45) Yi Zhong, Diego Saez-Chillon Gomez, Inflation in mimetic f(G) gravity, Symmetry 10(5), 170 (2018), [arXiv:1805.03467],
  * (46) J. Matsumoto, Unified description of dark energy and dark matter in mimetic matter model, [arXiv:1610.07847].
  * (47) S. Nojiri, S. D. Odintsov, Mimetic $F(R)$ gravity: inflation, dark energy and bounce Mod. Phys. Lett. A 29, no.40, 1450211, [arXiv:1408.3561].
  * (48) S.D. Odintsov, V.K. Oikonomou, Accelerating cosmologies and the phase structure of $F(R)$ gravity with Lagrange multiplier constraints: A mimetic approach, Phys. Rev. D 93, 023517 (2016), [arXiv:1511.04559].
  * (49) S. Nojiri, S. D. Odintsov, V.K. Oikonomou, Mimetic Completion of Unified Inflation-Dark Energy Evolution in Modified Gravity, Phys. Rev. D 94, 104050 (2016), [arXiv:1608.07806].
  * (50) N. Sadeghnezhad, K. Nozari, Braneworld Mimetic Cosmology, Phys. Lett. B 769, 134 (2017), [arXiv:1703.06269].
  * (51) M. A. Gorji, S. Mukohyama, H. Firouzjahi, Cosmology in Mimetic SU(2) Gauge Theory, JCAP 05, 019 (2019), [arXiv:1903.04845].
  * (52) M. A. Gorji, S. Mukohyama, H. Firouzjahi, S. A. Hosseini, Gauge Field Mimetic Cosmology, JCAP 08, 047 (2018) [arXiv:1807.06335].
  * (53) M. B. Lopez, C.-Y. Chen and P. Chen, Primordial Cosmology in Mimetic Born-Infeld Gravity, JCAP 11 (2017) 053, [arXiv:1709.09192].
  * (54) M. A. Gorji, S. A. Hosseini, H. Firouzjahi, Higher Derivative Mimetic Gravity, JCAP 01, 020 (2018), [arXiv:1709.09988].
  * (55) H. Firouzjahi, M. A. Gorji, S. A. Hosseini Mansoori, A. Karami and T. Rostami, Two-field disformal transformation and mimetic cosmology, JCAP 1811, 046 (2018), [arXiv:1806.11472].
  * (56) L. Sebastiani, S. Vagnozzi and R. Myrzakulov, Mimetic Gravity: A Review of Recent Developments and Applications to Cosmology and Astrophysics, Adv. High Energy Phys. 2017, 3156915 (2017).
  * (57) A.H. Chamseddine, V. Mukhanov, T. B. Russ, Asymptotically Free Mimetic Gravity, Eur. Phys. J. C 79, 558 (2019), [arXiv:1905.01343].
  * (58) N. Deruelle and J. Rua, Disformal Transformations,Veiled General Relativity and Mimetic Gravity, JCAP 09, (2014) 002, [arXiv:1407.0825].
  * (59) R. Myrzakulov, L. Sebastiani, Spherically symmetric static vacuum solutions in Mimetic gravity, Gen. Rel. Grav. 47, 89 (2015), [arXiv:1503.04293].
  * (60) R. Myrzakulov, L. Sebastiani, S. Vagnozzi, S. Zerbini, Static spherically symmetric solutions in mimetic gravity, rotation curves and wormholes, Class. Quant. Grav. 33, 125005 (2016), [arXiv:1510.02284].
  * (61) S.D. Odintsov, V.K. Oikonomou, Viable Mimetic F(R) Gravity Compatible with Planck Observations, Annals Phys. 363, 503 (2015), [arXiv:1508.07488].
  * (62) S. Nojiri, S.D. Odintsov, V.K. Oikonomou, Ghost-Free $F(R)$ Gravity with Lagrange Multiplier Constraint, Phys. Lett. B 775, 44 (2017), [arXiv:1710.07838].
  * (63) S.D. Odintsov, V.K. Oikonomou,The reconstruction of $Rf(\phi)$ and mimetic gravity from viable slow-roll inflation, Nucl. Phys. B 929 79 (2018), [arXiv:1801.10529].
  * (64) V.K. Oikonomou, Reissner Nordstrom Black Holes in Mimetic $F(R)$ Gravity, Universe 2, 10 (2016), [arXiv:1511.09117].
  * (65) M. A. Gorji, et.al., Mimetic Black Holes, Phys. Rev. D 101, 124060 (2020), [arXiv:1912.04636].
  * (66) G.G.L. Nashed, W. E Hanafy and K. Bamba, Charged rotating black holes coupled with nonlinear electrodynamics Maxwell field in the mimetic gravity, JCAP 01 (2019) 058, [arXiv:1809.02289].
  * (67) C.Y. Chen, M. Bouhmadi-López, P. Chen, Black hole solutions in mimetic Born-Infeld gravity, Eur. Phys. J. C 78 (2018) 59, [arXiv:1710.10638].
  * (68) G. G. L. Nashed, Spherically symmetric black hole solution in mimetic gravity and anti-evaporation, Int. J. Geom Met. Mod. Phys. Vol.15, No. 09, 1850154 (2018).
  * (69) J. B. Achour, F. Lamy, H. Liu, K. Noui, Non-singular black holes and the Limiting Curvature Mechanism: A Hamiltonian perspective, JCAP 05, 072 (2018), [arXiv:1712.03876].
  * (70) Y. Zheng, L. Shen, Y. Mou, M. Li, On (in)stabilities of perturbations in mimetic models with higher derivatives, DOI: 10.1088/1475-7516/2017/08/040, [arXiv:1704.06834].
  * (71) L. Shen, Y. Zheng, M. Li, Two-field mimetic gravity revisited and Hamiltonian analysis, DOI: 10.1088/1475-7516/2019/12/026, [arXiv:1909.01248].
  * (72) A. Sheykhi, Mimetic black strings, JHEP 07, 031 (2020), [arXiv:2002.11718].