You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using Gridap
using Gridap.CellData
model =CartesianDiscreteModel((0,1,0,1),(2,2))
Ω_space =Triangulation(model,[1,2])
reffe =ReferenceFE(lagrangian,Float64,1)
V =FESpace(Ω_space,reffe)
Ω =Triangulation(model)
dΩ =Measure(Ω,2)
j(u) =∫(u)dΩ
uh =zero(V)
c =get_contribution(gradient(j,uh),Ω)
collect(c) # Fails
The issue happens when the variable being differentiated is not defined on the whole integration domain. Although a niche thing, this kind of scenario does happen quite often in embedded scenarios.
It is caused by how autodiff works, and how cell-wise arrays are reindexed to match eachother's length.
I will be working on a fix.
The following script fails:
The issue happens when the variable being differentiated is not defined on the whole integration domain. Although a niche thing, this kind of scenario does happen quite often in embedded scenarios.
It is caused by how autodiff works, and how cell-wise arrays are reindexed to match eachother's length.
I will be working on a fix.
@zjwegert
The text was updated successfully, but these errors were encountered: