|
| | RebuildOnEntityChange ()=default |
| void | setup (const stk::mesh::BulkData &, const stk::mesh::Selector &, const stk::mesh::Selector &) noexcept |
| | No per-update setup needed; entities are enumerated on demand from each input's selector.
|
| template<typename TargetInput, typename SourceInput> |
| bool | needs_rebuild (const stk::mesh::BulkData &bulk, const TargetInput &targets, const SourceInput &sources) |
| | Return true if the entity sequence differs from the snapshot at the last build.
|
| template<typename TargetInput, typename SourceInput> |
| void | snapshot (const stk::mesh::BulkData &bulk, const TargetInput &targets, const SourceInput &sources) |
| | Snapshot the current entity sequences into device-resident storage.
|
| template<RebuilderType Next> |
| RebuilderChain< RebuildOnEntityChange, Next > | rebuild_if (const Next &next) const |
| | Return a chain of this rebuilder OR-combined with next.
|
| template<RebuilderType Next> |
| RebuilderChain< RebuildOnEntityChange, Next > | operator| (const Next &next) const |
template<typename MemorySpace = stk::ngp::MemSpace>
class mundy::search::RebuildOnEntityChange< MemorySpace >
After each build, snapshot() records the ordered entity sequences for both inputs (and the mesh's synchronized_count() at that point). needs_rebuild() reports a rebuild when that sequence changes — a different count, a different entity at any position, or a changed ordering. When the mesh has not been modified since the snapshot (unchanged synchronized_count()), it short-circuits to false without enumerating or comparing; otherwise the element-wise compare runs on device.
This is stricter than a count-only check: an add-one / remove-one swap at constant count is detected because the entity at some index will differ. It is also stricter than an unordered set check: reordering the same entities triggers a rebuild because the ordinal-to-entity mapping embedded in the neighbor list has changed.