Skip to content

Commit 1dfdc32

Browse files
committed
suite hhyerarchy
1 parent 33aa4b7 commit 1dfdc32

3 files changed

Lines changed: 12 additions & 16 deletions

File tree

benchmark/ConstitutiveModelsBenchmark/ViscousModelsBenchmarks.jl

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ using HyperFEM.PhysicalModels
33
using BenchmarkTools
44

55

6-
function benchmark_viscous_model(model)
6+
function benchmark_viscous_model()
7+
elasto = NeoHookean3D=1e6, μ=1e3)
8+
visco = ViscousIncompressible(IncompressibleNeoHookean3D=0., μ=1e3), 10.)
9+
model = GeneralizedMaxwell(elasto, visco)
710
Ψ, ∂Ψu, ∂Ψuu = model(Δt = 1e-2)
811
F = TensorValue(1.:9...) * 1e-3 + I3
912
Fn = TensorValue(1.:9...) * 5e-4 + I3
@@ -12,17 +15,9 @@ function benchmark_viscous_model(model)
1215
Uvn *= J^(-1/3)
1316
λvn = 1e-3
1417
Avn = VectorValue(Uvn.data..., λvn)
15-
print("Ψ(F, Fn, Avn) |")
16-
@btime $Ψ($F, $Fn, $Avn)
17-
print("∂Ψu(F, Fn, Avn) |")
18-
@btime $∂Ψu($F, $Fn, $Avn)
19-
print("∂Ψuu(F, Fn, Avn) |")
20-
@btime $∂Ψuu($F, $Fn, $Avn)
18+
SUITE["Constitutive models"]["Visco-elastic Ψ"] = @benchmarkable $Ψ($F, $Fn, $Avn)
19+
SUITE["Constitutive models"]["Visco-elastic ∂Ψu"] = @benchmarkable $∂Ψu($F, $Fn, $Avn)
20+
SUITE["Constitutive models"]["Visco-elastic ∂Ψuu"] = @benchmarkable $∂Ψuu($F, $Fn, $Avn)
2121
end
2222

23-
24-
elasto = NeoHookean3D=1e6, μ=1e3)
25-
visco = ViscousIncompressible(IncompressibleNeoHookean3D=0., μ=1e3), 10.)
26-
visco_elastic = GeneralizedMaxwell(elasto, visco)
27-
benchmark_viscous_model(visco);
28-
benchmark_viscous_model(visco_elastic);
23+
benchmark_viscous_model()
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11

2+
SUITE["Constitutive models"] = BenchmarkGroup()
3+
24
include("ViscousModelsBenchmarks.jl")

benchmark/TensorAlgebraBenchmarks/TensorAlgebraBenchmarks.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,5 @@ function _δδ_λ_2D(λ::Float64)
4242
λ)
4343
end
4444

45-
SUITE["δδ_μ_2d"] = @benchmark δᵢₖδⱼₗ2D + δᵢₗδⱼₖ2D
46-
47-
SUITE["δδ_λ_2d"] = @benchmark 1.0 * δᵢⱼδₖₗ2D
45+
SUITE["Tensor algebra"]["δδ_μ_2d"] = @benchmarkable δᵢₖδⱼₗ2D + δᵢₗδⱼₖ2D
46+
SUITE["Tensor algebra"]["δδ_λ_2d"] = @benchmarkable 1.0 * δᵢⱼδₖₗ2D

0 commit comments

Comments
 (0)