Bases: dolfin.functions.functionspace.FunctionSpaceBase
FunctionSpace represents a finite element function space.
Create finite element function space.
Which families and degrees that are supported is determined by the form compiler used to generate the element, but typical families include
| Name | Usage |
|---|---|
| Argyris* | “ARG” |
| Arnold-Winther* | “AW” |
| Brezzi-Douglas-Fortin-Marini* | “BDFM” |
| Brezzi-Douglas-Marini | “BDM” |
| Bubble | “B” |
| Crouzeix-Raviart | “CR” |
| Discontinuous Lagrange | “DG” |
| Discontinuous Raviart-Thomas | “DRT” |
| Hermite* | “HER” |
| Lagrange | “CG” |
| Mardal-Tai-Winther* | “MTW” |
| Morley* | “MOR” |
| Nedelec 1st kind H(curl) | “N1curl” |
| Nedelec 2nd kind H(curl) | “N2curl” |
| Quadrature | “Q” |
| Raviart-Thomas | “RT” |
| Real | “R” |
*only partly supported.
To define a discrete function space over e.g. the unit square:
mesh = UnitSquare(32,32)
V = FunctionSpace(mesh, "CG", 1)
Here, "CG" stands for Continuous Galerkin, implying the standard Lagrange family of elements. Instead of "CG", we could have written "Lagrange". With degree 1, we get the linear Lagrange element. Other examples include:
# Discontinuous element of degree 0
V = FunctionSpace(mesh, "DG", 0)
# Brezzi-Douglas-Marini element of degree 2
W = FunctionSpace(mesh, "BDM", 2)
# Real element with one global degree of freedom
R = FunctionSpace(mesh, "R", 0)