Skip to content

Conversation

@jmartfrut
Copy link
Collaborator

Changes the αr field in the HardMagnetic2D struct to be a Ref{Float64}.

This allows modification of the αr parameter after the object's construction, improving flexibility in simulations where this parameter needs to be dynamically adjusted. It also updates the access to αr to dereference the Ref object.

Changes the `αr` field in the `HardMagnetic2D` struct to be a `Ref{Float64}`.

This allows modification of the `αr` parameter after the object's construction, improving flexibility in simulations where this parameter needs to be dynamically adjusted. It also updates the access to `αr` to dereference the `Ref` object.
@github-actions
Copy link

Benchmark Results (Julia v1)

Time benchmarks
main d29630b... main / d29630b...
Constitutive models/Visco-elastic Ψ 0.0486 ± 0.027 ms 0.0491 ± 0.028 ms 0.99 ± 0.79
Constitutive models/Visco-elastic ∂Ψu 0.0634 ± 0.0043 ms 0.0635 ± 0.004 ms 0.999 ± 0.092
Constitutive models/Visco-elastic ∂Ψuu 0.112 ± 0.014 ms 0.113 ± 0.015 ms 0.989 ± 0.18
Simulations/StaticMechanicalDirichlet 0.131 ± 0.0064 s 0.133 ± 0.0082 s 0.981 ± 0.077
Simulations/StaticMechanicalNeumann 0.127 ± 0.011 s 0.127 ± 0.011 s 0.997 ± 0.12
Simulations/ViscoElastic 20.3 s 20.6 s 0.985
Tensor algebra/Cofactor 0.07 ± 0.01 μs 0.07 ± 0.01 μs 1 ± 0.2
Tensor algebra/Det(A)Inv(A') 0.13 ± 0.001 μs 0.131 ± 0.01 μs 0.992 ± 0.076
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.41 ± 0.0095 s 2.4 ± 0.0094 s 1 ± 0.0056
Memory benchmarks
main d29630b... main / d29630b...
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.36 k allocs: 0.0898 MB 1.36 k allocs: 0.0898 MB 1
Constitutive models/Visco-elastic ∂Ψuu 2.32 k allocs: 0.155 MB 2.32 k allocs: 0.155 MB 1
Simulations/StaticMechanicalDirichlet 1.51 M allocs: 0.109 GB 1.51 M allocs: 0.109 GB 1
Simulations/StaticMechanicalNeumann 1.48 M allocs: 0.0933 GB 1.48 M allocs: 0.0933 GB 1
Simulations/ViscoElastic 0.343 G allocs: 22 GB 0.343 G allocs: 22 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

@jmartfrut jmartfrut merged commit 457c967 into main Jan 19, 2026
4 checks passed
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