From 7ba1f2ef98768f297442b026e4acf168bad73ff8 Mon Sep 17 00:00:00 2001 From: Benjamin Bolm <74359358+bennibolm@users.noreply.github.com> Date: Wed, 4 Oct 2023 10:00:36 +0200 Subject: [PATCH] Fix n_elements in resizing containers (#1655) --- src/time_integration/methods_SSP.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/time_integration/methods_SSP.jl b/src/time_integration/methods_SSP.jl index a0ed889968a..33eb6ebf926 100644 --- a/src/time_integration/methods_SSP.jl +++ b/src/time_integration/methods_SSP.jl @@ -226,7 +226,9 @@ function Base.resize!(integrator::SimpleIntegratorSSP, new_size) resize!(integrator.r0, new_size) # Resize container - resize!(integrator.p, new_size) + # new_size = n_variables * n_nodes^n_dims * n_elements + n_elements = nelements(integrator.p.solver, integrator.p.cache) + resize!(integrator.p, n_elements) end function Base.resize!(semi::AbstractSemidiscretization, new_size)