Skip to content

Commit bf2a897

Browse files
committed
bc_flag implemented
1 parent d60b4ea commit bf2a897

File tree

5 files changed

+32
-32
lines changed

5 files changed

+32
-32
lines changed

src/pre_process/m_perturbation.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ contains
3232

3333
impure subroutine s_initialize_perturbation_module()
3434

35-
bcxb = bc_x%beg; bcxe = bc_x%end; bcyb = bc_y%beg; bcye = bc_y%end; bczb = bc_z%beg; bcze = bc_z%end
35+
bc_flag%xb = bc_x%beg; bc_flag%xe = bc_x%end; bc_flag%yb = bc_y%beg; bc_flag%ye = bc_y%end; bc_flag%zb = bc_z%beg; bc_flag%ze = bc_z%end
3636

3737
if (mixlayer_perturb) then
3838
mixlayer_bc_fd = 2
@@ -624,7 +624,7 @@ contains
624624
do q = 1, elliptic_smoothing_iters
625625

626626
! Communication of buffer regions and apply boundary conditions
627-
call s_populate_variables_buffers(q_prim_vf, pb%sf, mv%sf, bc_type)
627+
call s_populate_variables_buffers(q_prim_vf, pb%sf, mv%sf, bc_type, bc_flag)
628628

629629
! Perform smoothing and store in temp array
630630
if (n == 0) then

src/simulation/m_cbc.fpp

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ module m_cbc
101101
!$acc declare create(is1, is2, is3)
102102
103103
integer :: dj
104-
integer :: bcxb, bcxe, bcyb, bcye, bczb, bcze
104+
type(boundary_flags) :: bc_flag !< Boundary flags
105105
integer :: cbc_dir, cbc_loc
106106
integer :: flux_cbc_index
107-
!$acc declare create(dj, bcxb, bcxe, bcyb, bcye, bczb, bcze, cbc_dir, cbc_loc, flux_cbc_index)
107+
!$acc declare create(dj, bc_flag, cbc_dir, cbc_loc, flux_cbc_index)
108108
109109
!! GRCBC inputs for subsonic inflow and outflow conditions consisting of
110110
!! inflow velocities, pressure, density and void fraction as well as
@@ -392,23 +392,23 @@ contains
392392
! Associating the procedural pointer to the appropriate subroutine
393393
! that will be utilized in the conversion to the mixture variables
394394
395-
bcxb = bc_x%beg
396-
bcxe = bc_x%end
395+
bc_flag%xb = bc_x%beg
396+
bc_flag%xe = bc_x%end
397397
398-
!$acc update device(bcxb, bcxe)
398+
!$acc update device(bc_flag)
399399
400400
if (n > 0) then
401-
bcyb = bc_y%beg
402-
bcye = bc_y%end
401+
bc_flag%yb = bc_y%beg
402+
bc_flag%ye = bc_y%end
403403
404-
!$acc update device(bcyb, bcye)
404+
!$acc update device(bc_flag)
405405
end if
406406
407407
if (p > 0) then
408-
bczb = bc_z%beg
409-
bcze = bc_z%end
408+
bc_flag%zb = bc_z%beg
409+
bc_flag%ze = bc_z%end
410410
411-
!$acc update device(bczb, bcze)
411+
!$acc update device(bc_flag)
412412
end if
413413
414414
! Allocate GRCBC inputs
@@ -911,14 +911,14 @@ contains
911911
912912
Ma = vel(dir_idx(1))/c
913913
914-
if ((cbc_loc == -1 .and. bc${XYZ}$b == BC_CHAR_SLIP_WALL) .or. &
915-
(cbc_loc == 1 .and. bc${XYZ}$e == BC_CHAR_SLIP_WALL)) then
914+
if ((cbc_loc == -1 .and. bc_flag%${XYZ}$b == BC_CHAR_SLIP_WALL) .or. &
915+
(cbc_loc == 1 .and. bc_flag%${XYZ}$e == BC_CHAR_SLIP_WALL)) then
916916
call s_compute_slip_wall_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, dvel_ds, dadv_ds)
917-
else if ((cbc_loc == -1 .and. bc${XYZ}$b == BC_CHAR_NR_SUB_BUFFER) .or. &
918-
(cbc_loc == 1 .and. bc${XYZ}$e == BC_CHAR_NR_SUB_BUFFER)) then
917+
else if ((cbc_loc == -1 .and. bc_flag%${XYZ}$b == BC_CHAR_NR_SUB_BUFFER) .or. &
918+
(cbc_loc == 1 .and. bc_flag%${XYZ}$e == BC_CHAR_NR_SUB_BUFFER)) then
919919
call s_compute_nonreflecting_subsonic_buffer_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, dvel_ds, dadv_ds, dYs_ds)
920-
else if ((cbc_loc == -1 .and. bc${XYZ}$b == BC_CHAR_NR_SUB_INFLOW) .or. &
921-
(cbc_loc == 1 .and. bc${XYZ}$e == BC_CHAR_NR_SUB_INFLOW)) then
920+
else if ((cbc_loc == -1 .and. bc_flag%${XYZ}$b == BC_CHAR_NR_SUB_INFLOW) .or. &
921+
(cbc_loc == 1 .and. bc_flag%${XYZ}$e == BC_CHAR_NR_SUB_INFLOW)) then
922922
call s_compute_nonreflecting_subsonic_inflow_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, dvel_ds, dadv_ds)
923923
! Add GRCBC for Subsonic Inflow
924924
if (bc_${XYZ}$%grcbc_in) then
@@ -938,8 +938,8 @@ contains
938938
end do
939939
L(advxe) = rho*c**2._wp*(1._wp + Ma)*(vel(dir_idx(1)) + vel_in(${CBC_DIR}$, dir_idx(1))*sign(1, cbc_loc))/Del_in(${CBC_DIR}$) + c*(1._wp + Ma)*(pres - pres_in(${CBC_DIR}$))/Del_in(${CBC_DIR}$)
940940
end if
941-
else if ((cbc_loc == -1 .and. bc${XYZ}$b == BC_CHAR_NR_SUB_OUTFLOW) .or. &
942-
(cbc_loc == 1 .and. bc${XYZ}$e == BC_CHAR_NR_SUB_OUTFLOW)) then
941+
else if ((cbc_loc == -1 .and. bc_flag%${XYZ}$b == BC_CHAR_NR_SUB_OUTFLOW) .or. &
942+
(cbc_loc == 1 .and. bc_flag%${XYZ}$e == BC_CHAR_NR_SUB_OUTFLOW)) then
943943
call s_compute_nonreflecting_subsonic_outflow_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, dvel_ds, dadv_ds, dYs_ds)
944944
! Add GRCBC for Subsonic Outflow (Pressure)
945945
if (bc_${XYZ}$%grcbc_out) then
@@ -950,17 +950,17 @@ contains
950950
L(advxe) = L(advxe) + rho*c**2._wp*(1._wp - Ma)*(vel(dir_idx(1)) + vel_out(${CBC_DIR}$, dir_idx(1))*sign(1, cbc_loc))/Del_out(${CBC_DIR}$)
951951
end if
952952
end if
953-
else if ((cbc_loc == -1 .and. bc${XYZ}$b == BC_CHAR_FF_SUB_OUTFLOW) .or. &
954-
(cbc_loc == 1 .and. bc${XYZ}$e == BC_CHAR_FF_SUB_OUTFLOW)) then
953+
else if ((cbc_loc == -1 .and. bc_flag%${XYZ}$b == BC_CHAR_FF_SUB_OUTFLOW) .or. &
954+
(cbc_loc == 1 .and. bc_flag%${XYZ}$e == BC_CHAR_FF_SUB_OUTFLOW)) then
955955
call s_compute_force_free_subsonic_outflow_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, dvel_ds, dadv_ds)
956-
else if ((cbc_loc == -1 .and. bc${XYZ}$b == BC_CHAR_CP_SUB_OUTFLOW) .or. &
957-
(cbc_loc == 1 .and. bc${XYZ}$e == BC_CHAR_CP_SUB_OUTFLOW)) then
956+
else if ((cbc_loc == -1 .and. bc_flag%${XYZ}$b == BC_CHAR_CP_SUB_OUTFLOW) .or. &
957+
(cbc_loc == 1 .and. bc_flag%${XYZ}$e == BC_CHAR_CP_SUB_OUTFLOW)) then
958958
call s_compute_constant_pressure_subsonic_outflow_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, dvel_ds, dadv_ds)
959-
else if ((cbc_loc == -1 .and. bc${XYZ}$b == BC_CHAR_SUP_INFLOW) .or. &
960-
(cbc_loc == 1 .and. bc${XYZ}$e == BC_CHAR_SUP_INFLOW)) then
959+
else if ((cbc_loc == -1 .and. bc_flag%${XYZ}$b == BC_CHAR_SUP_INFLOW) .or. &
960+
(cbc_loc == 1 .and. bc_flag%${XYZ}$e == BC_CHAR_SUP_INFLOW)) then
961961
call s_compute_supersonic_inflow_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, dvel_ds, dadv_ds)
962-
else if ((cbc_loc == -1 .and. bc${XYZ}$b == BC_CHAR_SUP_OUTFLOW) .or. &
963-
(cbc_loc == 1 .and. bc${XYZ}$e == BC_CHAR_SUP_OUTFLOW)) then
962+
else if ((cbc_loc == -1 .and. bc_flag%${XYZ}$b == BC_CHAR_SUP_OUTFLOW) .or. &
963+
(cbc_loc == 1 .and. bc_flag%${XYZ}$e == BC_CHAR_SUP_OUTFLOW)) then
964964
call s_compute_supersonic_outflow_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, dvel_ds, dadv_ds, dYs_ds)
965965
end if
966966

