Symfem | "Bernstein" ↓ Show Symfem examples ↓↑ Hide Symfem examples ↑Before trying this example, you must install Symfem: pip3 install symfem This element can then be created with the following lines of Python: import symfem
# Create Bernstein order 1 on a interval element = symfem.create_element("interval", "Bernstein", 1)
# Create Bernstein order 2 on a interval element = symfem.create_element("interval", "Bernstein", 2)
# Create Bernstein order 3 on a interval element = symfem.create_element("interval", "Bernstein", 3)
# Create Bernstein order 1 on a triangle element = symfem.create_element("triangle", "Bernstein", 1)
# Create Bernstein order 2 on a triangle element = symfem.create_element("triangle", "Bernstein", 2)
# Create Bernstein order 3 on a triangle element = symfem.create_element("triangle", "Bernstein", 3) |
UFL | "Bernstein" ↓ Show UFL examples ↓↑ Hide UFL examples ↑Before trying this example, you must install UFL: pip3 install UFL This element can then be created with the following lines of Python: import ufl
# Create Bernstein order 1 on a interval element = ufl.FiniteElement("Bernstein", "interval", 1)
# Create Bernstein order 2 on a interval element = ufl.FiniteElement("Bernstein", "interval", 2)
# Create Bernstein order 3 on a interval element = ufl.FiniteElement("Bernstein", "interval", 3)
# Create Bernstein order 1 on a triangle element = ufl.FiniteElement("Bernstein", "triangle", 1)
# Create Bernstein order 2 on a triangle element = ufl.FiniteElement("Bernstein", "triangle", 2)
# Create Bernstein order 3 on a triangle element = ufl.FiniteElement("Bernstein", "triangle", 3) |
- \(R\) is the reference interval. The following numbering of the subentities of the reference is used:
- \(\mathcal{V}\) is spanned by: \(1\), \(x\), \(x^{2}\)
- \(\mathcal{L}=\{l_0,...,l_{2}\}\)
- Functionals and basis functions:
\(\displaystyle l_{0}:\mathbf{v}\mapsto\displaystyle\int_{R}(s_{0}^{2})v\)
where \(R\) is the reference element;
and \(s_{0}\) is a parametrisation of \(R(1)\).
\(\displaystyle \phi_{0} = 30 x^{2} - 24 x + 3\)
This DOF is associated with edge 0 of the reference element.
\(\displaystyle l_{1}:\mathbf{v}\mapsto\displaystyle\int_{R}(2 s_{0} \cdot \left(1 - s_{0}\right))v\)
where \(R\) is the reference element;
and \(s_{0}\) is a parametrisation of \(R(1)\).
\(\displaystyle \phi_{1} = - 60 x^{2} + 60 x - 9\)
This DOF is associated with edge 0 of the reference element.
\(\displaystyle l_{2}:\mathbf{v}\mapsto\displaystyle\int_{R}(s_{0}^{2} - 2 s_{0} + 1)v\)
where \(R\) is the reference element;
and \(s_{0}\) is a parametrisation of \(R(1)\).
\(\displaystyle \phi_{2} = 30 x^{2} - 36 x + 9\)
This DOF is associated with edge 0 of the reference element.
- \(R\) is the reference interval. The following numbering of the subentities of the reference is used:
- \(\mathcal{V}\) is spanned by: \(1\), \(x\), \(x^{2}\), \(x^{3}\)
- \(\mathcal{L}=\{l_0,...,l_{3}\}\)
- Functionals and basis functions:
\(\displaystyle l_{0}:\mathbf{v}\mapsto\displaystyle\int_{R}(s_{0}^{3})v\)
where \(R\) is the reference element;
and \(s_{0}\) is a parametrisation of \(R(1)\).
\(\displaystyle \phi_{0} = 140 x^{3} - 180 x^{2} + 60 x - 4\)
This DOF is associated with edge 0 of the reference element.
\(\displaystyle l_{1}:\mathbf{v}\mapsto\displaystyle\int_{R}(3 s_{0}^{2} \cdot \left(1 - s_{0}\right))v\)
where \(R\) is the reference element;
and \(s_{0}\) is a parametrisation of \(R(1)\).
\(\displaystyle \phi_{1} = - 420 x^{3} + 600 x^{2} - 220 x + 16\)
This DOF is associated with edge 0 of the reference element.
\(\displaystyle l_{2}:\mathbf{v}\mapsto\displaystyle\int_{R}(3 s_{0} \left(s_{0}^{2} - 2 s_{0} + 1\right))v\)
where \(R\) is the reference element;
and \(s_{0}\) is a parametrisation of \(R(1)\).
\(\displaystyle \phi_{2} = 420 x^{3} - 660 x^{2} + 280 x - 24\)
This DOF is associated with edge 0 of the reference element.
\(\displaystyle l_{3}:\mathbf{v}\mapsto\displaystyle\int_{R}(- s_{0}^{3} + 3 s_{0}^{2} - 3 s_{0} + 1)v\)
where \(R\) is the reference element;
and \(s_{0}\) is a parametrisation of \(R(1)\).
\(\displaystyle \phi_{3} = - 140 x^{3} + 240 x^{2} - 120 x + 16\)
This DOF is associated with edge 0 of the reference element.
- \(R\) is the reference triangle. The following numbering of the subentities of the reference is used:
- \(\mathcal{V}\) is spanned by: \(1\), \(x\), \(y\)
- \(\mathcal{L}=\{l_0,...,l_{2}\}\)
- Functionals and basis functions:
\(\displaystyle l_{0}:\mathbf{v}\mapsto\displaystyle\int_{R}(s_{1})v\)
where \(R\) is the reference element;
and \((s_{0},s_{1})\) is a parametrisation of \(R(2)\).
\(\displaystyle \phi_{0} = 24 y - 6\)
This DOF is associated with face 0 of the reference element.
\(\displaystyle l_{1}:\mathbf{v}\mapsto\displaystyle\int_{R}(s_{0})v\)
where \(R\) is the reference element;
and \((s_{0},s_{1})\) is a parametrisation of \(R(2)\).
\(\displaystyle \phi_{1} = 24 x - 6\)
This DOF is associated with face 0 of the reference element.
\(\displaystyle l_{2}:\mathbf{v}\mapsto\displaystyle\int_{R}(- s_{0} - s_{1} + 1)v\)
where \(R\) is the reference element;
and \((s_{0},s_{1})\) is a parametrisation of \(R(2)\).
\(\displaystyle \phi_{2} = - 24 x - 24 y + 18\)
This DOF is associated with face 0 of the reference element.
- \(R\) is the reference triangle. The following numbering of the subentities of the reference is used:
- \(\mathcal{V}\) is spanned by: \(1\), \(x\), \(x^{2}\), \(y\), \(x y\), \(y^{2}\)
- \(\mathcal{L}=\{l_0,...,l_{5}\}\)
- Functionals and basis functions:
\(\displaystyle l_{0}:\mathbf{v}\mapsto\displaystyle\int_{R}(s_{1}^{2})v\)
where \(R\) is the reference element;
and \((s_{0},s_{1})\) is a parametrisation of \(R(2)\).
\(\displaystyle \phi_{0} = 180 y^{2} - 120 y + 12\)
This DOF is associated with face 0 of the reference element.
\(\displaystyle l_{1}:\mathbf{v}\mapsto\displaystyle\int_{R}(2 s_{0} s_{1})v\)
where \(R\) is the reference element;
and \((s_{0},s_{1})\) is a parametrisation of \(R(2)\).
\(\displaystyle \phi_{1} = 360 x y - 60 x - 60 y + 12\)
This DOF is associated with face 0 of the reference element.
\(\displaystyle l_{2}:\mathbf{v}\mapsto\displaystyle\int_{R}(s_{0}^{2})v\)
where \(R\) is the reference element;
and \((s_{0},s_{1})\) is a parametrisation of \(R(2)\).
\(\displaystyle \phi_{2} = 180 x^{2} - 120 x + 12\)
This DOF is associated with face 0 of the reference element.
\(\displaystyle l_{3}:\mathbf{v}\mapsto\displaystyle\int_{R}(2 s_{1} \left(- s_{0} - s_{1} + 1\right))v\)
where \(R\) is the reference element;
and \((s_{0},s_{1})\) is a parametrisation of \(R(2)\).
\(\displaystyle \phi_{3} = - 360 x y + 60 x - 360 y^{2} + 360 y - 48\)
This DOF is associated with face 0 of the reference element.
\(\displaystyle l_{4}:\mathbf{v}\mapsto\displaystyle\int_{R}(2 s_{0} \left(- s_{0} - s_{1} + 1\right))v\)
where \(R\) is the reference element;
and \((s_{0},s_{1})\) is a parametrisation of \(R(2)\).
\(\displaystyle \phi_{4} = - 360 x^{2} - 360 x y + 360 x + 60 y - 48\)
This DOF is associated with face 0 of the reference element.
\(\displaystyle l_{5}:\mathbf{v}\mapsto\displaystyle\int_{R}(s_{0}^{2} + 2 s_{0} s_{1} - 2 s_{0} + s_{1}^{2} - 2 s_{1} + 1)v\)
where \(R\) is the reference element;
and \((s_{0},s_{1})\) is a parametrisation of \(R(2)\).
\(\displaystyle \phi_{5} = 180 x^{2} + 360 x y - 240 x + 180 y^{2} - 240 y + 72\)
This DOF is associated with face 0 of the reference element.
- \(R\) is the reference triangle. The following numbering of the subentities of the reference is used:
- \(\mathcal{V}\) is spanned by: \(1\), \(x\), \(x^{2}\), \(x^{3}\), \(y\), \(x y\), \(x^{2} y\), \(y^{2}\), \(x y^{2}\), \(y^{3}\)
- \(\mathcal{L}=\{l_0,...,l_{9}\}\)
- Functionals and basis functions:
\(\displaystyle l_{0}:\mathbf{v}\mapsto\displaystyle\int_{R}(s_{1}^{3})v\)
where \(R\) is the reference element;
and \((s_{0},s_{1})\) is a parametrisation of \(R(2)\).
\(\displaystyle \phi_{0} = 1120 y^{3} - 1260 y^{2} + 360 y - 20\)
This DOF is associated with face 0 of the reference element.
\(\displaystyle l_{1}:\mathbf{v}\mapsto\displaystyle\int_{R}(3 s_{0} s_{1}^{2})v\)
where \(R\) is the reference element;
and \((s_{0},s_{1})\) is a parametrisation of \(R(2)\).
\(\displaystyle \phi_{1} = 3360 x y^{2} - 1680 x y + 120 x - 420 y^{2} + 240 y - 20\)
This DOF is associated with face 0 of the reference element.
\(\displaystyle l_{2}:\mathbf{v}\mapsto\displaystyle\int_{R}(3 s_{0}^{2} s_{1})v\)
where \(R\) is the reference element;
and \((s_{0},s_{1})\) is a parametrisation of \(R(2)\).
\(\displaystyle \phi_{2} = 3360 x^{2} y - 420 x^{2} - 1680 x y + 240 x + 120 y - 20\)
This DOF is associated with face 0 of the reference element.
\(\displaystyle l_{3}:\mathbf{v}\mapsto\displaystyle\int_{R}(s_{0}^{3})v\)
where \(R\) is the reference element;
and \((s_{0},s_{1})\) is a parametrisation of \(R(2)\).
\(\displaystyle \phi_{3} = 1120 x^{3} - 1260 x^{2} + 360 x - 20\)
This DOF is associated with face 0 of the reference element.
\(\displaystyle l_{4}:\mathbf{v}\mapsto\displaystyle\int_{R}(3 s_{1}^{2} \left(- s_{0} - s_{1} + 1\right))v\)
where \(R\) is the reference element;
and \((s_{0},s_{1})\) is a parametrisation of \(R(2)\).
\(\displaystyle \phi_{4} = - 3360 x y^{2} + 1680 x y - 120 x - 3360 y^{3} + 4620 y^{2} - 1560 y + 100\)
This DOF is associated with face 0 of the reference element.
\(\displaystyle l_{5}:\mathbf{v}\mapsto\displaystyle\int_{R}(6 s_{0} s_{1} \left(- s_{0} - s_{1} + 1\right))v\)
where \(R\) is the reference element;
and \((s_{0},s_{1})\) is a parametrisation of \(R(2)\).
\(\displaystyle \phi_{5} = - 6720 x^{2} y + 840 x^{2} - 6720 x y^{2} + 7560 x y - 840 x + 840 y^{2} - 840 y + 100\)
This DOF is associated with face 0 of the reference element.
\(\displaystyle l_{6}:\mathbf{v}\mapsto\displaystyle\int_{R}(3 s_{0}^{2} \left(- s_{0} - s_{1} + 1\right))v\)
where \(R\) is the reference element;
and \((s_{0},s_{1})\) is a parametrisation of \(R(2)\).
\(\displaystyle \phi_{6} = - 3360 x^{3} - 3360 x^{2} y + 4620 x^{2} + 1680 x y - 1560 x - 120 y + 100\)
This DOF is associated with face 0 of the reference element.
\(\displaystyle l_{7}:\mathbf{v}\mapsto\displaystyle\int_{R}(3 s_{1} \left(s_{0}^{2} + 2 s_{0} s_{1} - 2 s_{0} + s_{1}^{2} - 2 s_{1} + 1\right))v\)
where \(R\) is the reference element;
and \((s_{0},s_{1})\) is a parametrisation of \(R(2)\).
\(\displaystyle \phi_{7} = 3360 x^{2} y - 420 x^{2} + 6720 x y^{2} - 5880 x y + 600 x + 3360 y^{3} - 5460 y^{2} + 2400 y - 200\)
This DOF is associated with face 0 of the reference element.
\(\displaystyle l_{8}:\mathbf{v}\mapsto\displaystyle\int_{R}(3 s_{0} \left(s_{0}^{2} + 2 s_{0} s_{1} - 2 s_{0} + s_{1}^{2} - 2 s_{1} + 1\right))v\)
where \(R\) is the reference element;
and \((s_{0},s_{1})\) is a parametrisation of \(R(2)\).
\(\displaystyle \phi_{8} = 3360 x^{3} + 6720 x^{2} y - 5460 x^{2} + 3360 x y^{2} - 5880 x y + 2400 x - 420 y^{2} + 600 y - 200\)
This DOF is associated with face 0 of the reference element.
\(\displaystyle l_{9}:\mathbf{v}\mapsto\displaystyle\int_{R}(- s_{0}^{3} - 3 s_{0}^{2} s_{1} + 3 s_{0}^{2} - 3 s_{0} s_{1}^{2} + 6 s_{0} s_{1} - 3 s_{0} - s_{1}^{3} + 3 s_{1}^{2} - 3 s_{1} + 1)v\)
where \(R\) is the reference element;
and \((s_{0},s_{1})\) is a parametrisation of \(R(2)\).
\(\displaystyle \phi_{9} = - 1120 x^{3} - 3360 x^{2} y + 2100 x^{2} - 3360 x y^{2} + 4200 x y - 1200 x - 1120 y^{3} + 2100 y^{2} - 1200 y + 200\)
This DOF is associated with face 0 of the reference element.