@@ -238,6 +238,14 @@ module m_global_parameters
238238
239239 !$acc declare create(bub_idx)
240240
241+ ! Cell Indices for the interior points (O- m, O- n, 0 - p).
242+ type(int_bounds_info) :: idwint(1 :3 )
243+ !$acc declare create(idwint)
244+
245+ ! Cell Indices for the entire domain, including the buffer region.
246+ type(int_bounds_info) :: idwbuff(1 :3 )
247+ !$acc declare create(idwbuff)
248+
241249 !> @name The number of fluids, along with their identifying indexes, respectively,
242250 !! for which viscous effects, e.g. the shear and/ or the volume Reynolds (Re)
243251 !! numbers, will be non- negligible.
@@ -703,8 +711,6 @@ contains
703711 integer :: i, j, k
704712 integer :: fac
705713
706- type(int_bounds_info) :: ix, iy, iz
707-
708714 #:if not MFC_CASE_OPTIMIZATION
709715 ! Determining the degree of the WENO polynomials
710716 weno_polyn = (weno_order - 1 )/ 2
@@ -1038,18 +1044,27 @@ contains
10381044 end if
10391045
10401046 ! Configuring Coordinate Direction Indexes =========================
1041- if (bubbles) then
1042- ix%beg = - buff_size; iy%beg = 0 ; iz%beg = 0
1043- if (n > 0 ) then
1044- iy%beg = - buff_size
1045- if (p > 0 ) then
1046- iz%beg = - buff_size
1047- end if
1048- end if
1047+ idwint(1 )%beg = 0 ; idwint(2 )%beg = 0 ; idwint(3 )%beg = 0
1048+ idwint(1 )%end = m; idwint(2 )%end = n; idwint(3 )%end = p
10491049
1050- ix%end = m - ix%beg; iy%end = n - iy%beg; iz%end = p - iz%beg
1050+ idwbuff(1 )%beg = - buff_size
1051+ if (num_dims > 1 ) then ; idwbuff(2 )%beg = - buff_size; else ; idwbuff(2 )%beg = 0 ; end if
1052+ if (num_dims > 2 ) then ; idwbuff(3 )%beg = - buff_size; else ; idwbuff(3 )%beg = 0 ; end if
10511053
1052- @:ALLOCATE_GLOBAL(ptil(ix%beg:ix%end, iy%beg:iy%end, iz%beg:iz%end))
1054+ idwbuff(1 )%end = idwint(1 )%end - idwbuff(1 )%beg
1055+ idwbuff(2 )%end = idwint(2 )%end - idwbuff(2 )%beg
1056+ idwbuff(3 )%end = idwint(3 )%end - idwbuff(3 )%beg
1057+
1058+ !$acc update device(idwint, idwbuff)
1059+
1060+ ! ==================================================================
1061+
1062+ ! Configuring Coordinate Direction Indexes =========================
1063+ if (bubbles) then
1064+ @:ALLOCATE_GLOBAL(ptil(&
1065+ & idwbuff(1 )%beg:idwbuff(1 )%end, &
1066+ & idwbuff(2 )%beg:idwbuff(2 )%end, &
1067+ & idwbuff(3 )%beg:idwbuff(3 )%end))
10531068 end if
10541069
10551070 if (probe_wrt) then
0 commit comments