9#include <ArborX_Point.hpp>
10#include <ArborX_Sphere.hpp>
31 template <
typename Predicate,
typename Value,
typename OutputFunctor>
32 KOKKOS_FUNCTION
void operator()(Predicate predicate, Value
const &value,
33 OutputFunctor
const &out)
const {
49 template <
typename Predicate,
typename Value,
typename OutputFunctor>
50 KOKKOS_FUNCTION
void operator()(Predicate predicate, Value
const &value,
51 OutputFunctor
const &out)
const {
53 out(Kokkos::make_pair(ArborX::getData(predicate), value.value));
76 template <
typename Predicate,
typename Value>
78 Value
const &value)
const {
79 const int center_index = ArborX::getData(predicate);
109 template <
typename Predicate,
typename Value>
111 Value
const &value)
const {
127template <KokkosViewRank<1> ViewType>
130template <KokkosViewRank<1> ViewType>
133template <KokkosViewRank<1> ViewType>
136template <KokkosViewRank<1> ViewType>
139template <KokkosViewRank<1> ViewType>
142template <KokkosViewRank<1> ViewType>
145template <KokkosViewRank<1> ViewType>
152 template <
typename Predicate,
typename Value,
typename OutputFunctor>
153 KOKKOS_FUNCTION
void operator()(Predicate , Value
const &value,
154 OutputFunctor
const &out)
const {
167template <PACMAN::KokkosViewRank<1> ViewType>
168struct AccessTraits<
PACMAN::RbfPum::DistanceToKNearest<ViewType>> {
171 static KOKKOS_FUNCTION
size_t size(
const Self &self) {
174 static KOKKOS_FUNCTION
auto get(
const Self &self,
size_t i) {
182template <PACMAN::KokkosViewRank<1> ViewType>
183struct AccessTraits<
PACMAN::RbfPum::Projection<ViewType>> {
186 static KOKKOS_FUNCTION
size_t size(
const Self &self) {
189 static KOKKOS_FUNCTION
auto get(
const Self &self,
size_t i) {
197template <PACMAN::KokkosViewRank<1> ViewType>
198struct AccessTraits<
PACMAN::RbfPum::TagEmptyCenters<ViewType>> {
201 using Point =
typename ViewType::non_const_value_type;
202 static KOKKOS_FUNCTION
size_t size(
const Self &self) {
205 static KOKKOS_FUNCTION
auto get(
const Self &self,
size_t i) {
208 return attach(nearest(
Point{}, 0), -1);
217template <PACMAN::KokkosViewRank<1> ViewType>
218struct AccessTraits<
PACMAN::RbfPum::TransformToNearest<ViewType>> {
221 using Point =
typename ViewType::non_const_value_type;
222 static KOKKOS_FUNCTION
size_t size(
const Self &self) {
225 static KOKKOS_FUNCTION
auto get(
const Self &self,
size_t i) {
228 return attach(nearest(
Point{}, 0), -1);
237template <PACMAN::KokkosViewRank<1> ViewType>
238struct AccessTraits<
PACMAN::RbfPum::GetClustersPoints<ViewType>> {
241 static KOKKOS_FUNCTION
size_t size(
const Self &self) {
244 static KOKKOS_FUNCTION
auto get(
const Self &self,
size_t i) {
Projection(ViewType) -> Projection< ViewType >
GetClustersPoints(ViewType, coordinates_t) -> GetClustersPoints< ViewType >
TransformToNearestCallback(ViewType) -> TransformToNearestCallback< ViewType >
TransformToNearest(ViewType) -> TransformToNearest< ViewType >
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.
TagEmptyCenters(ViewType) -> TagEmptyCenters< ViewType >
DistanceToKNearest(int_t, ViewType) -> DistanceToKNearest< ViewType >
TagEmptyCentersCallback(ViewType, fp_t) -> TagEmptyCentersCallback< ViewType >
static KOKKOS_FUNCTION size_t size(const Self &self)
static KOKKOS_FUNCTION auto get(const Self &self, size_t i)
PACMAN::RbfPum::DistanceToKNearest< ViewType > Self
typename ViewType::memory_space memory_space
static KOKKOS_FUNCTION size_t size(const Self &self)
PACMAN::RbfPum::GetClustersPoints< ViewType > Self
typename ViewType::memory_space memory_space
static KOKKOS_FUNCTION auto get(const Self &self, size_t i)
typename ViewType::memory_space memory_space
PACMAN::RbfPum::Projection< ViewType > Self
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)
PACMAN::RbfPum::TagEmptyCenters< ViewType > Self
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.
DistanceToKNearest(int_t k_, ViewType samples_)
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.
GetClustersPoints(ViewType centers_, coordinates_t radius_)
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.
Projection(ViewType centers_)
A custon ArborX callback which tags empty regions centers, by setting the x axis value of the center ...
ViewType centersCandidates
TagEmptyCentersCallback(ViewType centers_candidates, fp_t threshold_)
KOKKOS_FUNCTION void operator()(Predicate predicate, Value const &value) const
Support struct for an ArborX predicate.
TagEmptyCenters(ViewType centers_candidates)
ViewType centersCandidates