Merged
Conversation
stephankramer
approved these changes
Feb 9, 2026
Comment on lines
+32
to
+33
| "Input Function must be at least degree 2 to recover gradient" | ||
| " in CG space." |
Member
There was a problem hiding this comment.
Just to clarify: it's perfectly valid to L2 project the gradient of a CG1 Function to CG1 or DG0, right? Which seems to be allowed indeed if you provide your own target space. Here, the automatic choice of CG(k-1) of course doesn't work, but the error message seems to imply something more - which might be confusing
Member
Author
| " in CG space." | ||
| ) | ||
| raise ValueError(val_err) | ||
| target_degree = max(1, source_degree - 1) |
Member
There was a problem hiding this comment.
Nitpick, but we've already assured source_degree-1>1
Co-authored-by: Stephan Kramer <s.kramer@imperial.ac.uk>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Towards #11.
Towards #5.
This PR adds a
recoverymodule and ports therecover_gradient_l2function over from Animate. Once this is merged, we will just need to port the Clement interpolant (see #12) andrecover_hessian_clement(which uses bothclement_interpolantandrecover_gradient_l2) and then Movement will be independent of Animate.