N-GenIC

From: Agarwal, Shankar <sagarwal_at_ku.edu>
Date: Wed, 1 Aug 2012 18:21:22 +0000

Hi,

While generating ICs with N-GenIC, the boxsize needs to be set in Mpc/h or Kpc/h ?

I reproduce below, the make_glass.pro file.

Thanks
Shankar

---------------------------------------
fout = "dummy_glass.dat"
N = 16L
Ntot = N * N * N

npart=lonarr(6)
massarr=dblarr(6)
time=0.0D
redshift=0.0D
flag_sfr=0L
flag_feedback=0L
npartall=lonarr(6)
flag_cooling= 0L
num_files= 1L
BoxSize = 0.0D

bytesleft=120
la=intarr(bytesleft/2)

BoxSize = 100.0D
npart(1) = Ntot
npartall(1) = Ntot

pos= fltarr(3, Ntot)

for i=0L, N-1 do begin
  for j=0L, N-1 do begin
    for k=0L, N-1 do begin
      pos(0, (i*N+j)*N+k) = (i+0.0)/N * BoxSize
      pos(1, (i*N+j)*N+k) = (j+0.0)/N * BoxSize
      pos(2, (i*N+j)*N+k) = (k+0.0)/N * BoxSize
    endfor
  endfor
endfor

openw,1,fout,/f77_unformatted
writeu,1, npart,massarr,time,redshift,flag_sfr,flag_feedback,npartall,flag_cooling,num_files,BoxSize,la
writeu,1, pos
close,1

end
Received on 2012-08-01 20:21:30

This archive was generated by hypermail 2.3.0 : 2023-01-10 10:01:31 CET