8#include <basix/mdspan.hpp>
11#include <dolfinx/common/types.h>
19template <
class U,
class T>
21 = std::is_invocable_v<U, std::span<T>, std::span<const std::uint32_t>,
35 if constexpr (
requires {
static_cast<bool>(fn); })
36 return static_cast<bool>(fn);
45template <
class U,
class T,
class G = dolfinx::scalar_value_t<T>>
46concept FEkernel = std::is_invocable_v<U, T*,
const T*,
const T*,
const G*,
47 const int*,
const std::uint8_t*,
void*>;
52 = std::is_convertible_v<
53 std::remove_cvref_t<T>,
54 md::mdspan<const std::int32_t, md::dextents<std::size_t, 2>>>
55 or std::is_convertible_v<
56 std::remove_cvref_t<T>,
57 md::mdspan<const std::int32_t, md::dextents<std::size_t, 1>>>;
65 and std::same_as<typename std::remove_cvref_t<T>::value_type,
71template <
class T,
class U>
74 and std::same_as<typename std::remove_cvref_t<T>::value_type, U>;
85concept DofMapPackBase =
requires(
const std::remove_cvref_t<T>& t) {
86 requires std::tuple_size_v<std::remove_cvref_t<T>> == 3;
88 { std::get<1>(t) } -> std::convertible_to<int>;
97 = DofMapPackBase<T> and
requires(
const std::remove_cvref_t<T>& t) {
98 { std::get<2>(t)[0] } -> std::convertible_to<std::int32_t>;
106 = DofMapPackBase<T> and
requires(
const std::remove_cvref_t<T>& t) {
107 { std::get<2>(t)(0, 0) } -> std::convertible_to<std::int32_t>;
115 = DofMapPackBase<T> and
requires(
const std::remove_cvref_t<T>& t) {
116 { std::get<2>(t)(0, 0, 0) } -> std::convertible_to<std::int32_t>;
mdspan/mdarray namespace
Definition types.h:60
Concept for the degree-of-freedom map data passed to the cell assembly kernel, whose (2) entry is a f...
Definition traits.h:97
Concept for the degree-of-freedom map data passed to the entity assembly kernel, whose (2) entry is i...
Definition traits.h:106
Concept for the degree-of-freedom map data passed to the interior facet assembly kernel,...
Definition traits.h:115
Finite element cell kernel concept.
Definition traits.h:46
Concept for a rank-2 mdspan of a floating-point type.
Definition traits.h:73
Concept for a rank-2 mdspan of 32-bit indices.
Definition traits.h:64
Concept for mdspan of rank 1 or 2.
Definition traits.h:52
Finite element method functionality.
Definition assemble_expression_impl.h:24
constexpr bool is_transform_set(const F &fn)
Whether a DofTransformKernel fn should be invoked.
Definition traits.h:33