tiny fix
This commit is contained in:
parent
03a3a0f880
commit
232822a183
@ -18,7 +18,7 @@ function navier_stokes_uk(
|
|||||||
|
|
||||||
if i % print_freq==0
|
if i % print_freq==0
|
||||||
@printf("% .15e ",delta*i)
|
@printf("% .15e ",delta*i)
|
||||||
print_u(u,N1,N2,K1,K2)
|
print_u_inline(u,N1,N2,K1,K2)
|
||||||
|
|
||||||
# print to stderr
|
# print to stderr
|
||||||
@printf(stderr,"% .8e ",delta*i)
|
@printf(stderr,"% .8e ",delta*i)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
function print_u(
|
function print_u_inline(
|
||||||
u::Array{Complex{Float64},1},
|
u::Array{Complex{Float64},1},
|
||||||
N1::Int64,
|
N1::Int64,
|
||||||
N2::Int64,
|
N2::Int64,
|
||||||
|
@ -34,8 +34,8 @@ int uk(
|
|||||||
ins_step(u, K1, K2, N1, N2, nu, delta, g, fft1, fft2, ifft, tmp1, tmp2, tmp3);
|
ins_step(u, K1, K2, N1, N2, nu, delta, g, fft1, fft2, ifft, tmp1, tmp2, tmp3);
|
||||||
|
|
||||||
if(t%print_freq==0){
|
if(t%print_freq==0){
|
||||||
fprintf(stderr,"% .8e ",t*delta);
|
fprintf(stderr,"%d % .8e ",t,t*delta);
|
||||||
printf("% .15e ",t*delta);
|
printf("%8d % .15e ",t,t*delta);
|
||||||
|
|
||||||
for(kx=-K1;kx<=K1;kx++){
|
for(kx=-K1;kx<=K1;kx++){
|
||||||
for (ky=-K2;ky<=K2;ky++){
|
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)]);
|
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");
|
fprintf(stderr,"\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user