## Abstract

We revisit the theory of Discrete Exterior Calculus (DEC) in 2D for general triangulations, relying only on Vector Calculus and Matrix Algebra. We present DEC numerical solutions of the Poisson equation and compare them against those found using the Finite Element Method with linear elements (FEML).

Keywords: Discrete element method, Poisson equation

## 1. Introduction

The purpose of this paper is to introduce the theory of Discrete Exterior Calculus (DEC) to the widest possible audience and, therefore, we will rely mainly on Vector Calculus and Matrix Algebra. Discrete Exterior Calculus is a relatively new method for solving partial differential equations  based on the idea of discretizing the mathematical theory of Exterior Differential Calculus, a theory that goes back to Cartan  and is fundamental in the areas of Differential Geometry and Differential Topology. Although Exterior Differential Calculus is an abstract mathematical theory, it has been introduced in various fields such as in digital geometry processing , numerical schemes for partial differential equations [1,8], etc.

In his PhD thesis , Hirani laid down the fundamental concepts of Discrete Exterior Calculus (DEC), using discrete combinatorial and geometric operations on simplicial complexes (in any dimension), proposing discrete equivalents for differential forms, vector fields, differential and geometric operators, etc. Perhaps the first numerical application of DEC to PDE was given in  in order to solve Darcy flow and Poisson's equation. In , the authors develop a modification of DEC and show that in simple cases (e.g. flat geometry and regular meshes), the equations resulting from DEC are equivalent to classical numerical schemes such as finite difference or finite volume discretizations. In , the authors used DEC to solve the Navier-Stokes equations and, in  DEC was used with a discrete lattice model to simulate elasticity, plasticity and failure of isotropic materials.

In this expository paper, we review the various operators of Exterior Differential Calculus in 2D in terms of ordinary vector calculus, and introduce only the geometrical ideas that are essential to the formulation. Among those ideas is that of duality between the differentiation operator (on vector fields) and the boundary operator (on the domain) contained in Green's theorem. This duality is one of the key ideas of the method, which justifies taking the discretized derivative matrix as the transpose of the boundary operator matrix on the given mesh. Another important ingredient is the Hodge star operator, which is hidden in the notation of Vector Calculus. In order to show the necessity of the Hodge star operator, we carry out some simple calculations. In particular, we will introduce the notion of wedge product of vectors which, roughly speaking, helps us assign algebraic objects to parallelograms and carry out algebraic manipulations with them. We present DEC in the simplest terms possible using easy examples. We also review the formulation of DEC for arbitrary meshes, which was first considered in . Performance of the method is tested on the Poisson equation and compared with the Finite Element Method with linear elements (FEML).

The paper is organized as follows. In Section 2, we introduce the wedge product of vectors and the geometric Hodge star operator, and rewrite Green's theorem appropriately in order to display the duality between the differentiation and the boundary operators. In Section 3, we present the operators of DEC (mesh, dual mesh, discrete derivation, discrete Hodge star operator), showing simple examples throughout. In Section 4, we present the formulation of DEC on arbitrary triangulations. In Section 5, we present the numerical solution of a Poisson equation with DEC and FEML, in order to compare their performance. In Section 6, we present our conclusions.

## 2. 2D Exterior Differential Calculus as Vector Calculus

In this section we introduce two geometric operators (the wedge product and the Hodge star) and explain how to use them together with the gradient operator in order to obtain the Laplacian.

### 2.1 Wedge product for vectors in R²

Let ${\textstyle a,b}$ be vectors in ${\textstyle \mathbb {R} ^{2}}$. We can assign to these vector the parallelogram they span, and to such a parallelogram its area. The latter is equal to the determinant of the transformation matrix sending ${\textstyle e_{1},e_{2}}$ to ${\textstyle a,b}$ respectively. In Exterior Calculus, such a parallelogram is regarded as an algebraic object ${\textstyle a\wedge b}$, a bivector, and the set of bivectors is equipped with a vector space structure to form the one-dimensional vector space

 $\textstyle \wedge ^{2}\mathbb {R} ^{2}$

Thus, we have the following spaces

 $\mathbb {R} ,\quad \quad \mathbb {R} ^{2},\quad \quad \wedge ^{2}\mathbb {R} ^{2}$

of scalars, vectors and bivectors, respectively. For instance, the square formed by ${\textstyle e_{1}}$ and ${\textstyle e_{2}}$ is represented by the symbol

 $e_{1}\wedge e_{2}$

which is read as "${\textstyle e_{1}}$ wedge ${\textstyle e_{2}}$" (Figure 1).

In ${\textstyle \mathbb {R} ^{2}}$, this represents an “element” of unit area.

Note that if we list the vectors in the opposite order, we have a different orientation and, therefore, the algebraic objects must satisfy ${\textstyle e_{2}\wedge e_{1}=-e_{1}\wedge e_{2}}$ (Figure 2). Figure 2. Change of orientation of the parallelogram implies anticommutativity in the wedge product of two vectors

More generally, given two vectors ${\textstyle a,b\in \mathbb {R} ^{2}}$, their wedge product ${\textstyle a\wedge b}$ looks as follows (Figure 3). Figure 3. The wedge product of the vectors $a$ and $b$

The properties of the wedge product are

• it is anticommutative: ${\textstyle a\wedge b=-b\wedge a}$ (Figure 4)

• ${\textstyle a\wedge a=0}$ since it is a parallelogram with area zero (Figure 5) Figure 5. Parallelogram with very small area, depicting what happens when $b$ tends to $a$

• it is distributive
 $(a+b)\wedge c=a\wedge c+b\wedge c$
• it is associative
 $(a\wedge b)\wedge c=a\wedge (b\wedge c)$

For example, let

 $a=(a_{1},a_{2})\,\,=a_{1}e_{1}+a_{2}e_{2}$ $b=(b_{1},b_{2})\,\,\,=b_{1}e_{1}+b_{2}e_{2}$

