Note: this is documentation for an old release. View the latest documentation at docs.fenicsproject.org/basix/v0.8.0/cpp/polynomials_8h_source.html

# Basix 0.7.0

## HomeInstallationDemosC++ docsPython docs

polynomials.h
1 // Copyright (c) 2021 Matthew Scroggs
2 // FEniCS Project
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
16 {
18 enum class type
19 {
20  legendre = 0,
21  bernstein = 1,
22 };
23
32 template <std::floating_point T>
33 std::pair<std::vector<T>, std::array<std::size_t, 2>>
34 tabulate(polynomials::type polytype, cell::type celltype, int d,
35  MDSPAN_IMPL_STANDARD_NAMESPACE::mdspan<
36  const T, MDSPAN_IMPL_STANDARD_NAMESPACE::dextents<std::size_t, 2>>
37  x);
38
45 int dim(polynomials::type polytype, cell::type cell, int d);
46
47 } // namespace basix::polynomials
type
Cell type.
Definition: cell.h:21
Polynomials.
Definition: polynomials.h:16
std::pair< std::vector< T >, std::array< std::size_t, 2 > > tabulate(polynomials::type polytype, cell::type celltype, int d, MDSPAN_IMPL_STANDARD_NAMESPACE::mdspan< const T, MDSPAN_IMPL_STANDARD_NAMESPACE::dextents< std::size_t, 2 >> x)
Tabulate a set of polynomials.
Definition: polynomials.cpp:116
int dim(polynomials::type polytype, cell::type cell, int d)
Dimension of a polynomial space.
Definition: polynomials.cpp:141
type
Variants of a Lagrange space that can be created.
Definition: polynomials.h:19