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/...
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 derivativedJ(q,u,φ,dΩ,dΓ_N) = ∫(κ*∇(u)⋅∇(u)*q*(DH ∘ φ)*(norm ∘ ∇(φ)))dΩ
, an error will be thrown sayingAssertionError: 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 beJ(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/...