Skip to content

Conversation

@miguelmaso
Copy link
Collaborator

Only added a mutiple dispatch for the generalized Maxwell model. These are the minimal changes to have a visco-elastic model with one direction of anisotropy.

In the future, it'll need more implementation: anisotropic directions are a concept orthogonal to viscous branch. Hence, we need to forward the number of directions as well the number of viscous branches to the constitutive model, in order to separate the argumens N directions and B branches.

More complicated things may appear when each direction have multiple viscous anisotropic branches...

@miguelmaso miguelmaso requested a review from jmartfrut December 19, 2025 16:29
@github-actions
Copy link

Benchmark Results (Julia v1)

Time benchmarks
main 7f32496... main / 7f32496...
Constitutive models/Visco-elastic Ψ 0.05 ± 0.027 ms 0.0494 ± 0.028 ms 1.01 ± 0.79
Constitutive models/Visco-elastic ∂Ψu 0.0655 ± 0.0073 ms 0.0641 ± 0.0065 ms 1.02 ± 0.15
Constitutive models/Visco-elastic ∂Ψuu 0.115 ± 0.015 ms 0.114 ± 0.015 ms 1.01 ± 0.18
Simulations/StaticMechanicalDirichlet 0.142 ± 0.008 s 0.144 ± 0.0089 s 0.985 ± 0.082
Simulations/StaticMechanicalNeumann 0.136 ± 0.016 s 0.131 ± 0.013 s 1.03 ± 0.16
Simulations/ViscoElastic 20.7 s 20.9 s 0.989
Tensor algebra/Cofactor 0.07 ± 0.01 μs 0.07 ± 0.001 μs 1 ± 0.14
Tensor algebra/Det(A)Inv(A') 0.13 ± 0.001 μs 0.14 ± 0.011 μs 0.929 ± 0.073
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.44 ± 0.023 s 2.43 ± 0.013 s 1 ± 0.011
Memory benchmarks
main 7f32496... main / 7f32496...
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.61 M allocs: 0.115 GB 1.61 M allocs: 0.115 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.159 k allocs: 11.6 kB 0.964

@miguelmaso miguelmaso merged commit 6d63f41 into main Dec 22, 2025
4 checks passed
@miguelmaso miguelmaso deleted the visco-aniso branch December 22, 2025 15:41
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