Skip to content

Commit 9cc0626

Browse files
author
Diego Vaca
committed
Fix frontier tests: removing changes from m_bubbles_EL_kernels.fpp
1 parent 4a398c1 commit 9cc0626

File tree

2 files changed

+39
-7
lines changed

2 files changed

+39
-7
lines changed

src/simulation/m_bubbles_EL_kernels.fpp

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -317,27 +317,51 @@ contains
317317

318318
! x-dir
319319
if (bc_x%beg == -2 .and. (cell(1) <= mapCells - 1)) then
320-
cellaux(1) = abs(cellaux(1)) - 1
320+
if (cell(1) >= 0) then
321+
cellaux(1) = abs(cellaux(1)) - 1
322+
else
323+
stop "Lagrangian bubbles must not be located in the ghost cells of a symmetric boundary (bc_x%beg)."
324+
end if
321325
end if
322326
if (bc_x%end == -2 .and. (cell(1) >= m + 1 - mapCells)) then
323-
cellaux(1) = cellaux(1) - (2*(cellaux(1) - m) - 1)
327+
if (cell(1) <= m) then
328+
cellaux(1) = cellaux(1) - (2*(cellaux(1) - m) - 1)
329+
else
330+
stop "Lagrangian bubbles must not be located in the ghost cells of a symmetric boundary (bc_x%end)."
331+
end if
324332
end if
325333

326334
!y-dir
327335
if (bc_y%beg == -2 .and. (cell(2) <= mapCells - 1)) then
328-
cellaux(2) = abs(cellaux(2)) - 1
336+
if (cell(2) >= 0) then
337+
cellaux(2) = abs(cellaux(2)) - 1
338+
else
339+
stop "Lagrangian bubbles must not be located in the ghost cells of a symmetric boundary (bc_y%beg)."
340+
end if
329341
end if
330342
if (bc_y%end == -2 .and. (cell(2) >= n + 1 - mapCells)) then
331-
cellaux(2) = cellaux(2) - (2*(cellaux(2) - n) - 1)
343+
if (cell(2) <= n) then
344+
cellaux(2) = cellaux(2) - (2*(cellaux(2) - n) - 1)
345+
else
346+
stop "Lagrangian bubbles must not be located in the ghost cells of a symmetric boundary (bc_y%end)."
347+
end if
332348
end if
333349

334350
if (p > 0) then
335351
!z-dir
336352
if (bc_z%beg == -2 .and. (cell(3) <= mapCells - 1)) then
337-
cellaux(3) = abs(cellaux(3)) - 1
353+
if (cell(3) >= 0) then
354+
cellaux(3) = abs(cellaux(3)) - 1
355+
else
356+
stop "Lagrangian bubbles must not be located in the ghost cells of a symmetric boundary (bc_z%beg)."
357+
end if
338358
end if
339359
if (bc_z%end == -2 .and. (cell(3) >= p + 1 - mapCells)) then
340-
cellaux(3) = cellaux(3) - (2*(cellaux(3) - p) - 1)
360+
if (cell(3) <= p) then
361+
cellaux(3) = cellaux(3) - (2*(cellaux(3) - p) - 1)
362+
else
363+
stop "Lagrangian bubbles must not be located in the ghost cells of a symmetric boundary (bc_z%end)."
364+
end if
341365
end if
342366
end if
343367

src/simulation/m_start_up.fpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1395,9 +1395,17 @@ contains
13951395
end if
13961396

13971397
if (bubbles_lagrange) then
1398+
!$acc update host(intfc_rad)
1399+
do i = 1, nBubs
1400+
if (ieee_is_nan(intfc_rad(i, 1)) .or. intfc_rad(i, 1) <= 0._wp) then
1401+
print *, "Bubble radius is negative or NaN", proc_rank, t_step, i, intfc_rad(i, 1)
1402+
error stop "Bubble radius is negative or NaN, please reduce dt"
1403+
end if
1404+
end do
1405+
13981406
!$acc update host(q_beta%vf(1)%sf)
13991407
call s_write_data_files(q_cons_ts(1)%vf, q_T_sf, q_prim_vf, save_count, q_beta%vf(1))
1400-
!$acc update host(Rmax_stats, Rmin_stats, gas_p, gas_mv, intfc_rad, intfc_vel)
1408+
!$acc update host(Rmax_stats, Rmin_stats, gas_p, gas_mv, intfc_vel)
14011409
call s_write_restart_lag_bubbles(save_count) !parallel
14021410
if (lag_params%write_bubbles_stats) call s_write_lag_bubble_stats()
14031411
else

0 commit comments

Comments
 (0)