Loading...
Searching...
No Matches
traits.h
// Copyright (C) 2024 Joseph P. Dean and Garth N. Wells
// This file is part of DOLFINx (https://www.fenicsproject.org)
//
// SPDX-License-Identifier: LGPL-3.0-or-later
#pragma once
#include <basix/mdspan.hpp>
#include <concepts>
#include <cstdint>
#include <dolfinx/common/types.h>
#include <span>
#include <type_traits>
namespace dolfinx::fem
{
template <class U, class T>
concept DofTransformKernel
= std::is_invocable_v<U, std::span<T>, std::span<const std::uint32_t>,
std::int32_t, int>;
template <class U, class T>
concept FEkernel
= std::is_invocable_v<U, T*, const T*, const T*, const scalar_value_t<T>*,
const int*, const std::uint8_t*, void*>;
template <class T>
concept MDSpan2
= std::is_convertible_v<
std::remove_cvref_t<T>,
md::mdspan<const std::int32_t, md::dextents<std::size_t, 2>>>
or std::is_convertible_v<
std::remove_cvref_t<T>,
md::mdspan<const std::int32_t, md::dextents<std::size_t, 1>>>;
} // namespace dolfinx::fem
dolfinx::fem::DofTransformKernel
DOF transform kernel concept.
Definition traits.h:21
dolfinx::fem::FEkernel
Finite element cell kernel concept.
Definition traits.h:30
dolfinx::fem::MDSpan2
Concept for mdspan of rank 1 or 2.
Definition traits.h:36
dolfinx::fem
Finite element method functionality.
Definition assemble_expression_impl.h:23