-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: adj_value for Constants is not computed, but it used to work and works with FEniCS adjoint #3227
Comments
We know of an issue with |
#3261 should fix the issue Connor mentioned, do you still see the same issue on the fix branch? |
Hi Jack, I tried your branch, and unfortunately, I still see the same issue. |
This is clearly an issue that needs further investigation, but do things work if you use a real space function instead of a |
I think I know what's going on. When we add dependencies for the |
Actually, I've just attempted a fix and discovered that this is probably a feature and not a bug. In particular if I add the
The solution is therefore probably to use a @dham is certainly the person most knowledgeable about this. |
This reflects a change in |
Thanks a lot for the investigation and explaining everything! It all makes sense. I've tried using |
Maybe there should be a warning or an error about this when someone tries to access |
Something changed with adjoints for Constants and values are not computed anymore. It used to work some time ago and works as expected with FEniCS adjoint. Here's an example I'm testing with:
prints
Expected behavior
I expect adjoints for Constants to be computed. The last time I checked that it was working was Oct 26, 2022.
When I inspect the assemble block I see only 2 dependencies in Firedrake (mesh and P1 coefficient) and 4 dependencies in FEniCS (mesh, P1 coefficient, and two R coefficients):
Firedrake:
FEniCS:
Am I missing something in my script with Firedrake?
The text was updated successfully, but these errors were encountered: