Basix
Toggle main menu visibility
Loading...
Searching...
No Matches
cpp
basix
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
16
namespace
basix::polynomials
17
{
19
enum class
type
20
{
22
legendre
= 0,
26
lagrange
= 1,
28
bernstein
= 2,
29
};
30
39
template
<std::
float
ing_po
int
T>
40
std::pair<std::vector<T>, std::array<std::size_t, 2>>
41
tabulate
(
polynomials::type
polytype,
cell::type
celltype,
int
d,
42
md::mdspan<
const
T, md::dextents<std::size_t, 2>> x);
43
50
int
dim
(
polynomials::type
polytype,
cell::type
cell
,
int
d);
51
52
}
// namespace basix::polynomials
basix::cell
Information about reference cells.
Definition
cell.h:17
basix::cell::type
type
Cell type.
Definition
cell.h:21
basix::polynomials
Polynomials.
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:312
basix::polynomials::type
type
Polynomial types that can be created.
Definition
polynomials.h:20
basix::polynomials::type::lagrange
@ lagrange
Definition
polynomials.h:26
basix::polynomials::type::bernstein
@ bernstein
Bernstein polynomials.
Definition
polynomials.h:28
basix::polynomials::type::legendre
@ legendre
Legendre polynomials: polynomials that span the full space on a cell.
Definition
polynomials.h:22
basix::polynomials::tabulate
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
Generated by
1.17.0