Negative Time Step

From: David Riethmiller <>
Date: Fri, 28 Jun 2013 01:01:58 -0400

Hi Gadget users -

I'm running an SPH gas-only simulation within a static potential.
I've implemented a module that adds more gas particles to the
simulation after a set time is reached and certain conditions within
the gas are met.

I'm finding that the addition of gas particles is causing a negative
value for the system time step. I know it's not an MPI issue, since I
get the same behavior on a single processor. I think it's likely that
I'm forgetting to update something, or I'm calling the routine from a
disadvantageous place in the code, but I can't figure it out.

My gas addition routine is called immediately before
find_next_sync_point_and_drift() in run.c. The key steps are:

1) Check to see if physical conditions are met for gas addition.
2) Create new gas particles (assigning P and SphP tags) on processor
0, incrementing NumPart, N_gas, All.TotNumPart, and All.TotN_gas.
3) MPI_Bcast the new values of All.TotNumPart and All.TotN_gas from
processor 0.
4) Restore the correct ordering of particle types, i.e., block of gas
particles first, etc. (In addition to gas, there is one star particle
representing a black hole.)
5) Force an update to the tree via
        All.NumForcesSinceLastDomainDecomp = 1 +
All.TreeDomainUpdateFrequency * All.TotNumPart;

Up until this point in the time evolution, the simulation chugs along
happily, but as soon as this routine engages, I get a negative time
step, and the subsequent timeline becomes erratic.

Has anyone else seen this type of behavior? Pretty sure I'm doing
something dumb...

Thanks in advance,

David A. Riethmiller
Graduate Assistant, Astrophysical Institute
Ohio University

Clippinger Labs 338
Received on 2013-06-28 07:01:37

This archive was generated by hypermail 2.3.0 : 2023-01-10 10:01:31 CET