Then

 $a\wedge b=(a_{1}e_{1}+a_{2}e_{2})\wedge (b_{1}e_{1}+b_{2}e_{2})$ $=a_{1}b_{1}\,e_{1}\wedge e_{1}+a_{1}b_{2}\,e_{1}\wedge e_{2}+a_{2}b_{1}\,e_{2}\wedge e_{1}+a_{2}b_{2}\,e_{2}\wedge e_{2}$ $=a_{1}b_{2}\,e_{1}\wedge e_{2}-a_{2}b_{1}\,e_{1}\wedge e_{2}$ $=(a_{1}b_{2}-a_{2}b_{1})\,e_{1}\wedge e_{2}$

i.e. the determinant

 $\det \left({\begin{array}{cc}a_{1}&a_{2}\\b_{1}&b_{2}\end{array}}\right)$

times the canonical bivector/square ${\textstyle e_{1}\wedge e_{2}}$.

### 2.2 Hodge star operator for vectors in R²

Now consider the following situation: given the vector ${\textstyle e_{1}}$, find another vector ${\textstyle v}$ such that the parallelogram that they form has area ${\textstyle 1}$. It is readily seen that, for instance, ${\textstyle v=e_{2},-e_{2},e_{1}+e_{2}}$ are all solutions. Requiring orthogonality and standard orientation, we see that ${\textstyle e_{2}}$ is the unique solution. This process is summarized in the Hodge star operator, which basically says that the complementary vector for ${\textstyle e_{1}}$ is ${\textstyle e_{2}}$, and the one for ${\textstyle e_{2}}$ is ${\textstyle -e_{1}}$,

 $\star e_{1}=e_{2}$ ${}\star e_{2}=-e_{1}$

In general, the equation that defines the Hodge star operator for any given vector ${\textstyle v\in \mathbb {R} ^{2}}$ is the following

 $w\wedge (\star v)=(w\cdot v)\,e_{1}\wedge e_{2}$

for every ${\textstyle w\in \mathbb {R} ^{2}}$. In particular, if we take ${\textstyle v=w}$,

 $v\wedge (\star v)=|v|^{2}\,e_{1}\wedge e_{2}$

which means that ${\textstyle v}$ and ${\textstyle \star v}$ form a square of area ${\textstyle |v|^{2}}$. Thus, the Hodge star operator on a vector ${\textstyle v\in \mathbb {R} ^{2}}$ can be thought of as finding the vector that makes with ${\textstyle v}$ a positively oriented square of area ${\textstyle \vert v\vert ^{2}}$.

It is somewhat less intuitive to work out the Hodge star of a bivector. First of all, we have to treat bivectors as vectors of a different space, namely the space of bivectors ${\textstyle \textstyle \wedge ^{2}\mathbb {R} ^{2}}$. Secondly, the length of a bivector ${\textstyle v\wedge w}$ is its area

 ${length}(v\wedge w):={Area}(v\wedge w)$

Thus, the defining equation of the Hodge star applied to ${\textstyle (v\wedge w)}$ and ${\textstyle \star (v\wedge w)}$ reads as follows

 $(v\wedge w)\wedge \star (v\wedge w)=\left\langle v\wedge w,v\wedge w\right\rangle e_{1}\wedge e_{2}$

which means

 $(v\wedge w)\wedge \star (v\wedge w)={Area}(v\wedge w)^{2}e_{1}\wedge e_{2}$

Since ${\textstyle v\wedge w={Area}(v\wedge w)e_{1}\wedge e_{2}}$ is already a bivector, ${\textstyle \star (v\wedge w)}$ must be a scalar, i.e.

 $\star (v\wedge w)={Area}(v\wedge w)$

When ${\textstyle v=e_{1}}$ and ${\textstyle w=e_{2}}$ we have

 $\star (e_{1}\wedge e_{2})=1$

Finally, the Hodge star of a number ${\textstyle \lambda }$ is a bivector, i.e.

 $\star \lambda =\lambda \,e_{1}\wedge e_{2}$

### 2.3 The Laplacian

Let ${\textstyle f:\mathbb {R} ^{2}\rightarrow \mathbb {R} }$ and consider the gradient

 $\nabla f={\partial f \over \partial x}e_{1}+{\partial f \over \partial y}e_{2}$

Apply the Hodge star operator to it

 $\star \nabla f={\partial f \over \partial x}\star e_{1}+{\partial f \over \partial y}\star e_{2}$ $={\partial f \over \partial x}e_{2}-{\partial f \over \partial y}e_{1}$

Now take the gradient of each coefficient function together with wedge product

 $\nabla ^{\wedge }\star \nabla f:=\nabla \left({\partial f \over \partial x}\right)\wedge e_{2}-\nabla \left({\partial f \over \partial y}\right)\wedge e_{1}$ $=\left({\partial ^{2}f \over \partial x^{2}}e_{1}+{\partial ^{2}f \over \partial y\partial x}e_{2}\right)\wedge e_{2}-\left({\partial ^{2}f \over \partial x\partial y}e_{1}+{\partial ^{2}f \over \partial ^{2}y}e_{2}\right)\wedge e_{1}$ $={\partial ^{2}f \over \partial x^{2}}e_{1}\wedge e_{2}+{\partial ^{2}f \over \partial y\partial x}e_{2}\wedge e_{2}-{\partial ^{2}f \over \partial x\partial y}e_{1}\wedge e_{1}-{\partial ^{2}f \over \partial ^{2}y}e_{2}\wedge e_{1}$ $=\left({\partial ^{2}f \over \partial x^{2}}+{\partial ^{2}f \over \partial ^{2}y}\right)e_{1}\wedge e_{2}$

By taking the Hodge star of this last expression we get the ordinary Laplacian of ${\textstyle f}$

 $\star \nabla ^{\wedge }\star \nabla (f)={\partial ^{2}f \over \partial x^{2}}+{\partial ^{2}f \over \partial ^{2}y}$

Remarks.

(i) This rather convoluted looking way of computing the Laplacian of a function is based on Exterior Differential Calculus, a theory that generalizes the operators of vector calculus (gradient, curl and divergence) to arbitrary dimensions, and is the basis for the differential topological theory of deRham cohomology.

