Doxygen Generated Documentation From Interface Source Code
Particles_computeDt.F90 File Reference

Go to the source code of this file.


subroutine Particles_computeDt (blockID, dt_part, dt_minloc)

Function/Subroutine Documentation

◆ Particles_computeDt()

subroutine Particles_computeDt ( integer  blockID,
real  dt_part,
integer, dimension(5)  dt_minloc 

Timestep computation routine for the particle unit. This routine sets the timestep by requiring that particles travel no more than some fraction pt_dtFactor during a single step. Even for time integration schemes that can deal with pt_dtFactor > 1, you should not set pt_dtFactor to be larger than half the number of guard cells. Otherwise particles that leave the block that "owns" them may overshoot the block's immediate neighbors, causing problems when particle data are transmitted to the neighbors.

blockID: local block ID

dt_part: variable to hold timestep constraint dt_minloc(5): array to hold limiting zone info: index[1-3] are zone indices (i,j,k); index[4]=block ID; index[5]=processor number. The zone indices indicate the zone containing the particle whose velocity restricted the timestep.


pt_dtFactor: REAL [default 0.5] A factor multiplying dx/|v| to limit the movement of particles outside a single block.


Note that this routine does NOT calculate a timestep limitation based on the theoretical stability limits of the time integration routines. It SHOULD, but these limits were deemed to be unlikely to be restrictive based on the high velocities involved in normal astronomical simulations.

Definition at line 53 of file Particles_computeDt.F90.