From db7732025ad6ae58591b146b3f9aa12b7ede9f4c Mon Sep 17 00:00:00 2001 From: ignis Date: Sun, 24 Dec 2017 20:18:40 +0900 Subject: [PATCH] remove unnecessary lines in gather_4 and added comments in main --- gather_4.f90 | 42 +++--------------------------------------- main.f90 | 5 +++-- 2 files changed, 6 insertions(+), 41 deletions(-) diff --git a/gather_4.f90 b/gather_4.f90 index d6165bc..68d1181 100644 --- a/gather_4.f90 +++ b/gather_4.f90 @@ -23,8 +23,6 @@ subroutine gather_4 ! number of variables to write out n_out = 3 - if (int_scalars) n_out = n_out + n_scalars - if (les .and. n_les>0) n_out = n_out + n_les ! putting all variables in wrk array do k = 1,nz @@ -44,47 +42,13 @@ subroutine gather_4 ! velocities call xFFT3d(-1,1) - fname = 'u.'//file_ext - u_(1:nx,1:ny,1:nz) = wrk(1:nx,1:ny,1:nz,1) - call xFFT3d(-1,2) - fname = 'v.'//file_ext - v_(1:nx,1:ny,1:nz) = wrk(1:nx,1:ny,1:nz,2) - call xFFT3d(-1,3) - fname = 'w.'//file_ext + + u_(1:nx,1:ny,1:nz) = wrk(1:nx,1:ny,1:nz,1) + v_(1:nx,1:ny,1:nz) = wrk(1:nx,1:ny,1:nz,2) w_(1:nx,1:ny,1:nz) = wrk(1:nx,1:ny,1:nz,3) - ! scalars - if (int_scalars) then - do n = 1,n_scalars - call xFFT3d(-1,3+n) - write(fname,"('sc',i2.2,'.',a6)") n,file_ext - tmp4(1:nx,1:ny,1:nz) = wrk(1:nx,1:ny,1:nz,3+n) - call write_tmp4 - - end do - end if - - ! LES quantities - if (les) then - ! turbulent viscosity - if (allocated(turb_visc)) then - write(fname,"('nu_t.',a6)") file_ext - tmp4 = turb_visc - call write_tmp4 - end if - - if (n_les > 0) then - do n = 1, n_les - call xFFT3d(-1,3+n_scalars+n) - write(fname,"('les',i1,'.',a6)") n,file_ext - tmp4(1:nx,1:ny,1:nz) = wrk(1:nx,1:ny,1:nz,3+n_scalars+n) - call write_tmp4 - end do - end if - - end if return end subroutine gather_4 diff --git a/main.f90 b/main.f90 index ded720d..06c5db3 100644 --- a/main.f90 +++ b/main.f90 @@ -129,9 +129,10 @@ program x_code end if end if - if (fdm_sw.ne.0) then ! Reacting + ! reacting scalars + if (fdm_sw.ne.0) then call gather_4 - call fdm_exe + call fdm_exe endif ! RHS for scalars