Basix 0.10.0.0

Home     Installation     Demos     C++ docs     Python docs

quadrature.h
1 // Copyright (c) 2020 Chris Richardson
2 // FEniCS Project
3 // SPDX-License-Identifier: MIT
4 
5 #pragma once
6 
7 #include "cell.h"
8 #include "polyset.h"
9 #include <array>
10 #include <concepts>
11 #include <vector>
12 
15 {
16 
18 enum class type
19 {
20  Default = 0,
21  gauss_jacobi = 1,
22  gll = 2,
23  xiao_gimbutas = 3,
24  zienkiewicz_taylor = 20,
25  keast = 21,
26  strang_fix = 22,
27 };
28 
35 template <std::floating_point T>
36 std::array<std::vector<T>, 2> gauss_jacobi_rule(T a, int m);
37 
47 template <std::floating_point T>
48 std::array<std::vector<T>, 2> make_quadrature(const quadrature::type rule,
49  cell::type celltype,
50  polyset::type polytype, int m);
51 
58 
64 template <std::floating_point T>
65 std::vector<T> get_gll_points(int m);
66 
71 template <std::floating_point T>
72 std::vector<T> get_gl_points(int m);
73 
74 } // namespace basix::quadrature
type
Cell type.
Definition: cell.h:21
type
Cell type.
Definition: polyset.h:137
Quadrature rules.
Definition: quadrature.h:15
std::array< std::vector< T >, 2 > make_quadrature(const quadrature::type rule, cell::type celltype, polyset::type polytype, int m)
Make a quadrature rule on a reference cell.
Definition: quadrature.cpp:4934
std::array< std::vector< T >, 2 > gauss_jacobi_rule(T a, int m)
Get the Gauss-Jacobi rule for the interval for integrating f(x) * (1-x)^a on the interval [0,...
Definition: quadrature.cpp:4920
std::vector< T > get_gll_points(int m)
Get Gauss-Lobatto-Legendre (GLL) points on the interval [0, 1].
Definition: quadrature.cpp:4977
type
Quadrature type.
Definition: quadrature.h:19
std::vector< T > get_gl_points(int m)
Get Gauss-Legendre (GL) points on the interval [0, 1].
Definition: quadrature.cpp:4968
quadrature::type get_default_rule(cell::type celltype, int m)
Get the default quadrature type for the given cell and order.
Definition: quadrature.cpp:4891