Skip to content

Conversation

@miguelmaso
Copy link
Collaborator

Removed the time step argument from the energy call. It is now a reference that can be set into the constitutive model.

There is a new function set_time_step!, to make sure there is a uniform API over all the constitutive models. The reason for adding this function is t oavoid iterating all the branches in the generalized Maxwell model.

@miguelmaso miguelmaso requested a review from jmartfrut November 25, 2025 15:27
@github-actions
Copy link

github-actions bot commented Nov 25, 2025

Benchmark Results (Julia v1)

Time benchmarks
main 410d6c2... main / 410d6c2...
Constitutive models/Visco-elastic Ψ 0.0504 ± 0.021 ms 0.051 ± 0.02 ms 0.987 ± 0.57
Constitutive models/Visco-elastic ∂Ψu 0.0627 ± 0.011 ms 0.0645 ± 0.0048 ms 0.972 ± 0.19
Constitutive models/Visco-elastic ∂Ψuu 0.111 ± 0.023 ms 0.112 ± 0.016 ms 0.987 ± 0.25
Simulations/StaticMechanicalDirichlet 0.223 ± 0.014 s 0.225 ± 0.018 s 0.989 ± 0.1
Simulations/StaticMechanicalNeumann 0.161 ± 0.016 s 0.165 ± 0.017 s 0.976 ± 0.14
Simulations/ViscoElastic 8.38 s 8.68 s 0.965
Tensor algebra/Cofactor 0.063 ± 0.002 μs 0.063 ± 0.002 μs 1 ± 0.045
Tensor algebra/Det(A)Inv(A') 0.124 ± 0.006 μs 0.121 ± 0.005 μs 1.02 ± 0.065
Tensor algebra/δδ_λ_2d 19 ± 1 ns 19 ± 1 ns 1 ± 0.074
Tensor algebra/δδ_μ_2d 19 ± 1 ns 19 ± 1 ns 1 ± 0.074
time_to_load 2.38 ± 0.018 s 2.41 ± 0.0079 s 0.988 ± 0.0081
Memory benchmarks
main 410d6c2... main / 410d6c2...
Constitutive models/Visco-elastic Ψ 1.25 k allocs: 0.0794 MB 1.25 k allocs: 0.0789 MB 1.01
Constitutive models/Visco-elastic ∂Ψu 1.37 k allocs: 0.0917 MB 1.37 k allocs: 0.0911 MB 1.01
Constitutive models/Visco-elastic ∂Ψuu 2.31 k allocs: 0.158 MB 2.33 k allocs: 0.158 MB 1
Simulations/StaticMechanicalDirichlet 1.59 M allocs: 0.114 GB 1.59 M allocs: 0.114 GB 1
Simulations/StaticMechanicalNeumann 1.41 M allocs: 0.0901 GB 1.41 M allocs: 0.0901 GB 1
Simulations/ViscoElastic 0.127 G allocs: 8.28 GB 0.128 G allocs: 8.25 GB 1
Tensor algebra/Cofactor 1 allocs: 0.0781 kB 1 allocs: 0.0781 kB 1
Tensor algebra/Det(A)Inv(A') 4 allocs: 0.25 kB 4 allocs: 0.25 kB 1
Tensor algebra/δδ_λ_2d 0 allocs: 0 B 0 allocs: 0 B
Tensor algebra/δδ_μ_2d 0 allocs: 0 B 0 allocs: 0 B
time_to_load 0.149 k allocs: 11.1 kB 0.149 k allocs: 11.1 kB 1

@miguelmaso
Copy link
Collaborator Author

@jmartfrut as commented before, I'll revert all the changes related to lambda to reduce the cope of this PR

@miguelmaso miguelmaso merged commit bd55212 into main Nov 28, 2025
4 checks passed
@miguelmaso miguelmaso deleted the visco-dt branch November 28, 2025 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants