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 1/2] 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) From e245dc2638e22a0ec396786ad86992f4de189192 Mon Sep 17 00:00:00 2001 From: Daniel Doehring Date: Wed, 4 Oct 2023 16:07:09 +0200 Subject: [PATCH 2/2] Use Analysis CB (#1650) * Use Analysis CB * Apply suggestions from code review --------- Co-authored-by: Hendrik Ranocha --- examples/tree_2d_dgsem/elixir_navierstokes_lid_driven_cavity.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tree_2d_dgsem/elixir_navierstokes_lid_driven_cavity.jl b/examples/tree_2d_dgsem/elixir_navierstokes_lid_driven_cavity.jl index 81e48737e79..3314343ccca 100644 --- a/examples/tree_2d_dgsem/elixir_navierstokes_lid_driven_cavity.jl +++ b/examples/tree_2d_dgsem/elixir_navierstokes_lid_driven_cavity.jl @@ -66,7 +66,7 @@ summary_callback = SummaryCallback() alive_callback = AliveCallback(alive_interval=100) analysis_interval = 100 analysis_callback = AnalysisCallback(semi, interval=analysis_interval) -callbacks = CallbackSet(summary_callback, alive_callback) +callbacks = CallbackSet(summary_callback, alive_callback, analysis_callback) ############################################################################### # run the simulation