diff --git a/src/equations/numerical_fluxes.jl b/src/equations/numerical_fluxes.jl index 1d282fa..de1c514 100644 --- a/src/equations/numerical_fluxes.jl +++ b/src/equations/numerical_fluxes.jl @@ -33,8 +33,7 @@ const flux_hll_chen_noelle = FluxHLL(min_max_speed_chen_noelle) # unstructured meshes. These can depend on both the contravariant vectors (normal direction) at # the current node and the averaged ones. @inline function (numflux::Trixi.FluxHydrostaticReconstruction)(u_ll, u_rr, - normal_direction_ll, - normal_direction_average, + normal_direction, equations::Trixi.AbstractEquations) @unpack numerical_flux, hydrostatic_reconstruction = numflux @@ -42,8 +41,8 @@ const flux_hll_chen_noelle = FluxHLL(min_max_speed_chen_noelle) u_ll_star, u_rr_star = hydrostatic_reconstruction(u_ll, u_rr, equations) # Use the reconstructed states to compute the nonconservative surface flux - return numerical_flux(u_ll_star, u_rr_star, normal_direction_ll, - normal_direction_average, + return numerical_flux(u_ll_star, u_rr_star, + normal_direction, equations) end end diff --git a/src/equations/shallow_water_multilayer_2d.jl b/src/equations/shallow_water_multilayer_2d.jl index 555f18b..ad59766 100644 --- a/src/equations/shallow_water_multilayer_2d.jl +++ b/src/equations/shallow_water_multilayer_2d.jl @@ -451,8 +451,7 @@ end flux_nonconservative_ersing_etal(u_ll, u_rr, orientation::Integer, equations::ShallowWaterMultiLayerEquations2D) flux_nonconservative_ersing_etal(u_ll, u_rr, - normal_direction_ll::AbstractVector, - normal_direction_average::AbstractVector, + normal_direction::AbstractVector, equations::ShallowWaterMultiLayerEquations2D) Non-symmetric path-conservative two-point flux discretizing the nonconservative (source) term @@ -509,8 +508,7 @@ In the two-layer setting this combination is equivalent to the fluxes in: end @inline function flux_nonconservative_ersing_etal(u_ll, u_rr, - normal_direction_ll::AbstractVector, - normal_direction_average::AbstractVector, + normal_direction::AbstractVector, equations::ShallowWaterMultiLayerEquations2D) # Pull the necessary left and right state information h_ll = waterheight(u_ll, equations) @@ -537,8 +535,8 @@ end f_hv += g * h_ll[i] * h_jump[j] end end - setlayer!(f, f_h, f_hv * normal_direction_average[1], - f_hv * normal_direction_average[2], i, equations) + setlayer!(f, f_h, f_hv * normal_direction[1], + f_hv * normal_direction[2], i, equations) end return SVector(f) diff --git a/src/equations/shallow_water_two_layer_2d.jl b/src/equations/shallow_water_two_layer_2d.jl index 6f4ccfe..12abe85 100644 --- a/src/equations/shallow_water_two_layer_2d.jl +++ b/src/equations/shallow_water_two_layer_2d.jl @@ -322,8 +322,7 @@ end flux_nonconservative_ersing_etal(u_ll, u_rr, orientation::Integer, equations::ShallowWaterTwoLayerEquations2D) flux_nonconservative_ersing_etal(u_ll, u_rr, - normal_direction_ll::AbstractVector, - normal_direction_average::AbstractVector, + normal_direction::AbstractVector, equations::ShallowWaterTwoLayerEquations2D) !!! warning "Experimental code" @@ -382,8 +381,7 @@ For further details see: end @inline function flux_nonconservative_ersing_etal(u_ll, u_rr, - normal_direction_ll::AbstractVector, - normal_direction_average::AbstractVector, + normal_direction::AbstractVector, equations::ShallowWaterTwoLayerEquations2D) # Pull the necessary left and right state information h_upper_ll, h_lower_ll = waterheight(u_ll, equations) @@ -396,17 +394,17 @@ end h_lower_jump = (h_lower_rr - h_lower_ll) b_jump = (b_rr - b_ll) - # Note this routine only uses the `normal_direction_average` and the average of the + # Note this routine only uses the `normal_direction` and the average of the # bottom topography to get a quadratic split form DG gradient on curved elements return SVector(zero(eltype(u_ll)), - normal_direction_average[1] * equations.gravity * h_upper_ll * + normal_direction[1] * equations.gravity * h_upper_ll * (b_jump + h_lower_jump), - normal_direction_average[2] * equations.gravity * h_upper_ll * + normal_direction[2] * equations.gravity * h_upper_ll * (b_jump + h_lower_jump), zero(eltype(u_ll)), - normal_direction_average[1] * equations.gravity * h_lower_ll * + normal_direction[1] * equations.gravity * h_lower_ll * (b_jump + equations.r * h_upper_jump), - normal_direction_average[2] * equations.gravity * h_lower_ll * + normal_direction[2] * equations.gravity * h_lower_ll * (b_jump + equations.r * h_upper_jump), zero(eltype(u_ll))) end diff --git a/src/equations/shallow_water_wet_dry_2d.jl b/src/equations/shallow_water_wet_dry_2d.jl index 76fd761..a3c197a 100644 --- a/src/equations/shallow_water_wet_dry_2d.jl +++ b/src/equations/shallow_water_wet_dry_2d.jl @@ -243,8 +243,7 @@ end flux_nonconservative_wintermeyer_etal(u_ll, u_rr, orientation::Integer, equations::ShallowWaterEquationsWetDry2D) flux_nonconservative_wintermeyer_etal(u_ll, u_rr, - normal_direction_ll ::AbstractVector, - normal_direction_average::AbstractVector, + normal_direction::AbstractVector, equations::ShallowWaterEquationsWetDry2D) Non-symmetric two-point volume flux discretizing the nonconservative (source) term @@ -271,12 +270,10 @@ Further details are available in the papers: end @inline function Trixi.flux_nonconservative_wintermeyer_etal(u_ll, u_rr, - normal_direction_ll::AbstractVector, - normal_direction_average::AbstractVector, + normal_direction::AbstractVector, equations::ShallowWaterEquationsWetDry2D) return Trixi.flux_nonconservative_wintermeyer_etal(u_ll, u_rr, - normal_direction_ll, - normal_direction_average, + normal_direction, equations.basic_swe) end @@ -284,8 +281,7 @@ end flux_nonconservative_fjordholm_etal(u_ll, u_rr, orientation::Integer, equations::ShallowWaterEquationsWetDry2D) flux_nonconservative_fjordholm_etal(u_ll, u_rr, - normal_direction_ll ::AbstractVector, - normal_direction_average::AbstractVector, + normal_direction::AbstractVector, equations::ShallowWaterEquationsWetDry2D) Non-symmetric two-point surface flux discretizing the nonconservative (source) term of @@ -312,12 +308,10 @@ and for curvilinear 2D case in the paper: end @inline function Trixi.flux_nonconservative_fjordholm_etal(u_ll, u_rr, - normal_direction_ll::AbstractVector, - normal_direction_average::AbstractVector, + normal_direction::AbstractVector, equations::ShallowWaterEquationsWetDry2D) Trixi.flux_nonconservative_fjordholm_etal(u_ll, u_rr, - normal_direction_ll, - normal_direction_average, + normal_direction, equations.basic_swe) end @@ -407,8 +401,7 @@ end flux_nonconservative_audusse_etal(u_ll, u_rr, orientation::Integer, equations::ShallowWaterEquationsWetDry2D) flux_nonconservative_audusse_etal(u_ll, u_rr, - normal_direction_ll ::AbstractVector, - normal_direction_average::AbstractVector, + normal_direction::AbstractVector, equations::ShallowWaterEquationsWetDry2D) Non-symmetric two-point surface flux that discretizes the nonconservative (source) term. @@ -433,12 +426,10 @@ Further details for the hydrostatic reconstruction and its motivation can be fou end @inline function Trixi.flux_nonconservative_audusse_etal(u_ll, u_rr, - normal_direction_ll::AbstractVector, - normal_direction_average::AbstractVector, + normal_direction::AbstractVector, equations::ShallowWaterEquationsWetDry2D) return Trixi.flux_nonconservative_audusse_etal(u_ll, u_rr, - normal_direction_ll, - normal_direction_average, + normal_direction, equations.basic_swe) end @@ -447,8 +438,7 @@ end orientation::Integer, equations::ShallowWaterEquationsWetDry2D) flux_nonconservative_chen_noelle(u_ll, u_rr, - normal_direction_ll ::AbstractVector, - normal_direction_average ::AbstractVector, + normal_direction::AbstractVector, equations::ShallowWaterEquationsWetDry2D) Non-symmetric two-point surface flux that discretizes the nonconservative (source) term. @@ -497,8 +487,7 @@ Further details on the hydrostatic reconstruction and its motivation can be foun end @inline function flux_nonconservative_chen_noelle(u_ll, u_rr, - normal_direction_ll::AbstractVector, - normal_direction_average::AbstractVector, + normal_direction::AbstractVector, equations::ShallowWaterEquationsWetDry2D) # Pull the water height and bottom topography on the left h_ll, _, _, b_ll = u_ll @@ -515,9 +504,9 @@ end # Copy the reconstructed water height for easier to read code h_ll_star = u_ll_star[1] - f2 = -normal_direction_average[1] * equations.gravity * (h_ll_star + h_ll) * + f2 = -normal_direction[1] * equations.gravity * (h_ll_star + h_ll) * (b_ll - b_star) - f3 = -normal_direction_average[2] * equations.gravity * (h_ll_star + h_ll) * + f3 = -normal_direction[2] * equations.gravity * (h_ll_star + h_ll) * (b_ll - b_star) # First and last equations do not have a nonconservative flux