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 linear cell interpolation mapping for 2D #1297
Add linear cell interpolation mapping for 2D #1297
Conversation
Last comment from my side is that the name should be |
src/query/Index.cpp
Outdated
@@ -211,6 +211,25 @@ ProjectionMatch Index::findNearestProjection(const Eigen::VectorXd &location, in | |||
} | |||
} | |||
|
|||
ProjectionMatch Index::findCellInterpolation(const Eigen::VectorXd &location, int n) |
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.
We are now falling back to nearest-projection by design. So this name is very misleading.
It could also be findCellOrProjection
, but the name has to change.
tests/parallel/mapping-volume/testParallelSquareConservative1To2.cpp
Outdated
Show resolved
Hide resolved
tests/parallel/mapping-volume/testParallelTriangleConservative2To1.cpp
Outdated
Show resolved
Hide resolved
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 very clean already 👍
We still need more unit tests, also for the conservative variant. Probably sth you have on the radar anyway; I just mention it for completeness.
Co-authored-by: Benjamin Uekermann <benjamin.uekermann@gmail.com>
@uekerman all done except the unresolved conversation above. |
Main changes of this PR
volume-cell-interpolation
in the XML config and set up connectivitiy.Motivation and additional information
Milestone of #468.
Followup of #1258
Author's checklist
make changelog
if there are user-observable changes since the last release.make format
to ensure everything is formatted correctly.Reviewers' checklist
@fsimonis : there is still the fall-back question to answer.
For now, we fall-back in NN when the vertex isn't inside a good triangle. However fall-back on edge could be useful in some edge cases (no pun intended).
If we consider the triangle formed by (0,0), (1,0) (0,1) and a point on (-eps, 0.5) with eps a small number, we clearly want to interpolate linearly in the edge. However it is not in the triangle thus falls back to NN