changeset 2082:87157cfca640 feature/sbp_operators/laplace_curvilinear

Add benchmarks for laplace on a bunch of different grids
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 25 Feb 2026 14:33:42 +0100
parents efdc4d9391ee
children 5af7534e5b3c
files Manifest.toml benchmark/Project.toml benchmark/benchmarks.jl
diffstat 3 files changed, 30 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Manifest.toml	Wed Feb 25 10:43:46 2026 +0100
+++ b/Manifest.toml	Wed Feb 25 14:33:42 2026 +0100
@@ -1,6 +1,6 @@
 # This file is machine-generated - editing it directly is not advised
 
-julia_version = "1.12.4"
+julia_version = "1.12.5"
 manifest_format = "2.0"
 project_hash = "09ffd21aba1eada37be92d01708d2df8356cace2"
 
@@ -116,7 +116,7 @@
 deps = ["LinearAlgebra", "StaticArrays", "TOML"]
 path = "."
 uuid = "5a373a26-915f-4769-bcab-bf03835de17b"
-version = "0.1.5"
+version = "0.1.6"
 
     [deps.Diffinitive.extensions]
     DiffinitiveMakieExt = "Makie"
@@ -572,9 +572,9 @@
 
 [[deps.StaticArrays]]
 deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"]
-git-tree-sha1 = "eee1b9ad8b29ef0d936e3ec9838c7ec089620308"
+git-tree-sha1 = "0f529006004a8be48f1be25f3451186579392d47"
 uuid = "90137ffa-7385-5640-81b9-e52037218182"
-version = "1.9.16"
+version = "1.9.17"
 
     [deps.StaticArrays.extensions]
     StaticArraysChainRulesCoreExt = "ChainRulesCore"
--- a/benchmark/Project.toml	Wed Feb 25 10:43:46 2026 +0100
+++ b/benchmark/Project.toml	Wed Feb 25 14:33:42 2026 +0100
@@ -2,4 +2,5 @@
 BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
 Diffinitive = "5a373a26-915f-4769-bcab-bf03835de17b"
 Mustache = "ffc61752-8dc7-55ee-8c37-f3e9cdd09e70"
-PkgBenchmark = "32113eaa-f34f-5b0d-bd6c-c81e245fc73d"
\ No newline at end of file
+PkgBenchmark = "32113eaa-f34f-5b0d-bd6c-c81e245fc73d"
+StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
--- a/benchmark/benchmarks.jl	Wed Feb 25 10:43:46 2026 +0100
+++ b/benchmark/benchmarks.jl	Wed Feb 25 14:33:42 2026 +0100
@@ -6,6 +6,7 @@
 using Diffinitive.LazyTensors
 
 using LinearAlgebra
+using StaticArrays
 
 const SUITE = BenchmarkGroup()
 
@@ -18,6 +19,14 @@
 g2 = equidistant_grid(ll(2), lu(2), sz(2)...)
 g3 = equidistant_grid(ll(3), lu(3), sz(3)...)
 
+
+c = Chart(unitsquare()) do (ξ,η)
+    @SVector[2ξ + η*(1-η), 3η+(1+η/2)*ξ^2]
+end
+Grids.jacobian(c::typeof(c), (ξ,η)) = @SMatrix[2 1-2η; (2+η)*ξ 3+ξ^2/2]
+
+g2_curved = equidistant_grid(c, sz(2)...)
+
 v1 = rand(sz(1)...)
 v2 = rand(sz(2)...)
 v3 = rand(sz(3)...)
@@ -95,6 +104,21 @@
 
 
 
+SUITE["derivatives"]["laplace"] = BenchmarkGroup()
+
+Δ = laplace(g1, stencil_set)
+SUITE["derivatives"]["laplace"]["1D"] = @benchmarkable $u1 .= $Δ*$v1
+
+Δ = laplace(g2, stencil_set)
+SUITE["derivatives"]["laplace"]["2D"] = @benchmarkable $u2 .= $Δ*$v2
+
+Δ = laplace(g2_curved, stencil_set)
+SUITE["derivatives"]["laplace"]["2D_curved"] = @benchmarkable $u2 .= $Δ*$v2
+
+Δ = laplace(g3, stencil_set)
+SUITE["derivatives"]["laplace"]["3D"] = @benchmarkable $u3 .= $Δ*$v3
+
+
 
 SUITE["derivatives"]["addition"] = BenchmarkGroup()