Remove avg from energy
This commit is contained in:
parent
c62ce07579
commit
f9d9d48154
@ -105,17 +105,12 @@ int energy(
|
|||||||
// iterate
|
// iterate
|
||||||
for(t=0;t<nsteps;t++){
|
for(t=0;t<nsteps;t++){
|
||||||
ins_step(u, K1, K2, N1, N2, nu, delta, L, g, fft1, fft2, ifft, tmp1, tmp2, tmp3);
|
ins_step(u, K1, K2, N1, N2, nu, delta, L, g, fft1, fft2, ifft, tmp1, tmp2, tmp3);
|
||||||
|
|
||||||
if(t%print_freq==0){
|
if(t%print_freq==0){
|
||||||
energy=compute_energy(u, K1, K2);
|
energy=compute_energy(u, K1, K2);
|
||||||
|
|
||||||
// running average
|
fprintf(stderr,"%d % .8e % .8e\n",t,t*delta, energy);
|
||||||
if(t>0){
|
printf("%8d % .15e % .15e\n",t,t*delta,energy);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user