MFEMTreeCotreeGaugeEssentialConstraint

Overview

Applies a tree-cotree gauge to an (first-kind Nedelec) variable . The curl-curl operator has a large null space consisting of the gradients of functions,

so a problem of the form with no (or only partial) mass term is singular. Whenever a mass-like term is absent over part or all of the domain, that part of the operator retains the null space and the discrete system cannot be solved without either an artificial regularization or a gauge.

The constraint removes the null space by building a spanning tree of the mesh 1-skeleton (its vertices and edges) and strongly fixing every edge degree of freedom on every tree edge to zero. The remaining "cotree" edge DOFs are exactly enough to represent any curl, so the gauged system is non-singular while the physical solution is unchanged.

Higher order spaces

Above FIRST order, the null space also contains the gradients of the higher order "bubble" functions that vanish on the boundary of an edge, face or element. The gradient of such a bubble lives entirely in the DOFs of that edge, face or element, so the constraint additionally fixes, on every gauged edge, face and element, as many of its own DOFs as it carries bubbles. They are chosen on the reference element so that no nonzero bubble gradient vanishes on them. The selection on each edge and quadrilateral face is made in a frame fixed by the vertex coordinates, keeping the gauge independent of the partitioning.

The DOFs of a triangular face are related between frames by a linear transformation rather than a permutation, so no selection on it is the same in every frame. Triangular faces only carry bubbles from THIRD order on, so above SECOND order the constraint rejects meshes with triangular faces (tetrahedra, prisms and pyramids).

Partition-independent construction

The forest is grown by a distributed Boruvka pass in which no rank ever holds more than its own share of the mesh graph. Each edge is keyed on its two endpoint coordinates, read from the mesh nodes, which are bit-identical on every rank sharing a vertex. A distributed sort turns those coordinates into dense global vertex ids in canonical (lexicographic) order, which gives every edge a weight that depends only on the geometry and not on the partitioning.

Because those weights are distinct, the minimum spanning forest is unique, so the result is the same as a serial Kruskal pass over the globally sorted edge list. The gauge - and hence the solution - is therefore independent of the number of MPI ranks and of how the mesh was partitioned, without the construction ever being replicated.

Seeding the forest from essential conditions

Edges whose degrees of freedom are already fixed, by an essential (tangential Dirichlet) boundary condition or by another essential constraint on the variable, seed the spanning forest, so that the gauge stays compatible with those conditions instead of over-constraining them. Essential constraints on one variable must be restricted to disjoint sets of subdomains (see MFEMConstraint), so another constraint is restricted to subdomains outside the gauge's block and their edges seed the forest as described below, whichever of the two is applied first. A gauge used alongside another constraint therefore needs block set to exclude that constraint's subdomains.

Restricting the gauge with block

Where another term of the weak form already removes the null space, there is no gauge freedom left to fix and gauging anyway would over-constrain the solution. Set block to the subdomain(s) that do need gauging; all edges of the excluded elements, including those at the interface between gauged and non-gauged subdomains, then seed the spanning forest but are never gauged, and neither are the faces of the excluded elements. Leaving block empty gauges the whole mesh, which is correct only when the operator is genuinely unregularized everywhere.

Getting this wrong is not a subtle effect: in the example below, gauging only the unregularized subdomain reproduces the solution obtained from a vanishing artificial regularization to six significant figures, whereas a whole-mesh gauge perturbs it by several percent.

For a complex variable use MFEMComplexTreeCotreeGaugeEssentialConstraint, which selects the same degrees of freedom (the selection is shared via Moose::MFEM::TreeCotreeGauge) and fixes both their real and imaginary parts.

Notes and limitations

  • Above SECOND order, the mesh must have no triangular faces.

  • The variable must be an (Nedelec) variable.

  • Conforming meshes only. Meshes with discontinuous nodes, such as periodic meshes, are rejected, because their vertices cannot be identified by coordinates.

  • Construction is fully distributed in memory, but it is a global graph computation: for a mesh with V vertices, it costs O(log V) communication rounds and is rebuilt whenever the mesh or the finite element space is refined. The result is cached between solves, so a transient pays for it once rather than once per time step.

Example: a magnetodynamic A-formulation

The parameters above are formulation-independent; this is one concrete case. For the magnetic vector potential in an eddy-current A-formulation, the conducting region carries a term that removes the null space, but a surrounding non-conducting region has no such term and is singular. Setting block to the non-conducting subdomain(s) gauges exactly the region that needs it, while the boundaries carrying the tangential Dirichlet condition on (a perfect electric conductor, or "PEC", boundary in that terminology) seed the forest.

Example Input File Syntax

[Constraints<<<{"href": "../../../syntax/Constraints/index.html"}>>>]
  [tree_cotree_gauge]
    type = MFEMTreeCotreeGaugeEssentialConstraint<<<{"description": "Applies a tree-cotree gauge to an H(curl) (Nedelec) variable by strongly fixing the edge degrees of freedom on a spanning tree of the mesh to zero, and in a higher order space a selection of the degrees of freedom of every other edge, face and element, removing the gradient null space of a curl-curl operator. Edges carrying an essential condition on the variable seed the spanning forest so the gauge stays compatible with it. Set 'block' to the subdomains to gauge; the complement is treated as already gauged and only seeds the spanning forest. Leaving 'block' empty gauges the whole mesh. Above SECOND order, the mesh must have no triangular faces.", "href": "MFEMTreeCotreeGaugeEssentialConstraint.html"}>>>
    variable<<<{"description": "Variable on which to apply the constraint"}>>> = a_field
    # Gauge only the non-conducting region, where the sigma*dA/dt term is absent.
    # Conductor edges seed the spanning forest but are not gauged.
    block<<<{"description": "The list of subdomains (names or ids) that this object will be restricted to. Leave empty to apply to all subdomains."}>>> = ${insulator_block}
  []
[]
(test/tests/mfem/constraints/tree_cotree_gauge_magnetodynamic.i)

Input Parameters

  • blockThe list of subdomains (names or ids) that this object will be restricted to. Leave empty to apply to all subdomains.

    C++ Type:std::vector<SubdomainName>

    Controllable:No

    Description:The list of subdomains (names or ids) that this object will be restricted to. Leave empty to apply to all subdomains.

  • variableVariable on which to apply the constraint

    C++ Type:VariableName

    Unit:(no unit assumed)

    Controllable:No

    Description:Variable on which to apply the constraint

Optional Parameters

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Set the enabled status of the MooseObject.

Advanced Parameters

Input Files