Skip to content

Commit

Permalink
Merge branch 'main' into ci
Browse files Browse the repository at this point in the history
  • Loading branch information
sloede authored Oct 22, 2024
2 parents 2b79da7 + 54237d3 commit 52532bd
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ A medium blast wave taken from
function initial_condition_blast_wave(x, t, equations::CompressibleEulerEquations1D)
# Modified From Hennemann & Gassner JCP paper 2020 (Sec. 6.3) -> "medium blast wave"
# Set up polar coordinates
inicenter = SVector(0.0)
RealT = eltype(x)
inicenter = SVector(0)
x_norm = x[1] - inicenter[1]
r = abs(x_norm)
# The following code is equivalent to
Expand All @@ -28,9 +29,9 @@ function initial_condition_blast_wave(x, t, equations::CompressibleEulerEquation
cos_phi = x_norm > 0 ? one(x_norm) : -one(x_norm)

# Calculate primitive variables
rho = r > 0.5 ? 1.0 : 1.1691
v1 = r > 0.5 ? 0.0 : 0.1882 * cos_phi
p = r > 0.5 ? 1.0E-3 : 1.245
rho = r > 0.5f0 ? one(RealT) : RealT(1.1691)
v1 = r > 0.5f0 ? zero(RealT) : RealT(0.1882) * cos_phi
p = r > 0.5f0 ? RealT(1.0E-3) : RealT(1.245)

return prim2cons(SVector(rho, v1, p), equations)
end
Expand Down

0 comments on commit 52532bd

Please sign in to comment.