core 1.8.1
Shared MPI block decomposition, asynchronous ghost-layer exchange, SDF geometry, load balancing (header-only C++20)
Loading...
Searching...
No Matches
peclet::core::geom::SceneQueryView< Real > Struct Template Reference

The one POD every consumer captures: sphere-union fast path when the scene is a plain sphere union, general scene otherwise, candidate-accelerated in both modes, min-image periodic. More...

#include <scene_query.hpp>

Public Member Functions

PECLET_HD Real eval (Vec3< Real > p) const
PECLET_HD Real evalOwner (Vec3< Real > p, int &own) const
 eval(p) AND the index of the instance (sphere-union mode: the sphere) whose surface is nearest — the argmin behind eval's min, in ONE traversal.
PECLET_HD int owner (Vec3< Real > p) const
 Owner only.

Public Attributes

SphereUnionView< Real > u {}
SceneView< Real > scene {}
CandidateGridView< Real > grid {}
PeriodicBox< Real > box {}
const Real * instBoundR = nullptr

Detailed Description

template<class Real>
struct peclet::core::geom::SceneQueryView< Real >

The one POD every consumer captures: sphere-union fast path when the scene is a plain sphere union, general scene otherwise, candidate-accelerated in both modes, min-image periodic.

Mode selection happens ONCE at build (SceneQueryDevice / SceneQueryHost), so numerics are deterministic per scene; the sphere path is fma-canonical (bitwise host==device), the general tree walk is judged by the sign+ULP rule across backends.

Definition at line 964 of file scene_query.hpp.

Member Function Documentation

◆ eval()

◆ evalOwner()

template<class Real>
PECLET_HD Real peclet::core::geom::SceneQueryView< Real >::evalOwner ( Vec3< Real > p,
int & own ) const
inline

eval(p) AND the index of the instance (sphere-union mode: the sphere) whose surface is nearest — the argmin behind eval's min, in ONE traversal.

own is -1 for an empty scene. Ties break to the lowest index; see the determinism contract above. The returned value is bitwise eval's, so a consumer that needs both never has to reconcile two numbers.

Definition at line 982 of file scene_query.hpp.

References box, grid, instBoundR, PECLET_HD, scene, peclet::core::geom::sceneEvalOwnerGrid(), peclet::core::geom::sceneEvalOwnerPeriodic(), peclet::core::geom::sphereUnionEvalOwner(), peclet::core::geom::sphereUnionEvalOwnerGrid(), and u.

Referenced by owner().

◆ owner()

template<class Real>
PECLET_HD int peclet::core::geom::SceneQueryView< Real >::owner ( Vec3< Real > p) const
inline

Owner only.

Definition at line 991 of file scene_query.hpp.

References evalOwner(), and PECLET_HD.

Member Data Documentation

◆ u

◆ scene

◆ grid

◆ box

◆ instBoundR

template<class Real>
const Real* peclet::core::geom::SceneQueryView< Real >::instBoundR = nullptr

Definition at line 969 of file scene_query.hpp.

Referenced by eval(), and evalOwner().


The documentation for this struct was generated from the following file: