A particle-in-cell calculation code was made to simulate the operation of an inertial electrostatic confinement (IEC) fusion device. The computation includes the effects of ionization by electron impact. Several techniques to save computational time are introduced in this program code. One of them is time-dependent fine space meshes used in the regions where the particles concentrate. Several superparticles that have similar radial position as well as similar energy are merged, while one superparticle is divided into several particles with a somewhat different velocity when the total number of superparticles decreases. The methods enable more precise determination of the characteristics of an IEC device in a shorter time than by previous methods.