From 84f11db9efe611452180138a0cfc402400a6a36d Mon Sep 17 00:00:00 2001 From: SimonCan Date: Fri, 10 May 2024 19:34:18 +0100 Subject: [PATCH] Added further StructuredMeshView where needed. --- src/solvers/dgsem_structured/dg_2d.jl | 12 ++++++------ src/solvers/dgsem_tree/dg_2d.jl | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/solvers/dgsem_structured/dg_2d.jl b/src/solvers/dgsem_structured/dg_2d.jl index 1eb244e06aa..6f0354a7251 100644 --- a/src/solvers/dgsem_structured/dg_2d.jl +++ b/src/solvers/dgsem_structured/dg_2d.jl @@ -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, @@ -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, @@ -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) @@ -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) @@ -388,7 +388,7 @@ end end function calc_interface_flux!(cache, u, - mesh::Union{StructuredMesh{2}, StructuredMeshView{2}}, + mesh::Union{StructuredMesh{2}, StructuredMeshView{2}}, nonconservative_terms, # can be True/False equations, surface_integral, dg::DG) @unpack elements = cache @@ -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` diff --git a/src/solvers/dgsem_tree/dg_2d.jl b/src/solvers/dgsem_tree/dg_2d.jl index 6b66c2d4bfa..d5cbbe7ab13 100644 --- a/src/solvers/dgsem_tree/dg_2d.jl +++ b/src/solvers/dgsem_tree/dg_2d.jl @@ -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) @@ -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,