(ii) We would like to emphasize the necessity of using the Hodge star operator ${\textstyle \star }$ in order to make the combination of differentiation and wedge product produce the correct answer.

### 2.4 Duality in Green's theorem

Green's theorem states that for a vector field ${\textstyle (L,M)}$ defined on a region ${\textstyle D\subset \mathbb {R} ^{2}}$,

 $\int _{D}\left({\partial M \over \partial x}-{\partial L \over \partial y}\right)dxdy=\int _{C=\partial D}(Ldx+Mdy).$

In this section, we will explain how this identity encodes a duality between the operator of differentiation and that of taking the boundary of the domain of integration.

#### 2.4.1 Rewriting Green's theorem

Note that if ${\textstyle F=(L,M)}$ is a vector field, we can write it as

 $F=Le_{1}+Me_{2}$

Then, we can apply the gradient operator together with wedge product in the following fashion

 $\nabla ^{\wedge }(Le_{1}+Me_{2}):=\nabla L\wedge e_{1}+\nabla M\wedge e_{2}$ $=\left({\partial L \over \partial x}e_{1}+{\partial L \over \partial y}e_{2}\right)\wedge e_{1}+\left({\partial M \over \partial x}e_{1}+{\partial M \over \partial y}e_{2}\right)\wedge e_{2}$ $={\partial L \over \partial x}e_{1}\wedge e_{1}+{\partial L \over \partial y}e_{2}\wedge e_{1}+{\partial M \over \partial x}e_{1}\wedge e_{2}+{\partial M \over \partial y}e_{2}\wedge e_{2}$ $={\partial L \over \partial y}e_{2}\wedge e_{1}+{\partial M \over \partial x}e_{1}\wedge e_{2}$ $=\left({\partial M \over \partial x}-{\partial L \over \partial y}\right)e_{1}\wedge e_{2}$

Note that we have defined a new operator ${\textstyle \nabla ^{\wedge }}$ which combines differentiation and wedge product. Applying the Hodge star operator we obtain

 $\star \nabla ^{\wedge }(Le_{1}+Me_{2})=\left({\partial M \over \partial x}-{\partial L \over \partial y}\right)$

i.e. the integrand of the left hand side of the identity of integrals in Green's theorem. Thus, as a first step, Green's theorem can be rewritten as follows:

 $\int _{D}\nabla ^{\wedge }(L,M)dxdy=\int _{\partial D}(L,M)\cdot (dx,dy)$

#### 2.4.2 The duality in Green's theorem

Let us recall the following fact from Linear Algebra. Given a linear transformation ${\textstyle A}$ of Euclidean space ${\textstyle \mathbb {R} ^{n}}$, the transpose ${\textstyle A^{T}}$ satisfies

 $\left\langle A(v),w\right\rangle =\left\langle v,A^{T}(w)\right\rangle$

for any two vectors ${\textstyle v,w\in \mathbb {R} ^{n}}$, where ${\textstyle \left\langle \cdot ,\cdot \right\rangle }$ denotes the standard inner/dot product. In fact, such an identity characterizes the transpose ${\textstyle A^{T}}$.

Now, let us do the following notational trick: substitute the integration symbols in Green's theorem by ${\textstyle \ll \cdot ,\cdot \gg }$ as follows:

 $\int _{C}(L,M)\cdot (dx,dy)=\ll (L,M),C\gg$ $\int _{D}\nabla ^{\wedge }(L,M)dxdy=\ll \nabla ^{\wedge }(L,M),D\gg$

where ${\textstyle C=\partial D}$ is the boundary of the region. Using this notational change, Green's theorem reads as follows

 $\ll \nabla ^{\wedge }(L,M),D\gg \,\,=\,\,\ll (L,M),\partial D\gg$

Roughly speaking, this means that the differential operator ${\textstyle \nabla ^{\wedge }}$ is the transpose of the boundary operator ${\textstyle \partial }$ by means of the product ${\textstyle \ll \cdot ,\cdot \gg }$.

Remark. The previous observation is fundamental in the development of DEC, since the boundary operator is well understood and easy to calculate on meshes.

## 3. Discrete Exterior Calculus

Now we will discretize the differentiation operator ${\textstyle \nabla ^{\wedge }}$ presented above. We will start by describing the discrete version of the boundary operator on simplices/triangles. Afterwards, we will treat the differentiation operator as the transpose of the boundary operator.

We are interested in using certain geometric subsets of a given triangular mesh of a 2D region. Such subsets include vertices/nodes, edges/sides and faces/triangles. We will describe each one of them by means of the ordered list of vertices whose convex closure constitutes the subset of interest. For instance, consider the triangular mesh of the planar hexagonal region in Figure 6, Figure 6. Triangular mesh of a planar hexagonal region

where the shaded triangle will be denoted by ${\textstyle [v_{0},v_{1},v_{6}]}$, and its edge joining the vertices ${\textstyle v_{0}}$ and ${\textstyle v_{1}}$ will be denoted by ${\textstyle [v_{0},v_{1}]}$. For the sake of notational consistency, we will denote the vertices also enclosed in brackets, e.g. ${\textstyle [v_{0}]}$.

### 3.1 Boundary operator and discrete derivative

There is a well known boundary operator ${\textstyle \partial }$ for oriented triangles, edges and points:

• For points/vertices: Figure 7. Boundary of a vertex: $\partial [v_{0}]=0$

• For sides/edges: Figure 8. Boundary of an edge: $\partial [v_{0},v_{1}]=[v_{1}]-[v_{0}]$
• For faces/triangles: Figure 9. Boundary of a face: $\partial [v_{0},v_{1},v_{2}]=[v_{1},v_{2}]-[v_{0},v_{2}]+[v_{0},v_{1}]$

Example. Let us consider again the mesh of the planar hexagonal (with oriented triangles) in Figure 10. Figure 10. Oriented triangular mesh of a planar hexagonal region

