The optimization of particle calculations in 2 and 3 dimensions

A 2-dimensional plasma simulation code, GALAXY, has been developed for the Culham KDF 9 computer to test a number of programming techniques. By treating the coordinates, velocities and accelerations as integers, packing both components in one word, solving the equation of motion in vector form, and coding in optimized assembly language, a factor 2 in storage and a considerable increase in execution speed can be obtained. A triple-buffer technique is used in conjunction with two simultaneous tape transfers on separate channels, in order to make the computer behave as though it had a core store of infinite size, and thus allow a sufficiently large number of particles to be handled on a 32K machine. Coding and timing details are given. Similar techniques are practicable in 3 dimensions, and would enable realistic 3-dimensional plasma calculations to be carried out on existing large computers, but careful consideration must be given to the optimum choice of word length, and to the provision of massive fast backing storage.