From 2c067cba90f5c12c1589cfab84d82037238c1429 Mon Sep 17 00:00:00 2001 From: Joshua Lampert Date: Tue, 16 Dec 2025 18:21:43 +0100 Subject: [PATCH 1/5] change default example --- README.md | 2 +- docs/src/index.md | 2 +- src/util.jl | 2 +- test/test_unit.jl | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index dfa565f0..aa00435c 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ In the Julia REPL, first load the package DispersiveShallowWater.jl julia> using DispersiveShallowWater ``` -You can run a basic simulation that solves the BBM-BBM equations by executing +You can run a basic simulation that solves the Serre-Green-Naghdi equations by executing ```julia julia> include(default_example()); diff --git a/docs/src/index.md b/docs/src/index.md index 6395059a..0c0b16ac 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -59,7 +59,7 @@ In the Julia REPL, first load the package [DispersiveShallowWater.jl](https://gi julia> using DispersiveShallowWater ``` -You can run a basic simulation that solves the BBM-BBM equations by executing +You can run a basic simulation that solves the Serre-Green-Naghdi equations by executing ```julia julia> include(default_example()); diff --git a/src/util.jl b/src/util.jl index bfda1af3..06854caa 100644 --- a/src/util.jl +++ b/src/util.jl @@ -44,7 +44,7 @@ See also [`examples_dir`](@ref) and [`get_examples`](@ref). Copied from [Trixi.jl](https://github.com/trixi-framework/Trixi.jl). """ function default_example() - joinpath(examples_dir(), "bbm_bbm_1d", "bbm_bbm_1d_basic.jl") + joinpath(examples_dir(), "serre_green_naghdi_1d", "serre_green_naghdi_soliton.jl") end """ diff --git a/test/test_unit.jl b/test/test_unit.jl index f2d7f9d3..75891460 100644 --- a/test/test_unit.jl +++ b/test/test_unit.jl @@ -543,10 +543,10 @@ end eoc_mean_values, _ = convergence_test(@__MODULE__, default_example(), 2, N = 512, tspan = (0.0, 1.0), accuracy_order = accuracy_order) - @test isapprox(eoc_mean_values[:l2][1], accuracy_order, atol = 0.5) - @test isapprox(eoc_mean_values[:linf][2], accuracy_order, atol = 0.5) - @test isapprox(eoc_mean_values[:l2][1], accuracy_order, atol = 0.5) - @test isapprox(eoc_mean_values[:linf][2], accuracy_order, atol = 0.5) + @test isapprox(eoc_mean_values[:l2][1], accuracy_order, atol = 0.1) + @test isapprox(eoc_mean_values[:linf][1], accuracy_order, atol = 0.1) + @test isapprox(eoc_mean_values[:l2][2], accuracy_order, atol = 0.1) + @test isapprox(eoc_mean_values[:linf][2], accuracy_order, atol = 0.1) eoc_mean_values2, _ = convergence_test(@__MODULE__, default_example(), [512, 1024], tspan = (0.0, 1.0), From 4c0c67caf20892e8ea6974bcceeee14d3e6efeb4 Mon Sep 17 00:00:00 2001 From: Joshua Lampert Date: Tue, 16 Dec 2025 18:22:29 +0100 Subject: [PATCH 2/5] bump development version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 0984db9e..4f20ce3a 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "DispersiveShallowWater" uuid = "4ab875f6-b79a-4e28-9745-4f0293954817" authors = ["Joshua Lampert "] -version = "0.8.9-DEV" +version = "0.9.0-DEV" [deps] BandedMatrices = "aae01518-5342-5314-be14-df237901396f" From d222be98a495c891ad5106904f5edde0abf65f52 Mon Sep 17 00:00:00 2001 From: Joshua Lampert Date: Tue, 16 Dec 2025 18:25:02 +0100 Subject: [PATCH 3/5] add NEWS entry --- NEWS.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NEWS.md b/NEWS.md index d75b3fd1..0caf4033 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,12 @@ DispersiveShallowWater.jl follows the interpretation of used in the Julia ecosystem. Notable changes will be documented in this file for human readability. +## Changes when updating to v0.9 from v0.8.x + +#### Changed + +- Changed the `default_example()` from a BBM-BBM setup to a physically more relevant Serre-Green-Naghdi setup ([#276]). + ## Changes in the v0.8 lifecycle #### Added From 0c02eee99c54cfb75b3aa8623891e9f672bd44c9 Mon Sep 17 00:00:00 2001 From: Joshua Lampert Date: Tue, 16 Dec 2025 18:31:53 +0100 Subject: [PATCH 4/5] use only 256 and 512 nodes for convergence test --- test/test_unit.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_unit.jl b/test/test_unit.jl index 75891460..e58489a3 100644 --- a/test/test_unit.jl +++ b/test/test_unit.jl @@ -540,7 +540,7 @@ end accuracy_orders = [2, 4, 6] for accuracy_order in accuracy_orders - eoc_mean_values, _ = convergence_test(@__MODULE__, default_example(), 2, N = 512, + eoc_mean_values, _ = convergence_test(@__MODULE__, default_example(), 2, N = 256, tspan = (0.0, 1.0), accuracy_order = accuracy_order) @test isapprox(eoc_mean_values[:l2][1], accuracy_order, atol = 0.1) @@ -548,7 +548,7 @@ end @test isapprox(eoc_mean_values[:l2][2], accuracy_order, atol = 0.1) @test isapprox(eoc_mean_values[:linf][2], accuracy_order, atol = 0.1) - eoc_mean_values2, _ = convergence_test(@__MODULE__, default_example(), [512, 1024], + eoc_mean_values2, _ = convergence_test(@__MODULE__, default_example(), [256, 512], tspan = (0.0, 1.0), accuracy_order = accuracy_order) for kind in (:l2, :linf), variable in (1, 2) From c26252219e5b4620d035a172b8ab3aa7cad276d5 Mon Sep 17 00:00:00 2001 From: Joshua Lampert Date: Tue, 16 Dec 2025 18:50:49 +0100 Subject: [PATCH 5/5] make tolerance less strict again --- test/test_unit.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test_unit.jl b/test/test_unit.jl index e58489a3..eeba6aae 100644 --- a/test/test_unit.jl +++ b/test/test_unit.jl @@ -543,10 +543,10 @@ end eoc_mean_values, _ = convergence_test(@__MODULE__, default_example(), 2, N = 256, tspan = (0.0, 1.0), accuracy_order = accuracy_order) - @test isapprox(eoc_mean_values[:l2][1], accuracy_order, atol = 0.1) - @test isapprox(eoc_mean_values[:linf][1], accuracy_order, atol = 0.1) - @test isapprox(eoc_mean_values[:l2][2], accuracy_order, atol = 0.1) - @test isapprox(eoc_mean_values[:linf][2], accuracy_order, atol = 0.1) + @test isapprox(eoc_mean_values[:l2][1], accuracy_order, atol = 0.5) + @test isapprox(eoc_mean_values[:linf][1], accuracy_order, atol = 0.5) + @test isapprox(eoc_mean_values[:l2][2], accuracy_order, atol = 0.5) + @test isapprox(eoc_mean_values[:linf][2], accuracy_order, atol = 0.5) eoc_mean_values2, _ = convergence_test(@__MODULE__, default_example(), [256, 512], tspan = (0.0, 1.0),