Skip to content

Commit 20033cc

Browse files
committed
Merge branch 'main' into igr-integration
2 parents 3126a99 + 272ac0a commit 20033cc

20 files changed

Lines changed: 44 additions & 76 deletions

src/common/include/1dHardcodedIC.fpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@
5151
molar_mass_inv = y1/31.998_wp + y2/18.01508_wp + y3/16.04256_wp + y4/28.0134_wp
5252

5353
q_prim_vf(eqn_idx%cont%beg)%sf(i, 0, 0) = 1.01325_wp*(10.0_wp)**5/(temp*8.3144626_wp*1000.0_wp*molar_mass_inv)
54-
5554
case(191) ! 1D Dual Isothermal case
56-
5755
q_prim_vf(eqn_idx%E)%sf(i, 0, 0) = 101325.0_wp
5856
q_prim_vf(eqn_idx%mom%beg)%sf(i, 0, 0) = 0.0_wp
5957
q_prim_vf(eqn_idx%species%beg)%sf(i, 0, 0) = 1.0_wp

src/common/include/2dHardcodedIC.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@
251251
! q_prim_vf(eqn_idx%B%beg)%sf(i,j,0) = 1._wp/(4._wp*pi) * (alpha**8 - 2._wp*alpha**4 + 1._wp)
252252
! q_prim_vf(eqn_idx%E)%sf(i,j,0) = 6._wp - q_prim_vf(eqn_idx%B%beg)%sf(i,j,0)**2/2._wp
253253
end if
254-
case (262) ! Tilted 2D MHD shocktube at α = arctan2 (63.4°)
254+
case (262) ! Tilted 2D MHD shock-tube at \alpha = arctan2 (\approx63.4 deg)
255255
! rotate by \alpha = atan(2)
256256
alpha = atan(2._wp)
257257
cosA = cos(alpha)

src/common/m_derived_types.fpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,10 @@ module m_derived_types
278278

279279
! Geometry 13 (2D modal Fourier): fourier_cos(n), fourier_sin(n) for mode n
280280
real(wp), dimension(1:max_2d_fourier_modes) :: fourier_cos, fourier_sin
281-
logical :: modal_clip_r_to_min !< When true, clip boundary radius: R(theta) = max(R(theta), modal_r_min) (Non-exp form only)
282-
real(wp) :: modal_r_min !< Minimum boundary radius when modal_clip_r_to_min is true (Non-exp form only)
283-
logical :: modal_use_exp_form !< When true, boundary = radius*exp(Fourier series)
281+
!> When true, clip boundary radius: R(theta) = max(R(theta), modal_r_min) (Non-exp form only)
282+
logical :: modal_clip_r_to_min
283+
real(wp) :: modal_r_min !< Minimum boundary radius when modal_clip_r_to_min is true (Non-exp form only)
284+
logical :: modal_use_exp_form !< When true, boundary = radius*exp(Fourier series)
284285
! Geometry 14 (3D spherical harmonic): sph_har_coeff(l,m) for real Y_lm
285286
real(wp), dimension(0:max_sph_harm_degree,-max_sph_harm_degree:max_sph_harm_degree) :: sph_har_coeff
286287
real(wp), dimension(3) :: normal !< Patch orientation normal vector (x, y, z)

src/common/m_helper_basic.fpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ contains
111111

112112
!> Compute ghost-cell buffer size and set interior/buffered coordinate index bounds.
113113
subroutine s_configure_coordinate_bounds(recon_type, weno_polyn, muscl_polyn, igr_order, buff_size, idwint, idwbuff, viscous, &
114-
115114
& bubbles_lagrange, m, n, p, num_dims, igr, ib)
116115

117116
integer, intent(in) :: recon_type, weno_polyn, muscl_polyn

src/common/m_mpi_common.fpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ contains
291291
!! single process, within its assigned section of the computational domain. Finally, note that the global extrema values are
292292
!! only bookkeept on the rank 0 processor.
293293
impure subroutine s_mpi_reduce_stability_criteria_extrema(icfl_max_loc, vcfl_max_loc, Rc_min_loc, icfl_max_glb, vcfl_max_glb, &
294-
295294
& Rc_min_glb)
296295

297296
real(wp), intent(in) :: icfl_max_loc
@@ -367,13 +366,13 @@ contains
367366
!> Reduce a local integer value to its global sum across all MPI ranks.
368367
impure subroutine s_mpi_allreduce_integer_sum(var_loc, var_glb)
369368

