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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/common/include/2dHardcodedIC.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,11 @@
& 0) = 1.0*(1.0 - (1.0/1.0)*(5.0/(2.0*pi))*(5.0/(8.0*1.0*(1.4 + 1.0)*pi))*exp(2.0*1.0*(1.0 - (x_cc(i) &
& - patch_icpp(1)%x_centroid)**2.0 - (y_cc(j) - patch_icpp(1)%y_centroid)**2.0)))**1.4
q_prim_vf(eqn_idx%mom%beg + 0)%sf(i, j, &
& 0) = 0.0 + (y_cc(j) - patch_icpp(1)%y_centroid)*(5.0/(2.0*pi))*exp(1.0*(1.0 - (x_cc(i) - patch_icpp(1) &
& %x_centroid)**2.0 - (y_cc(j) - patch_icpp(1)%y_centroid)**2.0))
& 0) = 0.0 + (y_cc(j) - patch_icpp(1)%y_centroid)*(5.0/(2.0*pi))*exp(1.0*(1.0 - (x_cc(i) &
& - patch_icpp(1)%x_centroid)**2.0 - (y_cc(j) - patch_icpp(1)%y_centroid)**2.0))
q_prim_vf(eqn_idx%mom%beg + 1)%sf(i, j, &
& 0) = 0.0 - (x_cc(i) - patch_icpp(1)%x_centroid)*(5.0/(2.0*pi))*exp(1.0*(1.0 - (x_cc(i) - patch_icpp(1) &
& %x_centroid)**2.0 - (y_cc(j) - patch_icpp(1)%y_centroid)**2.0))
& 0) = 0.0 - (x_cc(i) - patch_icpp(1)%x_centroid)*(5.0/(2.0*pi))*exp(1.0*(1.0 - (x_cc(i) &
& - patch_icpp(1)%x_centroid)**2.0 - (y_cc(j) - patch_icpp(1)%y_centroid)**2.0))
end if
case (281) ! Acoustic pulse
! This is patch is hard-coded for test suite optimization used in the 2D_acoustic_pulse case: This analytic patch uses
Expand Down
2 changes: 0 additions & 2 deletions src/common/include/case.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@

! For pre-process.
#:def analytical()

#:enddef

! For moving immersed boundaries in simulation
#:def mib_analytical()

#:enddef
4 changes: 3 additions & 1 deletion src/common/include/parallel_macros.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,11 @@
#:if not isinstance(function_name, str)
#:stop "When using cray_noinline, function name must be given and given as a string"
#:endif
#:set cray_noinline_directive = ('!DIR$ NOINLINE ' + function_name).strip('\n')
#:set cray_noinline_directive = ('!DIR$ INLINENEVER ' + function_name).strip('\n')
#ifdef _CRAYFTN
#if MFC_OpenACC
$:acc_directive
$:cray_noinline_directive
#elif MFC_OpenMP
$:omp_directive
#else
Expand All @@ -91,6 +92,7 @@
#ifdef _CRAYFTN
#if MFC_OpenACC
$:acc_directive
$:cray_directive
#elif MFC_OpenMP
$:omp_directive
#else
Expand Down
3 changes: 1 addition & 2 deletions src/common/m_variables_conversion.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ contains
!> Compute the pressure from the appropriate equation of state
subroutine s_compute_pressure(energy, alf, dyn_p, pi_inf, gamma, rho, qv, rhoYks, pres, T, stress, mom, G, pres_mag)

$:GPU_ROUTINE(function_name='s_compute_pressure',parallelism='[seq]', cray_noinline=True)
$:GPU_ROUTINE(function_name='s_compute_pressure',parallelism='[seq]', cray_inline=True)

real(stp), intent(in) :: energy, alf
real(wp), intent(in) :: dyn_p
Expand Down Expand Up @@ -499,7 +499,6 @@ contains
real(wp) :: E, D !< Prim/Cons variables within Newton-Raphson iteration
real(wp) :: f, dGa_dW, dp_dW, df_dW !< Functions within Newton-Raphson iteration
integer :: iter !< Newton-Raphson iteration counter

