9#include <algorithms/ArborX_ClosestPoint.hpp>
12#include "common/transfer.hxx"
22namespace FiniteElements {
31template <
typename ExecSpace,
int_t Dim>
39 template <
typename Predicate,
typename Value>
47 Kokkos::Array<fp_t, MaxNodesPerElt>
warr;
48 Kokkos::Array<coordinates_t, MaxNodesPerElt * Dim>
Xarr;
49 Kokkos::Array<coordinates_t, Dim>
tpa;
50 Kokkos::View<coordinates_t *, ExecSpace>
tp(
tpa.data(),
Dim);
78 return ArborX::CallbackTreeTraversalControl::early_exit;
80 return ArborX::CallbackTreeTraversalControl::normal_continuation;
93 Kokkos::View<TransferStatus *, MemorySpace>
status;
97 template <
typename Predicate,
typename Value,
typename OutputFunctor>
111 using PointTag = ArborX::GeometryTraits::PointTag;
112 using TriangleTag = ArborX::GeometryTraits::TriangleTag;
137 Kokkos::View<TransferStatus *, MemorySpace>
status;
141 template <
typename Predicate,
typename Value,
typename OutputFunctor>
156 template <
typename Predicate,
typename Value,
typename OutputFunctor>
167 Kokkos::View<coordinates_t **, MemorySpace>
points;
176 template <
typename Predicate,
typename Value>
188 Kokkos::View<coordinates_t **, MemorySpace>
points;
197template <PACMAN::KokkosViewRank<1> ViewType>
198struct AccessTraits<
PACMAN::FiniteElements::PointNearest<ViewType>> {
205 return attach(nearest(self.
points(i), 1), (
int)i);
210template <
typename MemorySpace,
int Dim>
212 PACMAN::FiniteElements::PointCloudNearest<MemorySpace, Dim>> {
220 Point<Dim, PACMAN::coordinates_t> point;
221 for (
int k = 0; k < Dim; k++) {
222 point[k] = self.
points(i, k);
224 return attach(nearest(point, 1), (
int)i);
229template <
typename MemorySpace,
int Dim>
230struct AccessTraits<
PACMAN::FiniteElements::PointIntersect<MemorySpace, Dim>> {
238 Point<Dim, PACMAN::coordinates_t> point;
239 for (
int k = 0; k < Dim; k++) {
240 point[k] = self.
points(i, k);
242 return attach(intersects(point), (
int)i);
static KOKKOS_FUNCTION size_t size(const Self &self)
static KOKKOS_FUNCTION auto get(const Self &self, size_t i)
static KOKKOS_FUNCTION auto get(const Self &self, size_t i)
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)
Predicate wrapper for nearest-neighbor queries over point clouds.
Kokkos::View< coordinates_t **, MemorySpace > points
Point-finite element intersection and interplolation callback.
Kokkos::View< int *, MemorySpace > parents
typename ExecSpace::memory_space MemorySpace
Transfer< ExecSpace, Dim > transfer
KOKKOS_FUNCTION auto operator()(const Predicate &predicate, const Value &value) const
ArborX callback: project one outside target point and emit output.
Predicate wrapper for point/box intersection queries.
Kokkos::View< coordinates_t **, MemorySpace > points
Wrapper for nearest-neighbor predicates built from 1D point views.
Project outside target points onto nearest 3D skin triangle.
Kokkos::View< int_t *, MemorySpace > skinParents
KOKKOS_FUNCTION void operator()(const Predicate &predicate, const Value &value, const OutputFunctor &out) const
ArborX callback: project one outside target point and emit output.
Kokkos::View< coordinates_t **, MemorySpace > targetPointsPtr
typename ExecSpace::memory_space MemorySpace
Kokkos::View< int_t *, MemorySpace > parentElt
Kokkos::View< TransferStatus *, MemorySpace > status