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

Add StructuredMeshView to fluxes. #1986

Merged
merged 5 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
10 changes: 5 additions & 5 deletions src/solvers/dgsem_structured/dg_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ end

@inline function flux_differencing_kernel!(du, u,
element,
mesh::Union{StructuredMesh{2},
mesh::Union{StructuredMesh{2}, StructuredMeshView{2},
UnstructuredMesh2D, P4estMesh{2},
T8codeMesh{2}},
nonconservative_terms::False, equations,
Expand Down Expand Up @@ -157,7 +157,7 @@ end

@inline function flux_differencing_kernel!(du, u,
element,
mesh::Union{StructuredMesh{2},
mesh::Union{StructuredMesh{2}, StructuredMeshView{2},
UnstructuredMesh2D, P4estMesh{2},
T8codeMesh{2}},
nonconservative_terms::True, equations,
Expand Down Expand Up @@ -226,7 +226,7 @@ end
# "A provably entropy stable subcell shock capturing approach for high order split form DG for the compressible Euler equations"
# [arXiv: 2008.12044v2](https://arxiv.org/pdf/2008.12044)
@inline function calcflux_fv!(fstar1_L, fstar1_R, fstar2_L, fstar2_R, u,
mesh::Union{StructuredMesh{2}, UnstructuredMesh2D,
mesh::Union{StructuredMesh{2}, StructuredMeshView{2}, UnstructuredMesh2D,
P4estMesh{2}, T8codeMesh{2}},
nonconservative_terms::False, equations,
volume_flux_fv, dg::DGSEM, element, cache)
Expand Down Expand Up @@ -296,7 +296,7 @@ end
# Calculate the finite volume fluxes inside curvilinear elements (**with non-conservative terms**).
@inline function calcflux_fv!(fstar1_L, fstar1_R, fstar2_L, fstar2_R,
u::AbstractArray{<:Any, 4},
mesh::Union{StructuredMesh{2}, UnstructuredMesh2D,
mesh::Union{StructuredMesh{2}, StructuredMesh{2}, UnstructuredMesh2D,
P4estMesh{2}, T8codeMesh{2}},
nonconservative_terms::True, equations,
volume_flux_fv, dg::DGSEM, element, cache)
Expand Down Expand Up @@ -475,7 +475,7 @@ end

@inline function calc_interface_flux!(surface_flux_values, left_element, right_element,
orientation, u,
mesh::StructuredMesh{2},
mesh::Union{StructuredMesh{2}, StructuredMeshView{2}},
nonconservative_terms::True, equations,
surface_integral, dg::DG, cache)
# See comment on `calc_interface_flux!` with `nonconservative_terms::False`
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 @@ -36,7 +36,7 @@ end

# The methods below are specialized on the volume integral type
# and called from the basic `create_cache` method at the top.
function create_cache(mesh::Union{TreeMesh{2}, StructuredMesh{2}, UnstructuredMesh2D,
function create_cache(mesh::Union{TreeMesh{2}, StructuredMesh{2}, StructuredMeshView{2}, UnstructuredMesh2D,
P4estMesh{2}, T8codeMesh{2}},
equations, volume_integral::VolumeIntegralFluxDifferencing,
dg::DG, uEltype)
Expand Down Expand Up @@ -233,7 +233,7 @@ end
# mapping terms, stored in `cache.elements.contravariant_vectors`, is peeled apart
# from the evaluation of the physical fluxes in each Cartesian direction
function calc_volume_integral!(du, u,
mesh::Union{TreeMesh{2}, StructuredMesh{2},
mesh::Union{TreeMesh{2}, StructuredMesh{2}, StructuredMeshView{2},
UnstructuredMesh2D, P4estMesh{2},
T8codeMesh{2}},
nonconservative_terms, equations,
Expand Down
Loading