Bimetric 3+1 toolkit for spherical symmetry
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
documentation.h
Go to the documentation of this file.
00001 /** @file       documentation.h
00002  *  @brief      Doxygen documentation for the main page.
00003  *  @mainpage   Bimetric 3+1 Toolkit
00004  *
00005  *  Bimetric 3+1 Toolkit implements the standard 3+1 evolution for
00006  *  spherically symmetric bimetric and GR spacetimes. <p>
00007  *  The project goal is the construction of a computational toolkit for the evolution of
00008  *  3+1 equations of **modified theories of gravity** in spherical symmetry, at the same
00009  *  time resembling the functionality of the EinsteinToolkit to ease transition to the
00010  *  full scale projects. The current implementation handles bimetric and GR spacetimes.
00011  *
00012  *  Note that the toolkit can handle *any* system of differential equations.
00013  *  For a pedagogical example how to use the toolkit, see
00014  *  <a href="http://qft.nu/_private_gowdy">Gowdy spacetimes solver</a>.
00015  *
00016  *  @version    0.28, inception 2018-04-23, last modified **2018-09-18 09:05**
00017  *  @author     Mikica Kocic
00018  *
00019  *  @par Source code:
00020  *  <a href="bimetric-ss.zip" target="_blank">bimetric-ss.zip</a><br>
00021  *  A3 overview: <a href="bimetric-ss-in-3+1-overview.pdf">Bimetric equations
00022  *  in standard 3+1 form in spherical symmetry</a><br>
00023  *
00024  *  @par Main file:
00025  *  bim-solver.cpp, see also @ref modList
00026  *
00027  *  @note The 3+1 decomposition is based on @cite Kocic:2018ddp.
00028  *  The numerical algorithms are based on
00029  *  @cite Press:2007nrec, @cite Baumgarte:2010nr, and @cite Shibata:2015nr.
00030  *
00031  *  <br> <!-- ----------------------------------------------------------------------- -->
00032  *  ## Example simulation <a href="example.html">(dust collapse testbed)</a> ##
00033  *
00034  *  @htmlonly
00035  *  <div width="100%" style="background:white;"><iframe width="512" height="514"
00036  *  style="margin-left:100px;border: 1px solid gray; padding: 2px;
00037  *  border-radius: 5px; box-shadow: 1px 2px 5px 2px #888888;"
00038  *  src="https://www.youtube.com/embed/fenVNgHxnK4?rel=0&cc_load_policy=1"
00039  *  frameborder="0" allowfullscreen></iframe></span> </div>
00040  *  @endhtmlonly
00041  *
00042  *  The simulation is compliant with the results of @cite Nakamura:1980.
00043  *
00044  *  <br> <!-- ----------------------------------------------------------------------- -->
00045  *  - - -
00046  *  # Main Features #
00047  *  @copydoc features
00048  *
00049  *  - - -
00050  *  # Implementation details #
00051  *  @copydoc details
00052  *
00053  *  <br> <!-- ----------------------------------------------------------------------- -->
00054  *  - - -
00055  *  # Compiling the code #
00056  *
00057  *  The code can use OpenMP for almost all parallel loops on the spatial grid.
00058  *  These loops are indicated by `OMP_parallel_for`, which expands to:
00059  *  @code
00060  *     _Pragma("omp parallel for")   i.e., into: #pragma omp parallel for
00061  *  @endcode
00062  *
00063  *  To compile with enabled parallelism, use the `-fopenmp` switch:
00064  *  @code
00065  *     g++ -Wall -m64 -std=c++14 -O3 -fopenmp bim-solver.cpp -o bim-solver
00066  *  @endcode
00067  *
00068  *  The code can also be compiled to be executed on a cluster with the MPI support.
00069  *  To compile, use the `mpic++` compiler with the `-D_USEMPI` switch:
00070  *  @code
00071  *     mpic++  -D_USEMPI  -Wall -m64 ...
00072  *  @endcode
00073  *
00074  *  Then use `mpiexec` to run the resulting executable on a cluster.
00075  *
00076  *  @warning The maximal slicing is not compliant with MPI since the boundary value
00077  *  problem for the slicing differential equation requires access to the whole grid!
00078  *
00079  *  <br> <!-- ----------------------------------------------------------------------- -->
00080  *  - - -
00081  *  # References #
00082  *  @copydoc citelist
00083  *
00084  *  <br> <!-- ----------------------------------------------------------------------- -->
00085  *  @copyright  GNU General Public License (GPLv3).
00086  *
00087  *  @page example Testbed: GR dust collapse
00088  *
00089  *  The reference simulation is a dust collapse in GR. The initial conditions come from
00090  *  @cite Nakamura:1980. The initial rest-mass density profile is given in Figure 1 below.
00091  *  The slicing represented by the proper time of the Eulerian observer is given in
00092  *  Figure 2. The time variation of the radius of each Lagrange shell with the emergence
00093  *  of the apparent horizon is given in Figure 3 (cf. Fig. 4 in @cite Nakamura:1980).
00094  *
00095  *  - - -
00096  *  @image html fig-1.png "Figure 1."
00097  *         The initial rest-mass density profile of the dust.
00098  *  - - -
00099  *  @image html fig-2.png "Figure 2."
00100  *         The slicing represented by the proper time of the Eulerian observer.
00101  *         The collapse of the lapse before reaching the singularity is clearly visible.
00102  *  - - -
00103  *  @image html fig-3.png "Figure 3."
00104  *         The time variation of the radius of each Lagrange shell (solid lines).
00105  *         The dashed line shows the apparent horizon.
00106  *  - - -
00107  *  The animation of Figure 3 is shown below:
00108  *
00109  *  @htmlonly
00110  *  <div width="100%" style="background:white" align="center"><iframe width="512"
00111  *  height="514" style="margin-left:0;border: 1px solid gray; padding: 2px;
00112  *  border-radius: 5px; box-shadow: 1px 2px 5px 2px #888888;"
00113  *  src="https://www.youtube.com/embed/fenVNgHxnK4?rel=0&cc_load_policy=1"
00114  *  frameborder="0" allowfullscreen></iframe></span> </div><br>&nbsp;
00115  *  @endhtmlonly
00116  *
00117  *  @page example2 Bimetric dust collapse
00118  *
00119  *  Adding the second metric to the GR dust solution introduces a system of coupled ODE
00120  *  governing two conformal factors of two metrics. In such a case, the ODE for the
00121  *  initial data becomes:
00122  *  - - -
00123  *  @image html eq-1.png
00124  *  - - -
00125  *  Here we demanded that the matter distribution profile is the same as in GR case.
00126  *  This is a generalized
00127  *  <a href="https://en.wikipedia.org/wiki/Lane-Emden_equation">Lane-Emden</a>
00128  *  equation. In GR, the Lane-Emden equation occurs in the case of a polytropic fluid
00129  *  (which is a special case in the above equation for a fixed beta model).
00130  *  Hence, adding a second metric makes a pressureless fluid in one sector to appear
00131  *  as the influence of a nontrivial polytropic fluid on both metrics.
00132  *
00133  *  An example of the initial conditions is given in Figure 4.
00134  *  - - -
00135  *  @image html fig-4.png "Figure 4."
00136  *  - - -
00137  *  In Figure 4, the testbed GR initial conditions are shown in magenta for
00138  *  comparison. The bimetric initial conditions are depicted in blue/red and appear
00139  *  as a wavy departure from GR. The evolution is under development :)
00140  *  - - -
00141  *  @image html fig-5.png "Figure 5."
00142  *  - - -
00143  *
00144  *  @page features  Main Features
00145  *
00146  *  ## Formalism ##
00147  *
00148  *  - Bimetric equations in standard 3+1 form
00149  *    (with the evolution of p and the explicit bimetric lapse ratio).
00150  *
00151  *  - Matter equations for the perfect fluid in conservative form.
00152  *
00153  *  - Equations regularized for spherical symmetry.
00154  *
00155  *  ## Gauge setup ##
00156  *
00157  *  - Lapse:
00158  *    * Maximal slicing (boundary value problem at each slice, see maximalSlice.h).
00159  *    * Bona-Massó slicing condition and the K-driver (evolution).
00160  *    * Algebraic slicing (normal coordinates, and (1+erf)^{-2}).
00161  *
00162  *  - Shift:
00163  *    * Planned: Minimal distortion and Gamma-driver.
00164  *
00165  *  ## Boundary conditions ##
00166  *
00167  *  - Imposed parity conditions for local flattness at `r = 0` (on the inner boundary).
00168  *
00169  *  - Extrapolation (linear 2nd, or 4th order) or
00170  *    Sommerfeld outgoing wave radiative condition on the outer boundary.
00171  *
00172  *  ## Spatial discretization ##
00173  *
00174  *  - 2nd, 4th, or 6th order centered differences on a staggered grid
00175  *    (see finiteDifferences.h).
00176  *
00177  *  - Planned: Upwind differences on shift advection terms.
00178  *
00179  *  ## Temporal discretization ##
00180  *
00181  *  - Method of Lines:
00182  *    * Runge-Kutta: 2, 3, and 4 steps
00183  *    * Iterated Crank-Nicolson (ICN): 2 and 3 steps
00184  *    * Averaged ICN: 2 and 3 steps
00185  *    * Generic N-step algorithm with arbitrary coefficients (see methodOfLines.h)
00186  *
00187  *  - Kreiss-Oliger dissipation (2nd and 4th order) in all of the evolution equations.
00188  *
00189  *  - Courant-Friedrichs-Lewy factor (CFL) 0.5 as default.
00190  *
00191  *  ## Grid-driver code ##
00192  *
00193  *  - Uniform spatial grid (see gridDriver.h).
00194  *
00195  *  ## Numerics ##
00196  *
00197  *  - Implemented classes: Matrix, Vector, BandLUDecomposition (band-diagonal matrix
00198  *    LU decomposition with Crout factorization), CubicSpline (normal cubic spline
00199  *    interpolation), arbirary FD extrapolation, and arbitrary FD derivatives.
00200  *
00201  *  - 64-bit and 128-bit floating point
00202  *
00203  *  - C++ code with OpenMP and MPI support adapted for high-performance computing.
00204  *
00205  *  - Planned: Transition to Cactus
00206  *
00207  *  ## Horizons ##
00208  *
00209  *  - Apparent horizon finder.
00210  *
00211  *  ## Initial Data ##
00212  *
00213  *  - Minkowski GR (opt. with a gauge wave)
00214  *
00215  *  - Bimetric Minkowski (opt. with a gauge wave)
00216  *
00217  *  - GR collisionless matter (dust) with Gaussian profile (as the main testbed).
00218  *
00219  *  - Bimetric Gaussian dust with a "polytropic" conformally flat g and f.
00220  *
00221  *  <br> <!-- ----------------------------------------------------------------------- -->
00222  *  @page details Implementation Details
00223  *
00224  *  ## Main Class ##
00225  *
00226  *   @li BimetricEvolve: Encapsulates a 3+1 evolution solver for bimetric spacetimes.
00227  *
00228  *  <br> <!-- ----------------------------------------------------------------------- -->
00229  *  ## Modules across the source files ##
00230  *  @copydoc modList
00231  *  <br> <!-- ----------------------------------------------------------------------- -->
00232  *  ## Data Flow ##
00233  *  @copydoc dataFlow
00234  *  <br> <!-- ----------------------------------------------------------------------- -->
00235  *  - - -
00236  *  # Finite Difference Approximation #
00237  *  @copydoc fdm
00238  *
00239  *  @page modList  Module and File Overview
00240  *
00241  *  <pre style="margin-left:30px;">
00242  *     +-------------------------------------------------------+    +-----------------+
00243  *     |                  Bimetric Evolution                   |    |  Bimetric Model |
00244  *     +-------------------------------------------------------+    +-----------------+
00245  *     | bim-solver.cpp   eomEvolution.h    eomGauge.h         |    | bimetricModel.h |
00246  *     | maximalSlice.h   eomMatter.h       eomLapseRatios.h   |    +-----------------+
00247  *     |                  eomSources.h      eomMiscEquations.h |
00248  *     |                  eomConstraints.h                     |
00249  *     +-------------------------------------------------------+
00250  *  &nbsp;
00251  *  +-----------------+   +-------------------+   +----------------+   +---------------+
00252  *  |   Grid Driver   |   |   Initial Data    |   | MoL Integrator |   |  Output Data  |
00253  *  +-----------------+   +-------------------+   +----------------+   +---------------+
00254  *  | gridDriver.h    |   | gridInitialData.h |   |  integrator.h  |   | gridOutput.h  |
00255  *  | gridFunctions.h |   +-------------------+   +----------------+   +---------------+
00256  *  +-----------------+
00257  *         +---------------------+      +--------------+      +-----------------+
00258  *         |  Numerical Methods  |      |  Data Types  |      |    Utilities    |
00259  *         +---------------------+      +--------------+      +-----------------+
00260  *         | finiteDifferences.h |      | matrix.h     |      | trackUsedTime.h |
00261  *         | methodOfLines.h     |      | dataTypes.h  |      | mpiWorld.h      |
00262  *         | cubicSpline.h       |      +--------------+      | mpiDummyWorld.h |
00263  *         | bandSol.h           |                            | paramsHolder.h  |
00264  *         +---------------------+                            | slog.h          |
00265  *                                                            +-----------------+ </pre>
00266  *
00267  *  @page dataFlow  Data Flow
00268  *
00269  *  <pre style="margin-left:30px;">
00270  *  +---------------------------------+              +----------------------------+
00271  *  | Mathematica Notebook            |------------>>| Initial Data & Parameters  |
00272  *  | bimetric-ss-in-3+1 (cpp solver) |  Solve the   |  input.dat  (initial data) |
00273  *  +---------------------------------+  constraint  |  config.ini (parameters)   |
00274  *            |   Export the             equations   +----------------------------+
00275  *            |   C++ code                                         |
00276  *            V                                                    V
00277  *  +---------------------------------+  eom-std.h   +----------------------------+
00278  *  | eomEvolution.h eomMatter.h      |------------>>|       bim-solver.cpp       |
00279  *  | eomSources.h   eomConstraints.h |              +----------------------------+
00280  *  | eomGauge.h     eomLapseRatios.h |                            |
00281  *  | eomMiscEquations.h              |                            V
00282  *  +---------------------------------+              +----------------------------+
00283  *                                                   |         output.dat         |
00284  *     See also:  maximalSlice.h                     +----------------------------+
00285  *     &nbsp;
00286  *     Numerics:  methodOfLines.h, finiteDifferences.h,
00287  *                dataTypes.h, matrix.h, bandSol.h, cubicSpline.h  </pre>
00288  *
00289  *  <br> <!-- ----------------------------------------------------------------------- -->
00290  *  ## Regularization of spherically symmetric evolution codes ##
00291  *
00292  *  - The equations are regularized according to:
00293  *    @cite Alcubierre:2004gn, @cite Alcubierre:2010is,
00294  *    @cite Baumgarte:2013,  @cite CorderoCarrion:2012ic,
00295  *    @cite Mewes:2018szi, @cite Ruchlin:2017com, and @cite Ruiz:2007rs.
00296  *
00297  *  - A nice overview of the parity conditions at `r = 0` can be found in
00298  *    @cite Ruiz:2007rs.
00299  *
00300  *  - Also, parity conditions for components of vectors and tensors can be found in
00301  *    Table 1 in @cite Baumgarte:2013.
00302  *
00303  */