next up previous contents
Next: Other Code Parameters Up: Common Block Variables and Previous: Common Block Variables and   Contents

Common Block Parameters in spha.h

In the file spha.h, you must define the following parameters prior to compiling the code:
NPROCS:
Set this equal to the number of processors on which you will tell the code to run. It is often best of this number as a power of two, since it affects the FFT.
NMAX:
Set this number equal to or larger than the number of particles you will use. It is used to allocate the sizes of the vectors defined for particle quantities.
NMAXP:
This is determined from the code by the equation NMAXP= $({\tt NMAX}-1)$/ ${\tt NPROCS}+1$. It represents the number of particles stored on each processor, and is used to set the size of the arrays containing the neighbor lists.
NNMAX:
This is the maximum allowed number of neighbors. It is used to allocate the size of the neighbor arrays. Make sure t is $\sim 2\times$ greater than the optimal number of neighbors in sph.input.
NTAB:
This is the size of the vector which stores the tabulated values for the smoothing kernel function.
CN:
We multiply the minimum timestep by this factor, to ensure the stability of the evolution. We have found ${\tt CN}=0.6$ to be appropriate.
PI:
This one is obvious!
NGRAV:
The size of the data portion of the gravity grid, in each dimension.
NNGRAV:
Defined as $2\times{\tt NGRAV}$, it is the actual size in each dimension of the gravity grid.
N1GRAV, NNP:
Defined as ${\tt NGRAV}+1$ and ${\tt NNGRAV}/{\tt NPROCS}$, respectively, these are needed as array sizes in the gravity routines.


next up previous contents
Next: Other Code Parameters Up: Common Block Variables and Previous: Common Block Variables and   Contents
Joshua Faber 2003-06-28