Skip to content

Commit

Permalink
swap order of element and indices for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewwinters5000 committed May 15, 2024
1 parent 746c822 commit 0873271
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/callbacks_stage/positivity_zhang_shu_dg2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/callbacks_stage/positivity_zhang_shu_dg3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/solvers/dgsem_structured/dg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ end
mesh::Union{StructuredMesh, StructuredMeshView,
UnstructuredMesh2D, P4estMesh,
T8codeMesh},
element, indices...)
indices..., element)
return inverse_jacobian[indices..., element]
end

Expand Down
2 changes: 1 addition & 1 deletion src/solvers/dgsem_tree/dg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 0873271

Please sign in to comment.