Face Interpolator

The face interpolator provides tools for evaluating and interpolating finite element functions on mesh faces. This is particularly useful for postprocessing tasks that require access to traces or jumps of functions across element boundaries.

API Reference

ExtendableFEM.FaceInterpolatorMethod
FaceInterpolator([kernel], u_args, ops_args; Tv=Float64, Ti=Int, kwargs...)

Constructs a face-based interpolator for evaluating (possibly discontinuous) finite element function operators, e.g. jumps or averages, on mesh faces (edges in 2D, faces in 3D).

Arguments

  • kernel (optional): A function of the form kernel(result, input, qpinfo) for postprocessing the operator evaluations at each quadrature point. If omitted, a standard kernel is used.
  • u_args: Array of unknowns or indices specifying which solution blocks are used as arguments.
  • ops_args: Array of operator types (e.g., jump(grad(u)), id(u)) specifying which operators to evaluate on the faces.

Keyword Arguments

  • Tv: Value type for computations (default: Float64).

  • Ti: Integer type for indexing (default: Int).

    • name: name for operator used in printouts. Default: ''Projector''

    • only_interior: only interior faces, interpolation of boundary faces will be zero. Default: false

    • order: interpolation order (default: match order of applied finite element space). Default: ''auto''

    • parallel_groups: assemble operator in parallel using CellAssemblyGroups. Default: true

    • params: array of parameters that should be made available in qpinfo argument of kernel function. Default: nothing

    • resultdim: dimension of result field (default = length of arguments). Default: 0

    • verbosity: verbosity level. Default: 0

Returns

A FaceInterpolator object that can be used to evaluate or interpolate face-based quantities into a new FEVector living on the mesh faces.

Notes

  • The result is an FEVector on a face-based finite element space (e.g., H1Pk on faces).
  • Supports both interior and boundary faces; set only_interior=true to restrict to interior faces.
  • The kernel function can be used to compose customized quantities at each quadrature point.
source
ExtendableFEMBase.evaluate!Method
function evaluate!(O::FaceInterpolator{Tv, Ti, UT}, sol; kwargs...)

Evaluates the FaceInterpolator using the blocks of sol as arguments and returns the FEVector with the results.

source

Example Usage (extracted from Example210)

Suppose you want to compute the jumps of the gradient of a scalar-valued Lagrange finite element function on the interior edges, e.g. to compute an a posteriori error estimator.

function gradnormalflux!(result, ∇u, qpinfo)
    result[1] = dot(∇u, qpinfo.normal)
end
NormalJumpProjector = FaceInterpolator(gradnormalflux!, [jump(grad(u))]; resultdim = 1, only_interior = true)
Jumps4Faces = evaluate!(NormalJumpProjector, sol)

See the Example212 for the complete example.