$:GPU_PARALLEL_LOOP(collapse=3, private='[alpha_K, alpha_rho_K, Re_K, nRtmp, rho_K, gamma_K, pi_inf_K, qv_K, dyn_pres_K, &
& rhoYks, B, pres, vftmp, nbub_sc, G_K, T, pres_mag, Ga, B2, m2, S, W, dW, E, D, f, dGa_dW, dp_dW, &
& df_dW, iter]')
Expand Down
4 changes: 2 additions & 2 deletions src/simulation/m_ib_patches.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ contains
do l = ll, lr
do j = jl, jr
do i = il, ir
xyz_local = [x_cc(i) - center(1), y_cc(j) - center(2), &
& z_cc(l) - center(3)] ! get coordinate frame centered on IB
! get coordinate frame centered on IB
xyz_local = [x_cc(i) - center(1), y_cc(j) - center(2), z_cc(l) - center(3)]
xyz_local = matmul(inverse_rotation, xyz_local) ! rotate the frame into the IB's coordinates
xyz_local = xyz_local - offset ! airfoils are a patch that require a centroid offset

Expand Down
6 changes: 3 additions & 3 deletions src/simulation/m_rhs.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,8 @@ contains
type(scalar_field), dimension(sys_size), intent(inout) :: rhs_vf
real(stp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:,1:), intent(inout) :: pb_in

real(wp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:,1:), &
& intent(inout) &
& :: rhs_pb ! TODO :: I think these other two variables need to be stp as well, but it doesn't compile like that right now
! TODO :: I think these other two variables need to be stp as well, but it doesn't compile like that right now
real(wp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:,1:), intent(inout) :: rhs_pb
real(stp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:,1:), intent(inout) :: mv_in
real(wp), dimension(idwbuff(1)%beg:,idwbuff(2)%beg:,idwbuff(3)%beg:,1:,1:), intent(inout) :: rhs_mv
integer, intent(in) :: t_step
Expand All @@ -530,6 +529,7 @@ contains
integer(kind=8) :: i, j, k, l, q !< Generic loop iterators

! RHS: halo exchange -> reconstruct -> Riemann solve -> flux difference -> source terms

call nvtxStartRange("COMPUTE-RHS")

call cpu_time(t_start)
Expand Down
25 changes: 12 additions & 13 deletions src/simulation/m_riemann_solvers.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,11 +423,11 @@ contains
pres_mag%R = 0.5_wp*(B%R(1)**2._wp + B%R(2)**2._wp + B%R(3)**2._wp)
#:endif
E_L = gamma_L*pres_L + pi_inf_L + 0.5_wp*rho_L*vel_L_rms + qv_L + pres_mag%L
E_R = gamma_R*pres_R + pi_inf_R + 0.5_wp*rho_R*vel_R_rms + qv_R &
& + pres_mag%R ! includes magnetic energy
! includes magnetic energy
E_R = gamma_R*pres_R + pi_inf_R + 0.5_wp*rho_R*vel_R_rms + qv_R + pres_mag%R
H_L = (E_L + pres_L - pres_mag%L)/rho_L
H_R = (E_R + pres_R - pres_mag%R) &
& /rho_R ! stagnation enthalpy here excludes magnetic energy (only used to find speed of sound)
! stagnation enthalpy here excludes magnetic energy (only used to find speed of sound)
H_R = (E_R + pres_R - pres_mag%R)/rho_R
else
E_L = gamma_L*pres_L + pi_inf_L + 5.e-1*rho_L*vel_L_rms + qv_L
E_R = gamma_R*pres_R + pi_inf_R + 5.e-1*rho_R*vel_R_rms + qv_R
Expand Down Expand Up @@ -754,9 +754,8 @@ contains
& eqn_idx%psi) - qR_prim_rs${XYZ}$_vf(j + 1, k, l, &
& eqn_idx%psi)))/(s_M - s_P)
else
flux_rs${XYZ}$_vf(j, k, l, &
& eqn_idx%B%beg + norm_dir - 1) &
& = 0._wp ! Without hyperbolic cleaning, make sure flux of B_normal is identically zero
! Without hyperbolic cleaning, make sure flux of B_normal is identically zero
flux_rs${XYZ}$_vf(j, k, l, eqn_idx%B%beg + norm_dir - 1) = 0._wp
end if
end if
flux_src_rs${XYZ}$_vf(j, k, l, eqn_idx%adv%beg) = 0._wp
Expand Down Expand Up @@ -1113,11 +1112,11 @@ contains
pres_mag%L = 0.5_wp*(B%L(1)**2._wp + B%L(2)**2._wp + B%L(3)**2._wp)
pres_mag%R = 0.5_wp*(B%R(1)**2._wp + B%R(2)**2._wp + B%R(3)**2._wp)
E_L = gamma_L*pres_L + pi_inf_L + 0.5_wp*rho_L*vel_L_rms + qv_L + pres_mag%L
E_R = gamma_R*pres_R + pi_inf_R + 0.5_wp*rho_R*vel_R_rms + qv_R &
& + pres_mag%R ! includes magnetic energy
! includes magnetic energy
E_R = gamma_R*pres_R + pi_inf_R + 0.5_wp*rho_R*vel_R_rms + qv_R + pres_mag%R
H_L = (E_L + pres_L - pres_mag%L)/rho_L
H_R = (E_R + pres_R - pres_mag%R) &
& /rho_R ! stagnation enthalpy here excludes magnetic energy (only used to find speed of sound)
! stagnation enthalpy here excludes magnetic energy (only used to find speed of sound)
H_R = (E_R + pres_R - pres_mag%R)/rho_R
else
E_L = gamma_L*pres_L + pi_inf_L + 5.e-1*rho_L*vel_L_rms + qv_L
E_R = gamma_R*pres_R + pi_inf_R + 5.e-1*rho_R*vel_R_rms + qv_R
Expand Down Expand Up @@ -3463,8 +3462,8 @@ contains
E%L = gamma%L*pres%L + pi_inf%L + 0.5_wp*rho%L*vel_rms%L + qv%L + pres_mag%L
E%R = gamma%R*pres%R + pi_inf%R + 0.5_wp*rho%R*vel_rms%R + qv%R + pres_mag%R ! includes magnetic energy
H_no_mag%L = (E%L + pres%L - pres_mag%L)/rho%L
H_no_mag%R = (E%R + pres%R - pres_mag%R) &
& /rho%R ! stagnation enthalpy here excludes magnetic energy (only used to find speed of sound)
! stagnation enthalpy here excludes magnetic energy (only used to find speed of sound)
H_no_mag%R = (E%R + pres%R - pres_mag%R)/rho%R

