Mundy: Multibody Nonlocal Dynamics Version of the Day
Loading...
Searching...
No Matches
mundy::search::ExcludeNonIntersectingOBBs< Scalar, MemSpace > Class Template Reference

Narrow-phase excluder that keeps only candidates whose OBBs intersect. More...

#include <Excluder.hpp>

Public Types

Aliases
using scalar_type = Scalar
using memory_space = MemSpace
using execution_space = typename MemSpace::execution_space
using obb_type = OBB<Scalar>
using obb_component_type = mundy::mesh::OBBFieldComponent<Scalar>
using ngp_obb_component_type = typename obb_component_type::ngp_component_t

Public Member Functions

Constructors
 ExcludeNonIntersectingOBBs ()=default
 ExcludeNonIntersectingOBBs (obb_component_type target_obbs, obb_component_type source_obbs)
 Construct from separate target and source OBB components (asymmetric search).
 ExcludeNonIntersectingOBBs (obb_component_type obbs)
 Construct from a single OBB component (symmetric / self-search).
Setup
void setup (const stk::mesh::BulkData &bulk_data, const stk::mesh::Selector &, const stk::mesh::Selector &)
 Refresh the device OBB components and the NgpMesh that operator() reads.
Filtering
template<typename Candidate>
bool operator() (const Candidate &candidate) const
 Exclude candidate pairs whose OBBs do not intersect.

Detailed Description

template<typename Scalar = double, typename MemSpace = stk::ngp::MemSpace>
class mundy::search::ExcludeNonIntersectingOBBs< Scalar, MemSpace >

Reads each entity's OBB from an OBBFieldComponent (so the geometry survives mid-build ghosting). A candidate is excluded when its target and source OBBs do not intersect (15-axis separating-axis test). operator() reads each OBB on demand from the candidate's entity; setup() must be called immediately before the evaluation kernel to refresh the device components and the NgpMesh those reads go through.

Intended use: append as a .narrow_phase(ExcludeNonIntersectingOBBs{...}) filter after an AABB broad phase to tighten the candidate set for oriented shapes. The OBB component must be defined on the searched entities' rank.

Member Typedef Documentation

◆ scalar_type

template<typename Scalar = double, typename MemSpace = stk::ngp::MemSpace>
using mundy::search::ExcludeNonIntersectingOBBs< Scalar, MemSpace >::scalar_type = Scalar

◆ memory_space

template<typename Scalar = double, typename MemSpace = stk::ngp::MemSpace>
using mundy::search::ExcludeNonIntersectingOBBs< Scalar, MemSpace >::memory_space = MemSpace

◆ execution_space

template<typename Scalar = double, typename MemSpace = stk::ngp::MemSpace>
using mundy::search::ExcludeNonIntersectingOBBs< Scalar, MemSpace >::execution_space = typename MemSpace::execution_space

◆ obb_type

template<typename Scalar = double, typename MemSpace = stk::ngp::MemSpace>
using mundy::search::ExcludeNonIntersectingOBBs< Scalar, MemSpace >::obb_type = OBB<Scalar>

◆ obb_component_type

template<typename Scalar = double, typename MemSpace = stk::ngp::MemSpace>
using mundy::search::ExcludeNonIntersectingOBBs< Scalar, MemSpace >::obb_component_type = mundy::mesh::OBBFieldComponent<Scalar>

◆ ngp_obb_component_type

template<typename Scalar = double, typename MemSpace = stk::ngp::MemSpace>
using mundy::search::ExcludeNonIntersectingOBBs< Scalar, MemSpace >::ngp_obb_component_type = typename obb_component_type::ngp_component_t

Constructor & Destructor Documentation

◆ ExcludeNonIntersectingOBBs() [1/3]

template<typename Scalar = double, typename MemSpace = stk::ngp::MemSpace>
mundy::search::ExcludeNonIntersectingOBBs< Scalar, MemSpace >::ExcludeNonIntersectingOBBs ( )
default

◆ ExcludeNonIntersectingOBBs() [2/3]

template<typename Scalar = double, typename MemSpace = stk::ngp::MemSpace>
mundy::search::ExcludeNonIntersectingOBBs< Scalar, MemSpace >::ExcludeNonIntersectingOBBs ( obb_component_type target_obbs,
obb_component_type source_obbs )
inline
Parameters
target_obbs[in] OBB component supplying target-entity OBBs.
source_obbs[in] OBB component supplying source-entity OBBs.

◆ ExcludeNonIntersectingOBBs() [3/3]

template<typename Scalar = double, typename MemSpace = stk::ngp::MemSpace>
mundy::search::ExcludeNonIntersectingOBBs< Scalar, MemSpace >::ExcludeNonIntersectingOBBs ( obb_component_type obbs)
inlineexplicit
Parameters
obbs[in] OBB component shared by both target and source sides.

Member Function Documentation

◆ setup()

template<typename Scalar = double, typename MemSpace = stk::ngp::MemSpace>
void mundy::search::ExcludeNonIntersectingOBBs< Scalar, MemSpace >::setup ( const stk::mesh::BulkData & bulk_data,
const stk::mesh::Selector & ,
const stk::mesh::Selector &  )
inline

Call immediately before the kernel that evaluates this excluder, so the device geometry and the entity→FastMeshIndex mapping reflect the current mesh state.

◆ operator()()

template<typename Scalar = double, typename MemSpace = stk::ngp::MemSpace>
template<typename Candidate>
bool mundy::search::ExcludeNonIntersectingOBBs< Scalar, MemSpace >::operator() ( const Candidate & candidate) const
inline
Parameters
candidate[in] Candidate pair produced by a search backend.