We will denote a triangle by the list of its vertices listed in order according to the orientation of the tringle. Thus, we have the following ordered lists:

• list of faces
 $\{[v_{0},v_{1},v_{6}],[v_{1},v_{2},v_{6}],[v_{2},v_{3},v_{6}],[v_{3},v_{4},v_{6}],[v_{4},v_{5},v_{6}],[v_{5},v_{0},v_{6}]\}$
• list of edges
 $\{[v_{0},v_{6}],[v_{1},v_{6}],[v_{2},v_{6}],[v_{3},v_{6}],[v_{4},v_{6}],[v_{5},v_{6}],[v_{0},v_{1}],[v_{1},v_{2}],[v_{2},v_{3}],[v_{3},v_{4}],[v_{4},v_{5}],[v_{5},v_{0}]\}$
• list of vertices
 $\{[v_{0}],[v_{1}],[v_{2}],[v_{3}],[v_{4}],[v_{5}],[v_{6}]\}$

A key idea in DEC is to consider each face as an element of a basis of a vector space. Namely, column coordinate vectors are associated to faces as follows:

 $[v_{0},v_{1},v_{6}]\longleftrightarrow (1,0,0,0,0,0)^{T}$ ${}[v_{1},v_{2},v_{6}]\longleftrightarrow (0,1,0,0,0,0)^{T}$ ${}[v_{2},v_{3},v_{6}]\longleftrightarrow (0,0,1,0,0,0)^{T}$ ${}[v_{3},v_{4},v_{6}]\longleftrightarrow (0,0,0,1,0,0)^{T}$ ${}[v_{4},v_{5},v_{6}]\longleftrightarrow (0,0,0,0,1,0)^{T}$ ${}[v_{5},v_{0},v_{6}]\longleftrightarrow (0,0,0,0,0,1)^{T}$

Similarly, coordinate vectors are associated to the edges

 ${}[v_{0},v_{6}]\longleftrightarrow (1,0,0,0,0,0,0,0,0,0,0,0)^{T}$ ${}[v_{1},v_{6}]\longleftrightarrow (0,1,0,0,0,0,0,0,0,0,0,0)^{T}$ ${}[v_{2},v_{6}]\longleftrightarrow (0,0,1,0,0,0,0,0,0,0,0,0)^{T}$ ${}[v_{3},v_{6}]\longleftrightarrow (0,0,0,1,0,0,0,0,0,0,0,0)^{T}$ ${}[v_{4},v_{6}]\longleftrightarrow (0,0,0,0,1,0,0,0,0,0,0,0)^{T}$ ${}[v_{5},v_{6}]\longleftrightarrow (0,0,0,0,0,1,0,0,0,0,0,0)^{T}$ ${}[v_{0},v_{1}]\longleftrightarrow (0,0,0,0,0,0,1,0,0,0,0,0)^{T}$ ${}[v_{1},v_{2}]\longleftrightarrow (0,0,0,0,0,0,0,1,0,0,0,0)^{T}$ ${}[v_{2},v_{3}]\longleftrightarrow (0,0,0,0,0,0,0,0,1,0,0,0)^{T}$ ${}[v_{3},v_{4}]\longleftrightarrow (0,0,0,0,0,0,0,0,0,1,0,0)^{T}$ ${}[v_{4},v_{5}]\longleftrightarrow (0,0,0,0,0,0,0,0,0,0,1,0)^{T}$ ${}[v_{5},v_{0}]\longleftrightarrow (0,0,0,0,0,0,0,0,0,0,0,1)^{T}$

Finally, we do the same with the vertices

 ${}[v_{0}]\longleftrightarrow (1,0,0,0,0,0,0)^{T}$ ${}[v_{1}]\longleftrightarrow (0,1,0,0,0,0,0)^{T}$ ${}[v_{2}]\longleftrightarrow (0,0,1,0,0,0,0)^{T}$ ${}[v_{3}]\longleftrightarrow (0,0,0,1,0,0,0)^{T}$ ${}[v_{4}]\longleftrightarrow (0,0,0,0,1,0,0)^{T}$ ${}[v_{5}]\longleftrightarrow (0,0,0,0,0,1,0)^{T}$ ${}[v_{6}]\longleftrightarrow (0,0,0,0,0,0,1)^{T}$

Now, if we take the boundary of each face, we have

 $\partial [v_{0},v_{1},v_{6}]=[v_{1},v_{6}]-[v_{0},v_{6}]+[v_{0},v_{1}]$ $\partial [v_{1},v_{2},v_{6}]=[v_{2},v_{6}]-[v_{1},v_{6}]+[v_{1},v_{2}]$ $\partial [v_{2},v_{3},v_{6}]=[v_{3},v_{6}]-[v_{2},v_{6}]+[v_{2},v_{3}]$ $\partial [v_{3},v_{4},v_{6}]=[v_{4},v_{6}]-[v_{3},v_{6}]+[v_{3},v_{4}]$ $\partial [v_{4},v_{5},v_{6}]=[v_{5},v_{6}]-[v_{4},v_{6}]+[v_{4},v_{5}]$ $\partial [v_{5},v_{0},v_{6}]=[v_{0},v_{6}]-[v_{5},v_{6}]+[v_{5},v_{0}]$

which, under the previous assignments of coordinate vectors, corresponds to the linear transformation given by the following matrix which will multiply the column coordinate vectors on the left

 $\partial _{2,1}=\left({\begin{array}{rrrrrr}-1&0&0&0&0&1\\1&-1&0&0&0&0\\0&1&-1&0&0&0\\0&0&1&-1&0&0\\0&0&0&1&-1&0\\0&0&0&0&1&-1\\1&0&0&0&0&0\\0&1&0&0&0&0\\0&0&1&0&0&0\\0&0&0&1&0&0\\0&0&0&0&1&0\\0&0&0&0&0&1\end{array}}\right)$

