|
| | RebuildOnOBBDisplacement (obb_component_type obbs, Scalar max_displacement) |
| | Construct with a symmetric OBB component and a single threshold (aperiodic).
|
| | RebuildOnOBBDisplacement (obb_component_type target_obbs, obb_component_type source_obbs, Scalar max_displacement) |
| | Construct with separate target/source OBB components and a single threshold (aperiodic).
|
| | RebuildOnOBBDisplacement (obb_component_type target_obbs, obb_component_type source_obbs, Scalar target_max_displacement, Scalar source_max_displacement) |
| | Construct with separate target/source OBB components and asymmetric thresholds (aperiodic).
|
| | RebuildOnOBBDisplacement (obb_component_type obbs, Scalar max_displacement, const Metric &metric) |
| | Construct with a symmetric OBB component, a single threshold, and an explicit metric.
|
| | RebuildOnOBBDisplacement (obb_component_type target_obbs, obb_component_type source_obbs, Scalar target_max_displacement, Scalar source_max_displacement, const Metric &metric) |
| | Construct with separate target/source OBB components, asymmetric thresholds, and a metric.
|
| void | setup (const stk::mesh::BulkData &, const stk::mesh::Selector &, const stk::mesh::Selector &) noexcept |
| | No per-update setup needed; OBBs are read on demand from the stored OBB components.
|
template<typename TargetInput, typename SourceInput>
requires NeighborListInputType<TargetInput> && NeighborListInputType<SourceInput> |
| bool | needs_rebuild (const stk::mesh::BulkData &bulk, const TargetInput &targets, const SourceInput &sources) |
| | Return true if any OBB has escaped its inflated snapshot containment region.
|
template<typename TargetInput, typename SourceInput>
requires NeighborListInputType<TargetInput> && NeighborListInputType<SourceInput> |
| void | snapshot (const stk::mesh::BulkData &bulk, const TargetInput &targets, const SourceInput &sources) |
| | Snapshot the current OBBs into the per-side scratch fields.
|
| template<RebuilderType Next> |
| RebuilderChain< RebuildOnOBBDisplacement, Next > | rebuild_if (const Next &next) const |
| template<RebuilderType Next> |
| RebuilderChain< RebuildOnOBBDisplacement, Next > | operator| (const Next &next) const |
template<typename
Scalar = double, typename MemorySpace = stk::ngp::MemSpace, typename Metric = FreeSpaceMetric<Scalar>>
class mundy::search::RebuildOnOBBDisplacement< Scalar, MemorySpace, Metric >
After each build, snapshot() records every target and source OBB. needs_rebuild() checks whether each current OBB is still fully contained within the inflated snapshot OBB (half-extents expanded by the displacement threshold d).
- Containment check
- For a pair of OBBs obb_old (snapshot) and obb_new (current), the check is obb_new ⊆ expand(obb_old, d). Using obb_old's three face normals as projection axes — sufficient for containment in any convex body — this reduces to:
T = R_old^T * (c_new - c_old)
R_rel = R_old^T * R_new
for axis i = 0, 1, 2:
|T[i]| + sum_k |R_rel(i,k)| * h_new[k] <= h_old[i] + d
All eight corners of obb_new are implicitly checked: the first term is the center displacement and the second is the maximum extent of obb_new along axis i, achieved at the worst-case corner. If the inequality fails for any axis, the OBB has escaped its inflated containment region and a rebuild is required.
Note that the check uses only the face normals of the snapshot OBB (not all 15 SAT axes). This is correct because containment in a convex set is determined entirely by its own supporting halfspaces — the three axis-pairs that define the OBB.
- Relationship to RebuildOnAABBDisplacement
- For axis-aligned boxes, the containment check above degenerates to the per-corner scalar displacement check in RebuildOnAABBDisplacement: axes are fixed so T[i] = corner_disp[i] and R_rel = I. RebuildOnOBBDisplacement is the correct generalisation when orientations can change between rebuilds.
- Input and views
- Unlike RebuildOnAABBDisplacement (which reads boxes from the search input), OBBs are not part of the standard search input and must be supplied as caller-owned Kokkos views at construction. The user is responsible for keeping those views up to date before each call.