25 return p >= 2 ? p - 1 : 0;
28 return p >= 3 ?
static_cast<Index>(p - 1) * (p - 2) / 2 : 0;
32 if constexpr (Dim == 2) {
35 return p >= 4 ?
static_cast<Index>(p - 1) * (p - 2) * (p - 3) / 6 : 0;
46 static constexpr std::size_t
kNumVertices =
static_cast<std::size_t
>(Dim + 1);
53 [[nodiscard]]
Index size() const noexcept {
return size_; }
55 [[nodiscard]]
int max_order() const noexcept {
return layout_.cell_order; }
57 [[nodiscard]]
Index edge_offset(std::size_t k)
const noexcept {
return edge_offsets_[k]; }
58 [[nodiscard]]
Index face_offset(std::size_t k)
const noexcept {
return face_offsets_[k]; }
69 std::array<Index, CellLayout<Dim>::kNumEdges> edge_offsets_{};
70 std::array<Index, 4> face_offsets_{};
71 Index cell_offset_ = 0;
74extern template class H1Basis<2>;
75extern template class H1Basis<3>;
Definition h1_basis.hpp:43
static constexpr std::size_t kNumVertices
Definition h1_basis.hpp:46
Index size() const noexcept
Total number of shape functions.
Definition h1_basis.hpp:53
const CellLayout< Dim > & layout() const noexcept
Definition h1_basis.hpp:51
void evaluate(const Point< Dim > &xi, std::span< Real > values, std::span< Point< Dim > > gradients) const
Index cell_offset() const noexcept
Definition h1_basis.hpp:59
Index edge_offset(std::size_t k) const noexcept
First function index of the functions of edge / face k and of the interior.
Definition h1_basis.hpp:57
Index face_offset(std::size_t k) const noexcept
Definition h1_basis.hpp:58
int max_order() const noexcept
Maximal polynomial degree occurring.
Definition h1_basis.hpp:55
H1Basis(const CellLayout< Dim > &layout)
Definition cell_layout.hpp:13
constexpr Index h1_face_functions(int p) noexcept
Definition h1_basis.hpp:27
constexpr Index h1_edge_functions(int p) noexcept
Number of basis functions associated with an entity of the given order.
Definition h1_basis.hpp:24
constexpr Index h1_cell_functions(int p) noexcept
Definition h1_basis.hpp:31
Eigen::Matrix< Real, Dim, 1 > Point
Definition types.hpp:27
std::int64_t Index
global indices (DoFs, entities)
Definition types.hpp:17
Definition cell_layout.hpp:18
Local topology tables of the reference simplex in Dim dimensions.
Definition simplex_topology.hpp:27