Skip to content

Commit bbdb0fc

Browse files
committed
removed some unused code and added headers to modules
1 parent d92e58c commit bbdb0fc

File tree

4 files changed

+30
-33
lines changed

4 files changed

+30
-33
lines changed

src/simulation/m_monopole.f90

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
!>
2+
!! @file m_viscous.f90
3+
!! @brief Contains module m_viscous
4+
5+
!> @brief The module contains the subroutines used to
6+
17
module m_monopole
28

39
! Dependencies =============================================================

src/simulation/m_rhs.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
!> @brief The module contains the subroutines used to calculate the right-
66
!! hand-side (RHS) in the quasi-conservative, shock- and interface-
77
!! capturing finite-volume framework for the multicomponent Navier-
8-
!! f Stokes equations supplemented by appropriate advection equations
8+
!! Stokes equations supplemented by appropriate advection equations
99
!! used to capture the material interfaces. The system of equations
1010
!! is closed by the stiffened gas equation of state, as well as any
1111
!! required mixture relationships. Capillarity effects are included

src/simulation/m_viscous.f90

Lines changed: 19 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
!>
2+
!! @file m_viscous.f90
3+
!! @brief Contains module m_viscous
4+
5+
!> @brief The module contains the subroutines used to
6+
7+
18
module m_viscous
29

310
! Dependencies =============================================================
@@ -10,7 +17,8 @@ module m_viscous
1017

1118
private; public s_get_viscous, &
1219
s_compute_viscous_stress_tensor, &
13-
s_initialize_viscous_module
20+
s_initialize_viscous_module, &
21+
s_finalize_viscous_module
1422

1523
type(int_bounds_info) :: iv
1624

@@ -36,19 +44,14 @@ subroutine s_initialize_viscous_module()
3644
end do
3745
!$acc update device(gammas, pi_infs)
3846

39-
if (any(Re_size > 0)) then
40-
allocate (Res(1:2, 1:maxval(Re_size)))
41-
end if
47+
allocate (Res(1:2, 1:maxval(Re_size)))
4248

43-
if (any(Re_size > 0)) then
44-
do i = 1, 2
45-
do j = 1, Re_size(i)
46-
Res(i, j) = fluid_pp(Re_idx(i, j))%Re(i)
47-
end do
49+
do i = 1, 2
50+
do j = 1, Re_size(i)
51+
Res(i, j) = fluid_pp(Re_idx(i, j))%Re(i)
4852
end do
53+
end do
4954
!$acc update device(Res, Re_idx, Re_size)
50-
end if
51-
5255

5356
momxb = mom_idx%beg
5457
momxe = mom_idx%end
@@ -85,27 +88,6 @@ subroutine s_compute_viscous_stress_tensor(q_prim_vf, grad_x_vf, grad_y_vf, grad
8588

8689
type(int_bounds_info) :: ix, iy, iz
8790

88-
!ix%beg = -buff_size; iy%beg = 0; iz%beg = 0
89-
!if (n > 0) iy%beg = -buff_size; if (p > 0) iz%beg = -buff_size
90-
!ix%end = m - ix%beg; iy%end = n - iy%beg; iz%end = p - iz%beg
91-
92-
!$acc update device(ix, iy, iz)
93-
94-
do i = 1, num_dims
95-
allocate (tau_Re_vf(cont_idx%end + i)%sf(ix%beg:ix%end, &
96-
iy%beg:iy%end, &
97-
iz%beg:iz%end))
98-
!$acc enter data create(tau_Re_vf(cont_idx%end + i)%sf(ix%beg:ix%end, &
99-
!$acc iy%beg:iy%end, &
100-
!$acc iz%beg:iz%end))
101-
end do
102-
allocate (tau_Re_vf(E_idx)%sf(ix%beg:ix%end, &
103-
iy%beg:iy%end, &
104-
iz%beg:iz%end))
105-
!$acc enter data create (tau_Re_vf(E_idx)%sf(ix%beg:ix%end, &
106-
!$acc iy%beg:iy%end, &
107-
!$acc iz%beg:iz%end))
108-
10991
!$acc parallel loop collapse(3) gang vector default(present)
11092
do l = iz%beg, iz%end
11193
do k = iy%beg, iy%end
@@ -1390,4 +1372,9 @@ subroutine s_reconstruct_cell_boundary_values_visc(v_vf, vL_x_flat, vL_y_flat, v
13901372

13911373
end subroutine s_reconstruct_cell_boundary_values_visc ! --------------------
13921374

1375+
subroutine s_finalize_viscous_module()
1376+
deallocate (gammas, pi_infs)
1377+
allocate (Res(1:2, 1:maxval(Re_size)))
1378+
end subroutine s_finalize_viscous_module
1379+
13931380
end module m_viscous

src/simulation/p_main.fpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,10 @@ program p_main
356356
call s_finalize_mpi_proxy_module()
357357
call s_finalize_global_parameters_module()
358358

359+
if (any(Re_size > 0)) then
360+
call s_finalize_viscous_module()
361+
end if
362+
359363
! Terminating MPI execution environment
360364
call s_mpi_finalize()
361365

0 commit comments

Comments
 (0)