Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/common/m_boundary_common.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
case (BC_CHAR_SUP_OUTFLOW:BC_GHOST_EXTRAP)
call s_ghost_cell_extrapolation(q_prim_vf, pb, mv, 2, -1, k, l)
case (BC_AXIS)
call s_axis(q_prim_vf, pb, mv, 2, -1, k, l)
call s_axis(q_prim_vf, pb, mv, k, l)
case (BC_REFLECTIVE)
call s_symmetry(q_prim_vf, pb, mv, 2, -1, k, l)
case (BC_PERIODIC)
Expand Down Expand Up @@ -713,15 +713,14 @@

end subroutine s_periodic

pure subroutine s_axis(q_prim_vf, pb, mv, bc_dir, bc_loc, k, l)
pure subroutine s_axis(q_prim_vf, pb, mv, k, l)

Check warning on line 716 in src/common/m_boundary_common.fpp

View check run for this annotation

Codecov / codecov/patch

src/common/m_boundary_common.fpp#L716

Added line #L716 was not covered by tests
#ifdef _CRAYFTN
!DIR$ INLINEALWAYS s_axis
#else
!$acc routine seq
#endif
type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf
real(wp), dimension(idwbuff(1)%beg:, idwbuff(2)%beg:, idwbuff(3)%beg:, 1:, 1:), intent(inout) :: pb, mv
integer, intent(in) :: bc_dir, bc_loc
integer, intent(in) :: k, l

integer :: j, q, i
Expand Down
7 changes: 2 additions & 5 deletions src/common/m_mpi_common.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,21 +375,17 @@
!! @param Rc_min_glb Global minimum Rc stability criterion
impure subroutine s_mpi_reduce_stability_criteria_extrema(icfl_max_loc, &
vcfl_max_loc, &
ccfl_max_loc, &
Rc_min_loc, &
icfl_max_glb, &
vcfl_max_glb, &
ccfl_max_glb, &
Rc_min_glb)

real(wp), intent(in) :: icfl_max_loc
real(wp), intent(in) :: vcfl_max_loc
real(wp), intent(in) :: ccfl_max_loc
real(wp), intent(in) :: Rc_min_loc

real(wp), intent(out) :: icfl_max_glb
real(wp), intent(out) :: vcfl_max_glb
real(wp), intent(out) :: ccfl_max_glb
real(wp), intent(out) :: Rc_min_glb

#ifdef MFC_SIMULATION
Expand Down Expand Up @@ -1178,7 +1174,8 @@
#:endif
end if
#:endfor

p_send => buff_send(0)
p_recv => buff_recv(0)

Check warning on line 1178 in src/common/m_mpi_common.fpp

View check run for this annotation

Codecov / codecov/patch

src/common/m_mpi_common.fpp#L1177-L1178

Added lines #L1177 - L1178 were not covered by tests
! Send/Recv
#ifdef MFC_SIMULATION
#:for rdma_mpi in [False, True]
Expand Down
9 changes: 4 additions & 5 deletions src/common/m_phase_change.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ contains

! Calling pT-equilibrium for either finishing phase-change module, or as an IC for the pTg-equilibrium
! for this case, MFL cannot be either 0 or 1, so I chose it to be 2
call s_infinite_pt_relaxation_k(j, k, l, 2, pS, p_infpT, rM, q_cons_vf, rhoe, TS)
call s_infinite_pt_relaxation_k(j, k, l, 2, pS, p_infpT, q_cons_vf, rhoe, TS)

! check if pTg-equilibrium is required
! NOTE that NOTHING else needs to be updated OTHER than the individual partial densities
Expand All @@ -164,7 +164,7 @@ contains
q_cons_vf(vp + contxb - 1)%sf(j, k, l) = (1.0_wp - mixM)*rM

! calling pT-equilibrium for overheated vapor, which is MFL = 0
call s_infinite_pt_relaxation_k(j, k, l, 0, pSOV, p_infOV, rM, q_cons_vf, rhoe, TSOV)
call s_infinite_pt_relaxation_k(j, k, l, 0, pSOV, p_infOV, q_cons_vf, rhoe, TSOV)

! calculating Saturation temperature
call s_TSat(pSOV, TSatOV, TSOV)
Expand All @@ -177,7 +177,7 @@ contains
q_cons_vf(vp + contxb - 1)%sf(j, k, l) = mixM*rM

! calling pT-equilibrium for subcooled liquid, which is MFL = 1
call s_infinite_pt_relaxation_k(j, k, l, 1, pSSL, p_infSL, rM, q_cons_vf, rhoe, TSSL)
call s_infinite_pt_relaxation_k(j, k, l, 1, pSSL, p_infSL, q_cons_vf, rhoe, TSSL)

