Basix 0.10.0.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 "types.h"
10 #include <array>
11 #include <concepts>
12 #include <utility>
13 #include <vector>
14 
17 {
19 enum class type
20 {
21  legendre = 0,
22  bernstein = 1,
23 };
24 
33 template <std::floating_point T>
34 std::pair<std::vector<T>, std::array<std::size_t, 2>>
35 tabulate(polynomials::type polytype, cell::type celltype, int d,
36  md::mdspan<const T, md::dextents<std::size_t, 2>> x);
37 
44 int dim(polynomials::type polytype, cell::type cell, int d);
45 
46 } // namespace basix::polynomials
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:135
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:113
type
Variants of a Lagrange space that can be created.
Definition: polynomials.h:20