Basix 0.5.1

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 <utility>
11 #include <vector>
12 
15 {
17 enum class type
18 {
19  legendre = 0,
20  bernstein = 1,
21 };
22 
31 std::pair<std::vector<double>, std::array<std::size_t, 2>>
32 tabulate(polynomials::type polytype, cell::type celltype, int d,
33  std::experimental::mdspan<const double,
34  std::experimental::dextents<std::size_t, 2>>
35  x);
36 
43 int dim(polynomials::type polytype, cell::type cell, int d);
44 
45 } // namespace basix::polynomials
basix::polynomials
Polynomials.
Definition: polynomials.h:14
basix::cell::type
type
Cell type.
Definition: cell.h:19
basix::polynomials::tabulate
std::pair< std::vector< double >, std::array< std::size_t, 2 > > tabulate(polynomials::type polytype, cell::type celltype, int d, std::experimental::mdspan< const double, std::experimental::dextents< std::size_t, 2 >> x)
Tabulate a set of polynomials.
Definition: polynomials.cpp:109
basix::polynomials::type
type
Variants of a Lagrange space that can be created.
Definition: polynomials.h:17
basix::polynomials::dim
int dim(polynomials::type polytype, cell::type cell, int d)
Dimension of a polynomial space.
Definition: polynomials.cpp:133