! calculating Saturation temperature
call s_TSat(pSSL, TSatSL, TSSL)
Expand Down Expand Up @@ -281,7 +281,7 @@ contains
!! @param q_cons_vf Cell-average conservative variables
!! @param rhoe mixture energy
!! @param TS equilibrium temperature at the interface
pure subroutine s_infinite_pt_relaxation_k(j, k, l, MFL, pS, p_infpT, rM, q_cons_vf, rhoe, TS)
pure subroutine s_infinite_pt_relaxation_k(j, k, l, MFL, pS, p_infpT, q_cons_vf, rhoe, TS)

#ifdef _CRAYFTN
!DIR$ INLINEALWAYS s_infinite_pt_relaxation_k
Expand All @@ -293,7 +293,6 @@ contains
integer, intent(in) :: j, k, l, MFL
real(wp), intent(out) :: pS
real(wp), dimension(num_fluids), intent(out) :: p_infpT
real(wp), intent(in) :: rM
type(scalar_field), dimension(sys_size), intent(in) :: q_cons_vf
real(wp), intent(in) :: rhoe
real(wp), intent(out) :: TS
Expand Down
40 changes: 13 additions & 27 deletions src/common/m_variables_conversion.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@

if (model_eqns == 1) then ! Gamma/pi_inf model
call s_convert_mixture_to_mixture_variables(q_vf, i, j, k, &
rho, gamma, pi_inf, qv, Re_K, G_K, G)
rho, gamma, pi_inf, qv)

Check warning on line 94 in src/common/m_variables_conversion.fpp

View check run for this annotation

Codecov / codecov/patch

src/common/m_variables_conversion.fpp#L94

Added line #L94 was not covered by tests

else if (bubbles_euler) then
call s_convert_species_to_mixture_variables_bubbles(q_vf, i, j, k, &
rho, gamma, pi_inf, qv, Re_K, G_K, G)
rho, gamma, pi_inf, qv, Re_K)
else
! Volume fraction model
call s_convert_species_to_mixture_variables(q_vf, i, j, k, &
Expand Down Expand Up @@ -206,7 +206,7 @@
!! @param pi_inf liquid stiffness
!! @param qv fluid reference energy
subroutine s_convert_mixture_to_mixture_variables(q_vf, i, j, k, &
rho, gamma, pi_inf, qv, Re_K, G_K, G)
rho, gamma, pi_inf, qv)

type(scalar_field), dimension(sys_size), intent(in) :: q_vf
integer, intent(in) :: i, j, k
Expand All @@ -216,11 +216,6 @@
real(wp), intent(out), target :: pi_inf
real(wp), intent(out), target :: qv

real(wp), optional, dimension(2), intent(out) :: Re_K

real(wp), optional, intent(out) :: G_K
real(wp), optional, dimension(num_fluids), intent(in) :: G

! Transferring the density, the specific heat ratio function and the
! liquid stiffness function, respectively
rho = q_vf(1)%sf(i, j, k)
Expand Down Expand Up @@ -253,7 +248,7 @@
!! @param pi_inf liquid stiffness
!! @param qv fluid reference energy
subroutine s_convert_species_to_mixture_variables_bubbles(q_vf, j, k, l, &
rho, gamma, pi_inf, qv, Re_K, G_K, G)
rho, gamma, pi_inf, qv, Re_K)

type(scalar_field), dimension(sys_size), intent(in) :: q_vf

Expand All @@ -265,8 +260,6 @@
real(wp), intent(out), target :: qv

real(wp), optional, dimension(2), intent(out) :: Re_K
real(wp), optional, intent(out) :: G_K
real(wp), optional, dimension(num_fluids), intent(in) :: G

integer :: i, q
real(wp), dimension(num_fluids) :: alpha_rho_K, alpha_K
Expand Down Expand Up @@ -463,7 +456,7 @@

pure subroutine s_convert_species_to_mixture_variables_acc(rho_K, &
gamma_K, pi_inf_K, qv_K, &
alpha_K, alpha_rho_K, Re_K, k, l, r, &
alpha_K, alpha_rho_K, Re_K, &
G_K, G)
#ifdef _CRAYFTN
!DIR$ INLINEALWAYS s_convert_species_to_mixture_variables_acc
Expand All @@ -480,8 +473,6 @@
real(wp), optional, intent(out) :: G_K
real(wp), optional, dimension(num_fluids), intent(in) :: G

