From 5359525685966ab79a9abfca7f20920ee25c0505 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 24 May 2024 12:18:26 +0200 Subject: [PATCH 1/3] CompatHelper: bump compat for Convex to 0.16 for package test, (keep existing compat) (#1953) * CompatHelper: bump compat for Convex to 0.16 for package test, (keep existing compat) * bump compat for Convex.jl in main Project.toml * Convex.jl v0.16.0 compat * fmt * Convex.jl v0.16 required due to changes of keyword arguments --------- Co-authored-by: CompatHelper Julia Co-authored-by: Hendrik Ranocha Co-authored-by: Daniel Doehring --- Project.toml | 2 +- ext/TrixiConvexECOSExt.jl | 2 +- test/Project.toml | 2 +- test/test_tree_1d_advection.jl | 4 ++-- test/test_unit.jl | 20 ++++++++++---------- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Project.toml b/Project.toml index b605cb2c6b1..b2cc12010d2 100644 --- a/Project.toml +++ b/Project.toml @@ -61,7 +61,7 @@ TrixiConvexECOSExt = ["Convex", "ECOS"] [compat] CodeTracking = "1.0.5" ConstructionBase = "1.3" -Convex = "0.15.4" +Convex = "0.16" DataStructures = "0.18.15" DelimitedFiles = "1" DiffEqBase = "6 - 6.143" diff --git a/ext/TrixiConvexECOSExt.jl b/ext/TrixiConvexECOSExt.jl index fac127699ce..948dbf103cd 100644 --- a/ext/TrixiConvexECOSExt.jl +++ b/ext/TrixiConvexECOSExt.jl @@ -136,7 +136,7 @@ function Trixi.bisect_stability_polynomial(consistency_order, num_eig_vals, "reltol_inacc" => 5e-5, "nitref" => 9, "maxit" => 100, - "verbose" => 3); silent_solver = true) + "verbose" => 3); silent = true) abs_p = problem.optval diff --git a/test/Project.toml b/test/Project.toml index 5fc2bb18bdf..c8ae33a40ae 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -19,7 +19,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [compat] Aqua = "0.8" CairoMakie = "0.10" -Convex = "0.15.4" +Convex = "0.16" DelimitedFiles = "1" Downloads = "1" ECOS = "1.1.2" diff --git a/test/test_tree_1d_advection.jl b/test/test_tree_1d_advection.jl index afa92efeddb..3885fb50061 100644 --- a/test/test_tree_1d_advection.jl +++ b/test/test_tree_1d_advection.jl @@ -84,8 +84,8 @@ end @trixi_testset "elixir_advection_perk2.jl" begin @test_trixi_include(joinpath(EXAMPLES_DIR, "elixir_advection_perk2.jl"), - l2=[0.014139244532882265], - linf=[0.019997568971592217]) + l2=[0.014139242834192841], + linf=[0.01999756655819429]) # Ensure that we do not have excessive memory allocations # (e.g., from type instabilities) let diff --git a/test/test_unit.jl b/test/test_unit.jl index de13d41e931..d7ec2084361 100644 --- a/test/test_unit.jl +++ b/test/test_unit.jl @@ -1662,16 +1662,16 @@ end ode_algorithm = Trixi.PairedExplicitRK2(12, tspan, vec(eig_vals)) @test isapprox(ode_algorithm.a_matrix, - [0.06453812656705388 0.02637096434203703 - 0.09470601372266194 0.04165762264097442 - 0.12332877820057538 0.05848940361760645 - 0.1498701503275483 0.07740257694517898 - 0.173421149536068 0.09930612319120471 - 0.19261978147927503 0.12556203670254315 - 0.2052334022622969 0.15840296137406676 - 0.2073489042901963 0.2017420048007128 - 0.19135142349998963 0.2631940310454649 - 0.13942836392940833 0.3605716360705917], atol = 1e-13) + [0.06453812656711647 0.02637096434197444 + 0.09470601372274887 0.041657622640887494 + 0.12332877820069793 0.058489403617483886 + 0.14987015032771522 0.07740257694501203 + 0.1734211495362651 0.0993061231910076 + 0.19261978147948638 0.1255620367023318 + 0.20523340226247055 0.1584029613738931 + 0.20734890429023528 0.20174200480067384 + 0.1913514234997008 0.26319403104575373 + 0.13942836392866081 0.3605716360713392], atol = 1e-13) end @testset "Sutherlands Law" begin From 228aec04210722b39a3a11d3d6129e4317bb7d52 Mon Sep 17 00:00:00 2001 From: Michael Schlottke-Lakemper Date: Sun, 26 May 2024 14:50:19 +0200 Subject: [PATCH 2/3] Add JuliaCon 24 contributions to readme (#1957) * Add JuliaCon 24 contributions to readme * Mention minisymposium --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 86a8514a5ba..87075c885f9 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,28 @@

+*** +**Trixi.jl at JuliaCon 2024**
+At this year's JuliaCon in Eindhoven, Netherlands, we will be present with several contributions +from the Trixi Framework ecosystem: + +* [**Julia for Particle-Based Multiphysics with TrixiParticles.jl**](https://pretalx.com/juliacon2024/talk/TPFF8L/),
+ [*Erik Faulhaber*](https://github.com/efaulhaber/), [*Niklas Neher*](https://github.com/lasnikas/), + 10th July 2024, 11:30am–12:00pm, Function (4.1) +* [**Towards Aerodynamic Simulations in Julia with Trixi.jl**](https://pretalx.com/juliacon2024/talk/XH8KBG/),
+ [*Daniel Doehring*](https://github.com/danieldoehring/), + 10th July 2024, 15:00pm–15:30pm, While Loop (4.2) +* [**libtrixi: serving legacy codes in earth system modeling with fresh Julia CFD**](https://pretalx.com/juliacon2024/talk/JBKVGF/),
+ [*Benedict Geihe*](https://github.com/benegee/), + 12th July 2024, 14:00pm–17:00pm, Function (4.1) + +The last talk is part of the +[Julia for High-Performance Computing](https://pretalx.com/juliacon2024/talk/JBKVGF/) +minisymposium, which this year is hosted by our own [*Hendrik Ranocha*](https://github.com/ranocha/). + +We are looking forward to seeing you there ♥️ +*** + **Trixi.jl** is a numerical simulation framework for conservation laws written in [Julia](https://julialang.org). A key objective for the framework is to be useful to both scientists and students. Therefore, next to From 76719a85e0226ba9883dcf3817c6afe8daffb3f6 Mon Sep 17 00:00:00 2001 From: Erik Faulhaber <44124897+efaulhaber@users.noreply.github.com> Date: Wed, 29 May 2024 06:04:29 +0200 Subject: [PATCH 3/3] Clean up callback conditions (#1960) * Clean up callback conditions * Reformat --- src/callbacks_step/alive.jl | 1 - src/callbacks_step/analysis.jl | 10 ++++------ src/callbacks_step/save_restart.jl | 5 ++--- src/callbacks_step/save_solution.jl | 3 +-- src/callbacks_step/visualization.jl | 3 +-- 5 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/callbacks_step/alive.jl b/src/callbacks_step/alive.jl index 9df7181521e..9700f7e4cdc 100644 --- a/src/callbacks_step/alive.jl +++ b/src/callbacks_step/alive.jl @@ -68,7 +68,6 @@ function (alive_callback::AliveCallback)(u, t, integrator) # We need to check the number of accepted steps since callbacks are not # activated after a rejected step. return alive_interval > 0 && ((integrator.stats.naccept % alive_interval == 0 && - !(integrator.stats.naccept == 0 && integrator.iter > 0) && (analysis_interval == 0 || integrator.stats.naccept % analysis_interval != 0)) || isfinished(integrator)) diff --git a/src/callbacks_step/analysis.jl b/src/callbacks_step/analysis.jl index 8f89af755a2..7b4a97c2a79 100644 --- a/src/callbacks_step/analysis.jl +++ b/src/callbacks_step/analysis.jl @@ -26,8 +26,8 @@ or `extra_analysis_errors = (:conservation_error,)`. If you want to omit the computation (to safe compute-time) of the [`default_analysis_errors`](@ref), specify `analysis_errors = Symbol[]`. Note: `default_analysis_errors` are `:l2_error` and `:linf_error` for all equations. -If you want to compute `extra_analysis_errors` such as `:conservation_error` solely, i.e., -without `:l2_error, :linf_error` you need to specify +If you want to compute `extra_analysis_errors` such as `:conservation_error` solely, i.e., +without `:l2_error, :linf_error` you need to specify `analysis_errors = [:conservation_error]` instead of `extra_analysis_errors = [:conservation_error]`. Further scalar functions `func` in `extra_analysis_integrals` are applied to the numerical @@ -119,9 +119,7 @@ function AnalysisCallback(mesh, equations::AbstractEquations, solver, cache; # We need to check the number of accepted steps since callbacks are not # activated after a rejected step. condition = (u, t, integrator) -> interval > 0 && - ((integrator.stats.naccept % interval == 0 && - !(integrator.stats.naccept == 0 && integrator.iter > 0)) || - isfinished(integrator)) + (integrator.stats.naccept % interval == 0 || isfinished(integrator)) analyzer = SolutionAnalyzer(solver; kwargs...) cache_analysis = create_cache_analysis(analyzer, mesh, equations, solver, cache, @@ -696,7 +694,7 @@ include("analysis_dg3d_parallel.jl") # Special analyze for `SemidiscretizationHyperbolicParabolic` such that # precomputed gradients are available. Required for `enstrophy` (see above) and viscous forces. -# Note that this needs to be included after `analysis_surface_integral_2d.jl` to +# Note that this needs to be included after `analysis_surface_integral_2d.jl` to # have `VariableViscous` available. function analyze(quantity::AnalysisSurfaceIntegral{Variable}, du, u, t, diff --git a/src/callbacks_step/save_restart.jl b/src/callbacks_step/save_restart.jl index 0d174d85805..0b0d2420c7a 100644 --- a/src/callbacks_step/save_restart.jl +++ b/src/callbacks_step/save_restart.jl @@ -83,8 +83,7 @@ function (restart_callback::SaveRestartCallback)(u, t, integrator) # (total #steps) (#accepted steps) # We need to check the number of accepted steps since callbacks are not # activated after a rejected step. - return interval > 0 && (((integrator.stats.naccept % interval == 0) && - !(integrator.stats.naccept == 0 && integrator.iter > 0)) || + return interval > 0 && (integrator.stats.naccept % interval == 0 || (save_final_restart && isfinished(integrator))) end @@ -198,7 +197,7 @@ function load_adaptive_time_integrator!(integrator, restart_file::AbstractString # Reevaluate integrator.fsal_first on the first step integrator.reeval_fsal = true # Load additional parameters for PIDController - if hasproperty(controller, :err) # Distinguish PIDController from PIController + if hasproperty(controller, :err) # Distinguish PIDController from PIController controller.err[:] = read(attributes(file)["time_integrator_controller_err"]) end end diff --git a/src/callbacks_step/save_solution.jl b/src/callbacks_step/save_solution.jl index c106fe69bcd..870cea0b9f5 100644 --- a/src/callbacks_step/save_solution.jl +++ b/src/callbacks_step/save_solution.jl @@ -174,8 +174,7 @@ function (solution_callback::SaveSolutionCallback)(u, t, integrator) # (total #steps) (#accepted steps) # We need to check the number of accepted steps since callbacks are not # activated after a rejected step. - return interval_or_dt > 0 && (((integrator.stats.naccept % interval_or_dt == 0) && - !(integrator.stats.naccept == 0 && integrator.iter > 0)) || + return interval_or_dt > 0 && (integrator.stats.naccept % interval_or_dt == 0 || (save_final_solution && isfinished(integrator))) end diff --git a/src/callbacks_step/visualization.jl b/src/callbacks_step/visualization.jl index 98c0126a302..30ac88e9fd7 100644 --- a/src/callbacks_step/visualization.jl +++ b/src/callbacks_step/visualization.jl @@ -137,8 +137,7 @@ function (visualization_callback::VisualizationCallback)(u, t, integrator) # (total #steps) (#accepted steps) # We need to check the number of accepted steps since callbacks are not # activated after a rejected step. - return interval > 0 && ((integrator.stats.naccept % interval == 0 && - !(integrator.stats.naccept == 0 && integrator.iter > 0)) || + return interval > 0 && (integrator.stats.naccept % interval == 0 || isfinished(integrator)) end