symfem.elements.bernstein¶
Bernstein elements on simplices.
This element’s definition appears in https://doi.org/10.1007/s00211-010-0327-2 (Kirby, 2011) and https://doi.org/10.1137/11082539X (Ainsworth, Andriamaro, Davydov, 2011)
Classes¶
Functional for a Bernstein element. |
|
Bernstein finite element. |
Functions¶
|
Calculate choose function of a set of powers. |
|
Calculate choose function of a set of powers. |
|
Return a list of Bernstein polynomials. |
Module Contents¶
- symfem.elements.bernstein.single_choose(n: int, k: int) sympy.core.expr.Expr¶
Calculate choose function of a set of powers.
- Parameters:
n – Number of items
k – Number to select
- Returns:
Number of ways to pick k items from n items (ie n choose k)
- symfem.elements.bernstein.choose(n: int, powers: list[int]) sympy.core.expr.Expr¶
Calculate choose function of a set of powers.
- Parameters:
n – Number of items
k – Numbers to select
- Returns:
A multichoose function
- symfem.elements.bernstein.bernstein_polynomials(n: int, d: int, vars: symfem.symbols.AxisVariablesNotSingle = x) list[sympy.core.expr.Expr]¶
Return a list of Bernstein polynomials.
- Parameters:
n – The polynomial order
d – The topological dimension
vars – The variables to use
- Returns:
Bernstein polynomials
- class symfem.elements.bernstein.BernsteinFunctional(reference: symfem.references.Reference, integral_domain: symfem.references.Reference, index: int, degree: int, entity: tuple[int, int])¶
Bases:
symfem.functionals.BaseFunctionalFunctional for a Bernstein element.
- ref¶
- index¶
- degree¶
- moment¶
- dof_point() symfem.geometry.PointType¶
Get the location of the DOF in the cell.
- Returns:
Location of the DOF
- _eval_symbolic(function: symfem.functions.Function) symfem.functions.Function¶
Apply the functional to a function.
- Parameters:
function – The function
- Returns:
Evaluation of the functional
- get_tex() tuple[str, list[str]]¶
Get a representation of the functional as TeX, and list of terms involved.
- Returns:
TeX representation
- discrete(poly_degree: int) symfem.functionals.DiscreteDof¶
Get points and weights that define this DOF discretely.
- Parameters:
poly_degree – The polynomial degree of the element. This may be used to decide which degree quadrature rule to use
- Returns:
Points and weights
- property nderivs: int¶
Number of derivatives.
- class symfem.elements.bernstein.Bernstein(reference: symfem.references.Reference, order: int)¶
Bases:
symfem.finite_element.CiarletElementBernstein finite element.
- property lagrange_subdegree: int¶
Get the Lagrange subdegree of the element.
This is the degree of the highest degree Lagrange space whose polynomial space is a subspace of this element’s polynomial space.
- property lagrange_superdegree: int | None¶
Get the Lagrange superdegree of the element.
This is the degree of the highest degree Lagrange space whose polynomial space is a superspace of this element’s polynomial space.
- property polynomial_subdegree: int¶
Get the polynomial subdegree of the element.
This is the degree of the highest degree complete polynomial space that is a subspace of this element’s polynomial space.
- property polynomial_superdegree: int | None¶
Get the polynomial superdegree of the element.
This is the degree of the highest degree complete polynomial space that is a superspace of this element’s polynomial space.
- names = ['Bernstein', 'Bernstein-Bezier']¶
- references = ['interval', 'triangle', 'tetrahedron']¶
- min_order = 0¶
- continuity = 'C0'¶
- value_type = 'scalar'¶
- last_updated = '2023.12'¶