next up previous
Next: Initial conditions: CDM and Up: PM Code Previous: Scheme of integration

Format of data

In order to have the best possible resolution, most of the available computer memory is allocated to the density/potential grid. The Poisson solver is organized in such a way that only one large mesh is needed. Particle coordinates and velocities are kept on disk and are read into memory in large portions when necessary. This reading/writing of particles results in a small overhead - typically 5-10% of the total cpu time. If this overhead is an issue, the code can be easily adjusted to keep all particles in memory. This is always the case for a parallel version of the code. Particles are divided into ``species'' with constant mass of a particle for each species. Each species is kept in a separate file. Information which describes the run (such as the number of particles, omegas, and current time) is written in a separate header file.

Each file with particle data is a FORTRAN direct-access file with the number of records equal to the number of particles in one direction Nrow . Each record has coordinates and velocities for a ``page'' of particles Npage = Nrow2. The ``page'' of particles is read into a common block, which has the structure: X(Npage),Y(Npage),Z(Npage),Vx(Npage),Vy(Npage),Vz(Npage) The particle files and the header file are needed for continuation of the run or for the data analysis. The following diagram shows the structure and names of the data files:


\begin{figure}
\begin{tabular}
{llll}
C3CRD.DAT& Header& & Text-of-Header,~$a$,~...
 ...he file\\ \multicolumn{3}{c}{Not a part of the file}\\ \end{tabular}\end{figure}

Thus, the memory required to run the code is about Ngrid3 + 6Nrow2 memory words or 64Mb (Ngrid/256)3 +0.375Mb (Nrow/128)2 if single precision arithmetic is used. The total amount of disk space is 48Mb (Nrow/128)3 per each set of ``species''.


next up previous
Next: Initial conditions: CDM and Up: PM Code Previous: Scheme of integration
Jon Holtzman
12/9/1997