core 1.5.0
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 980 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 998 of file scene_query.hpp.

References peclet::core::geom::SceneQueryView< Real >::box, peclet::core::geom::SceneQueryView< Real >::grid, peclet::core::geom::SceneQueryView< Real >::instBoundR, peclet::core::geom::SceneQueryView< Real >::scene, peclet::core::geom::sceneEvalOwnerGrid(), peclet::core::geom::sceneEvalOwnerPeriodic(), peclet::core::geom::sphereUnionEvalOwner(), peclet::core::geom::sphereUnionEvalOwnerGrid(), and peclet::core::geom::SceneQueryView< Real >::u.

Referenced by peclet::core::geom::SceneQueryView< Real >::owner().

◆ owner()

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

Owner only.

Definition at line 1007 of file scene_query.hpp.

References peclet::core::geom::SceneQueryView< Real >::evalOwner().

Member Data Documentation

◆ u

◆ scene

◆ grid

◆ box

◆ instBoundR


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