Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused surface_integral for prolong2mortar functions #2188

Merged
Merged
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
2 changes: 1 addition & 1 deletion src/solvers/dgsem_p4est/dg_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ end
function prolong2mortars!(cache, u,
mesh::Union{P4estMesh{2}, T8codeMesh{2}}, equations,
mortar_l2::LobattoLegendreMortarL2,
surface_integral, dg::DGSEM)
dg::DGSEM)
@unpack neighbor_ids, node_indices = cache.mortars
index_range = eachnode(dg)

Expand Down
11 changes: 5 additions & 6 deletions src/solvers/dgsem_p4est/dg_2d_parabolic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ for `P4estMesh`es we call

```
prolong2mortars_divergence!(cache, flux_viscous, mesh, equations_parabolic,
dg.mortar, dg.surface_integral, dg)
dg.mortar, dg)

calc_mortar_flux_divergence!(cache_parabolic.elements.surface_flux_values,
mesh, equations_parabolic, dg.mortar,
Expand All @@ -42,11 +42,11 @@ for `P4estMesh`es we call
instead of
```
prolong2mortars!(cache, flux_viscous, mesh, equations_parabolic,
dg.mortar, dg.surface_integral, dg)
dg.mortar, dg)

calc_mortar_flux!(cache_parabolic.elements.surface_flux_values, mesh,
equations_parabolic,
dg.mortar, dg.surface_integral, dg, cache)
dg.mortar, dg, cache)
```
=#
function rhs_parabolic!(du, u, t, mesh::Union{P4estMesh{2}, P4estMesh{3}},
Expand Down Expand Up @@ -126,7 +126,7 @@ function rhs_parabolic!(du, u, t, mesh::Union{P4estMesh{2}, P4estMesh{3}},
# !!! NOTE: we reuse the hyperbolic cache here since it contains "mortars" and "u_threaded". See https://github.com/trixi-framework/Trixi.jl/issues/1674 for a discussion
@trixi_timeit timer() "prolong2mortars" begin
prolong2mortars_divergence!(cache, flux_viscous, mesh, equations_parabolic,
dg.mortar, dg.surface_integral, dg)
dg.mortar, dg)
end

# Calculate mortar fluxes (specialized for AbstractEquationsParabolic)
Expand Down Expand Up @@ -253,7 +253,7 @@ function calc_gradient!(gradients, u_transformed, t,
# Prolong solution to mortars. This resues the hyperbolic version of `prolong2mortars`
@trixi_timeit timer() "prolong2mortars" begin
prolong2mortars!(cache, u_transformed, mesh, equations_parabolic,
dg.mortar, dg.surface_integral, dg)
dg.mortar, dg)
end

# Calculate mortar fluxes. This reuses the hyperbolic version of `calc_mortar_flux`,
Expand Down Expand Up @@ -676,7 +676,6 @@ function prolong2mortars_divergence!(cache, flux_viscous::Vector{Array{uEltype,
mesh::Union{P4estMesh{2}, T8codeMesh{2}},
equations,
mortar_l2::LobattoLegendreMortarL2,
surface_integral,
dg::DGSEM) where {uEltype <: Real}
@unpack neighbor_ids, node_indices = cache.mortars
@unpack contravariant_vectors = cache.elements
Expand Down
2 changes: 1 addition & 1 deletion src/solvers/dgsem_p4est/dg_2d_parallel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function prolong2mpimortars!(cache, u,
mesh::Union{ParallelP4estMesh{2}, ParallelT8codeMesh{2}},
equations,
mortar_l2::LobattoLegendreMortarL2,
surface_integral, dg::DGSEM)
dg::DGSEM)
@unpack node_indices = cache.mpi_mortars
index_range = eachnode(dg)

Expand Down
2 changes: 1 addition & 1 deletion src/solvers/dgsem_p4est/dg_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ end
function prolong2mortars!(cache, u,
mesh::Union{P4estMesh{3}, T8codeMesh{3}}, equations,
mortar_l2::LobattoLegendreMortarL2,
surface_integral, dg::DGSEM)
dg::DGSEM)
@unpack fstar_tmp_threaded = cache
@unpack neighbor_ids, node_indices = cache.mortars
index_range = eachnode(dg)
Expand Down
4 changes: 2 additions & 2 deletions src/solvers/dgsem_p4est/dg_3d_parabolic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function calc_gradient!(gradients, u_transformed, t,
# !!! should we have a separate mortars/u_threaded in cache_parabolic?
@trixi_timeit timer() "prolong2mortars" begin
prolong2mortars!(cache, u_transformed, mesh, equations_parabolic,
dg.mortar, dg.surface_integral, dg)
dg.mortar, dg)
end

# Calculate mortar fluxes. These should reuse the hyperbolic version of `calc_mortar_flux`,
Expand Down Expand Up @@ -647,7 +647,7 @@ function prolong2mortars_divergence!(cache, flux_viscous,
mesh::Union{P4estMesh{3}, T8codeMesh{3}},
equations,
mortar_l2::LobattoLegendreMortarL2,
surface_integral, dg::DGSEM)
dg::DGSEM)
@unpack neighbor_ids, node_indices = cache.mortars
@unpack fstar_tmp_threaded = cache
@unpack contravariant_vectors = cache.elements
Expand Down
6 changes: 3 additions & 3 deletions src/solvers/dgsem_p4est/dg_3d_parallel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function rhs!(du, u, t,
# Prolong solution to MPI mortars
@trixi_timeit timer() "prolong2mpimortars" begin
prolong2mpimortars!(cache, u, mesh, equations,
dg.mortar, dg.surface_integral, dg)
dg.mortar, dg)
end

# Start to send MPI data
Expand Down Expand Up @@ -64,7 +64,7 @@ function rhs!(du, u, t,
# Prolong solution to mortars
@trixi_timeit timer() "prolong2mortars" begin
prolong2mortars!(cache, u, mesh, equations,
dg.mortar, dg.surface_integral, dg)
dg.mortar, dg)
end

# Calculate mortar fluxes
Expand Down Expand Up @@ -305,7 +305,7 @@ function prolong2mpimortars!(cache, u,
mesh::Union{ParallelP4estMesh{3}, ParallelT8codeMesh{3}},
equations,
mortar_l2::LobattoLegendreMortarL2,
surface_integral, dg::DGSEM)
dg::DGSEM)
@unpack node_indices = cache.mpi_mortars
index_range = eachnode(dg)

Expand Down
4 changes: 2 additions & 2 deletions src/solvers/dgsem_tree/dg_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ function rhs!(du, u, t,
# Prolong solution to mortars
@trixi_timeit timer() "prolong2mortars" begin
prolong2mortars!(cache, u, mesh, equations,
dg.mortar, dg.surface_integral, dg)
dg.mortar, dg)
end

# Calculate mortar fluxes
Expand Down Expand Up @@ -798,7 +798,7 @@ end

function prolong2mortars!(cache, u,
mesh::TreeMesh{2}, equations,
mortar_l2::LobattoLegendreMortarL2, surface_integral,
mortar_l2::LobattoLegendreMortarL2,
dg::DGSEM)
@threaded for mortar in eachmortar(dg, cache)
large_element = cache.mortars.neighbor_ids[3, mortar]
Expand Down
6 changes: 3 additions & 3 deletions src/solvers/dgsem_tree/dg_2d_parabolic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function rhs_parabolic!(du, u, t, mesh::Union{TreeMesh{2}, TreeMesh{3}},
# Prolong solution to mortars
@trixi_timeit timer() "prolong2mortars" begin
prolong2mortars!(cache, flux_viscous, mesh, equations_parabolic,
dg.mortar, dg.surface_integral, dg)
dg.mortar, dg)
end

# Calculate mortar fluxes
Expand Down Expand Up @@ -519,7 +519,7 @@ end
function prolong2mortars!(cache, flux_viscous::Vector{Array{uEltype, 4}},
mesh::TreeMesh{2},
equations_parabolic::AbstractEquationsParabolic,
mortar_l2::LobattoLegendreMortarL2, surface_integral,
mortar_l2::LobattoLegendreMortarL2,
dg::DGSEM) where {uEltype <: Real}
flux_viscous_x, flux_viscous_y = flux_viscous
@threaded for mortar in eachmortar(dg, cache)
Expand Down Expand Up @@ -830,7 +830,7 @@ function calc_gradient!(gradients, u_transformed, t,
# NOTE: This re-uses the implementation for hyperbolic terms in "dg_2d.jl"
@trixi_timeit timer() "prolong2mortars" begin
prolong2mortars!(cache, u_transformed, mesh, equations_parabolic,
dg.mortar, dg.surface_integral, dg)
dg.mortar, dg)
end

# Calculate mortar fluxes
Expand Down
6 changes: 3 additions & 3 deletions src/solvers/dgsem_tree/dg_2d_parallel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ function rhs!(du, u, t,
# Prolong solution to MPI mortars
@trixi_timeit timer() "prolong2mpimortars" begin
prolong2mpimortars!(cache, u, mesh, equations,
dg.mortar, dg.surface_integral, dg)
dg.mortar, dg)
end

# Start to send MPI data
Expand Down Expand Up @@ -510,7 +510,7 @@ function rhs!(du, u, t,
# Prolong solution to mortars
@trixi_timeit timer() "prolong2mortars" begin
prolong2mortars!(cache, u, mesh, equations,
dg.mortar, dg.surface_integral, dg)
dg.mortar, dg)
end

# Calculate mortar fluxes
Expand Down Expand Up @@ -597,7 +597,7 @@ end

function prolong2mpimortars!(cache, u,
mesh::ParallelTreeMesh{2}, equations,
mortar_l2::LobattoLegendreMortarL2, surface_integral,
mortar_l2::LobattoLegendreMortarL2,
dg::DGSEM)
@unpack mpi_mortars = cache

Expand Down
4 changes: 2 additions & 2 deletions src/solvers/dgsem_tree/dg_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ function rhs!(du, u, t,
# Prolong solution to mortars
@trixi_timeit timer() "prolong2mortars" begin
prolong2mortars!(cache, u, mesh, equations,
dg.mortar, dg.surface_integral, dg)
dg.mortar, dg)
end

# Calculate mortar fluxes
Expand Down Expand Up @@ -864,7 +864,7 @@ end
function prolong2mortars!(cache, u,
mesh::TreeMesh{3}, equations,
mortar_l2::LobattoLegendreMortarL2,
surface_integral, dg::DGSEM)
dg::DGSEM)
# temporary buffer for projections
@unpack fstar_tmp1_threaded = cache

Expand Down
4 changes: 2 additions & 2 deletions src/solvers/dgsem_tree/dg_3d_parabolic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ function prolong2mortars!(cache,
mesh::TreeMesh{3},
equations_parabolic::AbstractEquationsParabolic,
mortar_l2::LobattoLegendreMortarL2,
surface_integral, dg::DGSEM) where {uEltype <: Real}
dg::DGSEM) where {uEltype <: Real}
# temporary buffer for projections
@unpack fstar_tmp1_threaded = cache

Expand Down Expand Up @@ -966,7 +966,7 @@ function calc_gradient!(gradients, u_transformed, t,
# NOTE: This re-uses the implementation for hyperbolic terms in "dg_3d.jl"
@trixi_timeit timer() "prolong2mortars" begin
prolong2mortars!(cache, u_transformed, mesh, equations_parabolic,
dg.mortar, dg.surface_integral, dg)
dg.mortar, dg)
end

# Calculate mortar fluxes
Expand Down
2 changes: 1 addition & 1 deletion src/solvers/fdsbp_tree/fdsbp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ create_cache(mesh, equations, mortar::Nothing, uEltype) = NamedTuple()
nmortars(mortar::Nothing) = 0

function prolong2mortars!(cache, u, mesh, equations, mortar::Nothing,
surface_integral, dg::DG)
dg::DG)
@assert isempty(eachmortar(dg, cache))
end

Expand Down
Loading