diff --git a/src/runner.c b/src/runner.c index e8a4e0170cdd1540ab738cf77f41837a7e0f9941..b6d82b5de4dee5b35820561e3373bbe1533e88a7 100644 --- a/src/runner.c +++ b/src/runner.c @@ -378,7 +378,7 @@ void runner_doghost ( struct runner *r , struct cell *c ) { /* Final operation on the density. */ p->rho = rho = ih * ih2 * ( p->rho + p->mass*kernel_root ); - p->rho_dh = rho_dh = p->rho_dh * ih4; + p->rho_dh = rho_dh = ( p->rho_dh - 3.0f*p->mass*kernel_root ) * ih4; wcount = ( p->density.wcount + kernel_root ) * ( 4.0f / 3.0 * M_PI * kernel_gamma3 ); wcount_dh = p->density.wcount_dh * ih * ( 4.0f / 3.0 * M_PI * kernel_gamma3 );