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

Update numba_celltree package #1188

Closed
Manangka opened this issue Sep 5, 2024 · 0 comments · Fixed by #1189
Closed

Update numba_celltree package #1188

Manangka opened this issue Sep 5, 2024 · 0 comments · Fixed by #1189
Assignees

Comments

@Manangka
Copy link
Collaborator

Manangka commented Sep 5, 2024

In #1165 the numba_celltree package has been pinnend to a version lower then 0.2.
The reason for this is that a change has been made in that package which affect the locate_points method.
https://github.com/Deltares/numba_celltree/blame/4342ac78481a7e298f5cc05aa211f0bf5532e5ab/numba_celltree/query.py#L28

As a result the following tests fail:

  • test_in_bounds
  • test_get_indices__unstructured,
  • test_get_values__unstructured

@Huite suggested to alter in_bounds &= (x >= xmin) & (x < xmax) into in_bounds &= (x >= xmin) & (x <= xmax)

As a consequence other tests will fail and need to be fixed

After this issue the line numba_celltree = "<0.2" can be removed from the pixi.toml file

@Manangka Manangka converted this from a draft issue Sep 5, 2024
@Manangka Manangka self-assigned this Sep 5, 2024
github-merge-queue bot pushed a commit that referenced this issue Sep 12, 2024
Fixes #1188

# Description
In the numba_celltree package a change has been made that changes the
behavior of the locate_points method.

In structured grids the behavior is that when a point lies on the left
or bottom edge it is considered to be in the cell.
When the point lies on the right or top edge its considered outside of
the cell

This kind of logic doesn't work for unstructured grids because the
orientation of the cell can be anything.
However there are unit tests that do assume that this applies for
unstructured grids as well. And those are the tests that are failing
right now.

To solve this the bahavior has changed such that when a point lies on a
cell edge its is considered to be in the cell. This also applies to
structred grids.


This was

# Checklist
<!---
Before requesting review, please go through this checklist:
-->

- [ ] Links to correct issue
- [ ] Update changelog, if changes affect users
- [ ] PR title starts with ``Issue #nr``, e.g. ``Issue #737``
- [ ] Unit tests were added
- [ ] **If feature added**: Added/extended example
@github-project-automation github-project-automation bot moved this from 🧐 In Review to ✅ Done in iMOD Suite Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

1 participant