integer, intent(in) :: k, l, r

integer :: i, j !< Generic loop iterators
real(wp) :: alpha_K_sum

Expand Down Expand Up @@ -547,7 +538,7 @@

pure subroutine s_convert_species_to_mixture_variables_bubbles_acc(rho_K, &
gamma_K, pi_inf_K, qv_K, &
alpha_K, alpha_rho_K, Re_K, k, l, r)
alpha_K, alpha_rho_K, Re_K)
#ifdef _CRAYFTN
!DIR$ INLINEALWAYS s_convert_species_to_mixture_variables_bubbles_acc
#else
Expand All @@ -560,7 +551,6 @@
!! Partial densities and volume fractions

real(wp), dimension(2), intent(out) :: Re_K
integer, intent(in) :: k, l, r

integer :: i, j !< Generic loop iterators

Expand Down Expand Up @@ -819,16 +809,12 @@
subroutine s_convert_conservative_to_primitive_variables(qK_cons_vf, &
q_T_sf, &
qK_prim_vf, &
ibounds, &
gm_alphaK_vf)
ibounds)

Check warning on line 812 in src/common/m_variables_conversion.fpp

View check run for this annotation

Codecov / codecov/patch

src/common/m_variables_conversion.fpp#L812

Added line #L812 was not covered by tests

type(scalar_field), dimension(sys_size), intent(in) :: qK_cons_vf
type(scalar_field), intent(inout) :: q_T_sf
type(scalar_field), dimension(sys_size), intent(inout) :: qK_prim_vf
type(int_bounds_info), dimension(1:3), intent(in) :: ibounds
type(scalar_field), &
allocatable, optional, dimension(:), &
intent(in) :: gm_alphaK_vf

real(wp), dimension(num_fluids) :: alpha_K, alpha_rho_K
real(wp), dimension(2) :: Re_K
Expand Down Expand Up @@ -902,13 +888,13 @@
! If in simulation, use acc mixture subroutines
if (elasticity) then
call s_convert_species_to_mixture_variables_acc(rho_K, gamma_K, pi_inf_K, qv_K, alpha_K, &
alpha_rho_K, Re_K, j, k, l, G_K, Gs)
alpha_rho_K, Re_K, G_K, Gs)
else if (bubbles_euler) then
call s_convert_species_to_mixture_variables_bubbles_acc(rho_K, gamma_K, pi_inf_K, qv_K, &
alpha_K, alpha_rho_K, Re_K, j, k, l)
alpha_K, alpha_rho_K, Re_K)
else
call s_convert_species_to_mixture_variables_acc(rho_K, gamma_K, pi_inf_K, qv_K, &
alpha_K, alpha_rho_K, Re_K, j, k, l)
alpha_K, alpha_rho_K, Re_K)
end if
#else
! If pre-processing, use non acc mixture subroutines
Expand Down Expand Up @@ -1509,13 +1495,13 @@
if (elasticity) then
call s_convert_species_to_mixture_variables_acc(rho_K, gamma_K, pi_inf_K, qv_K, &
alpha_K, alpha_rho_K, Re_K, &
j, k, l, G_K, Gs)
G_K, Gs)
else if (bubbles_euler) then
call s_convert_species_to_mixture_variables_bubbles_acc(rho_K, gamma_K, &
pi_inf_K, qv_K, alpha_K, alpha_rho_K, Re_K, j, k, l)
pi_inf_K, qv_K, alpha_K, alpha_rho_K, Re_K)
else
call s_convert_species_to_mixture_variables_acc(rho_K, gamma_K, pi_inf_K, qv_K, &
alpha_K, alpha_rho_K, Re_K, j, k, l)
alpha_K, alpha_rho_K, Re_K)
end if

! Computing the energy from the pressure
Expand Down
15 changes: 6 additions & 9 deletions src/pre_process/m_boundary_conditions.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@
s_write_parallel_boundary_condition_files

contains
impure subroutine s_line_segment_bc(patch_id, q_prim_vf, bc_type)
impure subroutine s_line_segment_bc(patch_id, bc_type)

type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf
type(integer_field), dimension(1:num_dims, -1:1), intent(inout) :: bc_type
integer, intent(in) :: patch_id

Expand Down Expand Up @@ -79,9 +78,8 @@

end subroutine s_line_segment_bc

impure subroutine s_circle_bc(patch_id, q_prim_vf, bc_type)
impure subroutine s_circle_bc(patch_id, bc_type)

type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf
type(integer_field), dimension(1:num_dims, -1:1), intent(inout) :: bc_type

