Skip to content

Merge coincident nodes for dask-backed grids - #1915

Open
rajeeja wants to merge 1 commit into
mainfrom
rajeeja/fix-1905-lazy-coincident-merge
Open

rajeeja wants to merge 1 commit into
mainfrom
rajeeja/fix-1905-lazy-coincident-merge

Conversation

@rajeeja

@rajeeja rajeeja commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Closes #1905

Please merge after #1870. That PR adds a strict xfail for this bug, and this fix turns it into an XPASS failure. Once #1870 lands I'll rebase and drop the marker here, so the fix and its test go in together.

Overview

Chunked grids skipped the coincident-node merge from #1692, so chunks= changed the topology (n_edge, ==, validate()). The merge now runs for lazy grids as well: the 1-D node coordinates are loaded for the search, and the connectivity is remapped blockwise with map_blocks, so it is never computed at open time. _prepare_for_dual is removed because grids are now canonical at construction.

PR Checklist

General

  • An issue is created and linked
  • Added appropriate labels (if your uxarray repo permissions allow it)
  • Filled out Overview and Expected Usage (if applicable) sections

Testing & Benchmarking

  • There is adequate test coverage of changes from this PR (add new tests if needed)
  • If this PR could affect performance, ran ASV benchmarks and confirmed they show expected behavior (add a new benchmark if necessary)

Documentation and Examples

  • Docstrings updated with any function changes, and included in all new functions
  • [N/A] User (public) functions added to docs/api.rst; internal (private) function names start with an underscore (_)
  • [N/A] If touched any notebook files, cleared the output of all cells before committing
  • [N/A] If added new notebook files, put into appropriate directories and referenced in appropriate files

AI Disclosure

AI Usage:

  • I have tested and take responsibility for all AI-generated content in my PR.

Lazy grids skipped the construction-time merge, so chunks= changed the
topology. Remap and collapse connectivity blockwise so it stays lazy.

Fixes #1905
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Eager and lazy grids with any duplicates now give different results, because #1692 deduplicated eager grids only

1 participant