8#include <ArborX_Point.hpp>
9#include <Kokkos_Core.hpp>
24KOKKOS_INLINE_FUNCTION
constexpr bool
25operator==(
const ArborX::Point<Dim, PACMAN::coordinates_t> &lhs,
26 const ArborX::Point<Dim, PACMAN::coordinates_t> &rhs)
noexcept {
27 for (
int i = 0; i < Dim; ++i) {
28 if (lhs[i] != rhs[i] && (lhs[i] == lhs[i] && rhs[i] == rhs[i])) {
43KOKKOS_INLINE_FUNCTION
constexpr bool
44operator!=(
const ArborX::Point<Dim, PACMAN::coordinates_t> &lhs,
45 const ArborX::Point<Dim, PACMAN::coordinates_t> &rhs)
noexcept {
58KOKKOS_INLINE_FUNCTION
bool constexpr
59operator<(
const ArborX::Point<Dim, PACMAN::coordinates_t> &lhs,
60 const ArborX::Point<Dim, PACMAN::coordinates_t> &rhs)
noexcept {
61 const bool is_lhs_nan = lhs[0] != lhs[0];
62 const bool is_rhs_nan = rhs[0] != rhs[0];
63 if (is_lhs_nan != is_rhs_nan) {
66 for (
int axis = 0; axis < Dim; ++axis) {
67 if (lhs[axis] < rhs[axis]) {
70 if (lhs[axis] > rhs[axis]) {
86KOKKOS_INLINE_FUNCTION
bool constexpr
87operator>(
const ArborX::Point<Dim, PACMAN::coordinates_t> &lhs,
88 const ArborX::Point<Dim, PACMAN::coordinates_t> &rhs)
noexcept {
89 return !(lhs == rhs) && !(lhs < rhs);
102 const ArborX::Point<Dim, PACMAN::coordinates_t> &point) {
103 std::ostringstream strs;
105 strs <<
"ArborX::Point(";
106 for (
int i = 0; i < Dim - 1; i++) {
107 strs << point[i] <<
", ";
109 strs << point[Dim - 1] <<
")";
126KOKKOS_INLINE_FUNCTION
fp_t
128 const ::ArborX::Point<Dim, coordinates_t> &
rhs)
noexcept {
149 const ::ArborX::Point<Dim, coordinates_t> &
rhs) {
154 return Kokkos::sqrt(
d);
166 const ::ArborX::Point<Dim, coordinates_t> &
rhs) {
183 const ::ArborX::Point<Dim, coordinates_t> &
rhs) {
203 const bool &
final)
const {
206 pair.sourceCurrent +=
n *
n;
207 pair.targetCurrent +=
n *
m;
216 pair.sourceCurrent = 0;
217 pair.targetCurrent = 0;
222 dest.sourceCurrent +=
src.sourceCurrent;
223 dest.targetCurrent +=
src.targetCurrent;
KOKKOS_INLINE_FUNCTION bool constexpr operator<(const ArborX::Point< Dim, PACMAN::coordinates_t > &lhs, const ArborX::Point< Dim, PACMAN::coordinates_t > &rhs) noexcept
Custom operator overload for operator< to compare two ArborX::Point using the values of each point.
std::ostream & operator<<(std::ostream &os, const ArborX::Point< Dim, PACMAN::coordinates_t > &point)
Custom operator overload for operator<< to print a ArborX::Point with a nice format (ArborX::Point(x,...
KOKKOS_INLINE_FUNCTION constexpr bool operator==(const ArborX::Point< Dim, PACMAN::coordinates_t > &lhs, const ArborX::Point< Dim, PACMAN::coordinates_t > &rhs) noexcept
Custom operator overload for operator== to compare two ArborX::Point using the values of each point,...
KOKKOS_INLINE_FUNCTION constexpr bool operator!=(const ArborX::Point< Dim, PACMAN::coordinates_t > &lhs, const ArborX::Point< Dim, PACMAN::coordinates_t > &rhs) noexcept
Custom operator overload for operator!= to compare two ArborX::Point using the values of each point,...
KOKKOS_INLINE_FUNCTION bool constexpr operator>(const ArborX::Point< Dim, PACMAN::coordinates_t > &lhs, const ArborX::Point< Dim, PACMAN::coordinates_t > &rhs) noexcept
Custom operator overload for operator> to compare two ArborX::Point using the values of each point.
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.
KOKKOS_INLINE_FUNCTION fp_t Distance(const ::ArborX::Point< Dim, coordinates_t > &lhs, const ::ArborX::Point< Dim, coordinates_t > &rhs)
Returns the euclidian norm between two points by performing a square root operation on the SquaredDif...
KOKKOS_INLINE_FUNCTION fp_t DistanceNoCheck(const ::ArborX::Point< Dim, coordinates_t > &lhs, const ::ArborX::Point< Dim, coordinates_t > &rhs)
Returns the euclidian norm between two points by performing a square root operation on the SquaredDif...
KOKKOS_INLINE_FUNCTION fp_t SquaredDifferenceNoCheck(const ::ArborX::Point< Dim, coordinates_t > &lhs, const ::ArborX::Point< Dim, coordinates_t > &rhs)
Returns the squared distance between two points, and don't check for NaN values.
KOKKOS_INLINE_FUNCTION consteval fp_t zero(void)
KOKKOS_INLINE_FUNCTION consteval fp_t one(void)
Struct used to build multiple matrices access offsets with one scan loop only, during the systems sol...
Kokkos::View< offset_t *, ExecSpace > targetOffsets
KOKKOS_FUNCTION void operator()(const int &i, OffsetsScanPair &pair, const bool &final) const
Kokkos::View< offset_t *, ExecSpace > sourceOffsets
Kokkos::View< offset_t *, ExecSpace > evalMatOffsets
Kokkos::View< offset_t *, ExecSpace > rbfMatOffsets
KOKKOS_FUNCTION void init(OffsetsScanPair &pair) const
KOKKOS_FUNCTION void join(OffsetsScanPair &dest, const OffsetsScanPair &src) const