-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add Curvature to GridObject #100
Conversation
Merge main into dev
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good, @Teschl!
Notes for future reference: Curvature is numerically unstable and very sensitive both to the data and to numerical errors. There are numerical differences between this implementation and the MATLAB one especially when the denominator of the calculation is close to zero (i.e. when the gradient is zero). We should be careful about making comparisons between the two. The MATLAB implementation sets the curvature to zero when the denominator is exactly zero. This implementation instead adds a small offset to the denominator.
This adds the curvature function to the
GridObject
. Potential issue with the use of an epsilon to avoid divisions by zero, since the Matlab version does not have this. (This branch has a lot of commits since I used it before to locally test the curvature function written in C)