@@ -180,7 +180,7 @@ family such as ``"Raviart-Thomas"``. Secondly, you may use the
180180family, which gives a vector-valued space where each component is
181181identical to the appropriate scalar-valued
182182:py:class: `~.FunctionSpace `. Thirdly, you can create a
183- :py:class: `~ufl.classes .VectorElement ` directly (which is itself
183+ :py:class: `~finat. ufl.mixedelement .VectorElement ` directly (which is itself
184184*vector-valued * and pass that to the :py:func: `~.FunctionSpace `
185185constructor).
186186
@@ -275,7 +275,7 @@ Firedrake supports the use of the following finite elements.
275275 :file: element_list.csv
276276
277277In addition, the
278- :py:class: `~ufl.finiteelement .tensorproductelement.TensorProductElement `
278+ :py:class: `~finat.ufl .tensorproductelement.TensorProductElement `
279279operator can be used to create product elements on extruded meshes.
280280
281281Element variants
@@ -289,16 +289,17 @@ continuous elements these are the Gauss-Lobatto-Legendre points.
289289For CG and DG spaces on simplices, Firedrake offers both equispaced points and
290290the better conditioned recursive Legendre points from :cite: `Isaac2020 ` via the
291291`recursivenodes `_ module. These are selected by passing ``variant="equispaced" ``
292- or ``variant="spectral" `` to the :py:class: `~ufl.classes .FiniteElement ` or
292+ or ``variant="spectral" `` to the :py:class: `~finat. ufl.finiteelement .FiniteElement ` or
293293:py:func: `~.FunctionSpace ` constructors. For example:
294294
295295.. code-block :: python3
296296
297297 fe = FiniteElement("RTCE", quadrilateral, 2, variant="equispaced")
298298
299- For CG and DG spaces, and most tensor-product elements, the default is the spectral variant.
299+ For CG and DG spaces, and most tensor-product elements, the default is `` variant="spectral" `` .
300300
301- Integral-type degrees of freedom are also available through ``variant="integral" ``. For instance,
301+ Integral-type degrees of freedom are also available through ``variant="integral" ``. These
302+ enable orthogonal bases for DG on any cell type:
302303
303304.. code-block :: python3
304305
@@ -310,7 +311,7 @@ can be increased also through the variant option. For instance, ``variant="integ
310311will use a quadrature that exactly evaluates the degrees of freedom on polynomials of
3113124 degrees higher than that of the space.
312313
313- The key role of integral -type degrees of freedom is to nearly preserve curl-free or
314+ Integral -type degrees of freedom are useful to nearly preserve curl-free or
314315divergence-free functions when interpolating into the finite element space.
315316H(curl) and H(div) elements, such as Nédélec, Brezzi-Douglas-Marini, and Raviart-Thomas,
316317have ``variant="integral" `` as default. These elements also support ``variant="point" ``,
@@ -723,15 +724,16 @@ this estimate might be quite large, and a warning like this one will be raised:
723724
724725 tsfc:WARNING Estimated quadrature degree 13 more than tenfold greater than any argument/coefficient degree (max 1)
725726
726- This might increase memory and computational requirements. To manually override the default, the
727- quadrature degree can be prescribed on each integral,
727+ Sometimes the estimated quadrature degree might be even in the hundreds or thousands,
728+ rendering the integration prohibitively expensive. To manually override the default, the
729+ quadrature degree can be prescribed on each integral :py:class: `~ufl.measure.Measure `,
728730
729731.. code-block ::
730732
731733 inner(sin(u)**4, v) * dx(degree=4)
732734
733- This, of course, will introduce a variational crime.
734-
735+ Setting `` degree=4 `` means that the quadrature rule will be exact only for integrands
736+ of total polynomial degree up to 4. This, of course, will introduce a greater numerical error than the default.
735737
736738Another way to specify the quadrature rule is through the ``scheme `` keyword. This could be
737739either a :py:class: `~finat.quadrature.QuadratureRule `, or a string. Supported string values
@@ -751,7 +753,41 @@ produce a diagonal mass matrix.
751753
752754 .. Note ::
753755
754- For ``scheme="lump" `` the ``degree `` argument is interpreted as the degree of :py:func: `~.FunctionSpace `.
756+ To obtain the lumped mass matrix with ``scheme="lump" ``,
757+ the ``degree `` argument should match the degree of the :py:class: `~finat.ufl.finiteelement.FiniteElement `.
758+
759+ The default quadrature degree estimation may be overridden by setting the ``"quadrature_degree" `` in
760+ the ``form_compiler_parameters `` dictionary passed on to
761+ :py:func: `~.solve `, :py:func: `~.project `, or :py:class: `~.NonlinearVariationalProblem `.
762+
763+ .. code-block ::
764+
765+ F = inner(grad(u), grad(v))*dx(degree=0) + inner(exp(u), v)*dx - inner(1, v) * dx
766+
767+ solve(F == 0, u, form_compiler_parameters={"quadrature_degree": 4})
768+
769+ In the example above, only the integrals with unspecified quadrature degree
770+ will be computed on a quadrature rule that exactly integrates polynomials of
771+ degree set in ``form_compiler_parameters ``.
772+
773+ The Quadrature Space
774+ ~~~~~~~~~~~~~~~~~~~~
775+
776+ It is possible to define a finite element :py:class: `~.Function ` on a quadrature rule.
777+ The ``"Quadrature" `` and ``"Boundary Quadrature" `` spaces are useful to
778+ interpolate data at quadrature points on cell interiors and cell boundaries,
779+ respectively.
780+
781+ .. code-block ::
782+
783+ Q = FunctionSpace(mesh, "Quadrature", degree=quad_degree, quad_scheme=quad_scheme)
784+
785+ The ``quad_scheme `` keyword argument again may be either
786+ :py:class: `~finat.quadrature.QuadratureRule ` or a string.
787+ If a :py:class: `~.Function ` in the ``"Quadrature" `` space appears within an
788+ integral, Firedrake will automatically select the quadrature rule that corresponds
789+ to ``dx(degree=quad_degree, scheme=quad_scheme) `` to match the one associated
790+ with the quadrature space.
755791
756792
757793.. _more_complicated_forms :
0 commit comments