Commit 636cfd6e authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

fix comments.


Former-commit-id: 6ebc43a797faeab64f73ae9665142dff5e3a0633
parent 4148e298
......@@ -21,3 +21,4 @@
void printParticle(struct part *parts, long long int i, int N);
void printParticle_single ( struct part *p );
......@@ -506,8 +506,7 @@ void engine_step ( struct engine *e , int sort_queues ) {
// for(k=0; k<10; ++k)
// printParticle(parts, k);
// printParticle( parts , 432626 );
// printParticle( parts , 432628 );
// printParticle( e->s->parts , 382557 , e->s->nr_parts );
/* Prepare the space. */
engine_prepare( e );
......@@ -538,7 +537,7 @@ void engine_step ( struct engine *e , int sort_queues ) {
/* Stop the clock. */
TIMER_TOC(timer_runners);
// engine_single_force( e->s->dim , 6178 , e->s->parts , e->s->nr_parts , e->s->periodic );
// for(k=0; k<10; ++k)
......@@ -560,7 +559,7 @@ void engine_step ( struct engine *e , int sort_queues ) {
}
e->dt_min = dt_min;
// printParticle( parts , 432626 );
// printParticle( e->s->parts , 382557 , e->s->nr_parts );
printf( "engine_step: dt_min/dt_max is %e/%e.\n" , dt_min , dt_max ); fflush(stdout);
printf( "engine_step: etot is %e (ekin=%e, epot=%e).\n" , ekin+epot , ekin , epot ); fflush(stdout);
printf( "engine_step: total momentum is [ %e , %e , %e ].\n" , mom[0] , mom[1] , mom[2] ); fflush(stdout);
......
......@@ -119,7 +119,7 @@ struct part {
/* Sound speed */
float c;
} force;
};
......
......@@ -382,18 +382,21 @@ void runner_doghost ( struct runner *r , struct cell *c ) {
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 );
/* Compute the smoothing length update (Newton step). */
/* If no derivative, double the smoothing length. */
if ( wcount_dh == 0.0f )
h_corr = p->h;
/* Otherwise, compute the smoothing length update (Newton step). */
else {
h_corr = ( const_nwneigh - wcount ) / wcount_dh;
/* Truncate to the range [ -p->h/2 , p->h ]. */
h_corr = fminf( h_corr , h );
h_corr = fmaxf( h_corr , -h/2 );
}
/* Apply the correction to p->h. */
/* Apply the correction to p->h and to the compact part. */
p->h += h_corr;
cp->h = p->h;
......
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