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
The cause of the problem is that Gridap.gradient under the hood checks whether it is possible the change the domain of γh (i.e., Γ) to the domain associated to the measure dΩ (i.e., Ω), no matter whether γh is part of the integrand of the term or not. Thus, is_change_possible returns false, because γh is defined on a lower-dimensional manifold (i.e., 1D versus 2D).
This in particular happens here
function_gradient(f,uh,fuh::DomainContribution)
terms =DomainContribution()
for trian inget_domains(fuh)
g =_change_argument(gradient,f,trian,uh)
cell_u =get_cell_dof_values(uh)
cell_id =_compute_cell_ids(uh,trian)
cell_grad =autodiff_array_gradient(g,cell_u,cell_id)
add_contribution!(terms,trian,cell_grad)
end
terms
end
In the call to _compute_cell_ids(uh,trian), uh is γh and trian is Ω in the particular context of your MWE.
In other words, it is assuming somehow that all the terms in the functional being differentiated depend on the input argument
I dont think it is correct, the first term in your functional does not depend on the input argument, therefore Gridap should not assume that
I think it is not possible to determine whether a given element in fuh depends on uh given the information available in the local scope of _gradient
The text was updated successfully, but these errors were encountered:
Here is an MWE:
The error traces are:
In the MWE, if
l(γ, v) = ∫(γ * v)dΓ
, no errors will occur.Explanation of the error from @amartinhuertas:
The text was updated successfully, but these errors were encountered: