Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jlchan committed Jan 4, 2024
1 parent 3384553 commit a62cca0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
3 changes: 2 additions & 1 deletion examples/dgmulti_1d/elixir_shallow_water_quasi_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ dg = DGMulti(polydeg = 4, element_type = Line(), approximation_type = SBP(),

cells_per_dimension = (8,)
mesh = DGMultiMesh(dg, cells_per_dimension,
coordinates_min = (0.0,), coordinates_max = (sqrt(2),), periodicity = true)
coordinates_min = (0.0,), coordinates_max = (sqrt(2),),
periodicity = true)
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, dg;
source_terms = source_terms_convergence_test)

Expand Down
19 changes: 11 additions & 8 deletions src/equations/shallow_water_quasi_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,19 @@ Further details are available in the paper:
return SVector(z, equations.gravity * a_ll * h_ll * (h_rr + b_rr), z, z)
end

@inline function flux_nonconservative_chan_etal(u_ll, u_rr, normal_direction::AbstractVector,
equations::ShallowWaterEquationsQuasi1D)
return normal_direction[1] * flux_nonconservative_chan_etal(u_ll, u_rr, 1, equations)
@inline function flux_nonconservative_chan_etal(u_ll, u_rr,
normal_direction::AbstractVector,
equations::ShallowWaterEquationsQuasi1D)
return normal_direction[1] *
flux_nonconservative_chan_etal(u_ll, u_rr, 1, equations)
end

@inline function flux_nonconservative_chan_etal(u_ll, u_rr,
normal_ll::AbstractVector, normal_rr::AbstractVector,
equations::ShallowWaterEquationsQuasi1D)
@inline function flux_nonconservative_chan_etal(u_ll, u_rr,
normal_ll::AbstractVector,
normal_rr::AbstractVector,
equations::ShallowWaterEquationsQuasi1D)
# normal_ll should be equal to normal_rr
return flux_nonconservative_chan_etal(u_ll, u_rr, normal_ll, equations)
return flux_nonconservative_chan_etal(u_ll, u_rr, normal_ll, equations)
end

"""
Expand Down Expand Up @@ -222,7 +225,7 @@ Further details are available in the paper:
end

@inline function flux_chan_etal(u_ll, u_rr, normal_direction::AbstractVector,
equations::ShallowWaterEquationsQuasi1D)
equations::ShallowWaterEquationsQuasi1D)
return normal_direction[1] * flux_chan_etal(u_ll, u_rr, 1, equations)
end

Expand Down

0 comments on commit a62cca0

Please sign in to comment.