Skip to content
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

[SofaBaseMechanics] BarycentricMapping: spatial hashing, handle limit cases #896

Merged
merged 7 commits into from Feb 6, 2019

Conversation

EulalieCoevoet
Copy link
Contributor

@EulalieCoevoet EulalieCoevoet commented Jan 16, 2019

Hi,

This PR follows the changes made in BarycentricMapping (i.e use of spatial hashing to find the nearest points instead of an exhaustive search). This new PR:

  1. Handle cases of several grid cells having the same h index. In such case, the distance between two points, that have the same h index, should be computed only if the points are in the same grid cell. This PR add this implementation. Each element is now stored in the hash table with its corresponding grid cell indices.

  2. The nearest point, in a shared grid cell, may not be the global nearest point. To improve that, we detect when neighboring cells may contain a better solution, and do the check. These additional computations are still far better than the exhaustive search.


This PR:

  • builds with SUCCESS for all platforms on the CI.
  • does not generate new warnings.
  • does not generate new unit test failures.
  • does not generate new scene test failures.
  • does not break API compatibility.
  • is more than 1 week old (or has fast-merge label).

Reviewers will merge only if all these checks are true.

@EulalieCoevoet EulalieCoevoet added enhancement About a possible enhancement pr: fix Fix a bug labels Jan 16, 2019
@hugtalbot hugtalbot added the pr: status to review To notify reviewers to review this pull-request label Jan 16, 2019
@EulalieCoevoet EulalieCoevoet added pr: status wip Development in the pull-request is still in progress and removed pr: status to review To notify reviewers to review this pull-request labels Jan 17, 2019
@EulalieCoevoet EulalieCoevoet added pr: status to review To notify reviewers to review this pull-request and removed pr: status wip Development in the pull-request is still in progress labels Jan 21, 2019
@hugtalbot
Copy link
Contributor

[ci-build] [with-scene-tests] [with-regression-tests]

@guparan guparan added pr: status wip Development in the pull-request is still in progress and removed pr: status to review To notify reviewers to review this pull-request labels Jan 23, 2019
@damienmarchal damienmarchal added pr: status to review To notify reviewers to review this pull-request and removed pr: status wip Development in the pull-request is still in progress labels Feb 2, 2019
@guparan guparan added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Feb 6, 2019
@damienmarchal
Copy link
Contributor

Many thanks Eulalie for this work.

@damienmarchal damienmarchal merged commit e8ff5e5 into sofa-framework:master Feb 6, 2019
@damienmarchal damienmarchal deleted the barycentricMapping branch February 25, 2019 09:13
@guparan guparan added this to the v19.06 milestone Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement About a possible enhancement pr: fix Fix a bug pr: status ready Approved a pull-request, ready to be squashed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants