@@ -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
0 commit comments