Skip to content

Commit

Permalink
NEW LW
Browse files Browse the repository at this point in the history
  • Loading branch information
Anand committed Apr 17, 2024
1 parent 2076b96 commit 23d00a9
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 408 deletions.
2 changes: 2 additions & 0 deletions src/common/m_mpi_common.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ contains
end if
end if
! Define the view for each variable
do i = 1, sys_size
call MPI_TYPE_CREATE_SUBARRAY(num_dims, sizes_glb, sizes_loc, start_idx, &
Expand All @@ -128,6 +129,7 @@ contains
end if
#endif
#endif
end subroutine s_initialize_mpi_data ! ---------------------------------
Expand Down
29 changes: 15 additions & 14 deletions src/post_process/m_start_up.f90
Original file line number Diff line number Diff line change
Expand Up @@ -289,20 +289,21 @@ subroutine s_save_data(t_step, varname, pres, c, H)
-offset_z%beg:p + offset_z%end)

q_sf = 2.5d0*q_prim_vf(E_idx)%sf + 0.5d0*q_prim_vf(1)%sf(j,k,l)*&
(q_prim_vf(mom_idx%beg)%sf**2d0 + q_prim_vf(mom_idx%beg + 1)%sf**2d0)

En_tot = 0d0
rho_tot = 0d0
do k = 0, n
do j = 0, m
En_tot = En_tot + q_sf(j,k,0)
rho_tot = rho_tot + q_cons_vf(1)%sf(j,k,0)
end do
end do
En_tot = En_tot/(m+1)**2d0
rho_tot = 0.5d0*(rho_tot/(m+1)**2d0)**1.4
print *, "POT AVG", rho_tot
print *, "En_tot", En_tot
(q_prim_vf(mom_idx%beg)%sf**2d0 + q_prim_vf(mom_idx%beg + 1)%sf**2d0)

En_tot = 0d0
rho_tot = 0d0
do k = 0, n
do j = 0, m
En_tot = En_tot + q_sf(j,k,0)
rho_tot = rho_tot + q_cons_vf(1)%sf(j,k,0)
end do
end do
En_tot = En_tot/((m+1)*(n+1))
!En_tot = En_tot - 0.59012242316857255
rho_tot = 0.5d0*(rho_tot/((m+1)*(n+1)))**1.4
print *, "POT AVG", rho_tot
print *, "En_tot", En_tot
inquire (FILE='En_tot.dat', EXIST=file_exists)
if (file_exists) then
open (1, file='En_tot.dat', position='append', status='old')
Expand Down
4 changes: 3 additions & 1 deletion src/pre_process/m_data_output.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,9 @@ contains
call MPI_FILE_DELETE(file_loc, mpi_info_int, ierr)
end if
call MPI_FILE_OPEN(MPI_COMM_WORLD, file_loc, ior(MPI_MODE_WRONLY, MPI_MODE_CREATE), &
mpi_info_int, ifile, ierr)
mpi_info_int, ifile, ierr)



! Size of local arrays
data_size = (m + 1)*(n + 1)*(p + 1)
Expand Down
Loading

0 comments on commit 23d00a9

Please sign in to comment.