Basix 0.10.0.0

Home     Installation     Demos     C++ docs     Python docs

polyset.h
1 // Copyright (c) 2020 Chris Richardson & Matthew Scroggs
2 // FEniCS Project
3 // SPDX-License-Identifier: MIT
4 
5 #pragma once
6 
7 #include "cell.h"
8 #include "mdspan.hpp"
9 #include <array>
10 #include <concepts>
11 #include <utility>
12 #include <vector>
13 
131 namespace basix::polyset
132 {
133 
135 enum class type
136 {
137  standard = 0,
138  macroedge = 1,
139 };
140 
179 template <std::floating_point T>
180 std::pair<std::vector<T>, std::array<std::size_t, 3>>
181 tabulate(cell::type celltype, polyset::type ptype, int d, int n,
182  MDSPAN_IMPL_STANDARD_NAMESPACE::mdspan<
183  const T, MDSPAN_IMPL_STANDARD_NAMESPACE::dextents<std::size_t, 2>>
184  x);
185 
224 template <std::floating_point T>
225 void tabulate(
226  MDSPAN_IMPL_STANDARD_NAMESPACE::mdspan<
227  T, MDSPAN_IMPL_STANDARD_NAMESPACE::dextents<std::size_t, 3>>
228  P,
229  cell::type celltype, polyset::type ptype, int d, int n,
230  MDSPAN_IMPL_STANDARD_NAMESPACE::mdspan<
231  const T, MDSPAN_IMPL_STANDARD_NAMESPACE::dextents<std::size_t, 2>>
232  x);
233 
240 int dim(cell::type cell, polyset::type ptype, int d);
241 
247 int nderivs(cell::type cell, int d);
248 
256  polyset::type type2);
257 
265  cell::type restriction_cell);
266 
267 } // namespace basix::polyset
type
Cell type.
Definition: cell.h:21
Polynomial expansion sets.
Definition: polyset.h:132
type
Cell type.
Definition: polyset.h:136
int dim(cell::type cell, polyset::type ptype, int d)
Dimension of a polynomial space.
Definition: polyset.cpp:3250
std::pair< std::vector< T >, std::array< std::size_t, 3 > > tabulate(cell::type celltype, polyset::type ptype, int d, int n, MDSPAN_IMPL_STANDARD_NAMESPACE::mdspan< const T, MDSPAN_IMPL_STANDARD_NAMESPACE::dextents< std::size_t, 2 >> x)
Tabulate the orthonormal polynomial basis, and derivatives, at points on the reference cell.
Definition: polyset.cpp:3219
int nderivs(cell::type cell, int d)
Number of derivatives that the orthonormal basis will have on the given cell.
Definition: polyset.cpp:3299
polyset::type superset(cell::type cell, polyset::type type1, polyset::type type2)
Get the polyset types that is a superset of two types on the given cell.
Definition: polyset.cpp:3324
polyset::type restriction(polyset::type ptype, cell::type cell, cell::type restriction_cell)
Get the polyset type that represents the restrictions of a type on a subentity.
Definition: polyset.cpp:3336