#if defined(DEBUG) && !defined(DEAL_II_CXX14_CONSTEXPR_BUG)
// Up to __builtin_expect this is the same code as in the 'Assert' macro.
// The call to __builtin_expect turns out to be problematic.
- KOKKOS_IF_ON_HOST(if (!(iexp >= 0))::dealii::deal_II_exceptions::internals::
- issue_error_noreturn(
- ::dealii::deal_II_exceptions::internals::
- ExceptionHandling::abort_or_throw_on_exception,
- __FILE__,
- __LINE__,
- __PRETTY_FUNCTION__,
- "iexp>=0",
- "ExcMessage(\"The exponent must not be negative!\")",
- ExcMessage("The exponent must not be negative!"));)
+ KOKKOS_IF_ON_HOST((if (!(iexp >= 0))::dealii::deal_II_exceptions::
+ internals::issue_error_noreturn(
+ ::dealii::deal_II_exceptions::internals::
+ ExceptionHandling::abort_or_throw_on_exception,
+ __FILE__,
+ __LINE__,
+ __PRETTY_FUNCTION__,
+ "iexp>=0",
+ "ExcMessage(\"The exponent must not be negative!\")",
+ ExcMessage("The exponent must not be negative!"));))
#endif
// The "exponentiation by squaring" algorithm used below has to be
// compressed to one statement due to C++11's restrictions on constexpr
// When working with distributed vectors, the constrained dofs are
// computed for ghosted vectors but we want to copy the values of the
// constrained dofs of non-ghosted vectors.
- if (constr_dofs[dof] < size)
- dst_ptr[constr_dofs[dof]] = src_ptr[constr_dofs[dof]];
+ const auto constrained_dof = constr_dofs[dof];
+ if (constrained_dof < size)
+ dst_ptr[constrained_dof] = src_ptr[constrained_dof];
});
}
const unsigned int size =
(grid_dim[i].x * grid_dim[i].y * grid_dim[i].z) * cells_per_block *
Functor::n_local_dofs;
- // std::cout << "color " << i << " " << size << std::endl;
values_colors[i] =
Kokkos::View<Number *, MemorySpace::Default::kokkos_space>(
Kokkos::view_alloc("values_" + std::to_string(i),
(dim == 2) ? threadIdx.y :
threadIdx.z;
- // This loop simply multiply the shape function at the quadrature point
- // by the value finite element coefficient.
+ // This loop simply multiplies the shape function at the quadrature
+ // point by the value finite element coefficient.
Number t = 0;
for (int k = 0; k < n_q_points_1d; ++k) {
const unsigned int shape_idx =