This commit is contained in:
Ian Jauslin 2022-05-18 10:42:30 +02:00
parent 03a3a0f880
commit 232822a183
3 changed files with 5 additions and 5 deletions

View File

@ -18,7 +18,7 @@ function navier_stokes_uk(
if i % print_freq==0
@printf("% .15e ",delta*i)
print_u(u,N1,N2,K1,K2)
print_u_inline(u,N1,N2,K1,K2)
# print to stderr
@printf(stderr,"% .8e ",delta*i)

View File

@ -1,4 +1,4 @@
function print_u(
function print_u_inline(
u::Array{Complex{Float64},1},
N1::Int64,
N2::Int64,

View File

@ -34,8 +34,8 @@ int uk(
ins_step(u, K1, K2, N1, N2, nu, delta, g, fft1, fft2, ifft, tmp1, tmp2, tmp3);
if(t%print_freq==0){
fprintf(stderr,"% .8e ",t*delta);
printf("% .15e ",t*delta);
fprintf(stderr,"%d % .8e ",t,t*delta);
printf("%8d % .15e ",t,t*delta);
for(kx=-K1;kx<=K1;kx++){
for (ky=-K2;ky<=K2;ky++){
@ -43,7 +43,7 @@ int uk(
fprintf(stderr,"% .8e % .8e ",__real__ u[klookup(kx,ky,2*K1+1,2*K2+1)], __imag__ u[klookup(kx,ky,2*K1+1,2*K2+1)]);
}
printf("% .8e % .8e ",__real__ u[klookup(kx,ky,2*K1+1,2*K2+1)], __imag__ u[klookup(kx,ky,2*K1+1,2*K2+1)]);
printf("% .15e % .15e ",__real__ u[klookup(kx,ky,2*K1+1,2*K2+1)], __imag__ u[klookup(kx,ky,2*K1+1,2*K2+1)]);
}
}
fprintf(stderr,"\n");