9#include <ArborX_Point.hpp>
10#include <ArborX_Sphere.hpp>
29 template <
typename Predicate,
typename Value,
typename OutputFunctor>
43 template <
typename Predicate,
typename Value,
typename OutputFunctor>
64 template <
typename Predicate,
typename Value>
90 template <
typename Predicate,
typename Value>
109 template <
typename Predicate,
typename Value,
typename OutputFunctor>
124template <PACMAN::KokkosViewRank<1> ViewType>
125struct AccessTraits<
PACMAN::RbfPum::DistanceToKNearest<ViewType>> {
128 static KOKKOS_FUNCTION
size_t size(
const Self &self) {
131 static KOKKOS_FUNCTION
auto get(
const Self &self,
size_t i) {
139template <PACMAN::KokkosViewRank<1> ViewType>
140struct AccessTraits<
PACMAN::RbfPum::Projection<ViewType>> {
143 static KOKKOS_FUNCTION
size_t size(
const Self &self) {
146 static KOKKOS_FUNCTION
auto get(
const Self &self,
size_t i) {
154template <PACMAN::KokkosViewRank<1> ViewType>
155struct AccessTraits<
PACMAN::RbfPum::TagEmptyCenters<ViewType>> {
158 using Point =
typename ViewType::non_const_value_type;
159 static KOKKOS_FUNCTION
size_t size(
const Self &self) {
162 static KOKKOS_FUNCTION
auto get(
const Self &self,
size_t i) {
165 return attach(nearest(
Point{}, 0), -1);
174template <PACMAN::KokkosViewRank<1> ViewType>
175struct AccessTraits<
PACMAN::RbfPum::TransformToNearest<ViewType>> {
178 using Point =
typename ViewType::non_const_value_type;
179 static KOKKOS_FUNCTION
size_t size(
const Self &self) {
182 static KOKKOS_FUNCTION
auto get(
const Self &self,
size_t i) {
185 return attach(nearest(
Point{}, 0), -1);
194template <PACMAN::KokkosViewRank<1> ViewType>
195struct AccessTraits<
PACMAN::RbfPum::GetClustersPoints<ViewType>> {
198 static KOKKOS_FUNCTION
size_t size(
const Self &self) {
201 static KOKKOS_FUNCTION
auto get(
const Self &self,
size_t i) {
KOKKOS_INLINE_FUNCTION fp_t SquaredDifference(const ::ArborX::Point< Dim, coordinates_t > &lhs, const ::ArborX::Point< Dim, coordinates_t > &rhs) noexcept
Returns the squared distance between two points, and check for NaN values.
static KOKKOS_FUNCTION size_t size(const Self &self)
static KOKKOS_FUNCTION auto get(const Self &self, size_t i)
typename ViewType::memory_space memory_space
static KOKKOS_FUNCTION size_t size(const Self &self)
typename ViewType::memory_space memory_space
static KOKKOS_FUNCTION auto get(const Self &self, size_t i)
typename ViewType::memory_space memory_space
static KOKKOS_FUNCTION auto get(const Self &self, size_t i)
static KOKKOS_FUNCTION size_t size(const Self &self)
typename ViewType::non_const_value_type Point
static KOKKOS_FUNCTION size_t size(const Self &self)
typename ViewType::memory_space memory_space
static KOKKOS_FUNCTION auto get(const Self &self, size_t i)
Custom ArborX callback which returns the squared distance between a cluster center and its nearest po...
KOKKOS_FUNCTION void operator()(Predicate predicate, Value const &value, OutputFunctor const &out) const
Support struct for an ArborX predicate.
A custon ArborX callback which returns the indices of the points inside of each region (according to ...
KOKKOS_FUNCTION void operator()(Predicate, Value const &value, OutputFunctor const &out) const
Support struct for an ArborX predicate.
A custom ArborX callback which returns the nearest mesh point of a given value (the nearest projectio...
KOKKOS_FUNCTION void operator()(Predicate predicate, Value const &value, OutputFunctor const &out) const
Support struct for an ArborX predicate.
A custon ArborX callback which tags empty regions centers, by setting the x axis value of the center ...
ViewType centersCandidates
KOKKOS_FUNCTION void operator()(Predicate predicate, Value const &value) const
Support struct for an ArborX predicate.
ViewType centersCandidates