src/simulation/m_rhs.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ contains
674674
call nvtxEndRange
675675

676676
call nvtxStartRange("RHS-COMMUNICATION")
677-
call s_populate_variables_buffers(q_prim_qp%vf, pb, mv, bc_type)
677+
call s_populate_variables_buffers(q_prim_qp%vf, pb, mv, bc_type, bc_flag)
678678
call nvtxEndRange
679679

680680
call nvtxStartRange("RHS-ELASTIC")

src/simulation/m_surface_tension.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ contains
290290
end do
291291
end do
292292

293-
call s_populate_capillary_buffers(c_divs, bc_type)
293+
call s_populate_capillary_buffers(c_divs, bc_type, bc_flag)
294294

295295
iv%beg = 1; iv%end = num_dims + 1
296296

src/simulation/m_time_steppers.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ contains
940940

941941
elseif (bubbles_lagrange) then
942942

943-
call s_populate_variables_buffers(q_prim_vf, pb_ts(1)%sf, mv_ts(1)%sf, bc_type)
943+
call s_populate_variables_buffers(q_prim_vf, pb_ts(1)%sf, mv_ts(1)%sf, bc_type, bc_flag)
944944
call s_compute_bubble_EL_dynamics(q_cons_ts(1)%vf, q_prim_vf, t_step, rhs_vf, stage)
945945
call s_transfer_data_to_tmp()
946946
call s_smear_voidfraction()

0 commit comments

Comments
 (0)