Skip to content

Commit 7b15704

Browse files
Fixed debug build when IB is disabled
1 parent 2d6c291 commit 7b15704

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/simulation/m_data_output.fpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ contains
184184
real(wp) :: icfl, vcfl, ccfl, Rc
185185
real(wp) :: mu_frac, mu_frac_max_loc, mu_frac_max_glb !< Compression as a fraction of the EOS limit
186186
integer :: fl !< Fluid loop iterator
187+
logical :: include_cell !< Cell is fluid, not ghost/inside an IB
187188

188189
icfl_max_loc = 0._wp
189190
vcfl_max_loc = 0._wp
@@ -192,14 +193,15 @@ contains
192193
mu_frac_max_loc = 0._wp
193194
! Computing Stability Criteria at Current Time-step
194195
$:GPU_PARALLEL_LOOP(collapse=3, private='[j, k, l, vel, alpha, alpha_rho, Re, rho, vel_sum, pres, gamma, pi_inf, c, qv, &
195-
& icfl, vcfl, Rc, ccfl, fl, mu_frac]', reduction='[[icfl_max_loc, vcfl_max_loc, ccfl_max_loc, &
196-
& mu_frac_max_loc], [Rc_min_loc]]', reductionOp='[max, min]')
196+
& icfl, vcfl, Rc, ccfl, fl, mu_frac, include_cell]', reduction='[[icfl_max_loc, vcfl_max_loc, &
197+
& ccfl_max_loc, mu_frac_max_loc], [Rc_min_loc]]', reductionOp='[max, min]')
197198
do l = 0, p
198199
do k = 0, n
199200
do j = 0, m
200-
! Cells inside/on an immersed boundary hold ghost-derived, non-physical state -
201-
! excluded here so they cannot spuriously trip a stability violation.
202-
if ((.not. ib) .or. (ib_markers%sf(j, k, l) == 0)) then
201+
! exclude cells inside of immersed boundaries
202+
include_cell = .true.
203+
if (ib) include_cell = (ib_markers%sf(j, k, l) == 0)
204+
if (include_cell) then
203205
call s_compute_cell_state(q_prim_vf, pres, rho, gamma, pi_inf, Re, alpha, alpha_rho, vel, vel_sum, qv, j, &
204206
& k, l)
205207

0 commit comments

Comments
 (0)