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{
29};
30
39template <std::floating_point T>
40std::pair<std::vector<T>, std::array<std::size_t, 2>>
41tabulate(polynomials::type polytype, cell::type celltype, int d,
42 md::mdspan<const T, md::dextents<std::size_t, 2>> x);
43
50int dim(polynomials::type polytype, cell::type cell, int d);
51
52} // namespace basix::polynomials
Information about reference cells.
Definition cell.h:17
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
@ lagrange
Definition polynomials.h:26
@ bernstein
Bernstein polynomials.
Definition polynomials.h:28
@ legendre
Legendre polynomials: polynomials that span the full space on a cell.
Definition polynomials.h:22
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