-
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: Tape of mesh point dependencies #3909
Comments
Small update: the first point raised in the original post was related to the representation of the derivative and the expected result for the gradient of a mass matrix entry with respect to the mesh coordinates can be found by calling |
That is correct. This is related to the change to the new interpolate. Basically, AssembleBlock doesn't see the coordinates as a dependency of |
I think the old
output:
|
Dear all,
We are experiencing an issue with the taping of function dependencies on underlying mesh coordinates, which appear to not be recorded correctly. We were wondering if there is an easy fix for this?
I believe the feature of differentiation with respect to mesh coordinates was available in previous versions of Firedrake (based on https://doi.org/10.1007/s00158-019-02281-z).Please find further details below - any help to resolve this would be really greatly appreciated.Thank you in advance,
Georg
Steps to Reproduce & Expected behavior
The issue appears in the case of interpolating a function onto a mesh. A MWE is included below where we define the$\sin$ function by interpolation on the mesh. The gradient with respect to the mesh point should lead to $\cos$ , i.e. the derivative values should be $[\cos(0),\cos(1/2),\cos(1)]\approx [1.0,0.8776,0.5403]$ .
The output we receive here is$w_3$ is $w_{15}$ is the function
[0. 0. 0.]
. In the visualised tape (tape_interpolation.pdf)coords
, andu
. The dependency on the mesh points is again not tracked.Error message
The dependency on mesh coordinates (control variable
coords
) appears to not be recorded on the tape.Environment:
firedrake-status
:The text was updated successfully, but these errors were encountered: