Skip to content

Mutable αr in magnetic models#159

Open
miguelmaso wants to merge 1 commit into
mainfrom
mutable
Open

Mutable αr in magnetic models#159
miguelmaso wants to merge 1 commit into
mainfrom
mutable

Conversation

@miguelmaso
Copy link
Copy Markdown
Collaborator

@miguelmaso miguelmaso commented Jun 5, 2026

changes from #158

Features

  • Overloaded getproperty to ease getting/setting αr field.
  • αr behaves as a mutable field, the energy functions point to the reference.
  • Minor cleanup of magnetic models: used property destructing and moved energy functions outside the struct.

Revision of files changed

Click diff settings and ignore whitespace
image

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

Benchmark Results (Julia v1)

Time benchmarks
main 16d13a4... main / 16d13a4...
Constitutive models/Visco-elastic Ψ 0.0474 ± 0.03 ms 0.0486 ± 0.03 ms 0.975 ± 0.86
Constitutive models/Visco-elastic ∂Ψu 0.0537 ± 0.0019 ms 0.0557 ± 0.0028 ms 0.965 ± 0.059
Constitutive models/Visco-elastic ∂Ψuu 0.101 ± 0.016 ms 0.103 ± 0.017 ms 0.982 ± 0.23
Simulations/StaticMechanicalDirichlet 0.136 ± 0.0069 s 0.133 ± 0.0067 s 1.02 ± 0.073
Simulations/StaticMechanicalNeumann 0.128 ± 0.012 s 0.13 ± 0.012 s 0.99 ± 0.13
Simulations/ViscoElastic 18.4 s 18.5 s 0.994
Tensor algebra/Cofactor 0.06 ± 0.01 μs 0.06 ± 0.01 μs 1 ± 0.24
Tensor algebra/Det(A)Inv(A') 0.12 ± 0.011 μs 0.121 ± 0.04 μs 0.992 ± 0.34
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.84 ± 0.093 s 2.75 ± 0.0054 s 1.04 ± 0.034
Memory benchmarks
main 16d13a4... main / 16d13a4...
Constitutive models/Visco-elastic Ψ 1.24 k allocs: 0.0777 MB 1.24 k allocs: 0.0777 MB 1
Constitutive models/Visco-elastic ∂Ψu 1.29 k allocs: 0.0826 MB 1.29 k allocs: 0.0826 MB 1
Constitutive models/Visco-elastic ∂Ψuu 2.25 k allocs: 0.149 MB 2.25 k allocs: 0.149 MB 1
Simulations/StaticMechanicalDirichlet 1.51 M allocs: 0.108 GB 1.51 M allocs: 0.108 GB 1
Simulations/StaticMechanicalNeumann 1.48 M allocs: 0.0927 GB 1.48 M allocs: 0.0927 GB 1
Simulations/ViscoElastic 0.327 G allocs: 20.6 GB 0.327 G allocs: 20.6 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.159 k allocs: 11.6 kB 0.964

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.

1 participant