370-
integer, intent(in) :: var_loc
371-
integer, intent(out) :: var_glb
369+
integer(kind=8), intent(in) :: var_loc
370+
integer(kind=8), intent(out) :: var_glb
372371

373372
#ifdef MFC_MPI
374373
integer :: ierr !< Generic flag used to identify and report MPI errors
375374

376-
call MPI_ALLREDUCE(var_loc, var_glb, 1, MPI_INTEGER, MPI_SUM, MPI_COMM_WORLD, ierr)
375+
call MPI_ALLREDUCE(var_loc, var_glb, 1, MPI_INTEGER8, MPI_SUM, MPI_COMM_WORLD, ierr)
377376
#else
378377
var_glb = var_loc
379378
#endif
@@ -1444,7 +1443,6 @@ contains
14441443

14451444
if (mpi_dir == 1) then
14461445
if (pbc_loc == -1) then ! PBC at the beginning
1447-
14481446
if (bc_x%end >= 0) then ! PBC at the beginning and end
14491447
call MPI_SENDRECV(dx(m - buff_size + 1), buff_size, mpi_p, bc_x%end, 0, dx(-buff_size), buff_size, mpi_p, &
14501448
& bc_x%beg, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE, ierr)
@@ -1463,7 +1461,6 @@ contains
14631461
end if
14641462
else if (mpi_dir == 2) then
14651463
if (pbc_loc == -1) then ! PBC at the beginning
1466-
14671464
if (bc_y%end >= 0) then ! PBC at the beginning and end
14681465
call MPI_SENDRECV(dy(n - buff_size + 1), buff_size, mpi_p, bc_y%end, 0, dy(-buff_size), buff_size, mpi_p, &
14691466
& bc_y%beg, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE, ierr)
@@ -1482,7 +1479,6 @@ contains
14821479
end if
14831480
else
14841481
if (pbc_loc == -1) then ! PBC at the beginning
1485-
14861482
if (bc_z%end >= 0) then ! PBC at the beginning and end
14871483
call MPI_SENDRECV(dz(p - buff_size + 1), buff_size, mpi_p, bc_z%end, 0, dz(-buff_size), buff_size, mpi_p, &
14881484
& bc_z%beg, 0, MPI_COMM_WORLD, MPI_STATUS_IGNORE, ierr)

src/simulation/m_body_forces.fpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ contains
9999
$:END_GPU_PARALLEL_LOOP()
100100

101101
if (bf_x) then ! x-direction body forces
102-
103102
$:GPU_PARALLEL_LOOP(private='[j, k, l]', collapse=3)
104103
do l = 0, p
105104
do k = 0, n
@@ -114,7 +113,6 @@ contains
114113
end if
115114

116115
if (bf_y) then ! y-direction body forces
117-
118116
$:GPU_PARALLEL_LOOP(private='[j, k, l]', collapse=3)
119117
do l = 0, p
120118
do k = 0, n
@@ -130,7 +128,6 @@ contains
130128
end if
131129

132130
if (bf_z) then ! z-direction body forces
133-
134131
$:GPU_PARALLEL_LOOP(private='[j, k, l]', collapse=3)
135132
do l = 0, p
136133
do k = 0, n

src/simulation/m_bubbles.fpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,7 @@ contains
333333
!> Adaptive time stepping routine for subgrid bubbles (See Heirer, E. Hairer S.P.Norsett G. Wanner, Solving Ordinary
334334
!! Differential Equations I, Chapter II.4)
335335
subroutine s_advance_step(fRho, fP, fR, fV, fR0, fpb, fpbdot, alf, fntait, fBtait, f_bub_adv_src, f_divu, bub_id, fmass_v, &
336-
337-
& fmass_g, fbeta_c, fbeta_t, fCson, adap_dt_stop)
336+
& fmass_g, fbeta_c, fbeta_t, fCson, adap_dt_stop)
338337
$:GPU_ROUTINE(function_name='s_advance_step',parallelism='[seq]', cray_inline=True)
339338

340339
real(wp), intent(inout) :: fR, fV, fpb, fmass_v
@@ -488,8 +487,7 @@ contains
488487

489488
!> Integrate bubble variables over the given time step size, h, using a third-order accurate embedded Runge-Kutta scheme.
490489
subroutine s_advance_substep(err, fRho, fP, fR, fV, fR0, fpb, fpbdot, alf, fntait, fBtait, f_bub_adv_src, f_divu, bub_id, &
491-
492-
& fmass_v, fmass_g, fbeta_c, fbeta_t, fCson, h, myR_tmp, myV_tmp, myPb_tmp, myMv_tmp)
490+
& fmass_v, fmass_g, fbeta_c, fbeta_t, fCson, h, myR_tmp, myV_tmp, myPb_tmp, myMv_tmp)
493491
$:GPU_ROUTINE(function_name='s_advance_substep',parallelism='[seq]', cray_inline=True)
494492