! (2) Compute fast wave speeds
call s_compute_speed_of_sound(pres%L, rho%L, gamma%L, pi_inf%L, H_no_mag%L, alpha_L, vel_rms%L, &
Expand Down
12 changes: 6 additions & 6 deletions src/simulation/m_weno.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -1178,8 +1178,8 @@ contains
delta(:) = 0._wp
beta(:) = weno_eps

if (teno) v = v_rs_ws_${XYZ}$ (j - 3:j + 3,k, l, &
& i) ! temporary field value array for clarity
! temporary field value array for clarity
if (teno) v = v_rs_ws_${XYZ}$ (j - 3:j + 3,k, l, i)

if (.not. teno) then
dvd(2) = v_rs_ws_${XYZ}$ (j + 3, k, l, i) - v_rs_ws_${XYZ}$ (j + 2, k, l, i)
Expand Down Expand Up @@ -1279,8 +1279,8 @@ contains
tau = abs(beta(3) - beta(0)) ! Equation 50
$:GPU_LOOP(parallelism='[seq]')
do q = 0, weno_num_stencils
alpha(q) = d_cbL_${XYZ}$ (q, &
& j)*(1._wp + (tau/beta(q))**wenoz_q) ! wenoz_q = 2,3,4 for stability
! wenoz_q = 2,3,4 for stability
alpha(q) = d_cbL_${XYZ}$ (q, j)*(1._wp + (tau/beta(q))**wenoz_q)
end do
else if (teno) then
#:if not MFC_CASE_OPTIMIZATION or weno_num_stencils > 3
Expand Down Expand Up @@ -1353,8 +1353,8 @@ contains
else if (wenoz) then
$:GPU_LOOP(parallelism='[seq]')
do q = 0, weno_num_stencils
alpha(q) = d_cbR_${XYZ}$ (q, &
& j)*(1._wp + (tau/beta(q))**wenoz_q) ! wenoz_q = 2,3,4 for stability
! wenoz_q = 2,3,4 for stability
alpha(q) = d_cbR_${XYZ}$ (q, j)*(1._wp + (tau/beta(q))**wenoz_q)
end do
else if (teno) then
$:GPU_LOOP(parallelism='[seq]')
Expand Down