diff --git a/src/common/m_boundary_common.fpp b/src/common/m_boundary_common.fpp index ea72026dfc..e146c15af4 100644 --- a/src/common/m_boundary_common.fpp +++ b/src/common/m_boundary_common.fpp @@ -142,7 +142,7 @@ contains 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) @@ -713,7 +713,7 @@ contains 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) #ifdef _CRAYFTN !DIR$ INLINEALWAYS s_axis #else @@ -721,7 +721,6 @@ contains #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 diff --git a/src/common/m_mpi_common.fpp b/src/common/m_mpi_common.fpp index 4c84b6ff8c..b439ce1c6d 100644 --- a/src/common/m_mpi_common.fpp +++ b/src/common/m_mpi_common.fpp @@ -375,21 +375,17 @@ contains !! @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 @@ -1178,7 +1174,8 @@ contains #:endif end if #:endfor - + p_send => buff_send(0) + p_recv => buff_recv(0) ! Send/Recv #ifdef MFC_SIMULATION #:for rdma_mpi in [False, True] diff --git a/src/common/m_phase_change.fpp b/src/common/m_phase_change.fpp index 52565515f1..b520d700ba 100644 --- a/src/common/m_phase_change.fpp +++ b/src/common/m_phase_change.fpp @@ -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 @@ -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) @@ -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) @@ -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 @@ -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 diff --git a/src/common/m_variables_conversion.fpp b/src/common/m_variables_conversion.fpp index 288c2fb0f3..6b506b77cd 100644 --- a/src/common/m_variables_conversion.fpp +++ b/src/common/m_variables_conversion.fpp @@ -91,11 +91,11 @@ contains 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) 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, & @@ -206,7 +206,7 @@ contains !! @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 @@ -216,11 +216,6 @@ contains 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) @@ -253,7 +248,7 @@ contains !! @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 @@ -265,8 +260,6 @@ contains 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 @@ -463,7 +456,7 @@ contains 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 @@ -480,8 +473,6 @@ contains 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 @@ -547,7 +538,7 @@ contains 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 @@ -560,7 +551,6 @@ contains !! 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 @@ -819,16 +809,12 @@ contains subroutine s_convert_conservative_to_primitive_variables(qK_cons_vf, & q_T_sf, & qK_prim_vf, & - ibounds, & - gm_alphaK_vf) + ibounds) 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 @@ -902,13 +888,13 @@ contains ! 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 @@ -1509,13 +1495,13 @@ contains 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 diff --git a/src/pre_process/m_boundary_conditions.fpp b/src/pre_process/m_boundary_conditions.fpp index 1e8f160b38..4fc2e5ff03 100644 --- a/src/pre_process/m_boundary_conditions.fpp +++ b/src/pre_process/m_boundary_conditions.fpp @@ -29,9 +29,8 @@ module m_boundary_conditions 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 @@ -79,9 +78,8 @@ contains 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 @@ -143,9 +141,8 @@ contains 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) - 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 @@ -247,9 +244,9 @@ contains 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) end if end do !< Apply 1D patches to 2D domain @@ -260,7 +257,7 @@ contains 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 diff --git a/src/pre_process/m_model.fpp b/src/pre_process/m_model.fpp index 214a5fcda1..852cc1a22b 100644 --- a/src/pre_process/m_model.fpp +++ b/src/pre_process/m_model.fpp @@ -1104,11 +1104,10 @@ contains !! @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 @@ -1132,16 +1131,13 @@ contains !> 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 @@ -1176,13 +1172,11 @@ contains !! @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) 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 diff --git a/src/pre_process/m_patches.fpp b/src/pre_process/m_patches.fpp index 2425553d3f..ec9b2baf05 100644 --- a/src/pre_process/m_patches.fpp +++ b/src/pre_process/m_patches.fpp @@ -2299,8 +2299,7 @@ contains if (interpolate) then STL_levelset%sf(i, j, k, patch_id) = f_interpolated_distance(interpolated_boundary_v, & total_vertices, & - point, & - (/dx, dy, dz/)) + point) else STL_levelset%sf(i, j, k, patch_id) = distance end if @@ -2323,15 +2322,12 @@ contains ! Get the shortest distance between the cell center and the model boundary STL_levelset%sf(i, j, 0, patch_id) = f_interpolated_distance(interpolated_boundary_v, & total_vertices, & - point, & - (/dx, dy, dz/)) + point) else ! Get the shortest distance between the cell center and the interpolated model boundary STL_levelset%sf(i, j, 0, patch_id) = f_distance(boundary_v, & - boundary_vertex_count, & boundary_edge_count, & - point, & - (/dx, dy, dz/)) + point) end if ! Correct the sign of the levelset @@ -2341,10 +2337,9 @@ contains ! Get the boundary normals call f_normals(boundary_v, & - boundary_vertex_count, & - boundary_edge_count, & - point, & - & (/dx, dy, dz/), normals) + boundary_edge_count, & + point, & + normals) ! Correct the sign of the levelset_norm if (patch_id_fp(i, j, k) == 0) then diff --git a/src/pre_process/m_start_up.fpp b/src/pre_process/m_start_up.fpp index 1c9c79d342..e33491576f 100644 --- a/src/pre_process/m_start_up.fpp +++ b/src/pre_process/m_start_up.fpp @@ -826,12 +826,9 @@ contains end subroutine s_read_grid - impure subroutine s_apply_initial_condition(start, finish, proc_time, time_avg, time_final, file_exists) + impure subroutine s_apply_initial_condition(start, finish) real(wp), intent(inout) :: start, finish - real(wp), dimension(:), intent(inout) :: proc_time - real(wp), intent(inout) :: time_avg, time_final - logical, intent(inout) :: file_exists ! Setting up the grid and the initial condition. If the grid is read in from ! preexisting grid data files, it is checked for consistency. If the grid is diff --git a/src/pre_process/p_main.f90 b/src/pre_process/p_main.f90 index 56e6ab928f..4ce377f5cb 100644 --- a/src/pre_process/p_main.f90 +++ b/src/pre_process/p_main.f90 @@ -28,7 +28,7 @@ program p_main allocate (proc_time(0:num_procs - 1)) - call s_apply_initial_condition(start, finish, proc_time, time_avg, time_final, file_exists) + call s_apply_initial_condition(start, finish) time_avg = abs(finish - start) diff --git a/src/simulation/m_bubbles.fpp b/src/simulation/m_bubbles.fpp index bf008b9b00..4ff8a54df0 100644 --- a/src/simulation/m_bubbles.fpp +++ b/src/simulation/m_bubbles.fpp @@ -69,7 +69,7 @@ contains else if (bubble_model == 3) then ! Rayleigh-Plesset bubbles fCpbw = f_cpbw_KM(fR0, fR, fV, fpb) - f_rddot = f_rddot_RP(fP, fRho, fR, fV, fR0, fCpbw) + f_rddot = f_rddot_RP(fP, fRho, fR, fV, fCpbw) end if end function f_rddot @@ -207,9 +207,9 @@ contains !! @param fV Current bubble velocity !! @param fR0 Equilibrium bubble radius !! @param fCpbw Boundary wall pressure - pure elemental function f_rddot_RP(fCp, fRho, fR, fV, fR0, fCpbw) + pure elemental function f_rddot_RP(fCp, fRho, fR, fV, fCpbw) !$acc routine seq - real(wp), intent(in) :: fCp, fRho, fR, fV, fR0, fCpbw + real(wp), intent(in) :: fCp, fRho, fR, fV, fCpbw real(wp) :: f_rddot_RP diff --git a/src/simulation/m_bubbles_EE.fpp b/src/simulation/m_bubbles_EE.fpp index d2bb02cbc5..47558229ea 100644 --- a/src/simulation/m_bubbles_EE.fpp +++ b/src/simulation/m_bubbles_EE.fpp @@ -153,10 +153,9 @@ contains !! that are needed for the bubble modeling !! @param q_prim_vf Primitive variables !! @param q_cons_vf Conservative variables - impure subroutine s_compute_bubble_EE_source(q_cons_vf, q_prim_vf, t_step, rhs_vf) + impure subroutine s_compute_bubble_EE_source(q_cons_vf, q_prim_vf, rhs_vf) type(scalar_field), dimension(sys_size), intent(inout) :: q_cons_vf type(scalar_field), dimension(sys_size), intent(in) :: q_prim_vf - integer, intent(in) :: t_step type(scalar_field), dimension(sys_size), intent(inout) :: rhs_vf real(wp) :: rddot diff --git a/src/simulation/m_bubbles_EL.fpp b/src/simulation/m_bubbles_EL.fpp index 013d91988e..008840caa1 100644 --- a/src/simulation/m_bubbles_EL.fpp +++ b/src/simulation/m_bubbles_EL.fpp @@ -497,12 +497,10 @@ contains !! @param rhs_vf Calculated change of conservative variables !! @param t_step Current time step !! @param stage Current stage in the time-stepper algorithm - subroutine s_compute_bubble_EL_dynamics(q_cons_vf, q_prim_vf, t_step, rhs_vf, stage) + subroutine s_compute_bubble_EL_dynamics(q_prim_vf, stage) - type(scalar_field), dimension(sys_size), intent(inout) :: q_cons_vf type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf - type(scalar_field), dimension(sys_size), intent(inout) :: rhs_vf - integer, intent(in) :: t_step, stage + integer, intent(in) :: stage real(wp) :: myVapFlux real(wp) :: preterm1, term2, paux, pint, Romega, term1_fac @@ -575,8 +573,8 @@ contains myalpha(i) = q_prim_vf(E_idx + i)%sf(cell(1), cell(2), cell(3)) end do call s_convert_species_to_mixture_variables_acc(myRho, gamma, pi_inf, qv, myalpha, & - myalpha_rho, Re, cell(1), cell(2), cell(3)) - call s_compute_cson_from_pinf(k, q_prim_vf, myPinf, cell, myRho, gamma, pi_inf, myCson) + myalpha_rho, Re) + call s_compute_cson_from_pinf(q_prim_vf, myPinf, cell, myRho, gamma, pi_inf, myCson) ! Adaptive time stepping adap_dt_stop = 0 @@ -733,13 +731,12 @@ contains !! @param gamma Liquid specific heat ratio !! @param pi_inf Liquid stiffness !! @param cson Calculated speed of sound - pure subroutine s_compute_cson_from_pinf(bub_id, q_prim_vf, pinf, cell, rhol, gamma, pi_inf, cson) + pure subroutine s_compute_cson_from_pinf(q_prim_vf, pinf, cell, rhol, gamma, pi_inf, cson) #ifdef _CRAYFTN !DIR$ INLINEALWAYS s_compute_cson_from_pinf #else !$acc routine seq #endif - integer, intent(in) :: bub_id type(scalar_field), dimension(sys_size), intent(in) :: q_prim_vf real(wp), intent(in) :: pinf, rhol, gamma, pi_inf integer, dimension(3), intent(in) :: cell diff --git a/src/simulation/m_cbc.fpp b/src/simulation/m_cbc.fpp index 1c7f1a4506..1645ffef25 100644 --- a/src/simulation/m_cbc.fpp +++ b/src/simulation/m_cbc.fpp @@ -801,9 +801,9 @@ contains end do if (bubbles_euler) then - call s_convert_species_to_mixture_variables_bubbles_acc(rho, gamma, pi_inf, qv, adv, alpha_rho, Re_cbc, 0, k, r) + call s_convert_species_to_mixture_variables_bubbles_acc(rho, gamma, pi_inf, qv, adv, alpha_rho, Re_cbc) else - call s_convert_species_to_mixture_variables_acc(rho, gamma, pi_inf, qv, adv, alpha_rho, Re_cbc, 0, k, r) + call s_convert_species_to_mixture_variables_acc(rho, gamma, pi_inf, qv, adv, alpha_rho, Re_cbc) end if !$acc loop seq @@ -913,13 +913,13 @@ contains if ((cbc_loc == -1 .and. bc${XYZ}$b == BC_CHAR_SLIP_WALL) .or. & (cbc_loc == 1 .and. bc${XYZ}$e == BC_CHAR_SLIP_WALL)) then - call s_compute_slip_wall_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, dvel_ds, dadv_ds) + call s_compute_slip_wall_L(lambda, L, rho, c, dpres_ds, dvel_ds) else if ((cbc_loc == -1 .and. bc${XYZ}$b == BC_CHAR_NR_SUB_BUFFER) .or. & (cbc_loc == 1 .and. bc${XYZ}$e == BC_CHAR_NR_SUB_BUFFER)) then call s_compute_nonreflecting_subsonic_buffer_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, dvel_ds, dadv_ds, dYs_ds) else if ((cbc_loc == -1 .and. bc${XYZ}$b == BC_CHAR_NR_SUB_INFLOW) .or. & (cbc_loc == 1 .and. bc${XYZ}$e == BC_CHAR_NR_SUB_INFLOW)) then - call s_compute_nonreflecting_subsonic_inflow_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, dvel_ds, dadv_ds) + call s_compute_nonreflecting_subsonic_inflow_L(lambda, L, rho, c, dpres_ds, dvel_ds) ! Add GRCBC for Subsonic Inflow if (bc_${XYZ}$%grcbc_in) then !$acc loop seq @@ -958,7 +958,7 @@ contains call s_compute_constant_pressure_subsonic_outflow_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, dvel_ds, dadv_ds) else if ((cbc_loc == -1 .and. bc${XYZ}$b == BC_CHAR_SUP_INFLOW) .or. & (cbc_loc == 1 .and. bc${XYZ}$e == BC_CHAR_SUP_INFLOW)) then - call s_compute_supersonic_inflow_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, dvel_ds, dadv_ds) + call s_compute_supersonic_inflow_L(L) else if ((cbc_loc == -1 .and. bc${XYZ}$b == BC_CHAR_SUP_OUTFLOW) .or. & (cbc_loc == 1 .and. bc${XYZ}$e == BC_CHAR_SUP_OUTFLOW)) then call s_compute_supersonic_outflow_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, dvel_ds, dadv_ds, dYs_ds) @@ -1111,8 +1111,7 @@ contains ! The reshaping of outputted data and disssociation of the FD and PI ! coefficients, or CBC coefficients, respectively, based on selected ! CBC coordinate direction. - call s_finalize_cbc(flux_vf, flux_src_vf, & - ix, iy, iz) + call s_finalize_cbc(flux_vf, flux_src_vf) end subroutine s_cbc !> The computation of parameters, the allocation of memory, @@ -1399,18 +1398,12 @@ contains !! are necessary in order to finalize the CBC application !! @param flux_vf Cell-boundary-average fluxes !! @param flux_src_vf Cell-boundary-average flux sources - !! @param ix Index bound in the first coordinate direction - !! @param iy Index bound in the second coordinate direction - !! @param iz Index bound in the third coordinate direction - subroutine s_finalize_cbc(flux_vf, flux_src_vf, & - ix, iy, iz) + subroutine s_finalize_cbc(flux_vf, flux_src_vf) type(scalar_field), & dimension(sys_size), & intent(inout) :: flux_vf, flux_src_vf - type(int_bounds_info), intent(in) :: ix, iy, iz - integer :: i, j, k, r !< Generic loop iterators ! Determining the indicial shift based on CBC location diff --git a/src/simulation/m_compute_cbc.fpp b/src/simulation/m_compute_cbc.fpp index 275acb7f6f..7bab7d3a67 100644 --- a/src/simulation/m_compute_cbc.fpp +++ b/src/simulation/m_compute_cbc.fpp @@ -23,7 +23,7 @@ contains !! Thompson (1990). At the slip wall (frictionless wall), !! the normal component of velocity is zero at all times, !! while the transverse velocities may be nonzero. - pure subroutine s_compute_slip_wall_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, dvel_ds, dadv_ds) + pure subroutine s_compute_slip_wall_L(lambda, L, rho, c, dpres_ds, dvel_ds) #ifdef _CRAYFTN !DIR$ INLINEALWAYS s_compute_slip_wall_L #else @@ -32,10 +32,8 @@ contains real(wp), dimension(3), intent(in) :: lambda real(wp), dimension(sys_size), intent(inout) :: L real(wp), intent(in) :: rho, c - real(wp), dimension(num_fluids), intent(in) :: mf, dalpha_rho_ds real(wp), intent(in) :: dpres_ds real(wp), dimension(num_dims), intent(in) :: dvel_ds - real(wp), dimension(num_fluids), intent(in) :: dadv_ds integer :: i @@ -103,7 +101,7 @@ contains !! see pg. 455, Thompson (1990). This nonreflecting subsonic !! CBC assumes an incoming flow and reduces the amplitude of !! any reflections caused by outgoing waves. - pure subroutine s_compute_nonreflecting_subsonic_inflow_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, dvel_ds, dadv_ds) + pure subroutine s_compute_nonreflecting_subsonic_inflow_L(lambda, L, rho, c, dpres_ds, dvel_ds) #ifdef _CRAYFTN !DIR$ INLINEALWAYS s_compute_nonreflecting_subsonic_inflow_L #else @@ -112,10 +110,8 @@ contains real(wp), dimension(3), intent(in) :: lambda real(wp), dimension(sys_size), intent(inout) :: L real(wp), intent(in) :: rho, c - real(wp), dimension(num_fluids), intent(in) :: mf, dalpha_rho_ds real(wp), intent(in) :: dpres_ds real(wp), dimension(num_dims), intent(in) :: dvel_ds - real(wp), dimension(num_fluids), intent(in) :: dadv_ds integer :: i @@ -263,19 +259,14 @@ contains !! state, or nearly a steady state, CBC in which only the !! transverse terms may generate a time dependence at the !! inflow boundary. - pure subroutine s_compute_supersonic_inflow_L(lambda, L, rho, c, mf, dalpha_rho_ds, dpres_ds, dvel_ds, dadv_ds) + pure subroutine s_compute_supersonic_inflow_L(L) #ifdef _CRAYFTN !DIR$ INLINEALWAYS s_compute_supersonic_inflow_L #else !$acc routine seq #endif - real(wp), dimension(3), intent(in) :: lambda real(wp), dimension(sys_size), intent(inout) :: L - real(wp), intent(in) :: rho, c - real(wp), dimension(num_fluids), intent(in) :: mf, dalpha_rho_ds - real(wp), intent(in) :: dpres_ds - real(wp), dimension(num_dims), intent(in) :: dvel_ds - real(wp), dimension(num_fluids), intent(in) :: dadv_ds + integer :: i do i = 1, advxe diff --git a/src/simulation/m_data_output.fpp b/src/simulation/m_data_output.fpp index b66e13d9c2..5b174e6652 100644 --- a/src/simulation/m_data_output.fpp +++ b/src/simulation/m_data_output.fpp @@ -97,7 +97,7 @@ contains if (.not. parallel_io) then call s_write_serial_data_files(q_cons_vf, q_T_sf, q_prim_vf, t_step, beta) else - call s_write_parallel_data_files(q_cons_vf, q_prim_vf, t_step, beta) + call s_write_parallel_data_files(q_cons_vf, t_step, beta) end if end subroutine s_write_data_files @@ -330,11 +330,9 @@ contains if (num_procs > 1) then call 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) else icfl_max_glb = icfl_max_loc @@ -783,13 +781,11 @@ contains !> The goal of this subroutine is to output the grid and !! conservative variables data files for given time-step. !! @param q_cons_vf Cell-average conservative variables - !! @param q_prim_vf Cell-average primitive variables !! @param t_step Current time-step !! @param beta Eulerian void fraction from lagrangian bubbles - impure subroutine s_write_parallel_data_files(q_cons_vf, q_prim_vf, t_step, beta) + impure subroutine s_write_parallel_data_files(q_cons_vf, t_step, beta) type(scalar_field), dimension(sys_size), intent(in) :: q_cons_vf - type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf integer, intent(in) :: t_step type(scalar_field), intent(inout), optional :: beta diff --git a/src/simulation/m_hyperelastic.fpp b/src/simulation/m_hyperelastic.fpp index be79e98232..ba8b5bc4a8 100644 --- a/src/simulation/m_hyperelastic.fpp +++ b/src/simulation/m_hyperelastic.fpp @@ -118,7 +118,7 @@ contains end do ! If in simulation, use acc mixture subroutines call s_convert_species_to_mixture_variables_acc(rho, gamma, pi_inf, qv, alpha_k, & - alpha_rho_k, Re, j, k, l, G, Gs) + alpha_rho_k, Re, G, Gs) rho = max(rho, sgm_eps) G = max(G, sgm_eps) !if ( G <= verysmall ) G_K = 0_wp diff --git a/src/simulation/m_ibm.fpp b/src/simulation/m_ibm.fpp index 420a024545..c7c96890aa 100644 --- a/src/simulation/m_ibm.fpp +++ b/src/simulation/m_ibm.fpp @@ -203,13 +203,13 @@ contains ! If in simulation, use acc mixture subroutines if (elasticity) then call s_convert_species_to_mixture_variables_acc(rho, gamma, pi_inf, qv_K, alpha_IP, & - alpha_rho_IP, Re_K, j, k, l, G_K, Gs) + alpha_rho_IP, Re_K, G_K, Gs) else if (bubbles_euler) then call s_convert_species_to_mixture_variables_bubbles_acc(rho, gamma, pi_inf, qv_K, alpha_IP, & - alpha_rho_IP, Re_K, j, k, l) + alpha_rho_IP, Re_K) else call s_convert_species_to_mixture_variables_acc(rho, gamma, pi_inf, qv_K, alpha_IP, & - alpha_rho_IP, Re_K, j, k, l) + alpha_rho_IP, Re_K) end if end if @@ -324,7 +324,7 @@ contains end if call s_convert_species_to_mixture_variables_acc(rho, gamma, pi_inf, qv_K, alpha_IP, & - alpha_rho_IP, Re_K, j, k, l) + alpha_rho_IP, Re_K) dyn_pres = 0._wp diff --git a/src/simulation/m_qbmm.fpp b/src/simulation/m_qbmm.fpp index c952a7745d..1abc39b3a4 100644 --- a/src/simulation/m_qbmm.fpp +++ b/src/simulation/m_qbmm.fpp @@ -411,14 +411,13 @@ contains end subroutine s_initialize_qbmm_module - pure subroutine s_compute_qbmm_rhs(idir, q_cons_vf, q_prim_vf, rhs_vf, flux_n_vf, pb, rhs_pb, mv, rhs_mv) + pure subroutine s_compute_qbmm_rhs(idir, q_cons_vf, q_prim_vf, rhs_vf, flux_n_vf, pb, rhs_pb) integer, intent(in) :: idir type(scalar_field), dimension(sys_size), intent(in) :: q_cons_vf, q_prim_vf type(scalar_field), dimension(sys_size), intent(inout) :: rhs_vf type(scalar_field), dimension(sys_size), intent(in) :: flux_n_vf real(wp), dimension(idwbuff(1)%beg:, idwbuff(2)%beg:, idwbuff(3)%beg:, 1:, 1:), intent(inout) :: pb, rhs_pb - real(wp), dimension(idwbuff(1)%beg:, idwbuff(2)%beg:, idwbuff(3)%beg:, 1:, 1:), intent(inout) :: mv, rhs_mv integer :: i, j, k, l, q real(wp) :: nb_q, nb_dot, R, R2, nR, nR2, nR_dot, nR2_dot, var, AX @@ -700,7 +699,7 @@ contains end subroutine s_coeff - subroutine s_mom_inv(q_cons_vf, q_prim_vf, momsp, moms3d, pb, rhs_pb, mv, rhs_mv, ix, iy, iz, nbub_sc) + subroutine s_mom_inv(q_cons_vf, q_prim_vf, momsp, moms3d, pb, rhs_pb, mv, rhs_mv, ix, iy, iz) type(scalar_field), dimension(:), intent(inout) :: q_cons_vf, q_prim_vf type(scalar_field), dimension(:), intent(inout) :: momsp @@ -708,7 +707,6 @@ contains real(wp), dimension(idwbuff(1)%beg:, idwbuff(2)%beg:, idwbuff(3)%beg:, 1:, 1:), intent(inout) :: pb, rhs_pb real(wp), dimension(idwbuff(1)%beg:, idwbuff(2)%beg:, idwbuff(3)%beg:, 1:, 1:), intent(inout) :: mv, rhs_mv type(int_bounds_info), intent(in) :: ix, iy, iz - real(wp), dimension(idwbuff(1)%beg:, idwbuff(2)%beg:, idwbuff(3)%beg:), intent(inout) :: nbub_sc real(wp), dimension(nmom) :: moms, msum real(wp), dimension(nnode, nb) :: wght, abscX, abscY, wght_pb, wght_mv, wght_ht, ht diff --git a/src/simulation/m_rhs.fpp b/src/simulation/m_rhs.fpp index deb869c11b..c9aaac46d4 100644 --- a/src/simulation/m_rhs.fpp +++ b/src/simulation/m_rhs.fpp @@ -669,8 +669,7 @@ contains q_cons_qp%vf, & q_T_sf, & q_prim_qp%vf, & - idwint, & - gm_alpha_qp%vf) + idwint) call nvtxEndRange call nvtxStartRange("RHS-COMMUNICATION") @@ -687,7 +686,7 @@ contains if (t_step == t_step_stop) return end if - if (qbmm) call s_mom_inv(q_cons_qp%vf, q_prim_qp%vf, mom_sp, mom_3d, pb, rhs_pb, mv, rhs_mv, idwbuff(1), idwbuff(2), idwbuff(3), nbub) + if (qbmm) call s_mom_inv(q_cons_qp%vf, q_prim_qp%vf, mom_sp, mom_3d, pb, rhs_pb, mv, rhs_mv, idwbuff(1), idwbuff(2), idwbuff(3)) if (viscous) then call nvtxStartRange("RHS-VISCOUS") @@ -852,9 +851,7 @@ contains rhs_vf, & flux_n(id)%vf, & pb, & - rhs_pb, & - mv, & - rhs_mv) + rhs_pb) call nvtxEndRange end if ! END: Additional physics and source terms @@ -898,7 +895,6 @@ contains call s_compute_bubble_EE_source( & q_cons_qp%vf(1:sys_size), & q_prim_qp%vf(1:sys_size), & - t_step, & rhs_vf) call nvtxEndRange end if @@ -915,10 +911,7 @@ contains if (.not. adap_dt) then call nvtxStartRange("RHS-EL-BUBBLES-DYN") call s_compute_bubble_EL_dynamics( & - q_cons_qp%vf(1:sys_size), & q_prim_qp%vf(1:sys_size), & - t_step, & - rhs_vf, & stage) call nvtxEndRange end if @@ -1944,19 +1937,19 @@ contains call s_weno(v_vf(iv%beg:iv%end), & vL_x(:, :, :, iv%beg:iv%end), vL_y(:, :, :, iv%beg:iv%end), vL_z(:, :, :, iv%beg:iv%end), vR_x(:, :, :, iv%beg:iv%end), vR_y(:, :, :, iv%beg:iv%end), vR_z(:, :, :, iv%beg:iv%end), & - norm_dir, weno_dir, & + weno_dir, & is1, is2, is3) else call s_weno(v_vf(iv%beg:iv%end), & vL_x(:, :, :, iv%beg:iv%end), vL_y(:, :, :, iv%beg:iv%end), vL_z(:, :, :, :), vR_x(:, :, :, iv%beg:iv%end), vR_y(:, :, :, iv%beg:iv%end), vR_z(:, :, :, :), & - norm_dir, weno_dir, & + weno_dir, & is1, is2, is3) end if else call s_weno(v_vf(iv%beg:iv%end), & vL_x(:, :, :, iv%beg:iv%end), vL_y(:, :, :, :), vL_z(:, :, :, :), vR_x(:, :, :, iv%beg:iv%end), vR_y(:, :, :, :), vR_z(:, :, :, :), & - norm_dir, weno_dir, & + weno_dir, & is1, is2, is3) end if diff --git a/src/simulation/m_riemann_solvers.fpp b/src/simulation/m_riemann_solvers.fpp index 52a4640524..36d831a439 100644 --- a/src/simulation/m_riemann_solvers.fpp +++ b/src/simulation/m_riemann_solvers.fpp @@ -242,17 +242,14 @@ contains norm_dir, & ix, iy, iz) else - call s_compute_cartesian_viscous_source_flux(velL_vf, & - dvelL_dx_vf, & + call s_compute_cartesian_viscous_source_flux(dvelL_dx_vf, & dvelL_dy_vf, & dvelL_dz_vf, & - velR_vf, & dvelR_dx_vf, & dvelR_dy_vf, & dvelR_dz_vf, & flux_src_vf, & - norm_dir, & - ix, iy, iz) + norm_dir) end if end subroutine s_compute_viscous_source_flux @@ -346,19 +343,15 @@ contains qL_prim_rsx_vf, qL_prim_rsy_vf, qL_prim_rsz_vf, dqL_prim_dx_vf, & dqL_prim_dy_vf, & dqL_prim_dz_vf, & - qL_prim_vf, & qR_prim_rsx_vf, qR_prim_rsy_vf, qR_prim_rsz_vf, dqR_prim_dx_vf, & dqR_prim_dy_vf, & dqR_prim_dz_vf, & - qR_prim_vf, & norm_dir, ix, iy, iz) ! Reshaping inputted data based on dimensional splitting direction call s_initialize_riemann_solver( & - q_prim_vf, & - flux_vf, flux_src_vf, & - flux_gsrc_vf, & - norm_dir, ix, iy, iz) + flux_src_vf, & + norm_dir) #:for NORM_DIR, XYZ in [(1, 'x'), (2, 'y'), (3, 'z')] if (norm_dir == ${NORM_DIR}$) then @@ -1139,7 +1132,7 @@ contains call s_finalize_riemann_solver(flux_vf, flux_src_vf, & flux_gsrc_vf, & - norm_dir, ix, iy, iz) + norm_dir) end subroutine s_hll_riemann_solver @@ -1272,20 +1265,16 @@ contains qL_prim_rsx_vf, qL_prim_rsy_vf, qL_prim_rsz_vf, dqL_prim_dx_vf, & dqL_prim_dy_vf, & dqL_prim_dz_vf, & - qL_prim_vf, & qR_prim_rsx_vf, qR_prim_rsy_vf, qR_prim_rsz_vf, dqR_prim_dx_vf, & dqR_prim_dy_vf, & dqR_prim_dz_vf, & - qR_prim_vf, & norm_dir, ix, iy, iz) ! Reshaping inputted data based on dimensional splitting direction call s_initialize_riemann_solver( & - q_prim_vf, & - flux_vf, flux_src_vf, & - flux_gsrc_vf, & - norm_dir, ix, iy, iz) + flux_src_vf, & + norm_dir) idx1 = 1; if (dir_idx(1) == 2) idx1 = 2; if (dir_idx(1) == 3) idx1 = 3 @@ -2988,7 +2977,6 @@ contains if (surface_tension) then call s_compute_capilary_source_flux( & - q_prim_vf, & vel_src_rsx_vf, & vel_src_rsy_vf, & vel_src_rsz_vf, & @@ -2998,7 +2986,7 @@ contains call s_finalize_riemann_solver(flux_vf, flux_src_vf, & flux_gsrc_vf, & - norm_dir, ix, iy, iz) + norm_dir) end subroutine s_hllc_riemann_solver @@ -3058,13 +3046,13 @@ contains call s_populate_riemann_states_variables_buffers( & qL_prim_rsx_vf, qL_prim_rsy_vf, qL_prim_rsz_vf, dqL_prim_dx_vf, & - dqL_prim_dy_vf, dqL_prim_dz_vf, qL_prim_vf, & + dqL_prim_dy_vf, dqL_prim_dz_vf, & qR_prim_rsx_vf, qR_prim_rsy_vf, qR_prim_rsz_vf, dqR_prim_dx_vf, & - dqR_prim_dy_vf, dqR_prim_dz_vf, qR_prim_vf, & + dqR_prim_dy_vf, dqR_prim_dz_vf, & norm_dir, ix, iy, iz) call s_initialize_riemann_solver( & - q_prim_vf, flux_vf, flux_src_vf, flux_gsrc_vf, norm_dir, ix, iy, iz) + flux_src_vf, norm_dir) #:for NORM_DIR, XYZ in [(1, 'x'), (2, 'y'), (3, 'z')] if (norm_dir == ${NORM_DIR}$) then @@ -3305,7 +3293,7 @@ contains #:endfor call s_finalize_riemann_solver(flux_vf, flux_src_vf, flux_gsrc_vf, & - norm_dir, ix, iy, iz) + norm_dir) end subroutine s_hlld_riemann_solver !> The computation of parameters, the allocation of memory, @@ -3452,11 +3440,9 @@ contains qL_prim_rsx_vf, qL_prim_rsy_vf, qL_prim_rsz_vf, dqL_prim_dx_vf, & dqL_prim_dy_vf, & dqL_prim_dz_vf, & - qL_prim_vf, & qR_prim_rsx_vf, qR_prim_rsy_vf, qR_prim_rsz_vf, dqR_prim_dx_vf, & dqR_prim_dy_vf, & dqR_prim_dz_vf, & - qR_prim_vf, & norm_dir, ix, iy, iz) real(wp), dimension(idwbuff(1)%beg:, idwbuff(2)%beg:, idwbuff(3)%beg:, 1:), intent(inout) :: qL_prim_rsx_vf, qL_prim_rsy_vf, qL_prim_rsz_vf, qR_prim_rsx_vf, qR_prim_rsy_vf, qR_prim_rsz_vf @@ -3465,8 +3451,7 @@ contains allocatable, dimension(:), & intent(inout) :: dqL_prim_dx_vf, dqR_prim_dx_vf, & dqL_prim_dy_vf, dqR_prim_dy_vf, & - dqL_prim_dz_vf, dqR_prim_dz_vf, & - qL_prim_vf, qR_prim_vf + dqL_prim_dz_vf, dqR_prim_dz_vf integer, intent(in) :: norm_dir type(int_bounds_info), intent(in) :: ix, iy, iz @@ -3831,18 +3816,14 @@ contains !! @param iz Index bounds in the z-dir !! @param q_prim_vf Cell-averaged primitive variables subroutine s_initialize_riemann_solver( & - q_prim_vf, & - flux_vf, flux_src_vf, & - flux_gsrc_vf, & - norm_dir, ix, iy, iz) + flux_src_vf, & + norm_dir) - type(scalar_field), dimension(sys_size), intent(in) :: q_prim_vf type(scalar_field), & dimension(sys_size), & - intent(inout) :: flux_vf, flux_src_vf, flux_gsrc_vf + intent(inout) :: flux_src_vf integer, intent(in) :: norm_dir - type(int_bounds_info), intent(in) :: ix, iy, iz integer :: i, j, k, l ! Generic loop iterators @@ -4119,26 +4100,21 @@ contains !! @param[in] ix X-direction loop bounds (int_bounds_info). !! @param[in] iy Y-direction loop bounds (int_bounds_info). !! @param[in] iz Z-direction loop bounds (int_bounds_info). - pure subroutine s_compute_cartesian_viscous_source_flux(velL_vf, & - dvelL_dx_vf, & + pure subroutine s_compute_cartesian_viscous_source_flux(dvelL_dx_vf, & dvelL_dy_vf, & dvelL_dz_vf, & - velR_vf, & dvelR_dx_vf, & dvelR_dy_vf, & dvelR_dz_vf, & flux_src_vf, & - norm_dir, & - ix, iy, iz) + norm_dir) ! Arguments - type(scalar_field), dimension(num_dims), intent(in) :: velL_vf, velR_vf type(scalar_field), dimension(num_dims), intent(in) :: dvelL_dx_vf, dvelR_dx_vf type(scalar_field), dimension(num_dims), intent(in) :: dvelL_dy_vf, dvelR_dy_vf type(scalar_field), dimension(num_dims), intent(in) :: dvelL_dz_vf, dvelR_dz_vf type(scalar_field), dimension(sys_size), intent(inout) :: flux_src_vf integer, intent(in) :: norm_dir - type(int_bounds_info), intent(in) :: ix, iy, iz ! Local variables real(wp), dimension(num_dims, num_dims) :: vel_grad_avg !< Averaged velocity gradient tensor `d(vel_i)/d(coord_j)`. @@ -4313,19 +4289,15 @@ contains !! @param flux_src_vf Intercell source fluxes !! @param flux_gsrc_vf Intercell geometric source fluxes !! @param norm_dir Dimensional splitting coordinate direction - !! @param ix Index bounds in first coordinate direction - !! @param iy Index bounds in second coordinate direction - !! @param iz Index bounds in third coordinate direction pure subroutine s_finalize_riemann_solver(flux_vf, flux_src_vf, & flux_gsrc_vf, & - norm_dir, ix, iy, iz) + norm_dir) type(scalar_field), & dimension(sys_size), & intent(inout) :: flux_vf, flux_src_vf, flux_gsrc_vf integer, intent(in) :: norm_dir - type(int_bounds_info), intent(in) :: ix, iy, iz integer :: i, j, k, l !< Generic loop iterators diff --git a/src/simulation/m_sim_helpers.f90 b/src/simulation/m_sim_helpers.f90 index 64960b1353..a05ba92bf1 100644 --- a/src/simulation/m_sim_helpers.f90 +++ b/src/simulation/m_sim_helpers.f90 @@ -56,11 +56,11 @@ pure subroutine s_compute_enthalpy(q_prim_vf, pres, rho, gamma, pi_inf, Re, H, a if (elasticity) then call s_convert_species_to_mixture_variables_acc(rho, gamma, pi_inf, qv, alpha, & - alpha_rho, Re, j, k, l, G, Gs) + alpha_rho, Re, G, Gs) elseif (bubbles_euler) then - call s_convert_species_to_mixture_variables_bubbles_acc(rho, gamma, pi_inf, qv, alpha, alpha_rho, Re, j, k, l) + call s_convert_species_to_mixture_variables_bubbles_acc(rho, gamma, pi_inf, qv, alpha, alpha_rho, Re) else - call s_convert_species_to_mixture_variables_acc(rho, gamma, pi_inf, qv, alpha, alpha_rho, Re, j, k, l) + call s_convert_species_to_mixture_variables_acc(rho, gamma, pi_inf, qv, alpha, alpha_rho, Re) end if !$acc loop seq diff --git a/src/simulation/m_start_up.fpp b/src/simulation/m_start_up.fpp index bf1d429714..dbfda5f83b 100644 --- a/src/simulation/m_start_up.fpp +++ b/src/simulation/m_start_up.fpp @@ -1239,15 +1239,9 @@ contains end subroutine s_initialize_internal_energy_equations - impure subroutine s_perform_time_step(t_step, time_avg, time_final, io_time_avg, io_time_final, proc_time, io_proc_time, file_exists, start, finish, nt) + impure subroutine s_perform_time_step(t_step, time_avg) integer, intent(inout) :: t_step - real(wp), intent(inout) :: time_avg, time_final - real(wp), intent(inout) :: io_time_avg, io_time_final - real(wp), dimension(:), intent(inout) :: proc_time - real(wp), dimension(:), intent(inout) :: io_proc_time - logical, intent(inout) :: file_exists - real(wp), intent(inout) :: start, finish - integer, intent(inout) :: nt + real(wp), intent(inout) :: time_avg integer :: i @@ -1329,16 +1323,13 @@ contains end subroutine s_perform_time_step - impure subroutine s_save_performance_metrics(t_step, time_avg, time_final, io_time_avg, io_time_final, proc_time, io_proc_time, file_exists, start, finish, nt) + impure subroutine s_save_performance_metrics(time_avg, time_final, io_time_avg, io_time_final, proc_time, io_proc_time, file_exists) - integer, intent(inout) :: t_step real(wp), intent(inout) :: time_avg, time_final real(wp), intent(inout) :: io_time_avg, io_time_final real(wp), dimension(:), intent(inout) :: proc_time real(wp), dimension(:), intent(inout) :: io_proc_time logical, intent(inout) :: file_exists - real(wp), intent(inout) :: start, finish - integer, intent(inout) :: nt real(wp) :: grind_time diff --git a/src/simulation/m_surface_tension.fpp b/src/simulation/m_surface_tension.fpp index 8dac00ee39..99fbf6b90a 100644 --- a/src/simulation/m_surface_tension.fpp +++ b/src/simulation/m_surface_tension.fpp @@ -65,12 +65,11 @@ contains end if end subroutine s_initialize_surface_tension_module - pure subroutine s_compute_capilary_source_flux(q_prim_vf, & - vSrc_rsx_vf, vSrc_rsy_vf, vSrc_rsz_vf, & - flux_src_vf, & - id, isx, isy, isz) + pure subroutine s_compute_capilary_source_flux( & + vSrc_rsx_vf, vSrc_rsy_vf, vSrc_rsz_vf, & + flux_src_vf, & + id, isx, isy, isz) - type(scalar_field), dimension(sys_size), intent(in) :: q_prim_vf real(wp), dimension(-1:, 0:, 0:, 1:), intent(in) :: vSrc_rsx_vf real(wp), dimension(-1:, 0:, 0:, 1:), intent(in) :: vSrc_rsy_vf real(wp), dimension(-1:, 0:, 0:, 1:), intent(in) :: vSrc_rsz_vf diff --git a/src/simulation/m_time_steppers.fpp b/src/simulation/m_time_steppers.fpp index 7dd75f7486..8e3fe99b58 100644 --- a/src/simulation/m_time_steppers.fpp +++ b/src/simulation/m_time_steppers.fpp @@ -902,13 +902,13 @@ contains call nvtxStartRange("TIMESTEP") ! Stage 1 of 3 - call s_adaptive_dt_bubble(t_step, 1) + call s_adaptive_dt_bubble(1) ! Stage 2 of 3 call s_3rd_order_tvd_rk(t_step, time_avg) ! Stage 3 of 3 - call s_adaptive_dt_bubble(t_step, 3) + call s_adaptive_dt_bubble(3) call nvtxEndRange @@ -920,9 +920,9 @@ contains !> Bubble source part in Strang operator splitting scheme !! @param t_step Current time-step - impure subroutine s_adaptive_dt_bubble(t_step, stage) + impure subroutine s_adaptive_dt_bubble(stage) - integer, intent(in) :: t_step, stage + integer, intent(in) :: stage type(vector_field) :: gm_alpha_qp @@ -930,18 +930,17 @@ contains q_cons_ts(1)%vf, & q_T_sf, & q_prim_vf, & - idwint, & - gm_alpha_qp%vf) + idwint) if (bubbles_euler) then - call s_compute_bubble_EE_source(q_cons_ts(1)%vf, q_prim_vf, t_step, rhs_vf) + call s_compute_bubble_EE_source(q_cons_ts(1)%vf, q_prim_vf, rhs_vf) call s_comp_alpha_from_n(q_cons_ts(1)%vf) elseif (bubbles_lagrange) then call s_populate_variables_buffers(q_prim_vf, pb_ts(1)%sf, mv_ts(1)%sf, bc_type) - call s_compute_bubble_EL_dynamics(q_cons_ts(1)%vf, q_prim_vf, t_step, rhs_vf, stage) + call s_compute_bubble_EL_dynamics(q_prim_vf, stage) call s_transfer_data_to_tmp() call s_smear_voidfraction() if (stage == 3) then @@ -978,8 +977,7 @@ contains q_cons_ts(1)%vf, & q_T_sf, & q_prim_vf, & - idwint, & - gm_alpha_qp%vf) + idwint) !$acc parallel loop collapse(3) gang vector default(present) private(vel, alpha, Re) do l = 0, p diff --git a/src/simulation/m_viscous.fpp b/src/simulation/m_viscous.fpp index 615448e0d3..8ec6d63c51 100644 --- a/src/simulation/m_viscous.fpp +++ b/src/simulation/m_viscous.fpp @@ -1001,18 +1001,18 @@ contains if (p > 0) then call s_weno(v_vf(iv%beg:iv%end), & vL_x(:, :, :, iv%beg:iv%end), vL_y(:, :, :, iv%beg:iv%end), vL_z(:, :, :, iv%beg:iv%end), vR_x(:, :, :, iv%beg:iv%end), vR_y(:, :, :, iv%beg:iv%end), vR_z(:, :, :, iv%beg:iv%end), & - norm_dir, weno_dir, & + weno_dir, & is1_viscous, is2_viscous, is3_viscous) else call s_weno(v_vf(iv%beg:iv%end), & vL_x(:, :, :, iv%beg:iv%end), vL_y(:, :, :, iv%beg:iv%end), vL_z(:, :, :, :), vR_x(:, :, :, iv%beg:iv%end), vR_y(:, :, :, iv%beg:iv%end), vR_z(:, :, :, :), & - norm_dir, weno_dir, & + weno_dir, & is1_viscous, is2_viscous, is3_viscous) end if else call s_weno(v_vf(iv%beg:iv%end), & vL_x(:, :, :, iv%beg:iv%end), vL_y(:, :, :, :), vL_z(:, :, :, :), vR_x(:, :, :, iv%beg:iv%end), vR_y(:, :, :, :), vR_z(:, :, :, :), & - norm_dir, weno_dir, & + weno_dir, & is1_viscous, is2_viscous, is3_viscous) end if @@ -1099,19 +1099,19 @@ contains call s_weno(v_vf(iv%beg:iv%end), & vL_x(:, :, :, iv%beg:iv%end), vL_y(:, :, :, iv%beg:iv%end), vL_z(:, :, :, iv%beg:iv%end), vR_x(:, :, :, iv%beg:iv%end), vR_y(:, :, :, iv%beg:iv%end), vR_z(:, :, :, iv%beg:iv%end), & - norm_dir, weno_dir, & + weno_dir, & is1_viscous, is2_viscous, is3_viscous) else call s_weno(v_vf(iv%beg:iv%end), & vL_x(:, :, :, iv%beg:iv%end), vL_y(:, :, :, iv%beg:iv%end), vL_z(:, :, :, :), vR_x(:, :, :, iv%beg:iv%end), vR_y(:, :, :, iv%beg:iv%end), vR_z(:, :, :, :), & - norm_dir, weno_dir, & + weno_dir, & is1_viscous, is2_viscous, is3_viscous) end if else call s_weno(v_vf(iv%beg:iv%end), & vL_x(:, :, :, iv%beg:iv%end), vL_y(:, :, :, :), vL_z(:, :, :, :), vR_x(:, :, :, iv%beg:iv%end), vR_y(:, :, :, :), vR_z(:, :, :, :), & - norm_dir, weno_dir, & + weno_dir, & is1_viscous, is2_viscous, is3_viscous) end if diff --git a/src/simulation/m_weno.fpp b/src/simulation/m_weno.fpp index 39e0b281a8..a19aa4bcf7 100644 --- a/src/simulation/m_weno.fpp +++ b/src/simulation/m_weno.fpp @@ -639,13 +639,12 @@ contains end subroutine s_compute_weno_coefficients subroutine s_weno(v_vf, vL_rs_vf_x, vL_rs_vf_y, vL_rs_vf_z, vR_rs_vf_x, vR_rs_vf_y, vR_rs_vf_z, & - norm_dir, weno_dir, & + weno_dir, & is1_weno_d, is2_weno_d, is3_weno_d) type(scalar_field), dimension(1:), intent(in) :: v_vf real(wp), dimension(idwbuff(1)%beg:, idwbuff(2)%beg:, idwbuff(3)%beg:, 1:), intent(inout) :: vL_rs_vf_x, vL_rs_vf_y, vL_rs_vf_z real(wp), dimension(idwbuff(1)%beg:, idwbuff(2)%beg:, idwbuff(3)%beg:, 1:), intent(inout) :: vR_rs_vf_x, vR_rs_vf_y, vR_rs_vf_z - integer, intent(in) :: norm_dir integer, intent(in) :: weno_dir type(int_bounds_info), intent(in) :: is1_weno_d, is2_weno_d, is3_weno_d @@ -668,7 +667,7 @@ contains if (weno_order /= 1) then call s_initialize_weno(v_vf, & - norm_dir, weno_dir) + weno_dir) end if if (weno_order == 1) then @@ -1120,11 +1119,10 @@ contains !! @param is2_weno Index bounds in second coordinate direction !! @param is3_weno Index bounds in third coordinate direction subroutine s_initialize_weno(v_vf, & - norm_dir, weno_dir) + weno_dir) type(scalar_field), dimension(:), intent(IN) :: v_vf - integer, intent(IN) :: norm_dir integer, intent(IN) :: weno_dir integer :: j, k, l, q diff --git a/src/simulation/p_main.fpp b/src/simulation/p_main.fpp index 57dcbfbdf6..29cb3b8281 100644 --- a/src/simulation/p_main.fpp +++ b/src/simulation/p_main.fpp @@ -76,20 +76,19 @@ program p_main if (cfl_dt) then if (mytime >= t_stop) then - call s_save_performance_metrics(t_step, time_avg, time_final, io_time_avg, & - io_time_final, proc_time, io_proc_time, file_exists, start, finish, nt) + call s_save_performance_metrics(time_avg, time_final, io_time_avg, & + io_time_final, proc_time, io_proc_time, file_exists) exit end if else if (t_step == t_step_stop) then - call s_save_performance_metrics(t_step, time_avg, time_final, io_time_avg, & - io_time_final, proc_time, io_proc_time, file_exists, start, finish, nt) + call s_save_performance_metrics(time_avg, time_final, io_time_avg, & + io_time_final, proc_time, io_proc_time, file_exists) exit end if end if - call s_perform_time_step(t_step, time_avg, time_final, io_time_avg, io_time_final, & - proc_time, io_proc_time, file_exists, start, finish, nt) + call s_perform_time_step(t_step, time_avg) if (cfl_dt) then if (abs(mod(mytime, t_save)) < dt .or. mytime >= t_stop) then