495493
real(wp), intent(out) :: err

src/simulation/m_ibm.fpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ contains
7272
!> Initializes the values of various IBM variables, such as ghost points and image points.
7373
impure subroutine s_ibm_setup()
7474

75-
integer :: i, j, k
76-
integer :: max_num_gps
75+
integer :: i, j, k
76+
integer(kind=8) :: max_num_gps
7777

7878
call nvtxStartRange("SETUP-IBM-MODULE")
7979

@@ -119,10 +119,10 @@ contains
119119
! find the number of ghost points and set them to be the maximum total across ranks
120120
call s_find_num_ghost_points(num_gps)
121121
if (moving_immersed_boundary_flag) then
122-
call s_mpi_allreduce_integer_sum(num_gps, max_num_gps)
123-
max_num_gps = min(max_num_gps*2, (m + 1)*(n + 1)*(p + 1))
122+
call s_mpi_allreduce_integer_sum(int(num_gps, 8), max_num_gps)
123+
max_num_gps = min(max_num_gps*2_8, int(m + 1, 8)*int(n + 1, 8)*int(p + 1, 8))
124124
else
125-
max_num_gps = num_gps
125+
max_num_gps = int(num_gps, 8)
126126
end if
127127

128128
! set the size of the ghost point arrays to be the amount of points total, plus a factor of 2 buffer
@@ -1071,7 +1071,8 @@ contains
10711071
subroutine s_compute_centroid_offset(ib_marker)
10721072

10731073
integer, intent(in) :: ib_marker
1074-
integer :: i, j, k, num_cells, num_cells_local, decoded_gbl_id
1074+
integer :: i, j, k, num_cells_local, decoded_gbl_id
1075+
integer(kind=8) :: num_cells
10751076
real(wp), dimension(1:3) :: center_of_mass, center_of_mass_local
10761077

10771078
! Offset only needs to be computes for specific geometries
@@ -1098,7 +1099,7 @@ contains
10981099
end do
10991100

11001101
! reduce the mass contribution over all MPI ranks and compute COM
1101-
call s_mpi_allreduce_integer_sum(num_cells_local, num_cells)
1102+
call s_mpi_allreduce_integer_sum(int(num_cells_local, 8), num_cells)
11021103
if (num_cells /= 0) then
11031104
call s_mpi_allreduce_sum(center_of_mass_local(1), center_of_mass(1))
11041105
call s_mpi_allreduce_sum(center_of_mass_local(2), center_of_mass(2))

src/simulation/m_muscl.fpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,7 @@ contains
8484
end subroutine s_initialize_muscl_module
8585

8686
!> Perform MUSCL reconstruction of left and right cell-boundary values from cell-averaged variables
87-
subroutine s_muscl(v_vf, vL_rs_vf_x, vR_rs_vf_x, muscl_dir, is1_muscl_d, &
88-
89-
& is2_muscl_d, is3_muscl_d)
87+
subroutine s_muscl(v_vf, vL_rs_vf_x, vR_rs_vf_x, muscl_dir, is1_muscl_d, is2_muscl_d, is3_muscl_d)
9088

9189
type(scalar_field), dimension(1:), intent(in) :: v_vf
9290
real(wp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:), intent(inout) :: vL_rs_vf_x, vR_rs_vf_x

src/simulation/m_rhs.fpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,7 @@ contains
458458

459459
!> Compute the right-hand side of the semi-discrete governing equations for a single time stage
460460
impure subroutine s_compute_rhs(q_cons_vf, q_T_sf, q_prim_vf, bc_type, rhs_vf, pb_in, rhs_pb, mv_in, rhs_mv, t_step, &
461-
462-
& time_avg, stage)
461+
& time_avg, stage)
463462

464463
type(scalar_field), dimension(sys_size), intent(inout) :: q_cons_vf
465464
type(scalar_field), intent(inout) :: q_T_sf
@@ -1375,7 +1374,6 @@ contains
13751374
integer :: i, j, k, l
13761375
13771376
if (idir == 1) then ! x-direction
1378-
13791377
if (surface_tension) then
13801378
$:GPU_PARALLEL_LOOP(private='[j, k, l]', collapse=3)
13811379
do l = 0, p

0 commit comments

Comments
 (0)