Remove avg from energy

This commit is contained in:
Ian Jauslin 2022-05-27 00:38:05 -04:00
parent c62ce07579
commit f9d9d48154

View File

@ -109,13 +109,8 @@ int energy(
if(t%print_freq==0){
energy=compute_energy(u, K1, K2);
// running average
if(t>0){
avg=avg-(avg-energy)/t;
}
fprintf(stderr,"%d % .8e % .8e % .8e\n",t,t*delta, energy, avg);
printf("%8d % .15e % .15e % .15e\n",t,t*delta,energy,avg);
fprintf(stderr,"%d % .8e % .8e\n",t,t*delta, energy);
printf("%8d % .15e % .15e\n",t,t*delta,energy);
}
}