Commit 29ba6ed5 authored by Volker Springel's avatar Volker Springel
Browse files

added utherm to entroy conversion in Subfind postprocessing with gas

parent 06d04a45
...@@ -405,6 +405,14 @@ void sim::init(int RestartSnapNum) ...@@ -405,6 +405,14 @@ void sim::init(int RestartSnapNum)
Sp.PS = (subfind_data *)Mem.mymalloc_movable(&Sp.PS, "PS", Sp.MaxPart * sizeof(subfind_data)); Sp.PS = (subfind_data *)Mem.mymalloc_movable(&Sp.PS, "PS", Sp.MaxPart * sizeof(subfind_data));
memset(Sp.PS, 0, Sp.MaxPart * sizeof(subfind_data)); memset(Sp.PS, 0, Sp.MaxPart * sizeof(subfind_data));
for(int i = 0; i < Sp.NumGas; i++)
{
if(ThisTask == 0 && i == 0)
printf("INIT: Converting u -> entropy All.cf_a3inv=%g\n", All.cf_a3inv);
Sp.SphP[i].Entropy = GAMMA_MINUS1 * Sp.SphP[i].Entropy / pow(Sp.SphP[i].Density * All.cf_a3inv, GAMMA_MINUS1);
}
/* First, we save the original location of the particles, in order to be able to revert to this layout later on */ /* First, we save the original location of the particles, in order to be able to revert to this layout later on */
for(int i = 0; i < Sp.NumPart; i++) for(int i = 0; i < Sp.NumPart; i++)
{ {
......
Supports Markdown
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