PACMAN 0.1.0
Portable Algorithms for Coupling, Mapping, and Adaptive iNterpolation
Loading...
Searching...
No Matches
FTNearest.hpp
Go to the documentation of this file.
1//
2// This file is subject to the terms and conditions defined in
3// file 'LICENSE', which is part of this source code package.
4//
5
6#pragma once
7
8#include <ArborX_LinearBVH.hpp>
9#include <ArborX_Point.hpp>
10
11#include "common/transfer.hxx"
12#include "common/types.hpp"
14
15namespace PACMAN {
16namespace FiniteElements {
27template <typename ExecSpace, int_t Dim>
29 Kokkos::Profiling::pushRegion("FTNearest");
30
32 using MemorySpace = typename TransferType::MemorySpace;
33 using Point = ::ArborX::Point<Dim, coordinates_t>;
34
36
37 auto source_points = transfer.sourcePoints;
38 auto source_values = transfer.sourceValues;
39 auto target_points = transfer.targetPoints;
40 auto target_values = transfer.targetValues;
41
42 auto nb_target_points = target_points.extent(0);
43
44 Kokkos::Profiling::pushRegion("BVH construction and NN search");
45
46 ::ArborX::BoundingVolumeHierarchy bvh(
47 execspace, ::ArborX::Experimental::attach_indices(source_points));
49 bvh.query(execspace, pcn,
51 Kokkos::Profiling::popRegion();
52}
53
54} // namespace FiniteElements
55
56} // namespace PACMAN
ArborX predicate/callback helpers for PACMAN finite-elements kernels.
void FTNearest(Transfer< ExecSpace, Dim > &transfer)
Transfer source values to target points using nearest-neighbor search.
Definition FTNearest.hpp:28