SPARTA WWW Site - SPARTA Documentation - SPARTA Commands

fix grid/check command


fix ID grid/check N outflag 


fix 1 grid/check 100 error 


Check if particles are inside the grid cell they are supposed to be, based on their current coordinates. This is useful as a debugging check to insure that no particles have been assigned to the incorrect grid cell during the particle move stage of the SPARTA timestepping algorithm.

The check is performed once every N timesteps. Particles not inside the correct grid cell are counted and the value of the count can be monitored (see below). A value of 0 is "correct", meaning that no particle was found outside its assigned grid cell.

If the outflag setting is error, SPARTA will print an error and stop if it finds a particle in an incorrect grid cell. For warn, it will print a warning message and continue. For silent, it will print no message, but the count of such occurrences can be monitored as described below, e.g. by outputting the value with the stats command.

Restart, output info:

No information about this fix is written to binary restart files.

This fix computes a global scalar which can be accessed by various output commands. The scalar is the count of how many particles were not in the correct grid cell. The count is cummulative over all the timesteps the check was performed since the start of the run. It is initialized to zero each time a run is performed.

Restrictions: none

Related commands: none

Default: none