 __device__ void compressible_fluxes(float * q, float * f, bool x_dir,
                          float * gamma_up, float alpha, float * beta,
                          float gamma) {
-    // calculate the flux vector of the compressible GR hydrodynamics equations
+    /*
+    Calculate the flux vector of the compressible GR hydrodynamics equations
+
+    Parameters
+    ----------
+    q : float *
+        state vector
+    f : float *
+        grid where fluxes shall be stored
+    x_dir : bool
+        true if calculating flux in x-direction, false if in y_direction
+    gamma_up : float *
+        spatial metric
+    alpha : float
+        lapse function
+    beta : float *
+        shift vector
+    gamma : float
+        adiabatic index
+    */
 
     // this is worked out on the fine grid
     float * q_prim;

                    int * matching_indices,
                    float rho, float gamma, float * gamma_up,
                    int ng, int rank, float * qf_swe) {

    int kx_offset = 0;
    int ky_offset = (kernels[0].y * blocks[0].y * threads[0].y - 2*ng) * rank;

                    int nx, int ny, int nxf, int nyf, float dx, float dy,
                    int * matching_indices_d,
                    int kx_offset, int ky_offset) {
    /*
    Reconstruct fine grid variables from compressible variables on coarse grid

    Parameters
    ----------
    q_comp : float *
        compressible variables on coarse grid
    q_f : float *
        fine grid state vector
    nx, ny : int
        coarse grid dimensions
    nxf, nyf : int
        fine grid dimensions
    dx, dy : float
        coarse grid spacings
    matching_indices_d : int *
        position of fine grid wrt coarse grid
    kx_offset, ky_offset : int
        kernel offsets in the x and y directions
    */

    int x = kx_offset + blockIdx.x * blockDim.x + threadIdx.x;
    int y = ky_offset + blockIdx.y * blockDim.y + threadIdx.y;
