Skip to content

Further cleaning the handling of grid searching errors#2177

Merged
fluidnumerics-joe merged 20 commits intov4-devfrom
curvilinear_index_search_without_while_loop
Sep 13, 2025
Merged

Further cleaning the handling of grid searching errors#2177
fluidnumerics-joe merged 20 commits intov4-devfrom
curvilinear_index_search_without_while_loop

Conversation

@erikvansebille
Copy link
Copy Markdown
Member

@erikvansebille erikvansebille commented Sep 4, 2025

This PR addresses #2175 by exploring whether it is possible to remove the while-loop in the _search_indices_curvilinear_2d function.

Currently, there are three breaking unit tests:

FAILED tests/v4/test_index_search.py::test_grid_indexing_fpoints - AssertionError: Expected yi 0 but got [-3]
FAILED tests/v4/test_index_search.py::test_indexing_nemo_curvilinear - AssertionError: 
FAILED tests/v4/test_xgrid.py::test_xgrid_search_cpoints[2D lon/lat] - AssertionError: assert {'X': 0, 'Y': 0, 'Z': 0} == {'X': array([...': array([0])}

Note that in the first breaking unit test, a -3 means GRID_SEARCH_ERROR, so this is a clear case where the first computation of xsi and eta failed to produce results within the [0, 1] range

Loading
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 this pull request may close these issues.

Morton hashing still requires while loop in some cases in Curvilinear Grid

3 participants