Skip to content

Commit 30e7004

Browse files
bug: m_bubbles_EL: delete non-finite bubbles in the boundary enforcement (#1772)
Co-authored-by: Spencer Bryngelson <sbryngelson@gmail.com>
1 parent 6c87019 commit 30e7004

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

‎src/simulation/m_bubbles_EL.fpp‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,9 +1361,7 @@ contains
13611361
& 2) <= pcomm_coords(1)%end) then
13621362
wrap_bubble_dir(k, 1) = 1
13631363
wrap_bubble_loc(k, 1) = 1
1364-
else if (mtn_pos(k, 1, 2) >= x_cb(m)) then
1365-
keep_bubble(k) = 0
1366-
else if (mtn_pos(k, 1, 2) < x_cb(-1)) then
1364+
else if (.not. (mtn_pos(k, 1, 2) >= x_cb(-1) .and. mtn_pos(k, 1, 2) < x_cb(m))) then
13671365
keep_bubble(k) = 0
13681366
end if
13691367

@@ -1381,9 +1379,7 @@ contains
13811379
& 2) <= pcomm_coords(2)%end) then
13821380
wrap_bubble_dir(k, 2) = 1
13831381
wrap_bubble_loc(k, 2) = 1
1384-
else if (mtn_pos(k, 2, 2) >= y_cb(n)) then
1385-
keep_bubble(k) = 0
1386-
else if (mtn_pos(k, 2, 2) < y_cb(-1)) then
1382+
else if (.not. (mtn_pos(k, 2, 2) >= y_cb(-1) .and. mtn_pos(k, 2, 2) < y_cb(n))) then
13871383
keep_bubble(k) = 0
13881384
end if
13891385

@@ -1402,9 +1398,7 @@ contains
14021398
& 2) <= pcomm_coords(3)%end) then
14031399
wrap_bubble_dir(k, 3) = 1
14041400
wrap_bubble_loc(k, 3) = 1
1405-
else if (mtn_pos(k, 3, 2) >= z_cb(p)) then
1406-
keep_bubble(k) = 0
1407-
else if (mtn_pos(k, 3, 2) < z_cb(-1)) then
1401+
else if (.not. (mtn_pos(k, 3, 2) >= z_cb(-1) .and. mtn_pos(k, 3, 2) < z_cb(p))) then
14081402
keep_bubble(k) = 0
14091403
end if
14101404
end if

0 commit comments

Comments
 (0)