79 const ::internal::MatrixFreeFunctions::ConstraintKinds
81 const unsigned int x_idx,
82 const unsigned int y_idx,
83 const unsigned int z_idx,
84 const ::internal::MatrixFreeFunctions::ConstraintKinds face1_type,
85 const ::internal::MatrixFreeFunctions::ConstraintKinds face2_type,
86 const ::internal::MatrixFreeFunctions::ConstraintKinds face1,
87 const ::internal::MatrixFreeFunctions::ConstraintKinds face2,
88 const ::internal::MatrixFreeFunctions::ConstraintKinds edge)
90 const unsigned int face1_idx = (direction == 0) ? y_idx :
91 (direction == 1) ? z_idx :
93 const unsigned int face2_idx = (direction == 0) ? z_idx :
94 (direction == 1) ? x_idx :
97 const bool on_face1 = ((constraint_mask & face1_type) !=
98 ::internal::MatrixFreeFunctions::
99 ConstraintKinds::unconstrained) ?
101 (face1_idx == fe_degree);
102 const bool on_face2 = ((constraint_mask & face2_type) !=
103 ::internal::MatrixFreeFunctions::
104 ConstraintKinds::unconstrained) ?
106 (face2_idx == fe_degree);
108 (((constraint_mask & face1) != ::internal::MatrixFreeFunctions::
109 ConstraintKinds::unconstrained) &&
111 (((constraint_mask & face2) != ::internal::MatrixFreeFunctions::
112 ConstraintKinds::unconstrained) &&
114 (((constraint_mask & edge) != ::internal::MatrixFreeFunctions::
115 ConstraintKinds::unconstrained) &&
116 on_face1 && on_face2));
127 const Kokkos::TeamPolicy<
128 MemorySpace::Default::kokkos_space::execution_space>::member_type
130 Kokkos::View<Number *, MemorySpace::Default::kokkos_space>
132 const ::internal::MatrixFreeFunctions::ConstraintKinds
134 Kokkos::View<Number *,
135 MemorySpace::Default::kokkos_space::execution_space::
136 scratch_memory_space,
139 constexpr unsigned int n_q_points_1d = fe_degree + 1;
140 constexpr unsigned int n_q_points =
Utilities::pow(n_q_points_1d, 2);
144 const bool constrained_face =
156 Number tmp[n_q_points];
157 Kokkos::parallel_for(
158 Kokkos::TeamThreadRange(team_member, n_q_points),
159 [&](
const int &q_point) {
160 const unsigned int x_idx = q_point % n_q_points_1d;
161 const unsigned int y_idx = q_point / n_q_points_1d;
163 const auto this_type =
169 const unsigned int interp_idx = (direction == 0) ? x_idx : y_idx;
175 const bool constrained_dof =
180 if (constrained_face && constrained_dof)
182 const bool type = (constraint_mask & this_type) !=
183 ::internal::MatrixFreeFunctions::
184 ConstraintKinds::unconstrained;
188 for (
unsigned int i = 0; i <= fe_degree; ++i)
190 const unsigned int real_idx =
196 constraint_weights[i * n_q_points_1d + interp_idx] :
197 constraint_weights[interp_idx * n_q_points_1d + i];
198 tmp[q_point] += w * values[real_idx];
203 for (
unsigned int i = 0; i <= fe_degree; ++i)
205 const unsigned int real_idx =
211 constraint_weights[(fe_degree - i) * n_q_points_1d +
212 fe_degree - interp_idx] :
213 constraint_weights[(fe_degree - interp_idx) *
216 tmp[q_point] += w * values[real_idx];
224 team_member.team_barrier();
225 Kokkos::parallel_for(Kokkos::TeamThreadRange(team_member, n_q_points),
226 [&](
const int &q_point) {
227 const unsigned int x_idx = q_point % n_q_points_1d;
228 const unsigned int y_idx = q_point / n_q_points_1d;
229 const bool constrained_dof =
231 constraint_mask, x_idx, y_idx);
232 if (constrained_face && constrained_dof)
237 team_member.team_barrier();
248 const Kokkos::TeamPolicy<
249 MemorySpace::Default::kokkos_space::execution_space>::member_type
251 Kokkos::View<Number *, MemorySpace::Default::kokkos_space>
253 const ::internal::MatrixFreeFunctions::ConstraintKinds
255 Kokkos::View<Number *,
256 MemorySpace::Default::kokkos_space::execution_space::
257 scratch_memory_space,
260 constexpr unsigned int n_q_points_1d = fe_degree + 1;
261 constexpr unsigned int n_q_points =
Utilities::pow(n_q_points_1d, 3);
263 const auto this_type =
269 const auto face1_type =
275 const auto face2_type =
302 const auto constrained_face = constraint_mask & (face1 | face2 | edge);
304 Number tmp[n_q_points];
305 Kokkos::parallel_for(
306 Kokkos::TeamThreadRange(team_member, n_q_points),
307 [&](
const int &q_point) {
308 const unsigned int x_idx = q_point % n_q_points_1d;
309 const unsigned int y_idx = (q_point / n_q_points_1d) % n_q_points_1d;
310 const unsigned int z_idx = q_point / (n_q_points_1d * n_q_points_1d);
312 const unsigned int interp_idx = (direction == 0) ? x_idx :
313 (direction == 1) ? y_idx :
315 const bool constrained_dof =
326 if ((constrained_face != ::internal::MatrixFreeFunctions::
327 ConstraintKinds::unconstrained) &&
330 const bool type = (constraint_mask & this_type) !=
331 ::internal::MatrixFreeFunctions::
332 ConstraintKinds::unconstrained;
335 for (
unsigned int i = 0; i <= fe_degree; ++i)
337 const unsigned int real_idx =
346 constraint_weights[i * n_q_points_1d + interp_idx] :
347 constraint_weights[interp_idx * n_q_points_1d + i];
348 tmp[q_point] += w * values[real_idx];
353 for (
unsigned int i = 0; i <= fe_degree; ++i)
355 const unsigned int real_idx =
364 constraint_weights[(fe_degree - i) * n_q_points_1d +
365 fe_degree - interp_idx] :
366 constraint_weights[(fe_degree - interp_idx) *
369 tmp[q_point] += w * values[real_idx];
377 team_member.team_barrier();
379 Kokkos::parallel_for(
380 Kokkos::TeamThreadRange(team_member, n_q_points),
381 [&](
const int &q_point) {
382 const unsigned int x_idx = q_point % n_q_points_1d;
383 const unsigned int y_idx = (q_point / n_q_points_1d) % n_q_points_1d;
384 const unsigned int z_idx = q_point / (n_q_points_1d * n_q_points_1d);
385 const bool constrained_dof =
395 if ((constrained_face != ::internal::MatrixFreeFunctions::
396 ConstraintKinds::unconstrained) &&
401 team_member.team_barrier();