comparison benchmark/benchmarks.jl @ 1751:f3d7e2d7a43f feature/sbp_operators/laplace_curvilinear

Merge feature/grids/manifolds
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 11 Sep 2024 16:26:19 +0200
parents 471a948cd2b2
children
comparison
equal deleted inserted replaced
1731:3684db043add 1751:f3d7e2d7a43f
1 using BenchmarkTools 1 using BenchmarkTools
2 2
3 using Sbplib 3 using Diffinitive
4 using Sbplib.Grids 4 using Diffinitive.Grids
5 using Sbplib.SbpOperators 5 using Diffinitive.SbpOperators
6 using Sbplib.RegionIndices 6 using Diffinitive.LazyTensors
7 using Sbplib.LazyTensors
8 7
9 using LinearAlgebra 8 using LinearAlgebra
10 9
11 const SUITE = BenchmarkGroup() 10 const SUITE = BenchmarkGroup()
12 11
166 H = inner_product(g2, stencil_set) 165 H = inner_product(g2, stencil_set)
167 H⁻¹ = inverse_inner_product(g2, stencil_set) 166 H⁻¹ = inverse_inner_product(g2, stencil_set)
168 Dxx = second_derivative(g2, stencil_set, 1) 167 Dxx = second_derivative(g2, stencil_set, 1)
169 Dyy = second_derivative(g2, stencil_set, 2) 168 Dyy = second_derivative(g2, stencil_set, 2)
170 169
171 e₁ₗ = boundary_restriction(g2, stencil_set, CartesianBoundary{1,Lower}()) 170 e₁ₗ = boundary_restriction(g2, stencil_set, CartesianBoundary{1,LowerBoundary}())
172 e₁ᵤ = boundary_restriction(g2, stencil_set, CartesianBoundary{1,Upper}()) 171 e₁ᵤ = boundary_restriction(g2, stencil_set, CartesianBoundary{1,UpperBoundary}())
173 e₂ₗ = boundary_restriction(g2, stencil_set, CartesianBoundary{2,Lower}()) 172 e₂ₗ = boundary_restriction(g2, stencil_set, CartesianBoundary{2,LowerBoundary}())
174 e₂ᵤ = boundary_restriction(g2, stencil_set, CartesianBoundary{2,Upper}()) 173 e₂ᵤ = boundary_restriction(g2, stencil_set, CartesianBoundary{2,UpperBoundary}())
175 174
176 d₁ₗ = normal_derivative(g2, stencil_set, CartesianBoundary{1,Lower}()) 175 d₁ₗ = normal_derivative(g2, stencil_set, CartesianBoundary{1,LowerBoundary}())
177 d₁ᵤ = normal_derivative(g2, stencil_set, CartesianBoundary{1,Upper}()) 176 d₁ᵤ = normal_derivative(g2, stencil_set, CartesianBoundary{1,UpperBoundary}())
178 d₂ₗ = normal_derivative(g2, stencil_set, CartesianBoundary{2,Lower}()) 177 d₂ₗ = normal_derivative(g2, stencil_set, CartesianBoundary{2,LowerBoundary}())
179 d₂ᵤ = normal_derivative(g2, stencil_set, CartesianBoundary{2,Upper}()) 178 d₂ᵤ = normal_derivative(g2, stencil_set, CartesianBoundary{2,UpperBoundary}())
180 179
181 H₁ₗ = inner_product(boundary_grid(g2, CartesianBoundary{1,Lower}()), stencil_set) 180 H₁ₗ = inner_product(boundary_grid(g2, CartesianBoundary{1,LowerBoundary}()), stencil_set)
182 H₁ᵤ = inner_product(boundary_grid(g2, CartesianBoundary{1,Upper}()), stencil_set) 181 H₁ᵤ = inner_product(boundary_grid(g2, CartesianBoundary{1,UpperBoundary}()), stencil_set)
183 H₂ₗ = inner_product(boundary_grid(g2, CartesianBoundary{2,Lower}()), stencil_set) 182 H₂ₗ = inner_product(boundary_grid(g2, CartesianBoundary{2,LowerBoundary}()), stencil_set)
184 H₂ᵤ = inner_product(boundary_grid(g2, CartesianBoundary{2,Upper}()), stencil_set) 183 H₂ᵤ = inner_product(boundary_grid(g2, CartesianBoundary{2,UpperBoundary}()), stencil_set)
185 184
186 SUITE["boundary_terms"]["pre_composition"] = @benchmarkable $u2 .= $(H⁻¹∘e₁ₗ'∘H₁ₗ∘d₁ₗ)*$v2 185 SUITE["boundary_terms"]["pre_composition"] = @benchmarkable $u2 .= $(H⁻¹∘e₁ₗ'∘H₁ₗ∘d₁ₗ)*$v2
187 SUITE["boundary_terms"]["composition"] = @benchmarkable $u2 .= ($H⁻¹∘$e₁ₗ'∘$H₁ₗ∘$d₁ₗ)*$v2 186 SUITE["boundary_terms"]["composition"] = @benchmarkable $u2 .= ($H⁻¹∘$e₁ₗ'∘$H₁ₗ∘$d₁ₗ)*$v2
188 SUITE["boundary_terms"]["application"] = @benchmarkable $u2 .= $H⁻¹*$e₁ₗ'*$H₁ₗ* $d₁ₗ*$v2 187 SUITE["boundary_terms"]["application"] = @benchmarkable $u2 .= $H⁻¹*$e₁ₗ'*$H₁ₗ* $d₁ₗ*$v2
189 # An investigation of these allocations can be found in the branch `allocation_test` 188 # An investigation of these allocations can be found in the branch `allocation_test`