Skip to content

Commit

Permalink
Fixed the 2LPT bug (#20)
Browse files Browse the repository at this point in the history
* bug fixed

* Improved stability of 'tauX' and 'Mass_limit' calculation

* Conflict fixed

* (1) Added function to compute the volume filling factor Q, (2) Added python script to generate a summary plot which are a lightcone slice, the brightness temperature and the power spectrum at k=0.1Mpc^-1 (3) Improved stability of 'tauX' and 'Mass_limit' calculation and (4) Updated Out-of-box-Output

* Updated 'HII_ROUND_ERR' to avoid discontinuous of the redshift evolution in PS

* Replaced the function 'Mass_limit_bisection' with a simple analytic form, and fixed the interpolation in high density region for the SFRD calculation.

* Fixed bug when using 'SUBCELL_RSD' without 'USE_TS_IN_21CM' in delta_T.c.

* Updated to support 'USE_HALO_FIELD' when using the new parametrization.

* Fixed 2LPT bug

* Fixed 2LPT bug
  • Loading branch information
jaehongpark00 authored and andreimesinger committed Oct 18, 2019
1 parent 3460dbe commit fd2d4f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Programs/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,6 @@ int main(int argc, char ** argv){
*((float *)box + R_FFT_INDEX((unsigned long long)(i),(unsigned long long)(j),(unsigned long long)(k)) ) -= ( *((float *)(phi_1[PHI_INDEX(l, m)]) + R_FFT_INDEX((unsigned long long)(i),(unsigned long long) (j),(unsigned long long)(k) ) ) ) * ( *((float *)(phi_1[PHI_INDEX(l, m)]) + R_FFT_INDEX((unsigned long long)(i),(unsigned long long)(j),(unsigned long long)(k) )) );
//box[R_FFT_INDEX(i,j,k)] -= phi_1[PHI_INDEX(l, m)][R_FFT_INDEX(i,j,k)] * phi_1[PHI_INDEX(l, m)][R_FFT_INDEX(i,j,k)];
//fprintf(stderr, "%.2e ", *((float *)box + R_FFT_INDEX((unsigned long long)(i),(unsigned long long)(j),(unsigned long long)(k)) ) );
*((float *)box + R_FFT_INDEX((unsigned long long)(i),(unsigned long long)(j),(unsigned long long)(k)) ) /= TOT_NUM_PIXELS;

// smoothed_box[HII_R_INDEX(i,j,k)] =
// *((float *)box + R_FFT_INDEX((unsigned long long)(i*f_pixel_factor+0.5),
Expand All @@ -643,6 +642,7 @@ int main(int argc, char ** argv){
}
}
//fprintf(stderr, "\n");
*((float *)box + R_FFT_INDEX((unsigned long long)(i),(unsigned long long)(j),(unsigned long long)(k)) ) /= TOT_NUM_PIXELS;
}
}
}
Expand Down

0 comments on commit fd2d4f0

Please sign in to comment.