where the subindices in ${\textstyle \partial _{2,1}}$ indicate that we are taking the boundary of 2-dimensional elements and obtaining 1-dimensional ones. Similarly, taking the boundaries of all the edges gives

 $\partial [v_{0},v_{6}]=[v_{6}]-[v_{0}]$ $\partial [v_{1},v_{6}]=[v_{6}]-[v_{1}]$ $\partial [v_{2},v_{6}]=[v_{6}]-[v_{2}]$ $\partial [v_{3},v_{6}]=[v_{6}]-[v_{3}]$ $\partial [v_{4},v_{6}]=[v_{6}]-[v_{4}]$ $\partial [v_{5},v_{6}]=[v_{6}]-[v_{5}]$ $\partial [v_{0},v_{1}]=[v_{1}]-[v_{0}]$ $\partial [v_{1},v_{2}]=[v_{2}]-[v_{1}]$ $\partial [v_{2},v_{3}]=[v_{3}]-[v_{2}]$ $\partial [v_{3},v_{4}]=[v_{4}]-[v_{3}]$ $\partial [v_{4},v_{5}]=[v_{5}]-[v_{4}]$ $\partial [v_{5},v_{0}]=[v_{0}]-[v_{5}]$

which, under the previous assignments of coordinate vectors, corresponds to the linear transformation given by the following matrix

 $\partial _{1,0}=\left({\begin{array}{rrrrrr|rrrrrr}-1&0&0&0&0&0&-1&0&0&0&0&1\\0&-1&0&0&0&0&1&-1&0&0&0&0\\0&0&-1&0&0&0&0&1&-1&0&0&0\\0&0&0&-1&0&0&0&0&1&-1&0&0\\0&0&0&0&-1&0&0&0&0&1&-1&0\\0&0&0&0&0&-1&0&0&0&0&1&-1\\1&1&1&1&1&1&0&0&0&0&0&0\end{array}}\right)$

Remark. Note how these matrices encode different levels of connectivity with orientations, such as who are the edges of which oriented triangle, or which are the end points of a given oriented edge.

Due to the duality between ${\textstyle \partial }$ and ${\textstyle \nabla ^{\wedge }}$, we can define the discretiztion of ${\textstyle \nabla ^{\wedge }}$ by

 $\nabla ^{\wedge }:=(\partial )^{T}$

For instance, we see that the operator ${\textstyle \nabla _{0,1}^{\wedge }}$ reads as follows

 $\nabla _{0,1}^{\wedge }=\left({\begin{array}{rrrrrrr}-1&0&0&0&0&0&1\\0&-1&0&0&0&0&1\\0&0&-1&0&0&0&1\\0&0&0&-1&0&0&1\\0&0&0&0&-1&0&1\\0&0&0&0&0&-1&1\\-1&1&0&0&0&0&0\\0&-1&1&0&0&0&0\\0&0&-1&1&0&0&0\\0&0&0&-1&1&0&0\\0&0&0&0&-1&1&0\\1&0&0&0&0&-1&0\end{array}}\right)$

### 3.2 Dual mesh

In order to discretize the Hodge star operator, we must first introduce the notion of the dual mesh of a triangular mesh.

Consider the triangular mesh ${\textstyle K}$ in Figure 11(a). The construction of the dual mesh ${\textstyle K^{*}}$ is carried out as follows:

• The vertices of the dual mesh ${\textstyle K^{*}}$ are the circumcenters of the faces/triangles of the original mesh (the blue dots in Figures 11(b) and 11(c)). For instance, the dual of the face ${\textstyle [v_{0},v_{1},v_{6}]}$ will be denoted by ${\textstyle [v_{0},v_{1},v_{6}]^{*}}$.
• The edges of ${\textstyle K^{*}}$ are the straight line segments joining the circumcenters of two adjacent triangles (those which share an edge). Note that the resulting line segments are orthogonal to one of the original edges (the blue straight line segments in in Figures 11(b) and 11(c)). For instance, the dual of the edge ${\textstyle [v_{0},v_{6}]}$ will be denoted by ${\textstyle [v_{0},v_{6}]^{*}}$.
• The faces or cells of ${\textstyle K^{*}}$ are the areas enclosed by the new polygons determined by the new edges. For instance, the dual of the vertex ${\textstyle [v_{6}]}$ is the inner blue hexagon in in Figures 11(b) and 11(c) and will be denoted by ${\textstyle [v_{6}]^{*}}$.   (a) (b) (c) Figure 11. Dual mesh construction. (a) Triangular mesh $K$. (b) Dual mesh $K^{*}$ superimposed on the mesh $K$. (c) Dual mesh $K^{*}$

The orientation of the dual edges is given by the following recipe. If we have two adjacent triangles oriented as in Figure 12(a), the dual edge crossing the edge of adjacency is oriented as in Figure 12(b).  (a) (b) Figure 12. (a) Two adjacent oriented triangles. (b) Compatibly oriented dual edge

### 3.3 Boundary operator on the dual mesh

Consider the dual mesh in Figure 13 with the given labels and orientations.

The boundary operator is applied in a similar fashion as it was applied to triangles. In this case we have

 $\partial _{2,1}^{dual}F_{1}=E_{1}+E_{7}-E_{12}$ $\partial _{2,1}^{dual}F_{2}=E_{2}-E_{7}+E_{8}$ $\partial _{2,1}^{dual}F_{3}=E_{3}-E_{8}+E_{9}$ $\partial _{2,1}^{dual}F_{4}=E_{4}-E_{9}+E_{10}$ $\partial _{2,1}^{dual}F_{5}=E_{5}-E_{10}+E_{11}$ $\partial _{2,1}^{dual}F_{6}=E_{6}-E_{11}+E_{12}$ $\partial _{2,1}^{dual}F_{7}=-E_{1}-E_{2}-E_{3}-E_{4}-E_{5}-E_{6}$

