|
chombo-discharge
|
A patch's spatial index for one round: an EBGeometry point-cloud index (PointCloudBVH or PointCloudHashGrid, selected via Cloud) over the whole patch (every local valid particle followed by every ghost) plus its precomputed k-nearest-neighbor graph.
More...
#include <CD_NearestNeighborParticleMerge.H>
Public Attributes | |
| std::shared_ptr< Cloud > | pointCloud |
| The point-cloud index over this patch's whole point set (local valid first, then ghosts). Null iff there were no particles at all, or no cell in this patch could possibly be crowded (see buildNNSpatialIndex()'s per-cell pre-filter). | |
| std::size_t | pointCloudNLocal = 0 |
| Number of local-valid points at the front of the point cloud's order (used to decode a hit's local-vs-ghost ownership from its cloud index). Only meaningful when pointCloud is non-null. | |
| std::vector< typename Cloud::Hit > | pointCloudGraph |
The whole k-nearest-neighbor graph, precomputed once via Cloud::allNearestNeighbors(pointCloudK) at build time (batched, cache-warm, seeded from each point's own spatial locality – strictly cheaper than per-query calls). Row-major: entry [c * pointCloudK + j] is the j-th nearest OTHER point of cloud index c. Only the local-valid rows (c < pointCloudNLocal) are ever read by findNearestNeighborCandidates(); ghost rows are computed but unused. Empty iff pointCloud is null. | |
| int | pointCloudK = 0 |
| k used to build pointCloudGraph (= 1 + a_maxFallbackCandidates); the row stride. | |
A patch's spatial index for one round: an EBGeometry point-cloud index (PointCloudBVH or PointCloudHashGrid, selected via Cloud) over the whole patch (every local valid particle followed by every ghost) plus its precomputed k-nearest-neighbor graph.
Built once per patch per mergeNearestNeighborsTree()/mergeNearestNeighborsHash() call via buildNNSpatialIndex() and reused across every internal a_iterateLocalTierToConvergence pass via lazy deletion (see findNearestNeighborCandidates()'s own docs). A patch with no crowded cell gets no index at all (pointCloud stays null – see buildNNSpatialIndex()'s per-cell pre-filter). The point cloud's metadata is each point's globalID; a hit's cloud index c decodes ownership directly: c < pointCloudNLocal => local valid a_localValid[c], else ghost a_ghosts[c - pointCloudNLocal].
| Packed | See MergeParticle. |
| Cloud | EBGeometry point-cloud index type – EBGeometry::PointCloudBVH<Real,ParticleID> (default, used by mergeNearestNeighborsTree()) or EBGeometry::PointCloudHashGrid<Real,ParticleID> (used by mergeNearestNeighborsHash()). The two expose an identical query interface (same Hit shape, same method names), so every consumer of this struct is written once and works for either. |