11#ifndef EBGEOMETRY_SPHERECLOUD_HPP
12#define EBGEOMETRY_SPHERECLOUD_HPP
32namespace SphereCloud {
141template <
class T,
class Centers,
class Radii>
144 static_assert(std::is_trivially_copyable_v<Centers>,
145 "SphereCloud::FromCentersAndRadii: Centers must be trivially copyable");
146 static_assert(std::is_trivially_copyable_v<Radii>,
147 "SphereCloud::FromCentersAndRadii: Radii must be trivially copyable");
GPU portability layer: host/device decoration macros and backend detection.
#define EBGEOMETRY_HOST_DEVICE
Mark a function as callable from both host and device code (no-op on host compilers).
Definition EBGeometry_GPU.hpp:80
Utility macros for EBGeometry.
Scalar helpers and numeric limits that compile for both host and device.
Declaration of 2D and 3D point/vector classes with templated precision, and free functions on them.
Three-dimensional vector class with arithmetic operators.
Definition EBGeometry_Vec.hpp:258
constexpr uint32_t InvalidIndex
The cloud index of "no sphere": a miss.
Definition EBGeometry_SphereCloud.hpp:38
Namespace containing all of EBGeometry's functionality.
Definition EBGeometry_Affine.hpp:26
Numeric limits, with the meanings of the std::numeric_limits members of the same names.
Definition EBGeometry_Math.hpp:91
A source of spheres reading one array of Sphere<T>, indexed by cloud index.
Definition EBGeometry_SphereCloud.hpp:86
const Sphere< T > * m_spheres
The spheres, indexed by cloud index.
Definition EBGeometry_SphereCloud.hpp:90
Sphere< T > operator()(const uint32_t a_index) const noexcept
The sphere with a cloud index.
Definition EBGeometry_SphereCloud.hpp:99
A source of spheres combining a source of centers and a source of radii, for a caller who keeps them ...
Definition EBGeometry_SphereCloud.hpp:143
Sphere< T > operator()(const uint32_t a_index) const noexcept
The sphere with a cloud index.
Definition EBGeometry_SphereCloud.hpp:166
Centers m_centers
The centers.
Definition EBGeometry_SphereCloud.hpp:152
Radii m_radii
The radii.
Definition EBGeometry_SphereCloud.hpp:157
A source of radii reading one array of T, indexed by cloud index.
Definition EBGeometry_SphereCloud.hpp:111
T operator()(const uint32_t a_index) const noexcept
The radius of the sphere with a cloud index.
Definition EBGeometry_SphereCloud.hpp:124
const T * m_radii
The radii, indexed by cloud index.
Definition EBGeometry_SphereCloud.hpp:115
One query result: the cloud index of a sphere and the signed distance to its surface.
Definition EBGeometry_SphereCloud.hpp:62
uint32_t index
Cloud index of the sphere.
Definition EBGeometry_SphereCloud.hpp:63
T distance
Signed distance from the query to its surface.
Definition EBGeometry_SphereCloud.hpp:64
bool valid() const noexcept
Whether this is a match rather than a miss.
Definition EBGeometry_SphereCloud.hpp:72
A sphere of a sphere cloud: a center and a radius.
Definition EBGeometry_SphereCloud.hpp:48
Vec3T< T > m_center
The center.
Definition EBGeometry_SphereCloud.hpp:49
T m_radius
The radius, at least 0.
Definition EBGeometry_SphereCloud.hpp:50