Commit 30019281 authored by Volker Springel's avatar Volker Springel
Browse files

fix in yesterday's flawed change to when set_viscosity_coefficient() is called...

fix in yesterday's flawed change to when set_viscosity_coefficient() is called (thanks to Leonhard for pointing this out)
parent 38d1a95b
......@@ -570,12 +570,6 @@ void sph::density(int *list, int ntarget)
if(Left[target] > 0 && Right[target] > 0)
if((Right[target] - Left[target]) < 1.0e-3 * Left[target])
{
#ifdef TIMEDEP_ART_VISC
double dt = (Tp->P[target].getTimeBinHydro() ? (((integertime)1) << Tp->P[target].getTimeBinHydro()) : 0) *
All.Timebase_interval;
double dtime = All.cf_atime * dt / All.cf_atime_hubble_a;
SphP[target].set_viscosity_coefficient(dtime);
#endif
/* this one should be ok */
continue;
}
......@@ -669,6 +663,17 @@ void sph::density(int *list, int ntarget)
}
while(ndensities > 0);
#ifdef TIMEDEP_ART_VISC
for(int i = 0; i < ntarget; i++)
{
int target = list[i];
double dt =
(Tp->P[target].getTimeBinHydro() ? (((integertime)1) << Tp->P[target].getTimeBinHydro()) : 0) * All.Timebase_interval;
double dtime = All.cf_atime * dt / All.cf_atime_hubble_a;
Tp->SphP[target].set_viscosity_coefficient(dtime);
}
#endif
TIMER_START(CPU_DENSIMBALANCE);
MPI_Allreduce(MPI_IN_PLACE, &max_ncycles, 1, MPI_INT, MPI_MAX, D->Communicator);
......
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