Commit 4d022ab5 authored by Volker Springel's avatar Volker Springel
Browse files

added an extra domain decomposition before snapshot output if STARFORMATION and FOF is both enabled

parent 00754407
...@@ -521,6 +521,15 @@ void sim::create_snapshot_if_desired(void) ...@@ -521,6 +521,15 @@ void sim::create_snapshot_if_desired(void)
if(Sp.P[i].Ti_Current != All.Ti_Current) if(Sp.P[i].Ti_Current != All.Ti_Current)
Terminate("P[i].Ti_Current != All.Ti_Current"); Terminate("P[i].Ti_Current != All.Ti_Current");
#if defined(STARFORMATION) && defined(FOF)
// do an extra domain decomposition here to make sure that there are no new stars among the block of gas particles
NgbTree.treeallocate(Sp.NumGas, &Sp, &Domain);
NgbTree.treebuild(Sp.NumGas, NULL);
NgbTree.treefree(); NgbTree.treefree();
Sp.TimeBinsGravity.timebins_free(); Sp.TimeBinsGravity.timebins_free();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment