Skip to content
Open
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/simulation/m_riemann_solver_hll.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ contains
else if (mhd .and. relativity) then
Ga%L = 1._wp/sqrt(1._wp - vel_L_rms)
Ga%R = 1._wp/sqrt(1._wp - vel_R_rms)
#:if not MFC_CASE_OPTIMIZATION or num_dims > 2
#:if not MFC_CASE_OPTIMIZATION or num_vels > 2
vdotB%L = vel_L(1)*B%L(1) + vel_L(2)*B%L(2) + vel_L(3)*B%L(3)
vdotB%R = vel_R(1)*B%R(1) + vel_R(2)*B%R(2) + vel_R(3)*B%R(3)

Expand All @@ -274,15 +274,15 @@ contains
! Hard-coded EOS
H_L = 1._wp + (gamma_L + 1)*pres_L/rho_L
H_R = 1._wp + (gamma_R + 1)*pres_R/rho_R
#:if not MFC_CASE_OPTIMIZATION or num_dims > 2
#:if not MFC_CASE_OPTIMIZATION or num_vels > 2
cm%L(1:3) = (rho_L*H_L*Ga%L**2 + B2%L)*vel_L(1:3) - vdotB%L*B%L(1:3)
cm%R(1:3) = (rho_R*H_R*Ga%R**2 + B2%R)*vel_R(1:3) - vdotB%R*B%R(1:3)
#:endif

E_L = rho_L*H_L*Ga%L**2 - pres_L + 0.5_wp*(B2%L + vel_L_rms*B2%L - vdotB%L**2._wp) - rho_L*Ga%L
E_R = rho_R*H_R*Ga%R**2 - pres_R + 0.5_wp*(B2%R + vel_R_rms*B2%R - vdotB%R**2._wp) - rho_R*Ga%R
else if (mhd .and. .not. relativity) then
#:if not MFC_CASE_OPTIMIZATION or num_dims > 2
#:if not MFC_CASE_OPTIMIZATION or num_vels > 2
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)
#:endif
Expand Down Expand Up @@ -490,7 +490,7 @@ contains
! Energy
if (mhd .and. (.not. relativity)) then
! energy flux = (E + p + p_mag) * v_${XYZ}$ - B_${XYZ}$ * (v_x*B_x + v_y*B_y + v_z*B_z)
#:if not MFC_CASE_OPTIMIZATION or num_dims > 2
#:if not MFC_CASE_OPTIMIZATION or num_vels > 2
flux_rsx_vf(${SF('')}$, &
& eqn_idx%E) = (s_M*(vel_R(norm_dir)*(E_R + pres_R + pres_mag%R) - B%R(norm_dir) &
& *(vel_R(1)*B%R(1) + vel_R(2)*B%R(2) + vel_R(3)*B%R(3))) - s_P*(vel_L(norm_dir) &
Expand Down
4 changes: 2 additions & 2 deletions src/simulation/m_riemann_solver_lf.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ contains
H_L = (E_L + pres_L)/rho_L
H_R = (E_R + pres_R)/rho_R
else if (mhd .and. relativity) then
#:if not MFC_CASE_OPTIMIZATION or num_dims > 2
#:if not MFC_CASE_OPTIMIZATION or num_vels > 2
Ga%L = 1._wp/sqrt(1._wp - vel_L_rms)
Ga%R = 1._wp/sqrt(1._wp - vel_R_rms)
vdotB%L = vel_L(1)*B%L(1) + vel_L(2)*B%L(2) + vel_L(3)*B%L(3)
Expand Down Expand Up @@ -392,7 +392,7 @@ contains
! Energy
if (mhd .and. (.not. relativity)) then
! energy flux = (E + p + p_mag) * v_${XYZ}$ - B_${XYZ}$ * (v_x*B_x + v_y*B_y + v_z*B_z)
#:if not MFC_CASE_OPTIMIZATION or num_dims > 1
#:if not MFC_CASE_OPTIMIZATION or num_vels > 2
flux_rsx_vf(${SF('')}$, &
& eqn_idx%E) = (s_M*(vel_R(norm_dir)*(E_R + pres_R + pres_mag%R) - B%R(norm_dir) &
& *(vel_R(1)*B%R(1) + vel_R(2)*B%R(2) + vel_R(3)*B%R(3))) - s_P*(vel_L(norm_dir) &
Expand Down
Loading