From 84db157ecb8a8f6b7e7c4cf26b4f7a5ea2152757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Mas=C3=B3?= Date: Thu, 6 Nov 2025 12:43:12 +0100 Subject: [PATCH] Faster visco-elastic simulation --- .../SimulationsBenchmarks/ViscoElasticSimulationBenchmark.jl | 2 +- test/SimulationsTests/ViscoElasticSimulationTest.jl | 4 ++-- test/data/ViscoElasticSimulation.jl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/benchmark/SimulationsBenchmarks/ViscoElasticSimulationBenchmark.jl b/benchmark/SimulationsBenchmarks/ViscoElasticSimulationBenchmark.jl index 5bed0d9..d9287b5 100644 --- a/benchmark/SimulationsBenchmarks/ViscoElasticSimulationBenchmark.jl +++ b/benchmark/SimulationsBenchmarks/ViscoElasticSimulationBenchmark.jl @@ -2,4 +2,4 @@ filename = projdir("test/data/ViscoElasticSimulation.jl") include(filename) -SUITE["Simulations"]["ViscoElastic"] = @benchmarkable visco_elastic_simulation(writevtk=false, verbose=false) +SUITE["Simulations"]["ViscoElastic"] = @benchmarkable visco_elastic_simulation(t_end=2, writevtk=false, verbose=false) diff --git a/test/SimulationsTests/ViscoElasticSimulationTest.jl b/test/SimulationsTests/ViscoElasticSimulationTest.jl index f75d321..983e4e4 100644 --- a/test/SimulationsTests/ViscoElasticSimulationTest.jl +++ b/test/SimulationsTests/ViscoElasticSimulationTest.jl @@ -2,6 +2,6 @@ filename = projdir("test/data/ViscoElasticSimulation.jl") include(filename) -λx, σΓ = visco_elastic_simulation(t_end=5, writevtk=false, verbose=false) +λx, σΓ = visco_elastic_simulation(t_end=2, writevtk=false, verbose=false) -@test σΓ[end] ≈ 152821.386 +@test σΓ[end] ≈ 80903.472 diff --git a/test/data/ViscoElasticSimulation.jl b/test/data/ViscoElasticSimulation.jl index a5ba220..4c6aba2 100644 --- a/test/data/ViscoElasticSimulation.jl +++ b/test/data/ViscoElasticSimulation.jl @@ -40,7 +40,7 @@ function visco_elastic_simulation(;t_end=15, writevtk=true, verbose=true) [true, true, true], [true, false, true], [true, false, false], [true, false, false]] # Setup integration - order = 2 + order = 1 degree = 2 * order Ω = Triangulation(model) dΩ = Measure(Ω, degree)