integer, intent(in) :: patch_id
Expand Down Expand Up @@ -143,9 +141,8 @@

end subroutine s_circle_bc

impure subroutine s_rectangle_bc(patch_id, q_prim_vf, bc_type)
impure subroutine s_rectangle_bc(patch_id, bc_type)

Check warning on line 144 in src/pre_process/m_boundary_conditions.fpp

View check run for this annotation

Codecov / codecov/patch

src/pre_process/m_boundary_conditions.fpp#L144

Added line #L144 was not covered by tests

type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf
type(integer_field), dimension(1:num_dims, -1:1), intent(inout) :: bc_type

integer, intent(in) :: patch_id
Expand Down Expand Up @@ -247,9 +244,9 @@
end if

if (patch_bc(i)%geometry == 2) then
call s_circle_bc(i, q_prim_vf, bc_type)
call s_circle_bc(i, bc_type)
elseif (patch_bc(i)%geometry == 3) then
call s_rectangle_bc(i, q_prim_vf, bc_type)
call s_rectangle_bc(i, bc_type)

Check warning on line 249 in src/pre_process/m_boundary_conditions.fpp

View check run for this annotation

Codecov / codecov/patch

src/pre_process/m_boundary_conditions.fpp#L249

Added line #L249 was not covered by tests
end if
end do
!< Apply 1D patches to 2D domain
Expand All @@ -260,7 +257,7 @@
end if

if (patch_bc(i)%geometry == 1) then
call s_line_segment_bc(i, q_prim_vf, bc_type)
call s_line_segment_bc(i, bc_type)
end if
end do
end if
Expand Down
16 changes: 5 additions & 11 deletions src/pre_process/m_model.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -1104,11 +1104,10 @@
!! @param point The cell centers of the current levelset cell
!! @param spacing Dimensions of the current levelset cell
!! @return Distance which the levelset distance without interpolation
pure function f_distance(boundary_v, boundary_vertex_count, boundary_edge_count, point, spacing) result(distance)
integer, intent(in) :: boundary_vertex_count, boundary_edge_count
pure function f_distance(boundary_v, boundary_edge_count, point) result(distance)
integer, intent(in) :: boundary_edge_count
real(wp), intent(in), dimension(1:boundary_edge_count, 1:3, 1:2) :: boundary_v
t_vec3, intent(in) :: point
t_vec3, intent(in) :: spacing

integer :: i
real(wp) :: dist_buffer1, dist_buffer2
Expand All @@ -1132,16 +1131,13 @@

!> This procedure determines the levelset normals of 2D models without interpolation.
!! @param boundary_v Group of all the boundary vertices of the 2D model without interpolation
!! @param boundary_vertex_count Output the total number of boundary vertices
!! @param boundary_edge_count Output the total number of boundary edges
!! @param point The cell centers of the current levelset cell
!! @param spacing Dimensions of the current levelset cell
!! @param normals Output levelset normals without interpolation
pure subroutine f_normals(boundary_v, boundary_vertex_count, boundary_edge_count, point, spacing, normals)
integer, intent(in) :: boundary_vertex_count, boundary_edge_count
pure subroutine f_normals(boundary_v, boundary_edge_count, point, normals)
integer, intent(in) :: boundary_edge_count
real(wp), intent(in), dimension(1:boundary_edge_count, 1:3, 1:2) :: boundary_v
t_vec3, intent(in) :: point
t_vec3, intent(in) :: spacing
t_vec3, intent(out) :: normals

integer :: i, idx_buffer
Expand Down Expand Up @@ -1176,13 +1172,11 @@
!! @param interpolated_boundary_v Group of all the boundary vertices of the interpolated 2D model
!! @param total_vertices Total number of vertices after interpolation
!! @param point The cell centers of the current levelset cell
!! @param spacing Dimensions of the current levelset cell
!! @return Distance which the levelset distance without interpolation
pure function f_interpolated_distance(interpolated_boundary_v, total_vertices, point, spacing) result(distance)
pure function f_interpolated_distance(interpolated_boundary_v, total_vertices, point) result(distance)

Check warning on line 1176 in src/pre_process/m_model.fpp

View check run for this annotation

Codecov / codecov/patch

src/pre_process/m_model.fpp#L1176

Added line #L1176 was not covered by tests
integer, intent(in) :: total_vertices
real(wp), intent(in), dimension(1:total_vertices, 1:3) :: interpolated_boundary_v
t_vec3, intent(in) :: point
t_vec3, intent(in) :: spacing

integer :: i !< Loop iterator
real(wp) :: dist_buffer, min_dist
Expand Down
Loading
Loading