From fafb9ef2609ca3ce5c9f66eb2a34fbe2b18ada95 Mon Sep 17 00:00:00 2001 From: bennibolm Date: Mon, 2 Oct 2023 19:00:55 +0200 Subject: [PATCH] Fix n_elements in resizing containers --- 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)