Evolution of a single mode perturbation - cmyoo/cosmos GitHub Wiki

Here we will only describe how to perform test calculations and how to check them.
We will not go into the details of the setup here, so please refer to the following PDF file in the source directory.: sample_pert.pdf.
The main differences from the original source files in this sample code are described in diff_sample_pert.pdf

How to compile and run

  1. Check if your computer meets the required system environments.
  2. Download the source code and move to the "cosmos/source/sample_pert" directory.
  3. (If needed) Appropriately edit the "makefile".
  4. Compile it by "make".
  5. (If needed) Set the number of threads you use by "export OMP_NUM_THREADS=#".
  6. Run it by "./cosmos".

How to check the result

  • Check the files expected to be generated.

  • Check the contents of the file "out_diff.dat".
    The values show the differences from the expected values listed in "exp_xkl.dat".
    The values are expected to be less than $\sim 10^{-10}$.
    (Most of the values are expected to be at a level of machine precision.
    But values of constraint violations, such as "ham", "hamn", "nM_z", and "M_z", may be slightly larger due to cancellation errors).

  • Plot the profile of $\kappa$ (see sample_pert.pdf for the definition) by using the 1st ($x$ coordinate values) and 22nd (the values of the trace of the extrinsic curvature) columns in "out_xkl.dat". The gnuplot command to get Fig. 1 in sample_pert.pdf is the following.
    set style line 1 linetype 1 linewidth 3.00
    set style line 2 linetype 1 dt (5,5) linewidth 3.00
    set style line 3 linetype 2 linewidth 3.00
    set style line 4 linetype 2 dt (5,5) linewidth 3.00
    set style line 5 linetype 3 linewidth 3.00
    set style line 6 linetype 3 dt (5,5) linewidth 3.00
    set style line 7 linetype 4 linewidth 3.00
    set style line 8 linetype 4 dt (5,5) linewidth 3.00
    Amp=-0.01
    t0=0.25
    kt0=0.178126451216426
    t3=0.50058431
    kt3=0.340595670531306
    t5=0.75058431
    kt5=0.48763119746048
    t7=1.00058431
    kt7=0.620563702726348
    g(x)=2.+cos(pi*x)
    plot "out_xkl.dat" ind 0 usi 1:(-($22)/1.5*(t0)-1.) ti "initial:$t=0.25000000L$" with l ls 1,\
    (kt0*Amp*g(x)) ti "" with l ls 2,\
    "out_xkl.dat" ind 1 usi 1:(-($22)/1.5*(t3)-1.) ti "$t=0.50058431L$" with l ls 3,\
    (kt3*Amp*g(x)) ti "" with l ls 4,\
    "out_xkl.dat" ind 2 usi 1:(-($22)/1.5*(t5)-1.) ti "$t=0.75058431L$" with l ls 5,\
    (kt5*Amp*g(x)) ti "" with l ls 6,\
    "out_xkl.dat" ind 3 usi 1:(-($22)/1.5*(t7)-1.) ti "$t=1.00058431L$" with l ls 7,\
    (kt7*Amp*g(x)) ti "" with l ls 8