Basix
Loading...
Searching...
No Matches
polynomials.h
1// Copyright (c) 2021 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
17{
19enum class type
20{
22 legendre = 0,
26 lagrange = 1,
28 bernstein = 2,
29};
30
39template <std::floating_point T>
40std::pair<std::vector<T>, std::array<std::size_t, 2>>
42 md::mdspan<const T, md::dextents<std::size_t, 2>> x);
43
51
52} // namespace basix::polynomials
A finite element.
Definition finite-element.h:137
type
Cell type.
Definition cell.h:21
Polynomials.
Definition polynomials.h:17
int dim(polynomials::type polytype, cell::type cell, int d)
Dimension of a polynomial space.
Definition polynomials.cpp:312
type
Polynomial types that can be created.
Definition polynomials.h:20
@ bernstein
Bernstein polynomials.
@ legendre
Legendre polynomials: polynomials that span the full space on a cell.
std::pair< std::vector< T >, std::array< std::size_t, 2 > > tabulate(polynomials::type polytype, cell::type celltype, int d, md::mdspan< const T, md::dextents< std::size_t, 2 > > x)
Tabulate a set of polynomials.
Definition polynomials.cpp:269