15using CoefficientFieldMem1D = DFieldMem<IdxRange<Grid1D>,
typename ExecSpace::memory_space>;
17using CoefficientField1D = DField<IdxRange<Grid1D>,
typename ExecSpace::memory_space>;
32 IdxRange<DDims...>
const& idx_range,
33 std::function<DFieldMem<IdxRange<DDims>,
typename ExecSpace::memory_space>(
34 IdxRange<DDims>)>... funcs)
36 DFieldMem<IdxRange<DDims...>,
typename ExecSpace::memory_space> coefficients_alloc(idx_range);
37 DField<IdxRange<DDims...>,
typename ExecSpace::memory_space> coefficients(
38 get_field(coefficients_alloc));
40 std::tuple<CoefficientFieldMem1D<ExecSpace, DDims>...> current_dim_coeffs_alloc(
41 funcs(ddc::select<DDims>(idx_range))...);
42 std::tuple<CoefficientField1D<ExecSpace, DDims>...> current_dim_coeffs(get_field(
43 std::get<CoefficientFieldMem1D<ExecSpace, DDims>>(current_dim_coeffs_alloc))...);
45 ddc::parallel_for_each(
48 KOKKOS_LAMBDA(Idx<DDims...>
const idim) {
52 = (std::get<CoefficientField1D<ExecSpace, DDims>>(current_dim_coeffs)(
53 ddc::select<DDims>(idim))
56 return coefficients_alloc;
DFieldMem< IdxRange< DDims... >, typename ExecSpace::memory_space > quadrature_coeffs_nd(IdxRange< DDims... > const &idx_range, std::function< DFieldMem< IdxRange< DDims >, typename ExecSpace::memory_space >(IdxRange< DDims >)>... funcs)
Helper function which creates ND dimensions from N 1D quadrature coefficient functions.
Definition quadrature_coeffs_nd.hpp:31