Remove avg from energy
This commit is contained in:
parent
c62ce07579
commit
f9d9d48154
@ -105,17 +105,12 @@ int energy(
|
||||
// iterate
|
||||
for(t=0;t<nsteps;t++){
|
||||
ins_step(u, K1, K2, N1, N2, nu, delta, L, g, fft1, fft2, ifft, tmp1, tmp2, tmp3);
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user