Loading...
Searching...
No Matches
polynomials.h
// Copyright (c) 2021 Matthew Scroggs
// FEniCS Project
// SPDX-License-Identifier: MIT
#pragma once
#include "cell.h"
#include "mdspan.hpp"
#include "types.h"
#include <array>
#include <concepts>
#include <utility>
#include <vector>
namespace basix::polynomials
{
enum class type
{
legendre = 0,
lagrange = 1,
bernstein = 2,
};
template <std::floating_point T>
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);
int dim(polynomials::type polytype, cell::type cell, int d);
} // 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