Basix 0.9.0

Home     Installation     Demos     C++ docs     Python docs

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 <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:117
int dim(polynomials::type polytype, cell::type cell, int d)
Dimension of a polynomial space.
Definition: polynomials.cpp:142
type
Variants of a Lagrange space that can be created.
Definition: polynomials.h:19