Structures, Compile and Run (COSMOS) - cmyoo/cosmos GitHub Wiki

Structure

  • Main file:

    • "cosmos.cpp"
  • Header file:

    • "cosmos.h": main header file
    • "ahf2d.h": header file for the apparent horizon finder
  • Definitions:

    • "cosmos_bssn.cpp": calculation of r.h.s of evolution equations and flux terms
    • "cosmos_initial.cpp": initial conditions and settings
    • "cosmos_output.cpp": output functions
    • "cosmos_boundary.cpp": boundary conditions
    • "cosmos_ahf.cpp": apparent horizon finder
    • "cosmos_ipol.cpp": interpolation functions with Lagrange interpolation
    • "cosmos_fluid.cpp": functions for fluid treatment
    • "cosmos_fmr.cpp": higher layer treatment for the mesh refinement
  • Makefile:

    • "makefile"
  • Parameter files:

    • "par_ini.d": main parameter setting
    • "par_fmr.d": mesh-refinement parameter setting
    • "par_ahf.d": apparent horizon finder parameter setting

Compile and run

  • Compile: make
    Choose a compiler by changing the makefile.

  • OpenMP: export OMP_NUM_THREADS=#
    Set the number of threads you use.

  • Execute: ./cosmos

Terminal output

In the default setting, the following outputs appear in the standard (terminal) output at each time step.

time=7.0000308668e+01 step=1
alp=3.3620212440e-02 -ek=2.1317359352e-02
ham=1.5352069444e-03 hammax=1.1557961038e-01  (j,k,l)=(-8,0,0) r=2.2222222222e-01
mom=2.1504619173e-04 mommax=5.3544768678e-03  (j,k,l)=(8,5,5) r=2.9658550700e-01
layer number=1
ham=1.8807091866e-02 hammax=1.5650618888e-01  (j,k,l)=(13,0,0) r=1.8055555556e-01 
mom=3.9449193631e-03 mommax=1.2160541116e-02  (j,k,l)=(8,0,0) r=1.1111111111e-01
layer number=2
ham=2.1463173301e-02 hammax=1.9762474249e-01  (j,k,l)=(15,0,0) r=1.0416666667e-01 
mom=8.6711572948e-03 mommax=3.7023369072e-02  (j,k,l)=(0,6,0) r=4.1666666667e-02
  • "time": coordinate time at the output
  • "alp": value of the lapse function at the origin
  • "ham"/"mom": mean value of the Hamiltonian/momentum constraint violation
  • "hammax"/"mommax": maximum value of the Hamiltonian/momentum constraint violation
  • "(j,k,l)": grid numbers at which the maximum constraint violation is recorded
  • "r": coordinate radial distance to the grid point of (j,k,l)

One can check the constraint violation at each time step for each mesh refinement layer.

Files expected to be generated

  • "out_AHfig.dat": Shape of the apparent horizon
  • "out_AH.dat": Time evolution of geometrical variables of the apparent horizon
  • "out_jkz.dat": Variables on $z$-axis as functions of $z$
  • "out_jyl.dat": Variables on $y$-axis as functions of $y$
  • "out_xkl.dat": Variables on $x$-axis as functions of $x$
  • "out_xyl.dat": Variables on $xy$-plane as functions of $x$ and $y$
  • "out_xkz.dat": Variables on $xz$-plane as functions of $x$ and $z$
  • "out_const.dat": Time evolution of constraint violations
  • "out_all.dat": Data file that can be used as an initial data file to continue the time evolution
  • (Only for examples) "out_diff.dat": The differences from the expected values listed in "exp_jkz.dat".