Commit 7b3992a5 authored by Oliver Zier's avatar Oliver Zier
Browse files

Merge branch 'master' of https://gitlab.mpcdf.mpg.de/vrs/gadget4

parents b260f126 068a5082
......@@ -237,18 +237,8 @@ void domain<simparticles>::domain_find_total_cost(void)
if(Tp->P[i].getType() == 0)
{
#ifdef SUBFIND
if(Mode == COLL_SUBFIND)
{
if(Tp->PS[i].DomainFlag)
HydroCostPerListedTimeBin[n] += 1.0;
}
else
#endif
{
if(bin >= Tp->P[i].getTimeBinHydro())
HydroCostPerListedTimeBin[n] += 1.0;
}
if(bin >= Tp->P[i].getTimeBinHydro())
HydroCostPerListedTimeBin[n] += 1.0;
}
}
}
......
......@@ -157,6 +157,14 @@ class fofdata_comm : public generic_comm<fofdata_in, fofdata_out, T_tree, T_doma
fofnode *current = Tree->get_nodep(no, shmrank);
if(current->level == 0)
{
/* we always open the root node (its full node length can't be stored in the integer type */
no = current->nextnode; /* no change in shmrank expected here */
shmrank = current->nextnode_shmrank;
continue;
}
int nosaved = no;
no = current->sibling; /* in case the node can be discarded */
......
......@@ -405,6 +405,14 @@ void sim::init(int RestartSnapNum)
Sp.PS = (subfind_data *)Mem.mymalloc_movable(&Sp.PS, "PS", 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 */
for(int i = 0; i < Sp.NumPart; i++)
{
......
......@@ -289,8 +289,6 @@ void fof<partset>::subfind_hbt_single_group(domain<partset> *SubDomain, domain<p
/* sort the candidates by size */
mycxxsort(all_candidates, all_candidates + totcand, subfind_hbt_compare_subcand_len);
hbt_subcand_t maxlen_candidate = all_candidates[totcand - 1];
/* sort the candidates by summed previous length, as this is arguably a more robust decision of which one should be the largest
*/
mycxxsort(all_candidates, all_candidates + totcand, subfind_hbt_compare_subcand_summedprevlen);
......
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