From 55d982dbfd96c48b76a23e5e1c9b09615a208746 Mon Sep 17 00:00:00 2001 From: Xuzheng Tian Date: Sat, 24 May 2025 22:37:56 -0400 Subject: [PATCH 1/8] Removed All Unnecessary Variables --- src/common/m_boundary_common.fpp | 20 ++++++++--------- src/common/m_chemistry.fpp | 2 +- src/common/m_eigen_solver.f90 | 4 ++-- src/common/m_helper.fpp | 1 - src/common/m_mpi_common.fpp | 6 ++--- src/common/m_variables_conversion.fpp | 22 +++++++++--------- src/post_process/m_data_input.f90 | 2 +- src/post_process/m_data_output.fpp | 27 +++++++++++------------ src/post_process/m_derived_variables.fpp | 8 +++---- src/pre_process/m_assign_variables.fpp | 24 ++++++++++---------- src/pre_process/m_boundary_conditions.fpp | 10 ++++----- src/pre_process/m_compute_levelset.fpp | 8 +++---- src/pre_process/m_data_output.fpp | 6 ++--- src/pre_process/m_initial_condition.fpp | 2 +- src/pre_process/m_model.fpp | 7 ++---- src/pre_process/m_patches.fpp | 24 ++++++++++---------- src/pre_process/m_perturbation.fpp | 10 ++++----- src/pre_process/p_main.f90 | 2 +- src/simulation/m_boundary_conditions.fpp | 4 ++-- src/simulation/m_bubbles_EL.fpp | 2 +- src/simulation/m_cbc.fpp | 8 +++---- src/simulation/m_data_output.fpp | 2 +- src/simulation/m_hypoelastic.fpp | 2 +- src/simulation/m_ibm.fpp | 4 ++-- src/simulation/m_mhd.fpp | 2 +- src/simulation/m_mpi_proxy.fpp | 4 ++-- 26 files changed, 104 insertions(+), 109 deletions(-) diff --git a/src/common/m_boundary_common.fpp b/src/common/m_boundary_common.fpp index 55ac2fec82..217dd2191a 100644 --- a/src/common/m_boundary_common.fpp +++ b/src/common/m_boundary_common.fpp @@ -77,7 +77,7 @@ contains real(wp), dimension(idwbuff(1)%beg:, idwbuff(2)%beg:, idwbuff(3)%beg:, 1:, 1:), intent(inout) :: pb, mv type(integer_field), dimension(1:num_dims, -1:1), intent(in) :: bc_type - integer :: bc_loc, bc_dir + integer :: k, l ! Population of Buffers in x-direction @@ -249,7 +249,7 @@ contains integer, intent(in) :: bc_dir, bc_loc integer, intent(in) :: k, l - integer :: j, q, i + integer :: j, i if (qbmm .and. .not. polytropic) then call s_qbmm_extrapolation(pb, mv, bc_dir, bc_loc, k, l) @@ -789,7 +789,7 @@ contains integer, intent(in) :: bc_dir, bc_loc integer, intent(in) :: k, l - integer :: j, q, i + integer :: j, i if (qbmm .and. .not. polytropic) then call s_qbmm_extrapolation(pb, mv, bc_dir, bc_loc, k, l) @@ -888,7 +888,7 @@ contains integer, intent(in) :: bc_dir, bc_loc integer, intent(in) :: k, l - integer :: j, q, i + integer :: j, i if (qbmm .and. .not. polytropic) then call s_qbmm_extrapolation(pb, mv, bc_dir, bc_loc, k, l) @@ -1023,7 +1023,7 @@ contains integer, intent(in) :: bc_dir, bc_loc integer, intent(in) :: k, l - integer :: j, i, q + integer :: j, i #ifdef MFC_PRE_PROCESS call s_ghost_cell_extrapolation(q_prim_vf, pb, mv, 1, -1, k, l) @@ -1162,7 +1162,7 @@ contains type(scalar_field), dimension(num_dims + 1), intent(inout) :: c_divs type(integer_field), dimension(1:num_dims, -1:1), intent(in) :: bc_type - integer :: i, j, k, l + integer :: k, l !< x-direction if (bcxb >= 0) then @@ -1290,7 +1290,7 @@ contains integer, intent(in) :: bc_dir, bc_loc integer, intent(in) :: k, l - integer :: j, i, q + integer :: j, i if (bc_dir == 1) then !< x-direction if (bc_loc == -1) then !bc_x%beg @@ -1348,7 +1348,7 @@ contains integer, intent(in) :: bc_dir, bc_loc integer, intent(in) :: k, l - integer :: j, i, q + integer :: j, i if (bc_dir == 1) then !< x-direction if (bc_loc == -1) then !bc_x%beg @@ -1430,7 +1430,7 @@ contains integer, intent(in) :: bc_dir, bc_loc integer, intent(in) :: k, l - integer :: j, i, q + integer :: j, i if (bc_dir == 1) then !< x-direction if (bc_loc == -1) then !bc_x%beg @@ -1485,7 +1485,7 @@ contains #ifdef MFC_MPI integer :: dir, loc integer, dimension(3) :: sf_start_idx, sf_extents_loc - integer :: ifile, ierr, data_size + integer :: ierr do dir = 1, num_dims do loc = -1, 1, 2 diff --git a/src/common/m_chemistry.fpp b/src/common/m_chemistry.fpp index a9beef0b55..5ae6e1f5a1 100644 --- a/src/common/m_chemistry.fpp +++ b/src/common/m_chemistry.fpp @@ -28,7 +28,7 @@ contains type(int_bounds_info), dimension(1:3), intent(in) :: bounds integer :: x, y, z, eqn - real(wp) :: energy, mean_molecular_weight + real(wp) :: energy real(wp), dimension(num_species) :: Ys do z = bounds(3)%beg, bounds(3)%end diff --git a/src/common/m_eigen_solver.f90 b/src/common/m_eigen_solver.f90 index 4fef5153fb..4bbf6aa97e 100644 --- a/src/common/m_eigen_solver.f90 +++ b/src/common/m_eigen_solver.f90 @@ -225,7 +225,7 @@ subroutine corth(nm, nl, low, igh, ar, ai, ortr, orti) real(wp), dimension(igh), intent(out) :: ortr, orti integer :: i, j, ml, ii, jj, la, mp, kp1, mll - real(wp) :: f, g, h, fi, fr, scale, c + real(wp) :: f, g, h, fi, fr, scale mll = 6 @@ -353,7 +353,7 @@ subroutine comqr2(nm, nl, low, igh, ortr, orti, hr, hi, wr, wi, zr, zi, ierr) integer :: i, j, k, l, ml, en, ii, jj, ll, nn, ip1, itn, its, lp1, enm1, iend real(wp) :: si, sr, ti, tr, xi, xr, xxi, xxr, yi, yr, zzi, zzr, & - norm, tst1, tst2, c, d + norm, tst1, tst2, c ! ierr = 0 ! initialize eigenvector matrix diff --git a/src/common/m_helper.fpp b/src/common/m_helper.fpp index aab6855a37..7c58982cb6 100644 --- a/src/common/m_helper.fpp +++ b/src/common/m_helper.fpp @@ -395,7 +395,6 @@ contains integer :: i - real(wp), dimension(1:4) :: tmp do i = 1, 3 call s_transform_vec(triangle%v(i, :), matrix) diff --git a/src/common/m_mpi_common.fpp b/src/common/m_mpi_common.fpp index 4645e59c13..8450f94710 100644 --- a/src/common/m_mpi_common.fpp +++ b/src/common/m_mpi_common.fpp @@ -160,7 +160,7 @@ contains #ifdef MFC_MPI ! Generic loop iterator - integer :: i, j, q, k, l + integer :: i, j !Altered system size for the lagrangian subgrid bubble model integer :: alt_sys @@ -309,7 +309,7 @@ contains integer, intent(in) :: root ! Rank of the root process real(wp), allocatable, intent(out) :: gathered_vector(:) ! Gathered vector on the root process - integer :: i, offset, ierr + integer :: i, ierr integer, allocatable :: recounts(:), displs(:) #ifdef MFC_MPI @@ -1076,7 +1076,7 @@ contains type(scalar_field), dimension(num_dims + 1), intent(inout) :: c_divs_vf integer, intent(in) :: mpi_dir, pbc_loc - integer :: i, j, k, l, r, q !< Generic loop iterators + integer :: i, j, k, l, r !< Generic loop iterators integer :: buffer_counts(1:3), buffer_count diff --git a/src/common/m_variables_conversion.fpp b/src/common/m_variables_conversion.fpp index dbbf4457e1..6a33c1052a 100644 --- a/src/common/m_variables_conversion.fpp +++ b/src/common/m_variables_conversion.fpp @@ -846,15 +846,15 @@ contains real(wp) :: rhoYks(1:num_species) - real(wp) :: vftmp, nR3, nbub_sc, R3tmp + real(wp) :: vftmp, nbub_sc real(wp) :: G_K - real(wp) :: pres, Yksum + real(wp) :: pres - integer :: i, j, k, l, q !< Generic loop iterators + integer :: i, j, k, l !< Generic loop iterators - real(wp) :: ntmp, T + real(wp) :: T real(wp) :: pres_mag real(wp) :: Ga ! Lorentz factor (gamma in relativity) @@ -885,7 +885,7 @@ contains !$acc parallel loop collapse(3) gang vector default(present) & !$acc private(alpha_K, alpha_rho_K, Re_K, nRtmp, rho_K, gamma_K, & - !$acc pi_inf_K, qv_K, dyn_pres_K, R3tmp, rhoYks, B) + !$acc pi_inf_K, qv_K, dyn_pres_K, rhoYks, B) do l = ibounds(3)%beg, ibounds(3)%end do k = ibounds(2)%beg, ibounds(2)%end do j = ibounds(1)%beg, ibounds(1)%end @@ -1181,13 +1181,13 @@ contains real(wp) :: pi_inf real(wp) :: qv real(wp) :: dyn_pres - real(wp) :: nbub, R3, vftmp, R3tmp + real(wp) :: nbub, R3tmp real(wp), dimension(nb) :: Rtmp real(wp) :: G real(wp), dimension(2) :: Re_K - integer :: i, j, k, l, q !< Generic loop iterators - integer :: spec + integer :: i, j, k, l !< Generic loop iterators + real(wp), dimension(num_species) :: Ys real(wp) :: e_mix, mix_mol_weight, T @@ -1567,7 +1567,7 @@ contains subroutine s_finalize_variables_conversion_module() - integer :: i !< Generic loop iterators + ! Deallocating the density, the specific heat ratio function and the ! liquid stiffness function @@ -1673,8 +1673,8 @@ contains integer, intent(in) :: norm real(wp) :: B2, term, disc - real(wp) :: term2 + B2 = sum(B**2) if (.not. relativity) then @@ -1698,4 +1698,4 @@ contains end subroutine s_compute_fast_magnetosonic_speed #endif -end module m_variables_conversion +end module m_variables_conversion \ No newline at end of file diff --git a/src/post_process/m_data_input.f90 b/src/post_process/m_data_input.f90 index 5385ef7619..473ba80fc1 100644 --- a/src/post_process/m_data_input.f90 +++ b/src/post_process/m_data_input.f90 @@ -278,7 +278,7 @@ subroutine s_read_parallel_data_files(t_step) integer :: ifile, ierr, data_size integer, dimension(MPI_STATUS_SIZE) :: status - real(wp) :: start, finish + integer(KIND=MPI_OFFSET_KIND) :: disp integer(KIND=MPI_OFFSET_KIND) :: m_MOK, n_MOK, p_MOK integer(KIND=MPI_OFFSET_KIND) :: WP_MOK, var_MOK, str_MOK diff --git a/src/post_process/m_data_output.fpp b/src/post_process/m_data_output.fpp index 202c287c34..414d376be7 100644 --- a/src/post_process/m_data_output.fpp +++ b/src/post_process/m_data_output.fpp @@ -859,8 +859,8 @@ contains ! Generic loop iterator integer :: i, j, k - real(wp) :: start, finish + ! Silo-HDF5 Database Format if (format == 1) then @@ -1092,23 +1092,23 @@ contains subroutine s_write_lag_bubbles_results(t_step) integer, intent(in) :: t_step - character(len=len_trim(case_dir) + 2*name_len) :: t_step_dir + character(len=len_trim(case_dir) + 3*name_len) :: file_loc - logical :: dir_check - integer :: id, nlg_bubs + + integer :: id #ifdef MFC_MPI real(wp), dimension(20) :: inputvals - real(wp) :: id_real, time_real + real(wp) :: time_real integer, dimension(MPI_STATUS_SIZE) :: status integer(KIND=MPI_OFFSET_KIND) :: disp integer :: view - integer, dimension(3) :: cell - logical :: indomain, lg_bub_file, lg_bub_data, file_exist + + logical :: lg_bub_file, file_exist integer, dimension(2) :: gsizes, lsizes, start_idx_part - integer :: ifile, ireq, ierr, data_size, tot_data + integer :: ifile, ierr, tot_data integer :: i write (file_loc, '(A,I0,A)') 'lag_bubbles_mpi_io_', t_step, '.dat' @@ -1196,12 +1196,11 @@ contains subroutine s_write_intf_data_file(q_prim_vf) type(scalar_field), dimension(sys_size), intent(IN) :: q_prim_vf - integer :: i, j, k, l, w, cent !< Generic loop iterators - integer :: ierr, counter, root !< number of data points extracted to fit shape to SH perturbations - real(wp), dimension(num_fluids) :: alpha, vol_fluid, xcom, ycom, zcom + integer :: i, j, k, l, cent !< Generic loop iterators + integer :: counter, root !< number of data points extracted to fit shape to SH perturbations real(wp), parameter :: pi = 4._wp*tan(1._wp) real(wp), allocatable :: x_td(:), y_td(:), x_d1(:), y_d1(:), y_d(:), x_d(:) - real(wp) :: axp, axm, ayp, aym, azm, azp, tgp, euc_d, thres, maxalph_loc, maxalph_glb + real(wp) :: axp, axm, ayp, aym, tgp, euc_d, thres, maxalph_loc, maxalph_glb allocate (x_d1(m*n)) allocate (y_d1(m*n)) @@ -1290,10 +1289,10 @@ contains real(wp) :: Elk, Egk, Elp, Egint, Vb, Vl, pres_av, Et real(wp) :: rho, pres, dV, tmp, gamma, pi_inf, MaxMa, MaxMa_glb, maxvel, c, Ma, H real(wp), dimension(num_vels) :: vel - real(wp), dimension(num_fluids) :: gammas, pi_infs, adv + real(wp), dimension(num_fluids) :: adv integer :: i, j, k, l, s !looping indices - integer :: ierr, counter, root !< number of data points extracted to fit shape to SH perturbations + Egk = 0_wp Elp = 0_wp Egint = 0_wp diff --git a/src/post_process/m_derived_variables.fpp b/src/post_process/m_derived_variables.fpp index 7fdb620763..3bae2f7b06 100644 --- a/src/post_process/m_derived_variables.fpp +++ b/src/post_process/m_derived_variables.fpp @@ -329,9 +329,9 @@ contains real(wp), dimension(ndim), intent(inout) :: b real(wp), dimension(ndim), intent(out) :: sol - integer, dimension(ndim) :: ipiv - integer :: nrhs, lda, ldb, info + + !EXTERNAL DGESV integer :: i, j, k @@ -491,7 +491,7 @@ contains real(wp), & dimension(1:3, 1:3) :: q_jacobian_sf, S, S2, O, O2 - real(wp) :: trS, trS2, trO2, Q, IIS + real(wp) :: trS, Q, IIS integer :: j, k, l, r, jj, kk !< Generic loop iterators do l = -offset_z%beg, p + offset_z%end @@ -585,8 +585,8 @@ contains !! The first position in the variable contains the maximum value and !! the second contains the rank of the processor on which it occurred. - real(wp) :: alpha_unadv !< Unadvected volume fraction + integer :: i, j, k, l !< Generic loop iterators ! Computing Gradient Magnitude of Density diff --git a/src/pre_process/m_assign_variables.fpp b/src/pre_process/m_assign_variables.fpp index ba5ab6608d..437a4d68f3 100644 --- a/src/pre_process/m_assign_variables.fpp +++ b/src/pre_process/m_assign_variables.fpp @@ -111,15 +111,15 @@ contains type(scalar_field), dimension(1:sys_size), intent(inout) :: q_prim_vf integer, dimension(0:m, 0:n, 0:p), intent(inout) :: patch_id_fp - real(wp) :: rho !< density - real(wp), dimension(int(E_idx - mom_idx%beg)) :: vel !< velocity - real(wp) :: pres !< pressure - real(wp) :: gamma !< specific heat ratio function - real(wp) :: x_centroid, y_centroid - real(wp) :: epsilon, beta + + + + + + real(wp) :: Ys(1:num_species) - real(wp) :: mean_molecular_weight + integer :: smooth_patch_id integer :: i !< generic loop operator @@ -308,14 +308,14 @@ contains real(wp) :: rcoord, theta, phi, xi_sph real(wp), dimension(3) :: xi_cart - real(wp), dimension(int(E_idx - mom_idx%beg)) :: vel !< velocity - real(wp) :: pres !< pressure - real(wp) :: x_centroid, y_centroid - real(wp) :: epsilon, beta + + + + real(wp) :: Ys(1:num_species) - real(wp) :: mean_molecular_weight + real(wp), dimension(sys_size) :: orig_prim_vf !< !! Vector to hold original values of cell for smoothing purposes diff --git a/src/pre_process/m_boundary_conditions.fpp b/src/pre_process/m_boundary_conditions.fpp index 5bc18ad68c..e911835cfd 100644 --- a/src/pre_process/m_boundary_conditions.fpp +++ b/src/pre_process/m_boundary_conditions.fpp @@ -35,7 +35,7 @@ contains type(integer_field), dimension(1:num_dims, -1:1), intent(inout) :: bc_type integer, intent(in) :: patch_id - integer :: i, j, k, l + integer :: j ! Patch is a vertical line at x_beg or x_end if (patch_bc(patch_id)%dir == 1) then @@ -86,7 +86,7 @@ contains integer, intent(in) :: patch_id - integer :: i, j, k, l + integer :: j, k if (patch_bc(patch_id)%dir == 1) then y_centroid = patch_bc(patch_id)%centroid(2) z_centroid = patch_bc(patch_id)%centroid(3) @@ -149,7 +149,7 @@ contains type(integer_field), dimension(1:num_dims, -1:1), intent(inout) :: bc_type integer, intent(in) :: patch_id - integer :: i, j, k, l + integer :: j, k if (patch_bc(patch_id)%dir == 1) then y_centroid = patch_bc(patch_id)%centroid(2) z_centroid = patch_bc(patch_id)%centroid(3) @@ -274,7 +274,7 @@ contains character(LEN=*), intent(in) :: step_dirpath - integer :: dir, loc, i + integer :: dir, loc character(len=path_len) :: file_path character(len=10) :: status @@ -315,8 +315,8 @@ contains integer :: dir, loc character(len=path_len) :: file_loc, file_path - character(len=10) :: status + #ifdef MFC_MPI integer :: ierr integer :: file_id diff --git a/src/pre_process/m_compute_levelset.fpp b/src/pre_process/m_compute_levelset.fpp index d339157be6..b22efc7c2b 100644 --- a/src/pre_process/m_compute_levelset.fpp +++ b/src/pre_process/m_compute_levelset.fpp @@ -77,7 +77,7 @@ contains type(levelset_norm_field), intent(INOUT) :: levelset_norm integer, intent(IN) :: ib_patch_id - real(wp) :: radius, dist, global_dist + real(wp) :: dist, global_dist integer :: global_id real(wp) :: x_centroid, y_centroid, x_act, y_act, theta real(wp), dimension(3) :: dist_vec @@ -160,7 +160,7 @@ contains type(levelset_norm_field), intent(INOUT) :: levelset_norm integer, intent(IN) :: ib_patch_id - real(wp) :: radius, dist, dist_surf, dist_side, global_dist + real(wp) :: dist, dist_surf, dist_side, global_dist integer :: global_id real(wp) :: x_centroid, y_centroid, z_centroid, lz, z_max, z_min, x_act, y_act, theta real(wp), dimension(3) :: dist_vec @@ -507,10 +507,10 @@ contains type(levelset_norm_field), intent(INOUT) :: levelset_norm integer, intent(IN) :: ib_patch_id - real(wp) :: radius, dist + real(wp) :: radius real(wp) :: x_centroid, y_centroid, z_centroid real(wp) :: length_x, length_y, length_z - real(wp), dimension(3) :: pos_vec, centroid_vec, dist_vec, dist_sides_vec, dist_surface_vec + real(wp), dimension(3) :: pos_vec, centroid_vec, dist_sides_vec, dist_surface_vec real(wp) :: dist_side, dist_surface, side_pos type(bounds_info) :: boundary integer :: i, j, k !< Loop index variables diff --git a/src/pre_process/m_data_output.fpp b/src/pre_process/m_data_output.fpp index 7ae637f034..2324103552 100644 --- a/src/pre_process/m_data_output.fpp +++ b/src/pre_process/m_data_output.fpp @@ -131,7 +131,7 @@ contains character(LEN=len_trim(t_step_dir) + name_len) :: file_loc !< !! Generic string used to store the address of a particular file - integer :: i, j, k, l, r, c, dir !< Generic loop iterator + integer :: i, j, k, l, r, c !< Generic loop iterator integer :: t_step real(wp), dimension(nb) :: nRtmp !< Temporary bubble concentration @@ -140,9 +140,9 @@ contains real(wp) :: rho !< Temporary density real(wp) :: pres, T !< Temporary pressure - real(wp) :: nR3 - real(wp) :: ntmp + + real(wp) :: rhoYks(1:num_species) !< Temporary species mass fractions real(wp) :: pres_mag diff --git a/src/pre_process/m_initial_condition.fpp b/src/pre_process/m_initial_condition.fpp index 0efc1c225d..272f6ce7d9 100644 --- a/src/pre_process/m_initial_condition.fpp +++ b/src/pre_process/m_initial_condition.fpp @@ -175,8 +175,8 @@ contains !! primitive variables are converted to conservative ones. subroutine s_generate_initial_condition - integer :: i !< Generic loop operator + ! First, compute the temperature field from the conservative variables. if (chemistry) call s_compute_q_T_sf(q_T_sf, q_cons_vf, idwint) diff --git a/src/pre_process/m_model.fpp b/src/pre_process/m_model.fpp index bbd50e52bd..8565556abc 100644 --- a/src/pre_process/m_model.fpp +++ b/src/pre_process/m_model.fpp @@ -34,7 +34,7 @@ contains character(LEN=*), intent(in) :: filepath type(t_model), intent(out) :: model - integer :: i, j, iunit, iostat + integer :: i, iunit, iostat character(kind=c_char, len=80) :: header integer(kind=c_int32_t) :: nTriangles @@ -539,7 +539,7 @@ contains logical :: intersects - real(wp) :: v0v1(3), v0v2(3), N(3), P(3), C(3), edge(3), vp(3) + real(wp) :: N(3), P(3), C(3), edge(3), vp(3) real(wp) :: area2, d, t, NdotRayDirection intersects = .false. @@ -810,7 +810,6 @@ contains real(wp) :: edge_length, cell_width real(wp), dimension(1:2) :: edge_x, edge_y, edge_del - real(wp), allocatable :: temp_boundary_v(:, :) ! Get the number of boundary edges cell_width = minval(spacing(1:2)) @@ -904,7 +903,6 @@ contains t_vec3 :: edge_del, cell_area t_vec3 :: bary_coord !< Barycentric coordinates real(wp) :: edge_length, cell_width, cell_area_min, tri_area - real(wp), allocatable :: temp_boundary_v(:, :) ! Number of triangles in the model num_triangles = model%ntrs @@ -1050,7 +1048,6 @@ contains t_vec3, intent(out) :: normals real(wp), intent(out) :: distance - real(wp), dimension(1:model%ntrs, 1:3) :: tri_normals real(wp), dimension(1:3, 1:3) :: tri real(wp) :: dist_min, dist_t_min real(wp) :: dist_min_normal, dist_buffer_normal diff --git a/src/pre_process/m_patches.fpp b/src/pre_process/m_patches.fpp index c01f91654b..c6f8b92b70 100644 --- a/src/pre_process/m_patches.fpp +++ b/src/pre_process/m_patches.fpp @@ -455,8 +455,8 @@ contains type(scalar_field), dimension(1:sys_size), intent(inout) :: q_prim_vf logical, optional, intent(in) :: ib - real(wp) :: x0, y0, f, x_act, y_act, ca, pa, ma, ta, theta, xa, ya, yt, xu, yu, xl, yl, xc, yc, dycdxc, sin_c, cos_c - integer :: i, j, k, l + real(wp) :: x0, y0, f, x_act, y_act, ca, pa, ma, ta, theta, xa, yt, xu, yu, xl, yl, xc, yc, dycdxc, sin_c, cos_c + integer :: i, j, k integer :: Np1, Np2 if (.not. present(ib)) return @@ -617,7 +617,7 @@ contains type(scalar_field), dimension(1:sys_size), intent(inout) :: q_prim_vf logical, optional, intent(in) :: ib - real(wp) :: x0, y0, z0, lz, z_max, z_min, f, x_act, y_act, ca, pa, ma, ta, theta, xa, ya, yt, xu, yu, xl, yl, xc, yc, dycdxc, sin_c, cos_c + real(wp) :: x0, y0, z0, lz, z_max, z_min, f, x_act, y_act, ca, pa, ma, ta, theta, xa, yt, xu, yu, xl, yl, xc, yc, dycdxc, sin_c, cos_c integer :: i, j, k, l integer :: Np1, Np2 @@ -1297,9 +1297,9 @@ contains type(scalar_field), dimension(1:sys_size), intent(inout) :: q_prim_vf ! Generic loop iterators - integer :: i, j, k + integer :: i ! Placeholders for the cell boundary values - real(wp) :: a, b, c, d, pi_inf, gamma, lit_gamma + real(wp) :: pi_inf, gamma, lit_gamma @:Hardcoded1DVariables() @@ -1359,7 +1359,7 @@ contains ! Generic loop iterators integer :: i, j, k ! Placeholders for the cell boundary values - real(wp) :: fac, a, b, c, d, pi_inf, gamma, lit_gamma + real(wp) :: pi_inf, gamma, lit_gamma pi_inf = fluid_pp(1)%pi_inf gamma = fluid_pp(1)%gamma @@ -1410,8 +1410,8 @@ contains integer, dimension(0:m, 0:n, 0:p), intent(inout) :: patch_id_fp type(scalar_field), dimension(1:sys_size), intent(inout) :: q_prim_vf - integer :: i, j, k !< generic loop iterators - real(wp) :: a, b, c, d !< placeholderrs for the cell boundary values + integer :: i, j !< generic loop iterators + real(wp) :: pi_inf, gamma, lit_gamma !< equation of state parameters real(wp) :: l, U0 !< Taylor Green Vortex parameters @@ -1570,10 +1570,10 @@ contains integer :: i, j, k !< generic loop iterators - real(wp) :: epsilon, beta + complex(wp), parameter :: cmplx_i = (0._wp, 1._wp) - complex(wp) :: H + ! Transferring the patch's centroid and radius information x_centroid = patch_icpp(patch_id)%x_centroid y_centroid = patch_icpp(patch_id)%y_centroid @@ -1720,8 +1720,8 @@ contains integer :: i, j, k !< generic loop iterators real(wp) :: radius - real(wp) :: radius_pressure, pressure_bubble, pressure_inf !< - !! Variables to initialize the pressure field that corresponds to the + + !! Variables to initialize the pressure field that corresponds to the !! bubble-collapse test case found in Tiwari et al. (2013) ! Transferring spherical patch's radius, centroid, smoothing patch diff --git a/src/pre_process/m_perturbation.fpp b/src/pre_process/m_perturbation.fpp index d1b7536fdb..23353eee0f 100644 --- a/src/pre_process/m_perturbation.fpp +++ b/src/pre_process/m_perturbation.fpp @@ -61,7 +61,7 @@ contains integer :: i, j, k, l !< generic loop operators real(wp) :: perturb_alpha - real(wp) :: alpha_unadv + real(wp) :: rand_real call random_seed() @@ -90,7 +90,7 @@ contains subroutine s_perturb_surrounding_flow(q_prim_vf) type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf - integer :: i, j, k, l !< generic loop iterators + integer :: i, j, k !< generic loop iterators real(wp) :: perturb_alpha real(wp) :: rand_real @@ -188,7 +188,7 @@ contains real(wp), intent(inout) :: fR real(wp) :: f0, f1 real(wp) :: gam_b - integer :: ii, jj + integer :: ii gam_b = 1._wp + 1._wp/fluid_pp(num_fluids + 1)%gamma @@ -238,7 +238,7 @@ contains real(wp), dimension(0:nbp - 1, 0:nbp - 1) :: d !< differential operator in y dir real(wp) :: gam, pi_inf, mach, c1, adv real(wp) :: xratio, uratio - integer :: i, j !< generic loop iterators + integer :: j !< generic loop iterators xratio = mixlayer_vel_coef uratio = 1._wp/patch_icpp(1)%vel(1) @@ -299,7 +299,7 @@ contains real(wp), dimension(0:mixlayer_nvar*n - n_bc_skip - 1) :: fv1, fv2, fv3 !< temporary memory integer :: ierr - integer :: i, j, k, l !< generic loop iterators + integer :: j, k !< generic loop iterators integer :: ii, jj !< block matrix indices ! Compute y-derivatives of rho and u diff --git a/src/pre_process/p_main.f90 b/src/pre_process/p_main.f90 index b45a100c5a..9208d8e8d7 100644 --- a/src/pre_process/p_main.f90 +++ b/src/pre_process/p_main.f90 @@ -12,7 +12,7 @@ program p_main implicit none - integer :: i + logical :: file_exists real(wp) :: start, finish, time_avg, time_final real(wp), allocatable, dimension(:) :: proc_time diff --git a/src/simulation/m_boundary_conditions.fpp b/src/simulation/m_boundary_conditions.fpp index 0d6d22f8af..38e8d150a3 100644 --- a/src/simulation/m_boundary_conditions.fpp +++ b/src/simulation/m_boundary_conditions.fpp @@ -28,8 +28,8 @@ contains logical :: file_exist character(len=path_len) :: file_path - character(len=10) :: status + ! Read bc_types file_path = trim(step_dirpath)//'/bc_type.dat' inquire (FILE=trim(file_path), EXIST=file_exist) @@ -71,8 +71,8 @@ contains integer :: dir, loc character(len=path_len) :: file_loc, file_path - character(len=10) :: status + #ifdef MFC_MPI integer :: ierr integer :: file_id diff --git a/src/simulation/m_bubbles_EL.fpp b/src/simulation/m_bubbles_EL.fpp index 06cf1da7d0..f5b98e6729 100644 --- a/src/simulation/m_bubbles_EL.fpp +++ b/src/simulation/m_bubbles_EL.fpp @@ -1637,8 +1637,8 @@ contains real(wp) :: void_max_glb, void_avg_glb, vol_glb integer :: i, j, k - integer, dimension(3) :: cell + character(LEN=path_len + 2*name_len) :: file_loc if (proc_rank == 0) then diff --git a/src/simulation/m_cbc.fpp b/src/simulation/m_cbc.fpp index 869e333bb6..fc44bec825 100644 --- a/src/simulation/m_cbc.fpp +++ b/src/simulation/m_cbc.fpp @@ -640,8 +640,8 @@ contains real(wp), dimension(num_fluids) :: adv, dadv_ds real(wp), dimension(sys_size) :: L real(wp), dimension(3) :: lambda - real(wp), dimension(num_species) :: Y_s + real(wp) :: rho !< Cell averaged density real(wp) :: pres !< Cell averaged pressure real(wp) :: E !< Cell averaged energy @@ -654,10 +654,10 @@ contains real(wp) :: vel_K_sum, vel_dv_dt_sum - integer :: i, j, k, r, q !< Generic loop iterators - - real(wp) :: blkmod1, blkmod2 !< Fluid bulk modulus for Wood mixture sound speed + integer :: i, j, k, r !< Generic loop iterators + + ! Reshaping of inputted data and association of the FD and PI ! coefficients, or CBC coefficients, respectively, hinging on ! selected CBC coordinate direction diff --git a/src/simulation/m_data_output.fpp b/src/simulation/m_data_output.fpp index 56b21207ff..7255f68cea 100644 --- a/src/simulation/m_data_output.fpp +++ b/src/simulation/m_data_output.fpp @@ -994,7 +994,7 @@ contains integer, intent(in) :: t_step real(wp), dimension(num_fluids, 5), intent(in) :: c_mass - integer :: i, j !< Generic loop iterator + integer :: i !< Generic loop iterator real(wp) :: nondim_time !< Non-dimensional time ! Non-dimensional time calculation diff --git a/src/simulation/m_hypoelastic.fpp b/src/simulation/m_hypoelastic.fpp index 5a10800044..3913cc8313 100644 --- a/src/simulation/m_hypoelastic.fpp +++ b/src/simulation/m_hypoelastic.fpp @@ -39,7 +39,7 @@ contains subroutine s_initialize_hypoelastic_module - integer :: i, k, r + integer :: i @:ALLOCATE(Gs(1:num_fluids)) @:ALLOCATE(rho_K_field(0:m,0:n,0:p), G_K_field(0:m,0:n,0:p)) diff --git a/src/simulation/m_ibm.fpp b/src/simulation/m_ibm.fpp index 0c18d17327..70e184ac30 100644 --- a/src/simulation/m_ibm.fpp +++ b/src/simulation/m_ibm.fpp @@ -431,7 +431,7 @@ contains :: subsection_2D integer, dimension(2*gp_layers + 1, 2*gp_layers + 1, 2*gp_layers + 1) & :: subsection_3D - integer :: i, j, k, l, q !< Iterator variables + integer :: i, j, k!< Iterator variables num_gps = 0 num_inner_gps = 0 @@ -595,7 +595,7 @@ contains real(wp) :: buf real(wp), dimension(2, 2, 2) :: eta type(ghost_point) :: gp - integer :: i, j, k, l, q !< Iterator variables + integer :: i !< Iterator variables integer :: i1, i2, j1, j2, k1, k2 !< Grid indexes integer :: patch_id diff --git a/src/simulation/m_mhd.fpp b/src/simulation/m_mhd.fpp index 2a188fc332..f1aa7443f9 100644 --- a/src/simulation/m_mhd.fpp +++ b/src/simulation/m_mhd.fpp @@ -35,8 +35,8 @@ contains subroutine s_initialize_mhd_powell_module - integer :: i, k, r + ! Additional safety check beyond m_checker if (n == 0) call s_mpi_abort('Fatal Error: Powell correction is not applicable for 1D') diff --git a/src/simulation/m_mpi_proxy.fpp b/src/simulation/m_mpi_proxy.fpp index 33b61a9284..fce429abf2 100644 --- a/src/simulation/m_mpi_proxy.fpp +++ b/src/simulation/m_mpi_proxy.fpp @@ -591,8 +591,8 @@ contains integer, intent(in) :: mpi_dir integer, intent(in) :: pbc_loc - integer :: dst_proc(1:3) + #ifdef MFC_MPI ! MPI Communication in x-direction @@ -771,7 +771,7 @@ contains type(integer_field), intent(inout) :: ib_markers integer, intent(in) :: gp_layers - integer :: i, j, k, l, r !< Generic loop iterators + integer :: j, k, l, r !< Generic loop iterators integer, pointer, dimension(:) :: p_i_send, p_i_recv #ifdef MFC_MPI From 84132944a3d66b2bc1e40fc6ef75e06fbcab9b6e Mon Sep 17 00:00:00 2001 From: XuzhengTian Date: Sun, 25 May 2025 18:07:05 -0400 Subject: [PATCH 2/8] Format correction --- src/common/m_boundary_common.fpp | 1 - src/common/m_helper.fpp | 1 - src/common/m_variables_conversion.fpp | 6 +----- src/post_process/m_data_output.fpp | 3 --- src/post_process/m_derived_variables.fpp | 5 ----- src/pre_process/m_assign_variables.fpp | 13 ------------- src/pre_process/m_boundary_conditions.fpp | 2 -- src/pre_process/m_data_output.fpp | 3 --- src/pre_process/m_initial_condition.fpp | 2 -- src/pre_process/m_patches.fpp | 3 --- src/pre_process/p_main.f90 | 1 - src/simulation/m_boundary_conditions.fpp | 4 ---- src/simulation/m_bubbles_EL.fpp | 1 - src/simulation/m_cbc.fpp | 3 --- src/simulation/m_mhd.fpp | 2 -- src/simulation/m_mpi_proxy.fpp | 2 -- 16 files changed, 1 insertion(+), 51 deletions(-) diff --git a/src/common/m_boundary_common.fpp b/src/common/m_boundary_common.fpp index 217dd2191a..a242316f15 100644 --- a/src/common/m_boundary_common.fpp +++ b/src/common/m_boundary_common.fpp @@ -77,7 +77,6 @@ contains real(wp), dimension(idwbuff(1)%beg:, idwbuff(2)%beg:, idwbuff(3)%beg:, 1:, 1:), intent(inout) :: pb, mv type(integer_field), dimension(1:num_dims, -1:1), intent(in) :: bc_type - integer :: k, l ! Population of Buffers in x-direction diff --git a/src/common/m_helper.fpp b/src/common/m_helper.fpp index 7c58982cb6..186ff9e2e7 100644 --- a/src/common/m_helper.fpp +++ b/src/common/m_helper.fpp @@ -395,7 +395,6 @@ contains integer :: i - do i = 1, 3 call s_transform_vec(triangle%v(i, :), matrix) end do diff --git a/src/common/m_variables_conversion.fpp b/src/common/m_variables_conversion.fpp index 6a33c1052a..54ff68e5cb 100644 --- a/src/common/m_variables_conversion.fpp +++ b/src/common/m_variables_conversion.fpp @@ -1188,7 +1188,6 @@ contains integer :: i, j, k, l !< Generic loop iterators - real(wp), dimension(num_species) :: Ys real(wp) :: e_mix, mix_mol_weight, T real(wp) :: pres_mag @@ -1567,8 +1566,6 @@ contains subroutine s_finalize_variables_conversion_module() - - ! Deallocating the density, the specific heat ratio function and the ! liquid stiffness function #ifdef MFC_POST_PROCESS @@ -1674,7 +1671,6 @@ contains real(wp) :: B2, term, disc - B2 = sum(B**2) if (.not. relativity) then @@ -1698,4 +1694,4 @@ contains end subroutine s_compute_fast_magnetosonic_speed #endif -end module m_variables_conversion \ No newline at end of file +end module m_variables_conversion diff --git a/src/post_process/m_data_output.fpp b/src/post_process/m_data_output.fpp index 414d376be7..4426f58074 100644 --- a/src/post_process/m_data_output.fpp +++ b/src/post_process/m_data_output.fpp @@ -860,7 +860,6 @@ contains ! Generic loop iterator integer :: i, j, k - ! Silo-HDF5 Database Format if (format == 1) then @@ -1104,7 +1103,6 @@ contains integer(KIND=MPI_OFFSET_KIND) :: disp integer :: view - logical :: lg_bub_file, file_exist integer, dimension(2) :: gsizes, lsizes, start_idx_part @@ -1292,7 +1290,6 @@ contains real(wp), dimension(num_fluids) :: adv integer :: i, j, k, l, s !looping indices - Egk = 0_wp Elp = 0_wp Egint = 0_wp diff --git a/src/post_process/m_derived_variables.fpp b/src/post_process/m_derived_variables.fpp index 3bae2f7b06..65f78dfdac 100644 --- a/src/post_process/m_derived_variables.fpp +++ b/src/post_process/m_derived_variables.fpp @@ -329,9 +329,6 @@ contains real(wp), dimension(ndim), intent(inout) :: b real(wp), dimension(ndim), intent(out) :: sol - - - !EXTERNAL DGESV integer :: i, j, k @@ -585,8 +582,6 @@ contains !! The first position in the variable contains the maximum value and !! the second contains the rank of the processor on which it occurred. - - integer :: i, j, k, l !< Generic loop iterators ! Computing Gradient Magnitude of Density diff --git a/src/pre_process/m_assign_variables.fpp b/src/pre_process/m_assign_variables.fpp index 437a4d68f3..d79c97d39a 100644 --- a/src/pre_process/m_assign_variables.fpp +++ b/src/pre_process/m_assign_variables.fpp @@ -111,15 +111,8 @@ contains type(scalar_field), dimension(1:sys_size), intent(inout) :: q_prim_vf integer, dimension(0:m, 0:n, 0:p), intent(inout) :: patch_id_fp - - - - - - real(wp) :: Ys(1:num_species) - integer :: smooth_patch_id integer :: i !< generic loop operator @@ -308,14 +301,8 @@ contains real(wp) :: rcoord, theta, phi, xi_sph real(wp), dimension(3) :: xi_cart - - - - - real(wp) :: Ys(1:num_species) - real(wp), dimension(sys_size) :: orig_prim_vf !< !! Vector to hold original values of cell for smoothing purposes diff --git a/src/pre_process/m_boundary_conditions.fpp b/src/pre_process/m_boundary_conditions.fpp index e911835cfd..8c8b185c69 100644 --- a/src/pre_process/m_boundary_conditions.fpp +++ b/src/pre_process/m_boundary_conditions.fpp @@ -315,8 +315,6 @@ contains integer :: dir, loc character(len=path_len) :: file_loc, file_path - - #ifdef MFC_MPI integer :: ierr integer :: file_id diff --git a/src/pre_process/m_data_output.fpp b/src/pre_process/m_data_output.fpp index 2324103552..99695b2dab 100644 --- a/src/pre_process/m_data_output.fpp +++ b/src/pre_process/m_data_output.fpp @@ -140,9 +140,6 @@ contains real(wp) :: rho !< Temporary density real(wp) :: pres, T !< Temporary pressure - - - real(wp) :: rhoYks(1:num_species) !< Temporary species mass fractions real(wp) :: pres_mag diff --git a/src/pre_process/m_initial_condition.fpp b/src/pre_process/m_initial_condition.fpp index 272f6ce7d9..67e07a2542 100644 --- a/src/pre_process/m_initial_condition.fpp +++ b/src/pre_process/m_initial_condition.fpp @@ -175,8 +175,6 @@ contains !! primitive variables are converted to conservative ones. subroutine s_generate_initial_condition - - ! First, compute the temperature field from the conservative variables. if (chemistry) call s_compute_q_T_sf(q_T_sf, q_cons_vf, idwint) diff --git a/src/pre_process/m_patches.fpp b/src/pre_process/m_patches.fpp index c6f8b92b70..dca1ff1352 100644 --- a/src/pre_process/m_patches.fpp +++ b/src/pre_process/m_patches.fpp @@ -1570,10 +1570,8 @@ contains integer :: i, j, k !< generic loop iterators - complex(wp), parameter :: cmplx_i = (0._wp, 1._wp) - ! Transferring the patch's centroid and radius information x_centroid = patch_icpp(patch_id)%x_centroid y_centroid = patch_icpp(patch_id)%y_centroid @@ -1720,7 +1718,6 @@ contains integer :: i, j, k !< generic loop iterators real(wp) :: radius - !! Variables to initialize the pressure field that corresponds to the !! bubble-collapse test case found in Tiwari et al. (2013) diff --git a/src/pre_process/p_main.f90 b/src/pre_process/p_main.f90 index 9208d8e8d7..56e6ab928f 100644 --- a/src/pre_process/p_main.f90 +++ b/src/pre_process/p_main.f90 @@ -12,7 +12,6 @@ program p_main implicit none - logical :: file_exists real(wp) :: start, finish, time_avg, time_final real(wp), allocatable, dimension(:) :: proc_time diff --git a/src/simulation/m_boundary_conditions.fpp b/src/simulation/m_boundary_conditions.fpp index 38e8d150a3..3707fec910 100644 --- a/src/simulation/m_boundary_conditions.fpp +++ b/src/simulation/m_boundary_conditions.fpp @@ -28,8 +28,6 @@ contains logical :: file_exist character(len=path_len) :: file_path - - ! Read bc_types file_path = trim(step_dirpath)//'/bc_type.dat' inquire (FILE=trim(file_path), EXIST=file_exist) @@ -71,8 +69,6 @@ contains integer :: dir, loc character(len=path_len) :: file_loc, file_path - - #ifdef MFC_MPI integer :: ierr integer :: file_id diff --git a/src/simulation/m_bubbles_EL.fpp b/src/simulation/m_bubbles_EL.fpp index f5b98e6729..68b7fd10c4 100644 --- a/src/simulation/m_bubbles_EL.fpp +++ b/src/simulation/m_bubbles_EL.fpp @@ -1638,7 +1638,6 @@ contains integer :: i, j, k - character(LEN=path_len + 2*name_len) :: file_loc if (proc_rank == 0) then diff --git a/src/simulation/m_cbc.fpp b/src/simulation/m_cbc.fpp index fc44bec825..a713b95000 100644 --- a/src/simulation/m_cbc.fpp +++ b/src/simulation/m_cbc.fpp @@ -641,7 +641,6 @@ contains real(wp), dimension(sys_size) :: L real(wp), dimension(3) :: lambda - real(wp) :: rho !< Cell averaged density real(wp) :: pres !< Cell averaged pressure real(wp) :: E !< Cell averaged energy @@ -656,8 +655,6 @@ contains integer :: i, j, k, r !< Generic loop iterators - - ! Reshaping of inputted data and association of the FD and PI ! coefficients, or CBC coefficients, respectively, hinging on ! selected CBC coordinate direction diff --git a/src/simulation/m_mhd.fpp b/src/simulation/m_mhd.fpp index f1aa7443f9..49b1639391 100644 --- a/src/simulation/m_mhd.fpp +++ b/src/simulation/m_mhd.fpp @@ -35,8 +35,6 @@ contains subroutine s_initialize_mhd_powell_module - - ! Additional safety check beyond m_checker if (n == 0) call s_mpi_abort('Fatal Error: Powell correction is not applicable for 1D') diff --git a/src/simulation/m_mpi_proxy.fpp b/src/simulation/m_mpi_proxy.fpp index fce429abf2..12d50fd4ec 100644 --- a/src/simulation/m_mpi_proxy.fpp +++ b/src/simulation/m_mpi_proxy.fpp @@ -591,8 +591,6 @@ contains integer, intent(in) :: mpi_dir integer, intent(in) :: pbc_loc - - #ifdef MFC_MPI ! MPI Communication in x-direction From d5c81f0202b419c28b36e96b5c290f4c0f7952a0 Mon Sep 17 00:00:00 2001 From: XuzhengTian Date: Fri, 30 May 2025 22:46:58 -0400 Subject: [PATCH 3/8] Dummy Variables --- src/common/m_boundary_common.fpp | 5 ++- src/common/m_mpi_common.fpp | 7 ++-- src/common/m_phase_change.fpp | 9 +++--- src/common/m_variables_conversion.fpp | 39 ++++++++--------------- src/pre_process/m_boundary_conditions.fpp | 15 ++++----- src/pre_process/m_model.fpp | 16 +++------- src/pre_process/m_patches.fpp | 13 +++----- src/pre_process/m_perturbation.fpp | 6 ++-- src/pre_process/m_start_up.fpp | 6 ++-- src/pre_process/p_main.f90 | 2 +- src/simulation/m_bubbles.fpp | 4 +-- src/simulation/m_bubbles_EE.fpp | 5 ++- src/simulation/m_bubbles_EL.fpp | 8 ++--- src/simulation/m_cbc.fpp | 15 +++------ src/simulation/m_data_output.fpp | 8 ++--- src/simulation/m_hyperelastic.fpp | 2 +- src/simulation/m_ibm.fpp | 8 ++--- src/simulation/m_qbmm.fpp | 6 ++-- src/simulation/m_rhs.fpp | 10 ++---- src/simulation/m_sim_helpers.f90 | 6 ++-- src/simulation/m_time_steppers.fpp | 8 ++--- src/simulation/m_weno.fpp | 5 ++- 22 files changed, 74 insertions(+), 129 deletions(-) diff --git a/src/common/m_boundary_common.fpp b/src/common/m_boundary_common.fpp index a242316f15..f80c5ee104 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 - subroutine s_axis(q_prim_vf, pb, mv, bc_dir, bc_loc, k, l) + 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 8450f94710..1da6546814 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 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 6fbd24ec2d..95ccbece0e 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 - subroutine s_infinite_pt_relaxation_k(j, k, l, MFL, pS, p_infpT, rM, q_cons_vf, rhoe, TS) + 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 54ff68e5cb..f1bfcfb621 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,10 +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 @@ -253,7 +249,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 +261,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 +457,7 @@ contains 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,7 +474,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 +540,7 @@ contains 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 +553,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 +811,13 @@ 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 +891,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 @@ -1507,13 +1496,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 8c8b185c69..553aaa919f 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 - subroutine s_line_segment_bc(patch_id, q_prim_vf, bc_type) + 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 - subroutine s_circle_bc(patch_id, q_prim_vf, bc_type) + 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 - subroutine s_rectangle_bc(patch_id, q_prim_vf, bc_type) + 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 8565556abc..0e2c5f4441 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 - function f_distance(boundary_v, boundary_vertex_count, boundary_edge_count, point, spacing) result(distance) - integer, intent(in) :: boundary_vertex_count, boundary_edge_count + 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 - subroutine f_normals(boundary_v, boundary_vertex_count, boundary_edge_count, point, spacing, normals) - integer, intent(in) :: boundary_vertex_count, boundary_edge_count + 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 - function f_interpolated_distance(interpolated_boundary_v, total_vertices, point, spacing) result(distance) + 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 dca1ff1352..4578d11cc4 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) + normals) ! Correct the sign of the levelset_norm if (patch_id_fp(i, j, k) == 0) then diff --git a/src/pre_process/m_perturbation.fpp b/src/pre_process/m_perturbation.fpp index 23353eee0f..d9941c973e 100644 --- a/src/pre_process/m_perturbation.fpp +++ b/src/pre_process/m_perturbation.fpp @@ -352,7 +352,7 @@ contains call cg(mixlayer_nvar*n - n_bc_skip, mixlayer_nvar*n - n_bc_skip, hr, hi, wr, wi, zr, zi, fv1, fv2, fv3, ierr) ! Generate instability wave - call s_generate_wave(wr, wi, zr, zi, rho_mean, mach, alpha, beta, wave, shift) + call s_generate_wave(wi, zr, zi, rho_mean, mach, alpha, beta, wave, shift) end subroutine s_solve_linear_system @@ -494,8 +494,8 @@ contains !> This subroutine generates an instability wave using the most unstable !! eigenvalue and corresponding eigenvector among the !! given set of eigenvalues and eigenvectors. - subroutine s_generate_wave(wr, wi, zr, zi, rho_mean, mach, alpha, beta, wave, shift) - real(wp), dimension(0:mixlayer_nvar*n - n_bc_skip - 1), intent(in) :: wr, wi !< eigenvalues + subroutine s_generate_wave(wi, zr, zi, rho_mean, mach, alpha, beta, wave, shift) + real(wp), dimension(0:mixlayer_nvar*n - n_bc_skip - 1), intent(in) :: wi !< eigenvalues real(wp), dimension(0:mixlayer_nvar*n - n_bc_skip - 1, 0:mixlayer_nvar*n - n_bc_skip - 1), intent(in) :: zr, zi !< eigenvectors real(wp), intent(in) :: rho_mean real(wp), dimension(mixlayer_nvar, 0:m, 0:n, 0:p), intent(inout) :: wave diff --git a/src/pre_process/m_start_up.fpp b/src/pre_process/m_start_up.fpp index 8749c22278..1588c039d6 100644 --- a/src/pre_process/m_start_up.fpp +++ b/src/pre_process/m_start_up.fpp @@ -826,12 +826,10 @@ contains end subroutine s_read_grid - subroutine s_apply_initial_condition(start, finish, proc_time, time_avg, time_final, file_exists) + 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 b7b249139d..3630f6f72d 100644 --- a/src/simulation/m_bubbles.fpp +++ b/src/simulation/m_bubbles.fpp @@ -157,9 +157,9 @@ contains !! @param fV Current bubble velocity !! @param fR0 Equilibrium bubble radius !! @param fCpbw Boundary wall pressure - function f_rddot_RP(fCp, fRho, fR, fV, fR0, fCpbw) + 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 91e8c5f30e..11bee37c07 100644 --- a/src/simulation/m_bubbles_EE.fpp +++ b/src/simulation/m_bubbles_EE.fpp @@ -150,10 +150,9 @@ contains !! that are needed for the bubble modeling !! @param q_prim_vf Primitive variables !! @param q_cons_vf Conservative variables - subroutine s_compute_bubble_EE_source(q_cons_vf, q_prim_vf, t_step, rhs_vf) + 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 @@ -569,7 +568,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 diff --git a/src/simulation/m_bubbles_EL.fpp b/src/simulation/m_bubbles_EL.fpp index 68b7fd10c4..ef3737fd7a 100644 --- a/src/simulation/m_bubbles_EL.fpp +++ b/src/simulation/m_bubbles_EL.fpp @@ -589,8 +589,8 @@ contains myalpha(i) = q_prim_vf(advxb + i - 1)%sf(cell(1), cell(2), cell(3)) end do call s_convert_species_to_mixture_variables_acc(rhol, gamma, pi_inf, qv, myalpha, & - myalpha_rho, Re, cell(1), cell(2), cell(3)) - call s_compute_cson_from_pinf(k, q_prim_vf, pinf, cell, rhol, gamma, pi_inf, cson) + myalpha_rho, Re) + call s_compute_cson_from_pinf(q_prim_vf, pinf, cell, rhol, gamma, pi_inf, cson) ! Velocity correction due to massflux velint = fV - gas_dmvdt(k, stage)/(4._wp*pi*fR**2._wp*rhol) @@ -629,7 +629,6 @@ contains end subroutine s_compute_EL_coupled_solver !> This procedure computes the speed of sound from a given driving pressure - !! @param bub_id Bubble id !! @param q_prim_vf Primitive variables !! @param pinf Driving pressure !! @param cell Bubble cell @@ -637,13 +636,12 @@ contains !! @param gamma Liquid specific heat ratio !! @param pi_inf Liquid stiffness !! @param cson Calculated speed of sound - subroutine s_compute_cson_from_pinf(bub_id, q_prim_vf, pinf, cell, rhol, gamma, pi_inf, cson) + 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 a713b95000..840b45c10c 100644 --- a/src/simulation/m_cbc.fpp +++ b/src/simulation/m_cbc.fpp @@ -783,9 +783,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 @@ -1026,8 +1026,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, @@ -1314,18 +1313,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_data_output.fpp b/src/simulation/m_data_output.fpp index 7255f68cea..8dac199523 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 - subroutine s_write_parallel_data_files(q_cons_vf, q_prim_vf, t_step, beta) + 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 46addb7685..59db5ffed9 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 70e184ac30..3960c5e709 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 c93a4be2f7..79c1835e04 100644 --- a/src/simulation/m_qbmm.fpp +++ b/src/simulation/m_qbmm.fpp @@ -411,14 +411,13 @@ contains end subroutine s_initialize_qbmm_module - subroutine s_compute_qbmm_rhs(idir, q_cons_vf, q_prim_vf, rhs_vf, flux_n_vf, pb, rhs_pb, mv, rhs_mv) + 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 @@ -815,7 +814,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 @@ -823,7 +822,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 6930f3caa7..ce7c32971d 100644 --- a/src/simulation/m_rhs.fpp +++ b/src/simulation/m_rhs.fpp @@ -666,8 +666,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") @@ -684,7 +683,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") @@ -849,9 +848,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 @@ -895,7 +892,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 diff --git a/src/simulation/m_sim_helpers.f90 b/src/simulation/m_sim_helpers.f90 index 4d525cf5d9..e3ea8af093 100644 --- a/src/simulation/m_sim_helpers.f90 +++ b/src/simulation/m_sim_helpers.f90 @@ -56,11 +56,11 @@ subroutine s_compute_enthalpy(q_prim_vf, pres, rho, gamma, pi_inf, Re, H, alpha, 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_time_steppers.fpp b/src/simulation/m_time_steppers.fpp index f8cdb7a7ac..099f0f95a5 100644 --- a/src/simulation/m_time_steppers.fpp +++ b/src/simulation/m_time_steppers.fpp @@ -966,10 +966,9 @@ contains q_cons_ts(1)%vf, & q_T_sf, & q_prim_vf, & - idwint, & - gm_alpha_qp%vf) + idwint) - 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) @@ -996,8 +995,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_weno.fpp b/src/simulation/m_weno.fpp index 2071b3a0f0..3afd1138ae 100644 --- a/src/simulation/m_weno.fpp +++ b/src/simulation/m_weno.fpp @@ -668,7 +668,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 +1120,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 From 1d91c1adf8362acd48554b4b74e831fd4e88a432 Mon Sep 17 00:00:00 2001 From: XuzhengTian Date: Sun, 1 Jun 2025 17:39:12 -0400 Subject: [PATCH 4/8] Format Check --- src/common/m_variables_conversion.fpp | 3 --- src/pre_process/m_patches.fpp | 6 +++--- src/pre_process/m_start_up.fpp | 1 - src/simulation/m_riemann_solvers.fpp | 4 ++-- src/simulation/m_surface_tension.fpp | 8 ++++---- 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/common/m_variables_conversion.fpp b/src/common/m_variables_conversion.fpp index fcc0fc76e9..a462e97b47 100644 --- a/src/common/m_variables_conversion.fpp +++ b/src/common/m_variables_conversion.fpp @@ -216,7 +216,6 @@ contains real(wp), intent(out), target :: pi_inf real(wp), intent(out), target :: qv - ! Transferring the density, the specific heat ratio function and the ! liquid stiffness function, respectively rho = q_vf(1)%sf(i, j, k) @@ -474,7 +473,6 @@ contains real(wp), optional, intent(out) :: G_K real(wp), optional, dimension(num_fluids), intent(in) :: G - integer :: i, j !< Generic loop iterators real(wp) :: alpha_K_sum @@ -818,7 +816,6 @@ contains type(scalar_field), dimension(sys_size), intent(inout) :: qK_prim_vf type(int_bounds_info), dimension(1:3), intent(in) :: ibounds - real(wp), dimension(num_fluids) :: alpha_K, alpha_rho_K real(wp), dimension(2) :: Re_K real(wp) :: rho_K, gamma_K, pi_inf_K, qv_K, dyn_pres_K diff --git a/src/pre_process/m_patches.fpp b/src/pre_process/m_patches.fpp index 4578d11cc4..27c62675b4 100644 --- a/src/pre_process/m_patches.fpp +++ b/src/pre_process/m_patches.fpp @@ -2337,9 +2337,9 @@ contains ! Get the boundary normals call f_normals(boundary_v, & - boundary_edge_count, & - point, & - 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 68778b63f7..aba6ceadd3 100644 --- a/src/pre_process/m_start_up.fpp +++ b/src/pre_process/m_start_up.fpp @@ -830,7 +830,6 @@ contains real(wp), intent(inout) :: start, finish - ! 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 ! not read in, it is generated from scratch according to the inputs provided diff --git a/src/simulation/m_riemann_solvers.fpp b/src/simulation/m_riemann_solvers.fpp index ce31169a67..843430f3cf 100644 --- a/src/simulation/m_riemann_solvers.fpp +++ b/src/simulation/m_riemann_solvers.fpp @@ -3042,9 +3042,9 @@ 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,& + 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,& + dqR_prim_dy_vf, dqR_prim_dz_vf, & norm_dir, ix, iy, iz) call s_initialize_riemann_solver( & diff --git a/src/simulation/m_surface_tension.fpp b/src/simulation/m_surface_tension.fpp index 436b8a1eab..6292c6a795 100644 --- a/src/simulation/m_surface_tension.fpp +++ b/src/simulation/m_surface_tension.fpp @@ -65,10 +65,10 @@ contains end if end subroutine s_initialize_surface_tension_module - subroutine s_compute_capilary_source_flux(& - vSrc_rsx_vf, vSrc_rsy_vf, vSrc_rsz_vf, & - flux_src_vf, & - id, isx, isy, isz) + subroutine s_compute_capilary_source_flux( & + vSrc_rsx_vf, vSrc_rsy_vf, vSrc_rsz_vf, & + flux_src_vf, & + id, isx, isy, isz) real(wp), dimension(-1:, 0:, 0:, 1:), intent(in) :: vSrc_rsx_vf real(wp), dimension(-1:, 0:, 0:, 1:), intent(in) :: vSrc_rsy_vf From 8aa2f8891216d29c8535b46c51d5e570e47c8043 Mon Sep 17 00:00:00 2001 From: XuzhengTian Date: Sun, 1 Jun 2025 20:44:55 -0400 Subject: [PATCH 5/8] Solve conflicts --- src/simulation/m_rhs.fpp | 6 ++++-- src/simulation/m_riemann_solvers.fpp | 21 +++++++++++---------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/simulation/m_rhs.fpp b/src/simulation/m_rhs.fpp index 9a37fa5a71..6022113993 100644 --- a/src/simulation/m_rhs.fpp +++ b/src/simulation/m_rhs.fpp @@ -810,7 +810,8 @@ contains call s_compute_advection_source_term(id, & rhs_vf, & q_cons_qp, & - q_prim_qp) + q_prim_qp, & + flux_src_n(id)) call nvtxEndRange ! RHS additions for hypoelasticity @@ -951,12 +952,13 @@ contains end subroutine s_compute_rhs - subroutine s_compute_advection_source_term(idir, rhs_vf, q_cons_vf, q_prim_vf) + subroutine s_compute_advection_source_term(idir, rhs_vf, q_cons_vf, q_prim_vf, flux_src_n_vf) integer, intent(in) :: idir type(scalar_field), dimension(sys_size), intent(inout) :: rhs_vf type(vector_field), intent(inout) :: q_cons_vf type(vector_field), intent(inout) :: q_prim_vf + type(vector_field), intent(inout) :: flux_src_n_vf integer :: j, k, l, q ! Loop iterators from original, meaning varies integer :: k_loop, l_loop, q_loop ! Standardized spatial loop iterators 0:m, 0:n, 0:p diff --git a/src/simulation/m_riemann_solvers.fpp b/src/simulation/m_riemann_solvers.fpp index 39f8bff10f..5b4428865e 100644 --- a/src/simulation/m_riemann_solvers.fpp +++ b/src/simulation/m_riemann_solvers.fpp @@ -211,7 +211,8 @@ contains dvelR_dy_vf, & dvelR_dz_vf, & flux_src_vf, & - norm_dir) + norm_dir, & + ix, iy, iz) type(scalar_field), & dimension(num_vels), & @@ -226,6 +227,8 @@ contains integer, intent(IN) :: norm_dir + type(int_bounds_info), intent(IN) :: ix, iy, iz + if (grid_geometry == 3) then call s_compute_cylindrical_viscous_source_flux(velL_vf, & dvelL_dx_vf, & @@ -236,7 +239,8 @@ contains dvelR_dy_vf, & dvelR_dz_vf, & flux_src_vf, & - norm_dir) + norm_dir, & + ix, iy, iz) else call s_compute_cartesian_viscous_source_flux(dvelL_dx_vf, & dvelL_dy_vf, & @@ -1111,7 +1115,7 @@ contains dqR_prim_dx_vf(momxb:momxe), & dqR_prim_dy_vf(momxb:momxe), & dqR_prim_dz_vf(momxb:momxe), & - flux_src_vf, norm_dir) + flux_src_vf, norm_dir, ix, iy, iz) else call s_compute_viscous_source_flux( & q_prim_vf(momxb:momxe), & @@ -1122,7 +1126,7 @@ contains dqR_prim_dx_vf(momxb:momxe), & dqR_prim_dy_vf(momxb:momxe), & dqR_prim_dz_vf(momxb:momxe), & - flux_src_vf, norm_dir) + flux_src_vf, norm_dir, ix, iy, iz) end if end if @@ -2956,7 +2960,7 @@ contains dqR_prim_dx_vf(momxb:momxe), & dqR_prim_dy_vf(momxb:momxe), & dqR_prim_dz_vf(momxb:momxe), & - flux_src_vf, norm_dir) + flux_src_vf, norm_dir, ix, iy, iz) else call s_compute_viscous_source_flux( & q_prim_vf(momxb:momxe), & @@ -2967,7 +2971,7 @@ contains dqR_prim_dx_vf(momxb:momxe), & dqR_prim_dy_vf(momxb:momxe), & dqR_prim_dz_vf(momxb:momxe), & - flux_src_vf, norm_dir) + flux_src_vf, norm_dir, ix, iy, iz) end if end if @@ -4096,8 +4100,7 @@ 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). - subroutine s_compute_cartesian_viscous_source_flux(velL_vf, & - dvelL_dx_vf, & + subroutine s_compute_cartesian_viscous_source_flux(dvelL_dx_vf, & dvelL_dy_vf, & dvelL_dz_vf, & dvelR_dx_vf, & @@ -4107,13 +4110,11 @@ contains 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)`. From 9e7871e874ac4b42a6a313d9c9d22c64282eaf4d Mon Sep 17 00:00:00 2001 From: XuzhengTian Date: Thu, 5 Jun 2025 13:13:59 -0400 Subject: [PATCH 6/8] format check --- src/common/m_mpi_common.fpp | 10 +++++----- src/common/m_variables_conversion.fpp | 10 +++++----- src/simulation/m_riemann_solvers.fpp | 18 +++++++++--------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/common/m_mpi_common.fpp b/src/common/m_mpi_common.fpp index cfeae7d439..b439ce1c6d 100644 --- a/src/common/m_mpi_common.fpp +++ b/src/common/m_mpi_common.fpp @@ -374,11 +374,11 @@ contains !! @param vcfl_max_glb Global maximum VCFL stability criterion !! @param Rc_min_glb Global minimum Rc stability criterion impure subroutine s_mpi_reduce_stability_criteria_extrema(icfl_max_loc, & - vcfl_max_loc, & - Rc_min_loc, & - icfl_max_glb, & - vcfl_max_glb, & - Rc_min_glb) + vcfl_max_loc, & + Rc_min_loc, & + icfl_max_glb, & + vcfl_max_glb, & + Rc_min_glb) real(wp), intent(in) :: icfl_max_loc real(wp), intent(in) :: vcfl_max_loc diff --git a/src/common/m_variables_conversion.fpp b/src/common/m_variables_conversion.fpp index 87dfb6cc64..6b506b77cd 100644 --- a/src/common/m_variables_conversion.fpp +++ b/src/common/m_variables_conversion.fpp @@ -455,9 +455,9 @@ contains end subroutine s_convert_species_to_mixture_variables 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, & - G_K, G) + gamma_K, pi_inf_K, qv_K, & + alpha_K, alpha_rho_K, Re_K, & + G_K, G) #ifdef _CRAYFTN !DIR$ INLINEALWAYS s_convert_species_to_mixture_variables_acc #else @@ -537,8 +537,8 @@ contains end subroutine s_convert_species_to_mixture_variables_acc 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) + gamma_K, pi_inf_K, qv_K, & + alpha_K, alpha_rho_K, Re_K) #ifdef _CRAYFTN !DIR$ INLINEALWAYS s_convert_species_to_mixture_variables_bubbles_acc #else diff --git a/src/simulation/m_riemann_solvers.fpp b/src/simulation/m_riemann_solvers.fpp index e685bf4e5b..36d831a439 100644 --- a/src/simulation/m_riemann_solvers.fpp +++ b/src/simulation/m_riemann_solvers.fpp @@ -4101,13 +4101,13 @@ contains !! @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(dvelL_dx_vf, & - dvelL_dy_vf, & - dvelL_dz_vf, & - dvelR_dx_vf, & - dvelR_dy_vf, & - dvelR_dz_vf, & - flux_src_vf, & - norm_dir) + dvelL_dy_vf, & + dvelL_dz_vf, & + dvelR_dx_vf, & + dvelR_dy_vf, & + dvelR_dz_vf, & + flux_src_vf, & + norm_dir) ! Arguments type(scalar_field), dimension(num_dims), intent(in) :: dvelL_dx_vf, dvelR_dx_vf @@ -4290,8 +4290,8 @@ contains !! @param flux_gsrc_vf Intercell geometric source fluxes !! @param norm_dir Dimensional splitting coordinate direction pure subroutine s_finalize_riemann_solver(flux_vf, flux_src_vf, & - flux_gsrc_vf, & - norm_dir) + flux_gsrc_vf, & + norm_dir) type(scalar_field), & dimension(sys_size), & From 72a07a10c590f90d8fdb86aeb54699e456196a8e Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Sat, 7 Jun 2025 09:21:15 -0400 Subject: [PATCH 7/8] Discard changes to src/pre_process/m_perturbation.fpp --- src/pre_process/m_perturbation.fpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pre_process/m_perturbation.fpp b/src/pre_process/m_perturbation.fpp index 86c85fab85..f4909e89ee 100644 --- a/src/pre_process/m_perturbation.fpp +++ b/src/pre_process/m_perturbation.fpp @@ -352,7 +352,7 @@ contains call cg(mixlayer_nvar*n - n_bc_skip, mixlayer_nvar*n - n_bc_skip, hr, hi, wr, wi, zr, zi, fv1, fv2, fv3, ierr) ! Generate instability wave - call s_generate_wave(wi, zr, zi, rho_mean, mach, alpha, beta, wave, shift) + call s_generate_wave(wr, wi, zr, zi, rho_mean, mach, alpha, beta, wave, shift) end subroutine s_solve_linear_system @@ -494,8 +494,8 @@ contains !> This subroutine generates an instability wave using the most unstable !! eigenvalue and corresponding eigenvector among the !! given set of eigenvalues and eigenvectors. - pure subroutine s_generate_wave(wi, zr, zi, rho_mean, mach, alpha, beta, wave, shift) - real(wp), dimension(0:mixlayer_nvar*n - n_bc_skip - 1), intent(in) :: wi !< eigenvalues + pure subroutine s_generate_wave(wr, wi, zr, zi, rho_mean, mach, alpha, beta, wave, shift) + real(wp), dimension(0:mixlayer_nvar*n - n_bc_skip - 1), intent(in) :: wr, wi !< eigenvalues real(wp), dimension(0:mixlayer_nvar*n - n_bc_skip - 1, 0:mixlayer_nvar*n - n_bc_skip - 1), intent(in) :: zr, zi !< eigenvectors real(wp), intent(in) :: rho_mean real(wp), dimension(mixlayer_nvar, 0:m, 0:n, 0:p), intent(inout) :: wave From 7e3b4e9099a0522e9e3424a62160e3a9fb259e4b Mon Sep 17 00:00:00 2001 From: Spencer Bryngelson Date: Sat, 7 Jun 2025 09:26:38 -0400 Subject: [PATCH 8/8] Update m_model.fpp --- src/pre_process/m_model.fpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pre_process/m_model.fpp b/src/pre_process/m_model.fpp index 3b386ebf6c..852cc1a22b 100644 --- a/src/pre_process/m_model.fpp +++ b/src/pre_process/m_model.fpp @@ -327,7 +327,7 @@ contains character(kind=c_char, len=80), parameter :: header = "Model file written by MFC." integer(kind=c_int32_t) :: nTriangles - real(wp) :: normal(3), v(3) + real(kind=c_float) :: normal(3), v(3) integer(kind=c_int16_t) :: attribute open (newunit=iunit, file=filepath, action='WRITE', &