From 08732716000aa32c5bd992ab38166738d1f989fe Mon Sep 17 00:00:00 2001 From: Andrew Winters Date: Wed, 15 May 2024 19:11:34 +0200 Subject: [PATCH] swap order of element and indices for consistency --- src/callbacks_stage/positivity_zhang_shu_dg2d.jl | 2 +- src/callbacks_stage/positivity_zhang_shu_dg3d.jl | 2 +- src/solvers/dgsem_structured/dg.jl | 2 +- src/solvers/dgsem_tree/dg.jl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/callbacks_stage/positivity_zhang_shu_dg2d.jl b/src/callbacks_stage/positivity_zhang_shu_dg2d.jl index e75b2682fd2..813dd65878b 100644 --- a/src/callbacks_stage/positivity_zhang_shu_dg2d.jl +++ b/src/callbacks_stage/positivity_zhang_shu_dg2d.jl @@ -26,7 +26,7 @@ function limiter_zhang_shu!(u, threshold::Real, variable, total_volume = zero(eltype(u)) for j in eachnode(dg), i in eachnode(dg) volume_jacobian = abs(inv(get_inverse_jacobian(inverse_jacobian, mesh, - element, i, j))) + i, j, element))) u_node = get_node_vars(u, equations, dg, i, j, element) u_mean += u_node * weights[i] * weights[j] * volume_jacobian total_volume += weights[i] * weights[j] * volume_jacobian diff --git a/src/callbacks_stage/positivity_zhang_shu_dg3d.jl b/src/callbacks_stage/positivity_zhang_shu_dg3d.jl index 13a44ac3cad..156abf35b4c 100644 --- a/src/callbacks_stage/positivity_zhang_shu_dg3d.jl +++ b/src/callbacks_stage/positivity_zhang_shu_dg3d.jl @@ -26,7 +26,7 @@ function limiter_zhang_shu!(u, threshold::Real, variable, total_volume = zero(eltype(u)) for k in eachnode(dg), j in eachnode(dg), i in eachnode(dg) volume_jacobian = abs(inv(get_inverse_jacobian(inverse_jacobian, mesh, - element, i, j, k))) + i, j, k, element))) u_node = get_node_vars(u, equations, dg, i, j, k, element) u_mean += u_node * weights[i] * weights[j] * weights[k] * volume_jacobian total_volume += weights[i] * weights[j] * weights[k] * volume_jacobian diff --git a/src/solvers/dgsem_structured/dg.jl b/src/solvers/dgsem_structured/dg.jl index d40052f8bd4..54d32f427e5 100644 --- a/src/solvers/dgsem_structured/dg.jl +++ b/src/solvers/dgsem_structured/dg.jl @@ -80,7 +80,7 @@ end mesh::Union{StructuredMesh, StructuredMeshView, UnstructuredMesh2D, P4estMesh, T8codeMesh}, - element, indices...) + indices..., element) return inverse_jacobian[indices..., element] end diff --git a/src/solvers/dgsem_tree/dg.jl b/src/solvers/dgsem_tree/dg.jl index b8b50913cc5..83bb7018227 100644 --- a/src/solvers/dgsem_tree/dg.jl +++ b/src/solvers/dgsem_tree/dg.jl @@ -43,7 +43,7 @@ function volume_jacobian(element, mesh::TreeMesh, cache) end @inline function get_inverse_jacobian(inverse_jacobian, mesh::TreeMesh, - element, indices...) + indices..., element) return inverse_jacobian[element] end