Skip to content

Kd tree#4

Merged
TobiBu merged 12 commits intomainfrom
kd-tree
Feb 23, 2026
Merged

Kd tree#4
TobiBu merged 12 commits intomainfrom
kd-tree

Conversation

@TobiBu
Copy link
Owner

@TobiBu TobiBu commented Feb 23, 2026

Summary

made kd-tree compatible with downstream use in FMM code jaccpot.

Validation

  • pytest
  • black --check .
  • isort --check-only .
  • pydoclint .

Notes

simultaneously made changes to jaccpot to comply with these changes here.

Tobias Buck and others added 12 commits February 23, 2026 20:22
…chmark parity

- remove tracer-unsafe bool/int conversions in tree geometry path
- add outer-jit regression test for compute_tree_geometry
- make interactions result materialization tracer-safe under jit
- use shape-derived internal-node count in dual-tree walk
- restore fully-jitted radix traversal/e2e in kdtree backend benchmark notebook
- Implemented `return_squared` option in `query_neighbors` to return squared distances.
- Enhanced `count_neighbors` to support vector radii, allowing for multiple radius queries.
- Updated KDTree construction to optimize for leaf sizes and bounding box calculations.
- Added unit tests to verify the correctness of squared distance returns and vector radius handling.
This commit updates the __init__.py file to include the build_leaf_neighbor_lists function in the module exports. This change ensures that the function is accessible when the yggdrax module is imported, enhancing the functionality available to users.
- Updated test for KDTree to reflect changes in FMM topology support and missing fields.
- Enhanced KDTree class to include particle indices, parent nodes, and node ranges.
- Modified geometry computation to conditionally use Morton bounds based on available fields.
- Improved interactions implementation to ensure proper type handling for parent indices.
- Added helper function to compute inorder traversal and subtree ranges for KDTree nodes.
- Adjusted build_kdtree function to return additional topology information.
- Updated tree construction in KDParticleTree to utilize new particle indices.
- Introduced a new script `kdtree_radix_numeric_parity.py` to compare backend outputs for Radix and KD tree implementations in the context of nearfield computations.
- Enhanced unit tests for dense interactions to support both Radix and KD tree structures.
- Added backend-agnostic interaction contract tests for Radix and KD trees.
- Updated KD tree API tests to ensure topology fields are well-formed.
- Modified prepared artifacts tests to validate both Radix and KD tree types.
- Improved tree moments tests to support mass and multipole moment computations for both tree types.
- Refactored geometry and interactions implementations to accommodate the new tree topology requirements.
- Ensured compatibility with FMM-core topology across various modules.
@TobiBu TobiBu merged commit 6440cab into main Feb 23, 2026
0 of 4 checks passed
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.

1 participant