Skip to content

Conversation

@miguelmaso
Copy link
Collaborator

The EvolutionLaw struct allows to easily construct evolution functions

# Create base laws
r = ramp(0.2)   # Returns an EvolutionLaw

# Apply arithmetic
# This creates a NEW function: t -> 2.0 * ramp(0.2)(t) + 5.0
complex_load = 2 * r + 5

@miguelmaso miguelmaso requested a review from jmartfrut December 10, 2025 11:54
@github-actions
Copy link

Benchmark Results (Julia v1)

Time benchmarks
main 1478534... main / 1478534...
Constitutive models/Visco-elastic Ψ 0.0509 ± 0.027 ms 0.0501 ± 0.0098 ms 1.02 ± 0.57
Constitutive models/Visco-elastic ∂Ψu 0.0677 ± 0.0038 ms 0.0657 ± 0.0065 ms 1.03 ± 0.12
Constitutive models/Visco-elastic ∂Ψuu 0.118 ± 0.017 ms 0.116 ± 0.016 ms 1.02 ± 0.2
Simulations/StaticMechanicalDirichlet 0.15 ± 0.0089 s 0.147 ± 0.0085 s 1.02 ± 0.085
Simulations/StaticMechanicalNeumann 0.13 ± 0.015 s 0.134 ± 0.014 s 0.974 ± 0.15
Simulations/ViscoElastic 8.66 s 8.45 s 1.03
Tensor algebra/Cofactor 0.069 ± 0.01 μs 0.07 ± 0.01 μs 0.986 ± 0.2
Tensor algebra/Det(A)Inv(A') 0.14 ± 0.01 μs 0.131 ± 0.01 μs 1.07 ± 0.11
Tensor algebra/δδ_λ_2d 30 ± 0 ns 30 ± 0 ns 1 ± 0
Tensor algebra/δδ_μ_2d 30 ± 0 ns 30 ± 0 ns 1 ± 0
time_to_load 2.8 ± 0.05 s 2.79 ± 0.027 s 1 ± 0.02
Memory benchmarks
main 1478534... main / 1478534...
Constitutive models/Visco-elastic Ψ 1.25 k allocs: 0.0789 MB 1.25 k allocs: 0.0789 MB 1
Constitutive models/Visco-elastic ∂Ψu 1.37 k allocs: 0.0911 MB 1.37 k allocs: 0.0911 MB 1
Constitutive models/Visco-elastic ∂Ψuu 2.33 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.128 G allocs: 8.26 GB 0.128 G allocs: 8.26 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 miguelmaso merged commit e50f5af into main Dec 12, 2025
4 checks passed
@miguelmaso miguelmaso deleted the evol-law branch December 12, 2025 09:29
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