Bug with computing averages
This commit is contained in:
parent
870196ec07
commit
9c3ad2c400
@ -243,19 +243,17 @@ int enstrophy(
|
|||||||
fprintf(stderr,"% .8e % .8e % .8e % .8e % .8e % .8e % .8e\n",time, avg_a, avg_en, avg_en_x_a, alpha, enstrophy, alpha*enstrophy);
|
fprintf(stderr,"% .8e % .8e % .8e % .8e % .8e % .8e % .8e\n",time, avg_a, avg_en, avg_en_x_a, alpha, enstrophy, alpha*enstrophy);
|
||||||
printf("% .15e % .15e % .15e % .15e % .15e % .15e % .15e\n",time, avg_a, avg_en, avg_en_x_a, alpha, enstrophy, alpha*enstrophy);
|
printf("% .15e % .15e % .15e % .15e % .15e % .15e % .15e\n",time, avg_a, avg_en, avg_en_x_a, alpha, enstrophy, alpha*enstrophy);
|
||||||
}
|
}
|
||||||
// print to stdout
|
|
||||||
}
|
|
||||||
|
|
||||||
// reset averages
|
// reset averages
|
||||||
avg_a=0;
|
avg_a=0;
|
||||||
avg_en=0;
|
avg_en=0;
|
||||||
avg_en_x_a=0;
|
avg_en_x_a=0;
|
||||||
prevtime=time;
|
prevtime=time;
|
||||||
|
}
|
||||||
|
|
||||||
// get ready for next step
|
// get ready for next step
|
||||||
step=next_step;
|
step=next_step;
|
||||||
|
|
||||||
|
|
||||||
// catch abort signal
|
// catch abort signal
|
||||||
if (g_abort){
|
if (g_abort){
|
||||||
// print u to stderr if no savefile
|
// print u to stderr if no savefile
|
||||||
|
Loading…
Reference in New Issue
Block a user