Skip to content

Commit

Permalink
Remove unnecessary line of code
Browse files Browse the repository at this point in the history
  • Loading branch information
bennibolm committed Sep 27, 2023
1 parent bd4ede1 commit 165e9e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/solvers/dgsem_tree/containers_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,7 @@ nnodes(container::ContainerSubcellLimiterIDP2D) = size(container.alpha, 1)
function Base.resize!(container::ContainerSubcellLimiterIDP2D, capacity)
n_nodes = nnodes(container)

@unpack _alpha, _alpha1, _alpha2 = container
(; _alpha, _alpha1, _alpha2) = container
resize!(_alpha, n_nodes * n_nodes * capacity)
container.alpha = unsafe_wrap(Array, pointer(_alpha), (n_nodes, n_nodes, capacity))
resize!(_alpha1, (n_nodes + 1) * n_nodes * capacity)
Expand All @@ -1379,7 +1379,7 @@ function Base.resize!(container::ContainerSubcellLimiterIDP2D, capacity)
container.alpha2 = unsafe_wrap(Array, pointer(_alpha2),
(n_nodes, n_nodes + 1, capacity))

@unpack _variable_bounds = container
(; _variable_bounds) = container
for (key, _) in _variable_bounds
resize!(_variable_bounds[key], n_nodes * n_nodes * capacity)
container.variable_bounds[key] = unsafe_wrap(Array,
Expand Down
8 changes: 3 additions & 5 deletions src/solvers/dgsem_tree/subcell_limiters_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,9 @@ end

@inline function idp_positivity!(alpha, limiter, u, dt, semi, variable, index)
mesh, equations, dg, cache = mesh_equations_solver_cache(semi)
@unpack antidiffusive_flux1, antidiffusive_flux2 = cache.antidiffusive_fluxes
@unpack inverse_weights = dg.basis
@unpack positivity_correction_factor = limiter

@unpack variable_bounds = limiter.cache.subcell_limiter_coefficients
(; antidiffusive_flux1, antidiffusive_flux2) = cache.antidiffusive_fluxes
(; inverse_weights) = dg.basis
(; positivity_correction_factor) = limiter

(; variable_bounds) = limiter.cache.subcell_limiter_coefficients
var_min = variable_bounds["$(variable)_min"]
Expand Down

0 comments on commit 165e9e5

Please sign in to comment.