@@ -495,22 +495,24 @@ contains
495495 do k = -offset_y%beg, n + offset_y%end
496496 do j = -offset_x%beg, m + offset_x%end
497497 q_sf(j, k, l) = 0._wp
498- ! Tracks the volume fraction of the fluid not explicitly stored (IGR reconstructs it as 1 - sum)
499- alpha_last = 1._wp
500498
501- do i = 1, eqn_idx%adv%end - eqn_idx%E
502- q_sf(j, k, l) = q_sf(j, k, l) - schlieren_alpha(i)*q_cons_vf(i + eqn_idx%E)%sf(j, k, l)*gm_rho_sf(j, &
503- & k, l)/gm_rho_max(1)
504- if (igr) then
505- alpha_last = alpha_last - q_cons_vf(i + eqn_idx%E)%sf(j, k, l)
506- end if
507- end do
508-
509- ! IGR stores only num_fluids-1 volume fractions; the last fluid' s volume fraction is untracked.
510- ! For a single fluid this is simply 1.0 everywhere. Without this term, the entire single- fluid
511- ! Schlieren field) is dropped, leaving exp (0 ) = 1 everywhere. Compute that term below.
499+ ! Tracks the volume fraction of the fluid not explicitly stored (IGR reconstructs it as 1 - sum)
512500 if (igr) then
501+ ! IGR stores only num_fluids-1 volume fractions; the last fluid' s volume fraction is untracked.
502+ ! For a single fluid this is simply 1.0 everywhere. Without this term, the entire single- fluid
503+ ! Schlieren field is dropped, leaving exp (0 ) = 1 everywhere. Compute that term below.
504+ alpha_last = 1._wp
505+ do i = 1 , eqn_idx%adv%end - eqn_idx%E
506+ q_sf(j, k, l) = q_sf(j, k, l) - schlieren_alpha(i)* q_cons_vf(i + eqn_idx%E)%sf(j, k, l)* gm_rho_sf(j, &
507+ & k, l)/ gm_rho_max(1 )
508+ alpha_last = alpha_last - q_cons_vf(i + eqn_idx%E)%sf(j, k, l)
509+ end do
513510 q_sf(j, k, l) = q_sf(j, k, l) - schlieren_alpha(num_fluids)* alpha_last* gm_rho_sf(j, k, l)/ gm_rho_max(1 )
511+ else
512+ do i = 1 , eqn_idx%adv%end - eqn_idx%E
513+ q_sf(j, k, l) = q_sf(j, k, l) - schlieren_alpha(i)* q_cons_vf(i + eqn_idx%E)%sf(j, k, l)* gm_rho_sf(j, &
514+ & k, l)/ gm_rho_max(1 )
515+ end do
514516 end if
515517 end do
516518 end do
0 commit comments