If we assign coordinate vectors to the dual faces and the dual edges as before

 $F_{1}\longleftrightarrow (1,0,0,0,0,0,0)^{T}$ $F_{2}\longleftrightarrow (0,1,0,0,0,0,0)^{T}$ $F_{3}\longleftrightarrow (0,0,1,0,0,0,0)^{T}$ $F_{4}\longleftrightarrow (0,0,0,1,0,0,0)^{T}$ $F_{5}\longleftrightarrow (0,0,0,0,1,0,0)^{T}$ $F_{6}\longleftrightarrow (0,0,0,0,0,1,0)^{T}$ $F_{7}\longleftrightarrow (0,0,0,0,0,0,1)^{T}$

and

 $E_{1}\longleftrightarrow (1,0,0,0,0,0,0,0,0,0,0,0)^{T}$ $E_{2}\longleftrightarrow (0,1,0,0,0,0,0,0,0,0,0,0)^{T}$ $E_{3}\longleftrightarrow (0,0,1,0,0,0,0,0,0,0,0,0)^{T}$ $E_{4}\longleftrightarrow (0,0,0,1,0,0,0,0,0,0,0,0)^{T}$ $E_{5}\longleftrightarrow (0,0,0,0,1,0,0,0,0,0,0,0)^{T}$ $E_{6}\longleftrightarrow (0,0,0,0,0,1,0,0,0,0,0,0)^{T}$ $E_{7}\longleftrightarrow (0,0,0,0,0,0,1,0,0,0,0,0)^{T}$ $E_{8}\longleftrightarrow (0,0,0,0,0,0,0,1,0,0,0,0)^{T}$ $E_{9}\longleftrightarrow (0,0,0,0,0,0,0,0,1,0,0,0)^{T}$ $E_{10}\longleftrightarrow (0,0,0,0,0,0,0,0,0,1,0,0)^{T}$ $E_{11}\longleftrightarrow (0,0,0,0,0,0,0,0,0,0,1,0)^{T}$ $E_{12}\longleftrightarrow (0,0,0,0,0,0,0,0,0,0,0,1)^{T}$

we have the associated matrix

 $\partial _{2,1}^{dual}=\left({\begin{array}{rrrrrrr}1&0&0&0&0&0&-1\\0&1&0&0&0&0&-1\\0&0&1&0&0&0&-1\\0&0&0&1&0&0&-1\\0&0&0&0&1&0&-1\\0&0&0&0&0&1&-1\\1&-1&0&0&0&0&0\\0&1&-1&0&0&0&0\\0&0&1&-1&0&0&0\\0&0&0&1&-1&0&0\\0&0&0&0&1&-1&0\\-1&0&0&0&0&1&0\end{array}}\right)$

Notice that

 $\partial _{2,1}^{dual}=-\left(\partial _{1,0}\right)^{T}$

which arises from the duality between the two meshes . In general, the discrete differential to be applied is

 $\nabla _{1,2}^{\wedge ,dual}=\left(\partial _{2,1}^{dual}\right)^{T}=-\partial _{1,0}=-\left(\nabla _{0,1}^{\wedge }\right)^{T}$

### 3.4 Discrete Hodge star

The discretization of the Hodge star ${\textstyle \star }$ uses the geometrical ideas described in Section 2.2 and the dual mesh. More precisely, the 2D Hodge star operator rotates a vector ${\textstyle 90^{\circ }}$ counterclockwise. For the sake of clarity, let us focus on the edge ${\textstyle [v_{0},v_{6}]}$, its mesh dual ${\textstyle [v_{0},v_{6}]^{*}}$ and its Hodge star image ${\textstyle \star [v_{0},v_{6}]}$. They are represented in Figure 14.

Since

 ${length}(\star [v_{0},v_{6}])={length}([v_{0},v_{6}])$

we see that the relationship between the dual edge ${\textstyle [v_{0},v_{6}]^{*}}$ and the geometric ${\textstyle \star [v_{0},v_{6}]}$ is the following

 ${1 \over {length}([v_{0},v_{6}]^{*})}[v_{0},v_{6}]^{*}={1 \over {length}([v_{0},v_{6}])}\star [v_{0},v_{6}]$

As can be seen, when applying the geometric Hodge star to the edges of the mesh, we do not end up in the dual mesh but in multiples of the elements of the dual mesh. Thus, ${\textstyle \star [v_{0},v_{6}]}$ must be scaled to match ${\textstyle [v_{0},v_{6}]^{*}}$. If we do this to all the Hodge star images, we get the discrete Hodge star matrix

 $M_{1,1}=\left({\begin{array}{ccccc}{{length}([v_{0},v_{6}]^{*}) \over {length}([v_{0},v_{6}])}&0&0&\dots &0\\0&{{length}([v_{1},v_{6}]^{*}) \over {length}([v_{1},v_{6}])}&0&\dots &0\\0&0&{{length}([v_{2},v_{6}]^{*}) \over {length}([v_{2},v_{6}])}&\dots &0\\\vdots &\vdots &\vdots &\ddots &\vdots \\0&0&0&\dots &{{length}([v_{5},v_{0}]^{*}) \over {length}([v_{5},v_{0}])}\end{array}}\right)$

where the subindices in ${\textstyle M_{1,1}}$ indicate that we are sending 1-dimensional elements of the original mesh to 1-dimensional elements of the dual mesh.

Somewhat less intuitive is the meaning of the geometric Hodge star operator on nodes of the original mesh. As we saw in Subsection 2.2,

 $\star 1=e_{1}\wedge e_{2}$

which geometrically means that the Hodge star ${\textstyle \star [v_{6}]}$ must be a polygon with area equal to 1 (classically, it is a parallelogram, but can also be a hexahedron of area 1 as in this example).

However, in the dual mesh we have the polygon ${\textstyle [v_{6}]^{*}}$

so that we need to resize ${\textstyle \star [v_{6}]}$ as follows

 $[v_{6}]^{*}={Area}([v_{6}]^{*})\,\star [v_{6}]$

If we do that for all the vertices, we obtain the discrete Hodge star matrix

 $M_{0,2}=\left({\begin{array}{cccc}{Area}([v_{0}]^{*})&0&\dots &0\\0&{Area}([v_{1}]^{*})&\dots &0\\\vdots &\vdots &\ddots &\vdots \\0&0&\dots &{Area}([v_{6}]^{*})\end{array}}\right)$

