/**************************************************************************** * Copyright (c) 2017-2022 by the ArborX authors * * All rights reserved. * * * * This file is part of the ArborX library. ArborX is * * distributed under a BSD 3-clause license. For the licensing terms see * * the LICENSE file in the top-level directory. * * * * SPDX-License-Identifier: BSD-3-Clause * ****************************************************************************/ #ifndef ARBORX_HYPERSPHERE_HPP #define ARBORX_HYPERSPHERE_HPP #include #include #include namespace ArborX::ExperimentalHyperGeometry { template struct Sphere { KOKKOS_DEFAULTED_FUNCTION Sphere() = default; KOKKOS_FUNCTION constexpr Sphere(Point const ¢roid, Coordinate radius) : _centroid(centroid) , _radius(radius) {} KOKKOS_FUNCTION constexpr auto ¢roid() { return _centroid; } KOKKOS_FUNCTION constexpr auto const ¢roid() const { return _centroid; } KOKKOS_FUNCTION constexpr auto radius() const { return _radius; } Point _centroid = {}; Coordinate _radius = 0; }; } // namespace ArborX::ExperimentalHyperGeometry template struct ArborX::GeometryTraits::dimension< ArborX::ExperimentalHyperGeometry::Sphere> { static constexpr int value = DIM; }; template struct ArborX::GeometryTraits::tag< ArborX::ExperimentalHyperGeometry::Sphere> { using type = SphereTag; }; template struct ArborX::GeometryTraits::coordinate_type< ArborX::ExperimentalHyperGeometry::Sphere> { using type = Coordinate; }; #endif