13 template <
typename BareField>
26 KOKKOS_LAMBDA(
const index_array_type& args,
T& val) {
27 val +=
apply(view1, args) *
apply(view2, args);
31 layout.comm.allreduce(sum, globalSum, 1, std::plus<T>());
41 template <
typename BareField>
55 KOKKOS_LAMBDA(
const index_array_type& args,
T& val) {
56 T myVal = Kokkos::abs(
apply(view, args));
60 Kokkos::Max<T>(local));
62 layout.comm.allreduce(local, globalMax, 1, std::greater<T>());
68 KOKKOS_LAMBDA(
const index_array_type& args,
T& val) {
69 val += std::pow(Kokkos::abs(
apply(view, args)), p);
71 Kokkos::Sum<T>(local));
73 layout.comm.allreduce(local, globalSum, 1, std::plus<T>());
74 return std::pow(globalSum, 1.0 / p);
KOKKOS_INLINE_FUNCTION constexpr decltype(auto) apply(const View &view, const Coords &coords)
T innerProduct(const FEMVector< T > &a, const FEMVector< T > &b)
Calculate the inner product between two ippl::FEMVector(s).
void parallel_reduce(const std::string &name, const ExecPolicy &policy, const FunctorType &functor, ReducerArgument &&... reducer)
T norm(const FEMVector< T > &v, int p=2)
Layout_t & getLayout() const
static constexpr unsigned dim
policy_type< execution_space, PolicyArgs... > getFieldRangePolicy(const int nghost=0) const
view_type::execution_space execution_space
::ippl::Vector< index_type, Dim > index_array_type