The inverse matrix will deal with the case when we take the Hodge star of the 2D polygons in the dual mesh to obtain points (with weight 1) in the original mesh.

In summary, the various matrices ${\textstyle M}$ representing the discrete Hodge star operator send elements of the original mesh to elements of the dual mesh.

### 3.5 DEC applied to 2D Poisson's equation

Consider the 2D Poisson's equation

 $\kappa \Delta f=q$

As we have seen, this can be rewritten as

 $\kappa \,\,\star \nabla ^{\wedge }\star \nabla (f)=q$

Suppose that we wish to solve the equation using the mesh ${\textstyle K}$. Let us denote by ${\textstyle [f]}$ and ${\textstyle [q]}$ the column vector discretizations of the functions ${\textstyle K}$ and ${\textstyle q}$ at the nodes. According to DEC, the first derivation ${\textstyle \nabla (f)}$ is achieved left-multiplying ${\textstyle [f]}$ by the matrix ${\textstyle \nabla _{0,1}^{\wedge }}$ of Subsection 3.1. The resulting column vector is a collection of (unknown) directional derivative values of ${\textstyle f}$ assigned to the ordered set of edges. At this point we need to transfer such a set of values to the ordered set of dual edges of the dual mesh with the appropriate geometrical scaling, which is achieved multiplying on the left by the matrix ${\textstyle M_{1,1}}$ of Subsection 3.4. Now, the discrete version of the second derivation ${\textstyle \nabla ^{\wedge }}$ is given by left multiplication with the matrix ${\textstyle \nabla _{1,2}^{\wedge }}$ of Subsection 3.3, which gives a column vector of (unknown) values assigned to the ordered set of 2-dimensional cells of the dual mesh. Finally, the task of mapping such values (with the appropriate scaling) to the ordered set of vertices of the original mesh is achieved by left multiplication with the matrix ${\textstyle M_{2,0}}$ of Subsection 3.4. Thus, the Poisson equation is discretized as the matrix equation

 $\kappa \,\,M_{2,0}\,\,\nabla _{1,2}^{\wedge ,dual}\,\,M_{1,1}\,\,\nabla _{0,1}^{\wedge }\,\,[f]=[q]$

Later on, it will be convenient to work with the equivalent system

 $\kappa \,\,(\nabla _{0,1}^{\wedge })^{T}\,\,M_{1,1}\,\,\nabla _{0,1}^{\wedge }[f]=M_{0,2}[q]$

Note that the DEC-discretization of ${\textstyle \nabla (f)}$ is not a (discretized) flow vector. It is a collection of values of directional derivatives of ${\textstyle f}$, one such value for each oriented edge.

## 4. DEC for general triangulations

Since the boundary operator is really concerned with the connectivity of the mesh and does not change under deformation of the mesh, the change in the setup of DEC for a deformed mesh must be contained in the discrete Hodge star matrices. Since such matrices are computed in terms of lengths and areas of oriented elements of the mesh, we will now examine how those ingredients transform under deformation, a problem that was first considered in .

### 4.1 Dual mesh of an arbitrary triangle

In order to explain how to implement DEC for general triangulations, let us consider first a mesh consisting of a single well-centered triangle, as well as its dual mesh (Figure 15).

The dual cells are given as follows:

 ${}[v_{1},v_{2},v_{3}]^{*}=[c]$ ${}[v_{1},v_{2}]^{*}=[p_{1},c]$ ${}[v_{2},v_{3}]^{*}=[p_{2},c]$ ${}[v_{3},v_{1}]^{*}=[p_{3},c]$ ${}[v_{1}]^{*}=[v_{1},p_{1},c,p_{3}]$ ${}[v_{2}]^{*}=[v_{2},p_{2},c,p_{1}]$ ${}[v_{3}]^{*}=[v_{3},p_{3},c,p_{2}]$

Now consider the cell ${\textstyle [v_{3}]^{*}=[v_{3},p_{3},c,p_{2}]}$ subdivided as in Figure 16. Figure 16. The subdivision of a 2-dimensional dual cell of a well-centered triangle

If we deform continuously the triangle ${\textstyle [v_{1},v_{2},v_{3}]}$ to become an obtuse triangle as in Figure 17, we see in Figures 15(a) and 15(b) that the area of the blue subtriangle ${\textstyle [v_{3},c,p_{3}]}$ decreases to 0 and in Figure 15(c) that it is completely outside of the triangle and, therefore, must be assigned a negative sign. The same can be said about the 1-dimensional cell ${\textstyle [p_{3},c]}$, which originally is completely contained in the triangle ${\textstyle [v_{1},v_{2},v_{3}]}$, its size reduces to zero as the triangle is deformed (Figures 15(a) and 15(b)), and eventually it is completely outside the triangle ${\textstyle [v_{1},v_{2},v_{3}]}$ (Figure 15(c)) and a negative sign must be assigned to it. On the other hand, part of the red subtriangle ${\textstyle [v_{3},c,p_{2}]}$ still intersects the interior of the triangle ${\textstyle [v_{1},v_{2},v_{3}]}$ and, therefore, no assignment of sign is needed. Similarly for the segment ${\textstyle [p_{2},c]}$. In terms of numerical simulations, an implementation in terms of determinants contains intrinscally the aforementioned change of signs.

### 4.2 Dual mesh of a general triangulation

Now consider the well-centered mesh and its dual in Figure 18.  (a) (b) Figure 18. (a) Well-centered triangular mesh of hexagon. (b) Dual mesh

Observe the deformation of the blue-colored dual cell ${\textstyle [v_{6}]^{*}}$ in Figure 19(a) as the vertex ${\textstyle v_{0}}$ is moved to make the triangle ${\textstyle [v_{0},v_{6},v_{5}]}$ non-well-centered in Figure 19(b) and the vertex ${\textstyle v_{4}}$ is moved to make the triangle ${\textstyle [v_{4},v_{5},v_{6}]}$ non-well-centered in Figure 19(c).

