1. Introduction
We extend, in an easy way, the classical tree-cotree technique in the frame of high-order finite elements (FEs). We focus on magnetostatics as it represents a significative problem where this technique is usually applied. Particular attention is given to the magnetic vector potential formulation of such a problem. This problem admits infinite solutions hence its discretization by Whitney edge FEs yields to a singular algebraic system.
The techniques that are generally adopted in magnetostatics to eliminate the matrix nullspace are described in two seminal works, one by Albanese and Rubinacci [
1] and the other by Cendes and Manges [
2]. Albanese and Rubinacci showed that one converts the singular systems, resulting from low-order edge-based discretizations of magnetostatic problems, into nonsingular ones by setting to zero the vector potential circulations on a spanning tree edges of the FE mesh graph. Manges and Cendes underlined the relation between the tree-cotree approach proposed by Albanese and Rubinacci and the enforcement in a weak sense of the Coulomb gauge. The tree-cotree technique was then used for example in [
3] to reduce the number of unknowns of a three-dimensional magnetostatic problem or in [
4] to solve the eddy-current problem in a multiply connected region. It has led to several variants, see an overview in [
5]. The tree-cotree decomposition of the unknowns in two-dimensional applications has been also considered for face elements in [
6]. Indeed, in two dimensions, the face element basis functions are obtained from the edge element ones by a rotation of 90 degrees. However, in all the previous works, only the lowest order finite element discretisation is considered, which simplifies the identification of the degrees of freedom (dofs) with mesh edges. Indeed, with classical edge FEs, dofs are the circulations of the approximated vector field along the edges of the FE mesh [
7]. Hence, tree-cotree techniques are perfectly adapted to this type of discretizations since there is a one-to-one correspondence between edges, listed in the tree or cotree sets, and dofs.
In a high order FE discretization of the same problem, the dofs introduced in [
8], the so-called weights, have again a physical signification. For edge discretizations, they have the meaning of circulations on suitable edges of a fictitious refinement of the FE mesh. This fact allows us to rely in a very natural way on tree-cotree techniques. These new dofs were born from using the same geometrical approach, proposed by Whitney [
9] to construct low order polynomial representations of differential forms, on a finer simplicial complex of the computational domain mesh. These weights do coincide with Whitney edge FE dofs in the low-order case.
In these pages, by relying on linear algebra, we analyse the fundamental work accomplished in the 90 s on tree-cotree techniques and show that it is still in actuality in the high order case when fields are reconstructed in the discrete space by using their weights. Further, the interest of the analysis presented, for the weights, in these pages is to underline that the tree-cotree approach can be adopted within any high order FE approach where it is possible to state a clear correspondence of dofs with geometrical objects creating a graph.
We thus start by considering an open bounded connected polyhedral domain
with boundary
. We indicate by
, for
, the connected components of
(in particular,
is the external one). We denote by
g the number of independent non-bounding cycles in
. Note that
and
are, respectively, the first and the second Betti numbers of
(see, e.g., [
10]). For a domain
, the 0th Betti number
is equal to the number of connected components of
. If
is connected, as assumed in these pages, then
. The third Betti number
in the present case. Betti numbers describe the topology of
and provide a way of computing its Euler-Poincaré characteristic as the number
. We introduce the space of the magnetic harmonic vector fields, that is
We recall that
. The magnetostatic problem in its most basic form reads: find the magnetic induction field
due to prescribed compatible currents
and defined by the field equations and conditions
Here above,
is the outward going unit normal to
and
the magnetic permeability of the material contained in
. It is assumed that
is symmetric and positive definite, bounded from below, namely,
for a real number
(that coincides with the magnetic permeability of the air). The last condition of
-orthogonality to the space
is of key importance to guarantee the solution uniqueness. Indeed, when
, the first three equations in (
1) give
that, together with the last condition, yields
, that means
, due to the properties of
(see more details in [
11]). For compatible currents, we mean
such that
in
and
, for any
jth (out of
) connected component
of
.
The paper layout is as follows. In
Section 2, we reformulate problem (
1) in terms of the magnetic vector potential and its weak formulation. We thus define the high-order FE approximation space and write the discrete problem together with its matrix form in
Section 3. In
Section 4 we present the tree-cotree approach and the analysis of the linear system to solve in the block form dictated by the tree.
Section 5 is dedicated to the imposition of a discrete Coulomb-like gauge. We briefly discuss in
Section 6 about the other formulation of the magnetostatic problem and on its connection with the tree-cotree approach. We conclude in
Section 7 by analysing differences and similarities between the presented gauges.
2. The Magnetic Vector Potential Problem
A way to exactly satisfy the solenoidality condition
on the magnetic induction field
is to represent
in terms of a vector potential, namely a vector
such that
. This magnetic potential
is not uniquely defined as the vector
, for
V a scalar function, still verifies
. A classical way to ensure the uniqueness of
is to prescribe a gauge condition on
, e.g., the Coulomb gauge
. We introduce the space of the electric harmonic vector fields, as
It holds that
. The magnetostatic problem (
1) thus reads: given a compatible
, find a vector
satisfying the field equations (as stated in, e.g., [
12])
We remark that from the boundary condition
it follows
hence
. It is possible to show (see again [
11]) that
for each function
that is solution of
in
, with boundary conditions
, for
(here
is the Kronecker symbol, namely
takes the value 1 if
and 0 otherwise). If
, we have
. If
and
then
, for each
.
In view of using FEs, we need to rewrite problem (
2) in weak form. We multiply the first equation of (
2) by a test function
where
. We then integrate by parts over
to obtain
The condition
yields the following characterisation for
in
:
being
the space of smooth functions with compact support in
. By integration by parts and applying a density argument, we can write
and (
5) yields
in
(in the sense of distributions). When
, the second and fourth equations in problem (
2) can be imposed by using (
5) with
where
is a constant vector. In fact, taking
, with
for all
, we have
We thus look for
such that (
3) holds together with the condition
3. The Discrete Problem and Its Matrix Form
Let
be a simplicial triangulation over
and
. Even if
is a simplicial triangulation of
, the topological properties computed on
are the same as those of
. For
connected, with
g loops and
p cavities, the Euler-Poincaré characteristics
and
are equal and we have
where
,
,
,
are, respectively, the cardinalities of the sets of vertices
V, edges
E, faces
F and tetrahedra
T of the mesh
. Given a simplicial mesh
over
, we denote by
the set of Whitney differential
k-forms of polynomial degree
, where
is the order of the form (see [
13] for more details on the properties of these spaces). It is a compact notation to indicate space of polynomial functions which are well-known in finite elements. Indeed, for
, we have
, the space of continuous, piecewise polynomials of degree
; for
, we obtain
the first family of Nédélec edge element functions of degree
; for
, we get
the space of Raviart-Thomas functions of degree
; for
, we find
discontinuous piecewise polynomials of degree
r. The spaces
are connected in a complex by linear operators which can be represented by suitable matrices, namely
G (
),
R (
),
D (
) respectively, once a set of unisolvent dofs and consequently a basis in each space
have been fixed. Note that the entries of these matrices are
, only for few bases of these spaces
associated with dofs chosen as, for example, the
weights of a physical field, intended as a differential
k-form, on chains of
k-simplices of the high-order FE mesh.
For , the dimension of the space coincides with the number of k-simplices in the mesh, indeed , , and . Moreover, the matrices G, R, D are, resp., the edge-to-node, face-to-edge and tetrahedron-to-face connectivity matrices taking also into account respective orientations. Dofs for fields in are, respectively, their values at the mesh nodes (), their circulations along the edges (), their fluxes across the mesh faces () and their densities at the mesh tetrahedra ().
For
, as explained in [
8], by connecting the nodes of the principal lattice of degree
in a
n-simplex
, we obtain a number of
small n-simplices that are
-homothetic to
t. The
small k-simplices,
, are all the
k-simplices that compose the boundary of the small
n-simplices. Any small
k-simplex is denoted by a couple
, with
s a
k-simplex of
and
is a multi-integer
with
,
and
. By relying on the last two pictures on the right of
Figure 1, we give an example of small edges
with
. In the first of these two pictures, the three small edges lying at the interior of
T are, respectively,
(left),
(right),
(top). In the last picture, the small edge lying on the boundary of
T is
. The term
active is to indicate all couples
such that the function
belongs to a basis of
, where
and
. Indeed, by considering all possible multi-indices
in the couples
, one generates more functions
than necessary. The dimension of the space
coincides with the number of
active small k-simplices in the mesh. The small
k-simplices were born to define a set of unisolvent dofs, the weights
, for functions
when
, that, in distinction to the classical moments, maintain a physical interpretation. About the weights, their definition was first given in [
8] and unisolvence, despite redundancies, proved in [
14]. For the unisolvence of a minimal (i.e., without redundancies) set of such weights, we refer to [
15].
This work relies on the spaces
and
. In particular, the meaning of the matrix
G is the same as for the case
provided that we work with the active small
k-simplices instead of the
k-simplices of the mesh
, with
. The weights for high order Lagrangian finite elements
are the values of the function at the points of the corresponding principal lattice of each tetrahedron of the mesh, and the weights for high order Nédélec finite elements
are the line integrals of the vector field along the active small edges connecting adjacent points of the principal lattice. The geometrical realization of the graph
associated with the gradient operator, is straightforward (see an example in triangles, for
, in
Figure 1, the picture in second position from the left). A spanning tree
is a maximal subgraph of
(maximal because it visits all vertices of
) without closing circuits (this means that it is a tree). The remaining subgraph
is called the cotree. An example of spanning tree and associated cotree in triangles, for
, is given in
Figure 1, the last two pictures on the right. In a mesh, a similar construction is used to enrich a spanning tree of the vertices-edges graph of the mesh.
From now on, (resp. ) denotes the cardinality of the set of nodes or small nodes (resp. edges or active small edges) whatever is, and the terms active and small for k-simplices are taken for granted. We now make for the discrete problem.
Let
be the (dual) basis for
(for simplicity, we keep on denoting by
the dimension of
and
that of
) with respect to the weights over the active small edges as dofs, i.e.,
The discrete form of the variational formulation (
3) can be stated as: find
, such that
By writing
and selecting
for all
, the discrete variational problem results in the linear algebraic system
where
and
is the
jth active small edge with unit tangent vector
. The discrete form of condition (
6) reads:
with
. Condition (
11) says that
is orthogonal to
. At the beginning of the next section, we show that a vector
if and only if
satisfies
, and this implies that
. In this sense, we are identifying the space
with
.
With the help of the tree-cotree technique we will see, in a general domain, the conditions for the invertibility of system (
9) imposed by the tree gauge and those imposed by the orthogonality to the kernel of
S that we consider as a discrete Coulomb-like gauge.
4. The Tree-Cotree Decomposition to Analyse the System S
To accomplish the first step, we characterize the nullspace of
S, namely the set of vectors
such that
. Correspondingly, we have
By selecting
in (
12), we obtain
where the constant
depends on
. For this reason, from (
13) we deduce that
. Then
, where
R is the active small-face-to-small-edge connectivity matrix. Since
if and only if
, then
S and
R share the same nullspace
, therefore, they are row equivalent
.
Identifying the free variables corresponding to
(with more columns than rows, namely
) is possible by a tree-cotree decomposition (e.g., as it was done in the last row of ([
16] Equation (3)). Namely, we set to zero all the variables associated with a spanning tree
of a suitable graph
derived from the graph
of the gradient operator
G. The construction of the graph
from
is done as follows. In the graph
, since
, for each
, we eliminate all the active small edges
lying on the connected component
. To do this, we collapse all their extremities into a unique node, say
. Accordingly, an active small edge, say
, with one extremity at a node
and the other extremity at a node
, is deformed (⇝) into an edge, still denoted by
, with extremity
and
, that is
. We thus get a modified graph
with vertices, the set
and arcs, the set defined as
that is the set of small edges
of
with both extremeties not on
together with the set of the deformed ones, namely those small edges of
with an extremity on
that has collapsed into one of the nodes
. Note that the number of nodes in
is equal to
and the number of arcs coincides with
.
Taking advantage of the row equivalence between
R and
S (following the ideas of Manges and Cendes [
2]), we decompose
S into blocks, corresponding with a partition of the active small edges in two sets, by relying on a spanning tree of the graph
. Dofs supported by small edges out of the tree (thus on the so-called cotree), are numbered first, and dofs corresponding with small edges on the tree are numbered second. The subscript
(resp.,
t) indicates the block of indices associated with small edges in the complement of the spanning tree (resp., in the spanning tree), namely,
. The number of edges in a spanning tree of
is the number of the nodes of
minus one, that is
. Hence, the size of
is
, and that of
is then
. According to this decomposition, the system (
9) reads
Note that
S is a singular matrix and this mimics the singularity of the continuous problem (
2). The singularity of
S raises two issues. First, compatibility, namely, which are the requirements on
so that
is in the range of
S? Secondly, uniqueness, namely, is there a way to ensure uniqueness for the solution of (
9), under compatibility condition?
4.1. Characterising the Block of Maximal Rank in the System Matrix
The tree-cotree technique provides a way to define the set of indices (corresponding with dofs associated with the cotree) such that is maximal rank. Indeed, we have the following result.
Theorem 1. The square block is invertible.
Proof of Theorem 1. Let us denote by
q the size of
and let us consider a vector
such that
. Hence,
and
, too. We have
where
is an element of
. Due to the requirement on
, this gives
. As a consequence,
for a scalar field
. Let us check that this yields
. Indeed, each small edge
of the cotree (
) closes, together with other arcs
that all belong to the tree (
), a circuit
in
. Being
equal to the gradient of a scalar function, its circulation on circuits is zero. Note that
has the form
We thus have
Hence, if for each edge in the cotree, that yields and the invertibility of . □
We state a property that will be widely applied in the following:
Property 1. If has maximal rank q, then .
Proof of the Property. If the first
q lines (block
) in (
14) define the rank of
S, the remaining
lines (block
t) are linear combination of the first
q ones. This means that a matrix
exists such that
Hence, for we have □
For a matrix
M, the expression
is well known in the frame of domain decomposition (DD) methods, indeed it coincides with the so-called Schur complement associated with
M for the partition of indices into the sets
and
t. In the context of DD methods, the maximal rank block of
M is not used to put in evidence, since
M in the DD context is an invertible matrix, but rather to solve
by going through the inversion of a finite number of better conditioned smaller linear systems (the interested reader can find more details in [
17]).
4.2. Requirements on the System Right-Hand-Side
for the Existence of a Solution
We now focus on the compatibility condition for the right-hand-side of (
14). It is an algebraic constraint for a vector
to be the right-hand-side of a linear system with matrix
S, thus stating when
Theorem 2. if and only if .
Proof of Theorem 2. The fact that
implies
is in the columns space of
S, so
for some
. Written in partitioned matrix form
This yields the equations
Thanks to the fact that
, we know that
. By eliminating
in (
16) and considering
in (
16), we have the following relation between the blocks of
:
that is what we wished to prove. □
Condition (
17) has to be satisfied by
to be in the range of
S, prior to solving (
9).
4.3. Characterising the Nullspace of the System Matrix
Under a compatibility condition on the right-hand side addressed in the previous section, the nullspace of S is responsible for the lack of uniqueness of the solution . We thus characterise the nullspace of S, i.e., .
Theorem 3. if and only if .
Proof of Theorem 3. Let
. Under the form (
14), the first block of lines in the system
reads
. Being
invertible, we get
. The other way around, if
, then the vector
reads
Hence and with . We have that , too, because since . So . □
If
verifies (
17) then
. Indeed, by a simple calculation, we have
for all
. In fact,
. By relying on (
17) and Theorem 3 for
, we have
since
and
.
4.4. Generating Solutions to the System
From the previous results, we can state the following.
Theorem 4. Given a vector satisfying (17), all solutions of (9) look like with Proof of Theorem 4. All vectors
, with blocks defined in (
18), verify the first block line of system (
14). To get the second block line of (
14), let us multiply
in (
18) by
and rearrange the terms. We thus obtain
Then using
and the condition (
17) for
, relation (
19) becomes
that is the second line block of (
14). The other way around, from the first line block of (
14) we can set
since
is invertible. We replace
in the second line block of (
14) and we have
The right-hand-side
verifies (
17) thus
. Therefore we have
with
; thus,
can be any vector in
. □
To summarize, the infinite set of solutions to (
9) with the form
, is generated by arbitrarily setting the entries of the block
and by computing
with the system
The solution of system (
9) is thereby reduced to the components indexed out of a tree, namely to
, once the block
has been set. We say that we impose the classical
tree gauge when we set
. It is worth noting that these tree gauges are not a discretization of the Coulomb gauge stated in (
5) or (
6). They are not enforcing in any sense the orthogonality to the gradient in conditions (
5) and (
6). We follow this way in the next section.
5. A Discrete Coulomb Gauge
We have seen that the dof block
of the magnetic vector potential
is set arbitrarily, eventually equal to zero, without affecting the corresponding field
. In this section, we restrict the solution
of
to verify
. We recall that
is in
if and only if
, where
is the basis in
defined in (
7). We thus have to look for a vector
where
is the block
of rows in
S. In fact, according to Theorem 2, we have
if and only if
has the form
with
denoting the identity matrix for the block
.
Applying this discrete Coulomb gauge means to look for a vector
such that
. Using this change of variable
from
to
, by relying on the block definition of
T and
S, the relation
can be written as
Hence, the discrete Coulomb gauge consists in looking for the solution of
of the form
with
solving the system
The ones of T are the rows of S with indices in and hence they span all the rowspace of S, since is maximal rank, namely . The matrix is square, symmetric and positive definite, since T is full rank. It can be inverted by efficient, direct or iterative, techniques well-known in scientific computing.
Under the compatibility conditions on
stated in Theorem 2, the lower part
of the system
is redundant with the upper one given in (
22). Let us perform the matrix products:
- (i)
that is .
- (ii)
that is .
If
verifies (
17), from (i) we get (ii). Indeed
We can fix some expressions. The original problem is to solve
under the compatibility condition on
. The tree allows to find
invertible, thus to prepare
S in a block form. To impose a discrete Coulomb gauge on (
14) means to select solutions of such a problem of the form
. To solve (
14) under the discrete Coulomb gauge is equivalent to solve the gauged problem
, in particular
since the rest of the equations (those with right-hand-side
) are redundant.
Remark 1. Note that the null space gauge was imposed by the change of variable from to , that actually enforces the orthogonality of to the kernel of S (that is the same as the kernel of R). The vectors in the kernel of S are the coefficients in the basis of the gradients of . In this sense the null space gauge can be intended as a weak enforcement of a discrete Coulomb gauge.
6. Other Formulations in Magnetostatics
Alternative formulations, with respect to the magnetic vector potential one, exploit the zero divergence condition of the source
. The starting point is the magnetostatic problem in terms of the magnetic field
. Namely, assigned a solenoidal source current
with
, we wish to compute the magnetic field
defined in
from the equations
,
with boundary conditions
and
for all
. As commonly done [
1,
18,
19], the condition
is strongly satisfied via a curl-conforming source field, namely an electric vector potential
such that
. Again, the problem
is overdetermined, since the kernel of the curl operator includes the gradients. If
is not simply connected, there exist vector fields in
that are not gradients. Indeed, the dimension of the quotient space
coincides with
. We can thus apply analogous gauging techniques as the ones we have analysed before to solve it. In this case, a belted tree is used (see, e.g., [
20]).
We have seen that a spanning tree on the graph of the gradient operator is involved in both the discrete version solution of (
1) and (
2). There is however a difference between the construction of a spanning tree, say
, when working in terms of
and that of say
when working in terms of
. We have indeed that
can be a belted tree, that takes into account
, the first Betti number of
( e.g., [
20]) whereas
is a genuine spanning tree of a graph that pays attention to
, the second Betti number of
. This is much related to the type of boundary conditions appearing in (
1) and (
2). The condition on
takes in the
connected components of
. Here we work in terms of
, so
is of type
. Similar considerations can be stated for the graph to consider when we have to build a tree for the solution of the magnetostatic problem in either
or
.
7. Discussion and Concluding Remarks
Using, as dofs for the first family of Nédélec FEs, the weights, it is natural to extend the classical tree-cotree techniques to high-order approximations. This construction is useful to any high order FE approach where there is a correspondence of dofs with geometrical entities that constitute a graph. The idea in this work is to recall the main problems where this type of techniques are applied. We pay particular attention to the generality of the domain from a topological point of view and the implication that this generality has on the graph (and consequently on the spanning tree) to be considered. We have considered in details the use of the tree-cotree technique when looking for a solution of the magnetostatic problem in terms of a magnetic vector potential in a general domain . We have deeply analysed, in the high order FE context, the two different ways of performing a discrete gauge that were considered by Manges and Cendes in the low order case. We have recalled also briefly the use of this technique for the computation of an electric vector potential when solving the magnetostatic problem in terms of the magnetic field .
In these pages, we have proved some properties for the linear system with matrix
S associated with a high order edge FE discretization of the magnetostatic problem in terms of the magnetic vector potential
. By relying on a tree-cotree partition of the components of the solution vector
, Theorem 2 states that
if and only if
. Then, to have
, when imposing a discrete Coulomb gauge, we look for a solution of the form
. Under the compatibility condition on the right-hand-side of Theorem 2, both gauges provide a unique solution of
. The tree-cotree technique in Theorem 1 allows to define the block of maximal rank in
S and thus to define
T. The tree gauge chooses the solution
by fixing the entries of the block
, in agreement with (
18). However, these entries collected in
can be arbitrarily fixed and when they are different from zero, we have another gauge.