Basix
Loading...
Searching...
No Matches
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 "types.h"
10#include <array>
11#include <concepts>
12#include <utility>
13#include <vector>
14
133{
134
136enum class type
137{
138 standard = 0,
139 macroedge = 1,
140};
141
180template <std::floating_point T>
181std::pair<std::vector<T>, std::array<std::size_t, 3>>
182tabulate(cell::type celltype, polyset::type ptype, int d, int n,
183 md::mdspan<const T, md::dextents<std::size_t, 2>> x);
184
223template <std::floating_point T>
224void tabulate(md::mdspan<T, md::dextents<std::size_t, 3>> P,
225 cell::type celltype, polyset::type ptype, int d, int n,
226 md::mdspan<const T, md::dextents<std::size_t, 2>> x);
227
234int dim(cell::type cell, polyset::type ptype, int d);
235
241int nderivs(cell::type cell, int d);
242
250 polyset::type type2);
251
259 cell::type restriction_cell);
260
261} // namespace basix::polyset
Information about reference cells.
Definition cell.h:17
type
Cell type.
Definition cell.h:21
Polynomial expansion sets.
Definition polyset.h:133
type
Cell type.
Definition polyset.h:137
int dim(cell::type cell, polyset::type ptype, int d)
Dimension of a polynomial space.
Definition polyset.cpp:3002
int nderivs(cell::type cell, int d)
Number of derivatives that the orthonormal basis will have on the given cell.
Definition polyset.cpp:3051
std::pair< std::vector< T >, std::array< std::size_t, 3 > > tabulate(cell::type celltype, polyset::type ptype, int d, int n, md::mdspan< const T, md::dextents< std::size_t, 2 > > x)
Tabulate the orthonormal polynomial basis, and derivatives, at points on the reference cell.
Definition polyset.cpp:2981
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:3076
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:3088