We have colored in red the part of the dual cell ${\textstyle [v_{6}]^{*}}$ in Figure 16(c) that must have the opposite orientation of the blue-colored part. Similar considerations apply to the edges.

### 4.3. Brief digression in 2D.

In 2D, there is an intuitively clear way of comparing Discrete Exterior Calculus with the Finite Element Method (FEM) and the Finite Volume Method (FVM), both with linear interpolation functions, by considering the circumcenters of the triangles.

• Since the circumcenter of an obtuse triangle lies outside the triangle, the circumcenter cannot be used as control points of an irregular mesh for FVM.
• DEC is capable of using the circumcenter of irregular meshes. While the rigidity matrix generated by DEC works in a similar fashion to that of FEM, the discretized source term generally differs.
• When the elements of the mesh are all regular (the circumcenter of every triangle is in the triangle), DEC, FEM and FVM are very similar.

## 5. Numerical examples

### 5.1 First example

Let us solve the Poisson equation in a circle of radius one under the following conditions (Figure 20):

• heat difussion constant ${\textstyle k=1}$;
• source term ${\textstyle q=-1}$;
• Dirichlet boundary condition ${\textstyle u=10}$.

The exact solution is

 $u(x,y)={\frac {1}{4}}(1-x^{2}-y^{2})+10$ Figure 20. Disk of radius one with difussion constant $k=1$, subject to a heat source $q=-1$

The meshes used in this example are shown in Figure 21 and vary from very coarse to very fine.

The numerical results for the maximum temperature value (${\textstyle u(0,0)=10.25}$) are exemplified in Table 1 where a comparison with the Finite Element Method with linear interpolation functions (FEML) is also shown. The FEML methodology that we used in the comparison can be consulted [2,12,13]. For the sake of completeness in our comparison, here we compute the flux vectors in the same way as in FEML.

Table 1. Maximum temperature and Flux magnitude values in the numerical simulation
 Mesh #nodes #elements Max. Temp. Value Max. Flux Magnitude DEC FEML DEC FEML Figure (a) 9 8 10.250 10.285 0.270 0.307 Figure (b) 17 20 10.250 10.237 0.388 0.405 Figure (c) 41 56 10.250 10.246 0.449 0.453 Figure (d) 713 1304 10.250 10.250 0.491 0.492 Figure (e) 42298 83346 10.250 10.250 0.496 0.496

The temperature distribution and Flux magnitude fields for the finest mesh are shown in Figure 22.  (a) (b) Figure 22. Temperature distribution and Flux magnitude fields for the finest mesh

Figures 23(a), 23(b) and 23(c) show the graphs of the temperature and flux magnitude values along a diameter of the circle for the different meshes of Figures 23(b), 23(c) and 23(d) respectively.

 (a)  (b)  (c)  Figure 23. Temperature and Flux magnitude graphs along a diameter of the circle for different meshes: (a) Graphs for the Mesh in Figure 23(b); (b) Graphs for the Mesh in Figure 23(c); (c) Graphs for the Mesh in Figure 23(d)

As can be seen from Table 1 and Figure 20, DEC behaves very well on coarse meshes. Note that the maximum temperature values calculated with DEC matches the exact theoretical value even on coarse meshes. As expected, the results of DEC and FEML are similar for fine meshes. We would also like to point out the the computational costs of DEC and FEML are very similar.

### 5.2 Second example

In this example, we consider a region in the plane whose boundary consists of segments of a straight line, a circle, a parabola, a cubic and an ellipse (Figure 24).  Figure 24. Region with linear, quadratic and cubic boundary segments, together with boundary conditions

The meshes used in this example are shown in Figure 25 and vary from coarse to very fine.

We set

• the source term ${\textstyle q=20.2}$;
• the heat diffusion constant ${\textstyle k=80.2}$;
• Newmann boundary condition ${\textstyle h=100}$ along the inner elliptical boundary;
• Dirichlet boundary condition ${\textstyle u=10}$ along the external boundary.

The numerical results for the maximum temperature and flux magnitude values are exemplified in Table 2.

Table 2. Numerical simulation results
 Mesh #nodes #elements Max. Temp. Value Max. Flux Magnitude DEC FEML DEC FEML Figure 21(a) 162 268 129.07 128.92 467.22 467.25 Figure 21(b) 678 1223 129.71 129.70 547.87 548.42 Figure 21(c) 9489 18284 130.00 130.00 591.58 591.63 27453 53532 130.01 130.01 597.37 597.38 651406 1295960 130.02 130.02 602.19 602.19

The temperature and flux-magnitude distribution fields are shown in Figure 26.

Figure 27 shows the graphs of the temperature and the flux magnitude along a horizontal line crossing the elliptical boundary for the first two meshes.

As can be seen from Table 2 and Figure 27, the performance of DEC is very similar to that of FEML in this example. As expected, when the mesh is refined, the two methods converge to the same values.

## 6. Conclusions

DEC is a relatively recent discretization scheme for PDE which takes into account the geometric and analytic features of the operators and the domains involved. The main contributions of this paper are the following:

1. We have presented 2D DEC in a simplified manner, avoiding references to the theory of differential forms and motivating geometrically the new operators.
2. We have carried out a numerical comparison between DEC and FEML by solving the 2D Poisson equation on two cirved domains. The numerical experiments show the solutions obtained with DEC on coarse meshes are as good or better as those of FEML. On the other hand, the experiements also show numerical convergence.
3. The computational cost of DEC is similar to that of FEML.

## Acknowledgements

The second named author was partially supported by a grant of CONACYT, and would like to thank the International Centre for Numerical Methods in Engineering (CIMNE) and the University of Swansea for their hospitality. We gratefully acknowledge the support of NVIDIA Corporation with the donation of the Titan X Pascal GPU used for this research.

### Document information Published on 08/02/19
Accepted on 04/10/18
Submitted on 06/06/18

Volume 35, Issue 1, 2019
DOI: 10.23967/j.rimni.2018.11.003

### Document Score 0

Times cited: 1
Views 470
Recommendations 0 