Documentation: Developer notes - unstructured grid spatial hashing documentation#2522
Documentation: Developer notes - unstructured grid spatial hashing documentation#2522fluidnumerics-joe wants to merge 6 commits intomainfrom
Conversation
for more information, see https://pre-commit.ci
erikvansebille
left a comment
There was a problem hiding this comment.
Very nice write-up, @fluidnumerics-joe! Even though this is a draft, I already provided some feedback that I noted as I was reading through (because I was so curious).
|
|
||
| 4. **Gather candidates.** For each query with a valid hit, use `starts[pos]` and `counts[pos]` to gather the candidate face indices `(j_all, i_all)` from the sorted arrays. This is done fully vectorised using a CSR traversal with `np.repeat` and cumulative sums. | ||
|
|
||
| 5. **Point-in-cell test.** Call `self._point_in_cell` (either `curvilinear_point_in_cell` or `uxgrid_point_in_cell`) on all candidates simultaneously. The first candidate per query that passes is taken as the result. |
There was a problem hiding this comment.
Should we rename curvilinear_point_in_cell to xgrid_point_in_cell, to keep the symmetry between the two types of grids?
There was a problem hiding this comment.
xgrid's can also be rectilinear, but we don't leverage the point in cell checks for rectilinear grids. I'm not necessarily opposed to a name change, so long as docstrings indicate clearly the intention of the function to be used on curvilinear grids. What do you think @VeckoTheGecko ?
We now reference the path to the function using python syntax
…b.com:Parcels-Code/Parcels into documentation/developer-notes-spatial-hashing
|
@erikvansebille - I'll leave the comments/suggestions as unresolved. If it looks like I've addressed them, please mark them resolved. Otherwise, additional feedback is welcome |
|
It's not clear to me why the unit tests are suddenly failing while all I've changed are docs.. |
This PR adds a "Developer Notes" section to the Development page. In this section, I've added documentation that adds some more detailed descriptions of the spatial hashing algorithm.