zjwegert / GridapTopOpt.jl

A computational toolbox for level set-based topology optimisation in Julia
MIT License
10 stars 1 forks source link

Analytic gradient breaks in parallel for integrals of certain measures #46

Open zjwegert opened 8 months ago

zjwegert commented 8 months ago

When an optimisation function does not contain a measure over the whole computational domain but the analytic derivative does, the ghost DoFs will not be allocated. I.e., for J(u,φ,dΩ,dΓ_N) = ∫(g*u)dΓ_N with analytic shape derivative dJ(q,u,φ,dΩ,dΓ_N) = ∫(κ*∇(u)⋅∇(u)*q*(DH ∘ φ)*(norm ∘ ∇(φ)))dΩ, an error will be thrown saying AssertionError: You are trying to set a value that is not stored in the local portion.

The current work around for this problem is to modify J to be J(u,φ,dΩ,dΓ_N) = ∫(g*u)dΓ_N + ∫(0)dΩ.

The hope is that the move to PartitionedArrays 0.4 will help resolve this issue.

Test scripts available at scripts/_dev/bug_issue_46/...