Interfaces, traces, and discontinuous Galerkin
Select facet domains and assemble consistent interface terms.
Facet contributions
Cell integrals describe volume contributions. Facet integrals express exterior fluxes and coupling between neighboring cells. The integration domain, one-sided values and normal orientation must be specified together.
Select the facet domain
| Form | Domain | Use |
|---|---|---|
BoundaryIntegral | Exterior facets | Neumann, Robin and weak Dirichlet terms |
InterfaceIntegral | Interior facets | Material interfaces and DG coupling |
FaceIntegral | All facets | Terms common to both domains |
.over(attribute, ...) restricts a form to tagged facets. Prepare the facet-to-cell relation first. BoundaryNormal provides the exterior normal; FaceNormal follows the library's facet orientation.
Choose a side
A conforming scalar field has equal values on the two sides of an interior facet. A discontinuous field or a conforming field's gradient can have distinct traces. For derivative expressions, Grad(field).traceOf(attribute) selects the incident cell with that region label. Ambiguous derivative evaluation raises UndeterminedTraceDomainException. For a discontinuous field value, evaluate on a point mapped into the selected cell, as in the checked example.
mesh.trace({{attr1, attr2}, interfaceAttribute}) assigns a facet label from a pair of cell labels. This operation prepares attribute selection for subsequent interface forms; the selected field trace still specifies its incident region.
Jump and average
With a fixed ordering of incident cells, define
Jump(w) and Average(w) implement these operations. For a continuous trace, the jump is zero and the average equals the common value. The checked trace example evaluates a piecewise constant field and verifies both selected traces and both operators.
Symmetric interior penalty
For scalar diffusion with coefficient one, choose an interior normal from the plus cell to the minus cell and use the same ordering in the jump. On a discontinuous trial/test space, the interior part is
The two consistency terms are transposes. A penalty of the form is typical for positive degree ; the sufficient constant depends on the element family and mesh geometry.
Homogeneous Dirichlet data imposed weakly on adds
For prescribed value , the right-hand side includes , in addition to the volume source. These terms complete the boundary treatment required by this method.
The analysis of interior-penalty formulations is developed in [2]. For suitable discontinuous spaces, regular meshes and a sufficiently large penalty, the symmetric Dirichlet diffusion form is coercive and yields an SPD matrix. Solver choice follows the assembled form and constraints. Conforming P1 fields have zero interior value jumps, while P0 has zero cellwise gradient. A DG discretization therefore requires a space and facet operators appropriate to the full chosen formulation.
The SIPG diffusion tutorial implements the complete cell-local affine method, including weak boundary data, and checks a patch test and a four-level refinement study.