Hitchhiker Guide
Hitchhiker Guide
A BSTRACT. We present the essential ingredients in the Virtual Element Method for a simple linear elliptic
second-order problem. We emphasize its computer implementation, which will enable interested readers
to readily implement the method.
“Don’t Panic.”
– Douglas Adams, The Hitchhiker’s Guide to the Galaxy
1. I NTRODUCTION
The aim of this paper is to present in detail the practical aspects of the implementation of the Virtual
Element Method (VEM) [1, 5, 6, 8, 13, 17].
On the one hand, VEM can be viewed as an extension of Finite Element Methods to general polygonal
and polyhedral elements [11, 21, 29–31, 33–39]. On the other hand, many of its aspects are closely
connected with Finite Volume Methods (see for instance [19, 20, 28, 32]) and in particular with Mimetic
Finite Differences (MFD) [2–4, 7, 10, 12, 14–16, 18, 22, 23, 25–27]. Indeed, for many problems – for
instance in two dimensions and for C 0 elements – the final system matrices are identical for MFD and
VEM. On particular meshes, this correspondence exists between traditional Finite Elements and Finite
Differences.
The strongest aspects in favor of the VEM are its firm mathematical foundations, simplicity in imple-
mentation, and efficiency and accuracy in computations. In particular, for diffusion or reaction-diffusion
problems in two and three dimensions, the VEM permits the analysis to be performed without using any
numerical quadrature formulas.
We begin by considering the model problem of the Poisson equation in two dimensions:
u D f in
(1.1)
u D 0 on @
where is a polygonal domain in R2 . We choose the simple problem posed in (1.1) so that the es-
sential features in the implementation of the VEM can be easily explained. Unlike FEM that only
allow elements that are either triangles or quadrilaterals, we herein admit the decomposition of into
nonoverlapping elements that can be of very general shape (convex or nonconvex polygons).
In Section 2, we introduce the local virtual element space within each element of the decomposition.
This space contains a certain number of polynomials (sufficient to guarantee accuracy), plus a few other
additional functions (typically the solution of a PDE within the element) that are however never required
to be computed. In Section 3, we show how to construct a suitable local stiffness matrix (ensuring the
necessary consistency and stability) without knowing these additional functions but by using only their
degrees of freedom. A crucial ingredient in this operation is the construction of the operator …r (a
projection operator, related to the bilinear form of the problem). We present the details on how to
compute …r using only the degrees of freedom of the space. Once the operator …r is known, the local
element stiffness matrices for problems such as (1.1) are readily constructed. In Section 4 we present two
1 Dipartimento di Matematica, Università di Milano Statale, Via Saldini 50, I-20133 Milano (Italy);
[email protected].
2 IUSS and IMATI-CNR 27100 Pavia, Italy, and KAU, Jeddah, Saudi Arabia; [email protected].
4 Dipartimento di Matematica, Università di Pavia, and IMATI-CNR, 27100 Pavia (Italy); [email protected].
4 Dipartimento di Matematica e Applicazioni, Università di Milano–Bicocca, Via Cozzi 53, I-20153, Milano (Italy);
[email protected].
1
2 BEIRÃO DA VEIGA, BREZZI, MARINI, AND RUSSO
worked examples. We explicitly write the basic ingredients needed to compute the projection operator
…r in the case of a square and of a pentagon.
In the second part of this paper, we shed light on more complex problems. In Section 5, we intro-
duce the second, and possibly even more fundamental operator …0 – the L2 -projection on the space of
polynomials of a certain degree. We show that by just changing the definition and the perspective for
the local spaces Vk .E/ (but not the degrees of freedom and the construction and the use of the operator
…r), the construction of the new operator …0 is realized. The fundamental nature of the operator …0
stems from the fact that the knowledge of the L2 -projection of the additional functions is an extremely
valuable instrument that is needed to solve more complex problems. We illustrate in Section 6 the use
of …0 in the construction of load terms and mass matrix, with the latter arising due to the presence of
a reaction term or for time-dependent problems. In Section 7 we discuss the use of the operator …0 on
every face of a polyhedron, thereby paving the way for an efficient implementation of three-dimensional
VEM. Finally, in Section 8, we provide a few additional remarks on the implementation of VEM for
more general weak forms.
The general level of the presentation is intended for people not necessarily having a strong mathemat-
ical background, but with some experience in implementing the Finite Element Method. A few, more
sophisticated remarks are indicated with a “” and are not strictly necessary for the practical aspects of
the VEM.
The authors wish to thank Professor Sukumar for his valuable comments and suggestions.
1.1. Notation. If D is a subset of Rn , we will denote by xD , hD and jDj the centroid, the diameter, and
the measure of D, respectively. The L2 inner product between two functions u and v defined on D will
be written .u; v/0;D . Let Pk .D/ be the space of polynomials of degree less than or equal to k in D. If
D R2 , we define
.k C 1/.k C 2/
nk WD dim Pk .D/ D ;
2
while for D R3 , we set
.k C 1/.k C 2/.k C 3/
k WD dim Pk .D/ D : (1.2)
6
In two dimensions a boldface Greek letter will indicate a multiindex: ˛ D .˛1 ; ˛2 / with the usual
notation j˛j D ˛1 C ˛2 . If x D .x1 ; x2 /, then x ˛ D x1˛1 x2˛2 . We will denote by m˛ the scaled
monomial of degree equal to j˛j defined by
x xD ˛
m˛ WD : (1.3)
hD
We denote by Mk .D/ the set of scaled monomials of degree less then or equal to k:
Mk .D/ WD f m˛ : 0 j˛j k g :
It is clear that the set Mk .D/ is a basis for Pk .D/. A (non bold) greek letter ˛ will indicate a one-
dimensional index starting from 1 with the natural correspondence
1 $ .0; 0/; 2 $ .1; 0/; 3 $ .0; 1/; 4 $ .2; 0/; 5 $ .1; 1/; ::: (1.4)
We will also write m˛ instead of m˛ . Note that with this convention m.0;0/ D m1 1. From now on,
the statement “degree k” will always mean “degree less than or equal to k” unless explicitly indicated.
In three dimensions, the obvious changes of notation will apply. For ˛ D .˛1 ; ˛2 ; ˛3 / we have
j˛j D ˛1 C ˛2 C ˛3 , and if x D .x1 ; x2 ; x3 / then x ˛ D x1˛1 x2˛2 x3˛3 . Always in three dimensions we
will denote by ˛ the scaled monomial of degree equal to j˛j defined again by
x xD ˛
˛ .x/ WD ; (1.5)
hD
and we denote again by Mk .D/ the set of scaled monomials of degree k. Finally, a (non bold) Greek
letter ˛ will still indicate a one-dimensional index starting from 1, and the natural correspondence this
time goes as
1 $ .0; 0; 0/; 2 $ .1; 0; 0/; 3 $ .0; 1; 0/; 4 $ .0; 0; 1/; 5 $ .2; 0; 0/; :::
THE HITCHHIKER’S GUIDE TO VEM 3
Consider now the change of variable x D hxO (for some given h ¤ 1) from D
b to D, mapping the function
O into the function given (as usual) by .x/ D O .x/ O D O .x= h/. Then it is not difficult to check that
hD D h hb D
and hence
x xD ˛
.x/ D :
hD
This explains why we called the elements of Mk .D/ scaled monomials.
V6
e5 V5
e6
V7 e4 V4
e3
E
e7
E V3
e2
V8 e8
V9 e9
e1
V2
V10 V1
F IGURE 1. A random polygonal mesh Ph for the unit square and a typical polygon E
Remark 2.1. We point out that two consecutive edges are allowed to form a straight angle (180 degrees).
For example, a square with an extra point on each edge is simply regarded as an octagon, as shown in
Fig. 2. In other words, hanging nodes are allowed geometrically in the mesh, but in practice they are not
really hanging.
For each polygon E we define a local finite element space Vk .E/. Roughly speaking, Vk .E/ contains
all polynomials of degree k (which is essential for convergence) plus other functions whose restriction
on an edge is still a polynomial of degree k. Following [5], a function vh 2 Vk .E/ is defined by the
following properties:
i) vh is a polynomial of degree k on each edge e of E, i.e., vhje 2
8
ˆ
Pk .e/;
<
ˆ
: ii) vh on @E is globally continuous, i.e., vhj@E 2 C 0 .@E/;
iii) vh is a polynomial of degree k 2 in E, i.e., vh 2 Pk 2 .E/.
Remark 2.2. Note that a polynomial of degree k satisfies conditions i), ii), and iii) so that Pk .E/ is a
subspace of Vk .E/.
4 BEIRÃO DA VEIGA, BREZZI, MARINI, AND RUSSO
V6
V7 V5
E V8
E V4
V1 V2 V3
F IGURE 2. Hanging nodes are allowed: the central square is treated as an octagon
F IGURE 3. Boundary () and internal () degrees of freedom for k D 2 (left) and
k D 3 (right)
In [5] it is shown that we can take the following degrees of freedom in Vk .E/:
the value of vh at the vertices of E
8
ˆ
on each edge e, the value of vh at the k 1 internal points of
ˆ
ˆ
ˆ
ˆ
the .k C 1/-point Gauss-Lobatto quadrature rule on e;
ˆ
ˆ
ˆ
ˆ
< the moments up to order k 2 of vh in E:
ˆ
1
Z (2.1)
v m ; ˛ D 1; : : : ; n
ˆ
h ˛ k 2
ˆ
jEj E
ˆ
ˆ
ˆ
ˆ
ˆ
: where the scaled monomials m˛ are defined in (1.3) and (1.4)
ˆ
ˆ
ˆ
and nk 2 D dim Pk 2 .E/.
As a consequence, the dimension of Vk .E/ is
.k 1/k
dim Vk .E/ D N V C N V .k 1/ C nk 2 D N V k C ;
2
where we recall that N V is the number of vertices (and edges) of the polygon E. We will refer to the
first and to the second set of degrees of freedom as boundary degrees of freedom, and to the third set as
internal degrees of freedom, see Fig. 3.
Remark 2.3. There are no internal degrees of freedom in the case k D 1. In this case, the space V1 .E/
corresponds to the well-known polygonal finite element method with harmonic barycentric coordinates
(see [33]). However, as we shall see, the construction of the stiffness matrix for the VEM is different.
Remark 2.4. The choice of the internal Gauss-Lobatto quadrature points on each edge is not manda-
tory; in fact, we could have used the uniformly spaced points or even the (scaled) moments up to degree
k 2, or more generally, any set of parameters that, together with the vertex values, identify a unique
THE HITCHHIKER’S GUIDE TO VEM 5
polynomial of degree k on each edge. Our option has the obvious advantage that we can compute the
integral of a polynomial of degree 2k 1 on each edge directly from its k C 1 degrees of freedom on that
edge, and this feature will greatly simplify the exposition and the actual implementation of the method.
Remark 2.5. In the framework of Remark 1.1, assume again that we have a domain D b and the change
of variable x D hxO (for some given h ¤ 1) that maps the domain D b into the domain D. Assume now
O
that for a given and a given ˛ we have
!˛
1 xO xOb
Z
O .x/ D
O dxO D 1:
jDj
b b D hb
D
Then it is not difficult to check that, setting again .x/ D O .x/ O O .x= h/ for all x 2 D, we also have
˛
1
Z
x xD
.x/ dx D 1:
jDj D hD
We express this property by saying that the degrees of freedom
x xD ˛
1
Z
7! .x/ dx
jDj D hD
scale as 1. We notice that all the degrees of freedom in (2.1) scale as 1.
We number the degrees of freedom from 1 to N dof WD dim Vk .E/ and we define the operator dofi
from Vk .E/ to R as
dofi .vh / WD i -th degree of freedom of vh ; i D 1; : : : ; N dof :
The basis functions 'i 2 Vk .E/ are defined as usual as the canonical basis functions:
dofi .'j / D ıij ; i; j D 1; : : : ; N dof ; (2.2)
so that we have a Lagrange-type interpolation identity:
N dof
X
vh D dofi .vh / 'i for all vh 2 Vk .E/: (2.3)
i D1
The boundary degrees of freedom identify on each edge a unique polynomial of degree k. Hence, we
can define the global finite element space Vh H01 ./ as
Vh WD fvh 2 H01 ./ : vhjE 2 Vk .E/ for all E 2 Ph g
with the following global degrees of freedom for vh :
the value of vh at the internal vertices of the decomposition;
8
ˆ
on each internal edge e, the value of vh at the k 1 internal points of
ˆ
ˆ
ˆ
ˆ
< the .k C 1/-point Gauss-Lobatto quadrature rule on e;
ˆ
for each polygon E, the moments up to order k 2 of vh in E: (2.4)
ˆ
ˆ
1
ˆ
ˆ Z
vh m˛ ; ˛ D 1; : : : ; nk 2 :
ˆ
ˆ
:
jEj E
3. C OMPUTATION OF THE LOCAL STIFFNESS MATRIX
We want to compute the local stiffness matrix KE of the Laplace operator in the polygon E, i.e.,
KE ij D r'i ; r'j 0;E ; i; j D 1; : : : ; N dof ;
(3.1)
where 'i 2 Vk .E/ is defined by (2.2). An obvious but very expensive way would be to choose a quadra-
ture formula on E, and then use some approximation for the values of the gradient of the basis functions
'i at the integration nodes in order to compute an approximation of .KE /ij . The VEM approach is
completely different: it does not require neither the use of quadrature formulas nor an approximate ex-
pression of the basis functions. Nevertheless, the final output will be a matrix KhE whose associated
bilinear form is exact (up to machine precision) whenever one of the two entries is a polynomial of
degree k. This will allow to retain the optimal approximation properties of the space Vk .E/ (see [5]).
6 BEIRÃO DA VEIGA, BREZZI, MARINI, AND RUSSO
The explicit computation of the basis functions 'i is actually not needed and this is the reason of the
word “Virtual” in VEM.
3.1. The projection operator …r. We begin by defining a projection operator
…r
E;k W Vk .E/ ! Pk .E/
which will play a fundamental role in the rest of the paper. For the sake of simplicity, the subscripts E
and/or k will be omitted when no confusion can arise.
The operator …r is defined for every vh 2 Vk .E/ by the following orthogonality condition:
rpk ; r …rvh vh D 0 for all pk 2 Pk .E/: (3.2)
0;E
As it can be easily seen, condition (3.2) defines …rvh only up to a constant; this is fixed by prescribing
a projection operator onto constants P0 W Vk .E/ ! P0 .E/ and requiring
P0 …rvh vh D 0:
(3.3)
Many options are possible for P0 . Here we choose
N V
1 X
P0 vh WD V vh .Vi / for k D 1 (3.4a)
N
i D1
1
Z
P0 vh WD vh for k 2: (3.4b)
jEj E
The reasons for this choice will be explained later on. We will now show how to actually compute …rvh
for a given vh 2 Vk .E/ using only the degrees of freedom of vh . Since Mk .E/ is a basis for Pk .E/, in
equation (3.2) we can let pk vary only in Mk .E/:
rm˛ ; r …rvh vh D 0; ˛ D 1; : : : nk ; (3.5)
0;E
and since …rv h is an element of Pk .E/ we can represent it in the basis Mk .E/:
nk
X
r
… vh D s ˇ mˇ : (3.6)
ˇ D1
* Remark 3.1. The use of the scaled monomials Mk .E/ is essential in the definition of the degrees of
freedom (2.1). On the contrary, in (3.6) and in the sequel we could use any basis for Pk .E/. Neverthe-
less, for the sake of simplicity we will always keep using the basis Mk .E/.
Equation (3.5) becomes:
nk
X
s ˇ rm˛ ; rmˇ
0;E
D rm˛ ; rvh 0;E
; ˛ D 1; : : : nk (3.7)
ˇ D1
which is a linear system of nk equations in the nk unknowns s ˇ D s ˇ .vh /. The indeterminacy of (3.2)
is reflected here in the fact that for ˛ D 1, which corresponds to m˛ 1, equation (3.7) is the identity
0 D 0. Condition (3.3) adds one linear equation that eliminates this indeterminacy:
nk
X
s ˇ P0 mˇ D P0 vh : (3.8)
ˇ D1
The linear system arising from (3.7) and (3.8) can then be written as follows:
32 1 3 2
P0 m1 P0 m2 ::: P0 mnk P0 vh
2 3
s
rm2 ; rm2 0;E : : : rm2 ; rmnk 0;E 7 6 27 6
7 6 s 7 6 rm2 ; rvh 0;E 7
6 0 7
7 6 :: 7 D 6 7;
6
6 :: :: :: :: ::
4 : : : : 54 : 5 4 : 5
n
0 rmnk ; rm2 0;E : : : rmnk ; rmnk 0;E s k rmnk ; rvh 0;E
or, in compact way,
Gs D b (3.9)
THE HITCHHIKER’S GUIDE TO VEM 7
where
P0 m1 P0 m2 ::: P0 mnk
2 3
6 0 rm2 ; rm2 0;E ::: rm2 ; rmnk 0;E 7
G WD 6 :: (3.10)
6 7
:: :: :: 7
4 : : : :
5
0 rmnk ; rm2 0;E ::: rmnk ; rmnk 0;E
and
P0 vh
2 3
6 rm2 ; rvh 0;E 7
b WD 6 7: (3.11)
6 7
::
4 :
5
rmnk ; rvh 0;E
The matrix G in (3.10) is computable because we assume to be able to compute integrals of polynomials
on E. Hence, to compute …rvh , we only need to show that the right-hand side of (3.9) (that is, the
vector b in (3.11)) is computable from of the degrees of freedom of vh .
By the definitions (3.4a) and (3.4b) for the projector P0 , it is clear that in both cases, k D 1 and k 2,
we can compute P0 vh (the first component of the right-hand side (3.11)) from the degrees of freedom of
vh . Concerning the other components of (3.11), we have, integrating by parts:
@m˛
Z Z
rm˛ ; rvh 0;E D m˛ vh C vh : (3.12)
E @E @n
We examine separately the two terms.
Since m˛ 2 Pk 2 .E/, the first term can be computed from the internal degrees of freedom of vh . In
fact, writing m˛ as a linear combination of the mˇ ,
nX
k 2
m˛ D d˛ˇ mˇ ;
ˇ D1
we have
Z nX
k 2 Z nX
k 2
Concerning the second term, we observe that the integrand is a polynomial of degree .k 1/Ck D 2k 1
on each edge e so it can be integrated exactly by evaluating it at the Gauss-Lobatto quadrature points
(including the extrema of the edge). This can be done easily because the values of vh at these points are
precisely the boundary degrees of freedom of vh .
Remark 3.2. We note that in the calculation of the two terms in (3.12), and thus in the construction of the
above matrices and vectors, we never used the requirement that functions in Vk .E/ have the Laplacian
in Pk 2 .E/. The reason for this assumption is mainly to fix the dimension of the space Vk .E/.
3.2. Computation of …r'i . For each basis function 'i , we define si˛ as the coefficients of …r'i in the
basis m˛ :
Xnk
…r'i D si˛ m˛ ; i D 1; : : : N dof : (3.13)
˛D1
The coefficients si˛ are solutions of the system (3.9) with 'i in place of vh in the right-hand side:
32 1 3 2
P0 m1 P0 m2 ::: P0 mnk P0 'i
2 3
si
rm2 ; rm2 0;E : : : rm2 ; rmnk 0;E 7 6 27 6
7 6 si 7 6 rm2 ; r'i 0;E 7
6 0 7
D 7;
6
6 :: :: :: :: : ::
5 4 :: 5 4
7 6 7 6
4 : : : : : 5
nk
0 rmnk ; rm2 0;E : : : rmnk ; rmnk 0;E si rmnk ; r'i 0;E
or, in compact form,
1 .i /
s .i / D G b :
8 BEIRÃO DA VEIGA, BREZZI, MARINI, AND RUSSO
dof
6 rm2 ; r'1 0;E ::: rm2 ; r'N dof 0;E 7
B WD b .1/ b .2/ : : : b .N / D 6
7; (3.14)
6 7
:: :: ::
4 : : :
5
rmnk ; r'1 0;E ::: rmnk ; r'N dof 0;E
the matrix representation …r r
of the operator … acting from Vk .E/ to Pk .E/ in the basis Mk .E/ is
˛
given by .…r /˛i D si , that is,
…r 1
D G B: (3.15)
We will also need the matrix representation, in the canonical basis (2.2), of the same operator …r, this
time thought as an operator Vk .E/ ! Vk .E/. Hence, let
N dof
j
X
r
… 'i D i 'j ; i D 1; : : : N dof ;
j D1
with
j
i D dofj …r'i :
so that
nk
j
X
i D si˛ dofj .m˛ /: (3.16)
˛D1
In order to express (3.16) in matrix form, we define the N dof nk matrix D by:
Di ˛ WD dofi .m˛ /; i D 1; : : : ; N dof ; ˛ D 1; : : : ; nk ;
that is, 2 3
dof1 .m1 / dof1 .m2 / ::: dof1 .mnk /
6 dof2 .m1 / dof2 .m2 / ::: dof2 .mnk / 7
DD6 7: (3.17)
6 7
:: :: :: ::
4 : : : : 5
dofN dof .m1 / dofN dof .m2 / : : : dofN dof .mnk /
Equation (3.16) becomes:
nk
j
X
1 1
i D .G B/˛i Dj˛ D .DG B/j i :
˛D1
Hence, the matrix representation …r of the operator …r W Vk .E/ ! Vk .E/ in the canonical basis
(2.2), is given by
…r D DG 1 B D D…r : (3.18)
Remark 3.3. We point out that G can be expressed in terms of D and B as
G D BD: (3.19)
In fact:
for ˛ D 1:
PN dof PN dof PN dof
i D1 B1i Diˇ D i D1 P0 'i dofi .mˇ / D P0 i D1 dofi .mˇ /'i D P0 .mˇ / D G1ˇ I
for ˛ 2:
PN dof PN dof
i D1 B˛i Diˇ D i D1 .rm˛ ; r'i /0;E dofi .mˇ / D
PN dof
rm˛ ; r i D1 dofi .mˇ /'i 0;E D rm˛ ; rmˇ 0;E D G˛ˇ ;
THE HITCHHIKER’S GUIDE TO VEM 9
and we can conclude that G D BD. In the implementation of the VEM it might be convenient to compute
directly the matrix G by (3.10) and then use identity (3.19) to check the correctness of the code.
3.3. Construction of the local stiffness matrix. At this point we can write the VEM local stiffness
matrix KhE for the polygon E. Using the projector …r, we write 'i as
'i D …r'i C .I …r/'i
and we plug it into (3.1) obtaining, after expansion,
KE ij D r…r'i ; r…r'j C r I …r 'i ; r I …r 'j
C
0;E 0;E
r…r'i ; r I …r 'j C r I …r 'i ; r…r'j :
0;E 0;E
Since the last two terms are zero by the definition of …r, we obtain the following expression for KE :
KE ij D r…r'i ; r…r'j 0;E C r I …r 'i ; r I …r 'j
: (3.20)
0;E
The first term ensures consistency and must be computed exactly, while the second term ensures stability
and can be approximated. In [5] it is shown that we can take for the second term the following rough
approximation
N dof
X
r r
r I … 'i ; r I … 'j dofr I …r 'i dofr I …r 'j ; (3.21)
0;E
rD1
where G
e is the matrix that coincides with G (see (3.10)) except for the first row which is set to zero, and
r
… is defined in (3.15). From the computation above we have
dofr I …r 'i D .I …r /T i r
and finally
N dof
X h i
dofr I …r 'i dofr I …r 'j D .I …r /T .I …r / : (3.24)
ij
rD1
10 BEIRÃO DA VEIGA, BREZZI, MARINI, AND RUSSO
We end up with the following matrix expression for the VEM local stiffness matrix:
KhE D .…r Te r
/ G .… / C .I …r /T .I …r / : (3.25)
Remark 3.5. The matrices B; D and G D BD depend only on the shape of the polygon E and not on
its size. Therefore, any transformation that preserves the shape of E will have no effect on the matrices
B; D; G and thus also on the stiffness matrix KhE . Note that this same observation does not apply, for
instance, in three dimensions or for higher order problems.
* Remark 3.6. As shown in [5], we can multiply the stabilization term (3.24) by a factor E and still
achieve the optimal convergence results if
0 < E
where the two constants and are independent of h.
* Remark 3.7. The VEM stiffness matrix KhE in general is not close to the exact stiffness matrix KE ;
actually .KhE /ij is not meant to be an approximation of .KE /ij in the standard sense. This notwith-
standing, thanks to the first term in (3.20), the VEM solution retains the optimal accuracy of the space
Vh .
3.4. The case k D 1. In the case k D 1 we can easily give an “intrinsic” formula for …rvh . Since the
gradient of a polynomial of degree 1 is a constant vector, equation (3.2) becomes
Z
r
jEj rp1 r.… vh / D rp1 rvh ; (3.26)
E
and by taking p1 D x1 , p1 D x2 we easily see that (3.26) is equivalent to
1
Z
r
g.vh / WD r.… vh / D rvh : (3.27)
jEj E
Hence,
…rvh D x g.vh / C c; (3.28)
where c is a constant function that depends on vh . From this expression we can readily compute the
consistency term of the VEM stiffness matrix (3.22). In fact, by (3.27), equation (3.23) in this case
becomes
r…r'i ; r…r'j 0;E D jEj g.'i / g.'j /:
giving
…rvh D .x V / g.vh / C v h :
Applying this formula to vh D 'i , using (3.29), and since ' i D 1=N V , we end up with the following
formula:
1 1
…r'i D .x V / d? i C :
2jEj NV
Hence,
1 1
…r D dofr .…r'i / D …r'i .Vr / D .Vr V / d?
i C (3.31)
ri 2jEj NV
so that
1 1
I …r D dofr I …r 'i D ıi r .Vr V / d?i ; (3.32)
ri NV 2jEj
from which we can easily obtain the stability term (3.24).
3.5. Reviewing the whole procedure. We summarize here the calculation of the local VEM stiffness
matrix KhE .
Compute the matrices B, D, and G D BD given in (3.14), (3.17), and (3.10), respectively.
Compute the matrices corresponding to the projection operators:
…r
DG
1
B; …r D D…r
:
Finally compute the matrix
KhE D .…r Te r
/ G .… / C .I …r /T .I …r /;
where we recall that G
e is the matrix that coincides with G except for the first row which is set
to zero.
4. T WO WORKED EXAMPLES
In this section we will present two worked examples in which we compute the matrices B, D and G
for a given polygon in the cases k D 1 and k D 2. We consider the unit square Œ0; 1 Œ0; 1 and the
pentagon E depicted in Fig. 4. In Fig. 5 we show the degrees of freedom for the pentagon when k D 1
and k D 2. As noted in Remark 3.5, we would get the same results for any polygon obtained by rotation
and dilation of our square and our pentagon.
4.5
V5 V4
4
3.5
V1 D (0,0)
V2 D (3,0)
3 V3 D (3,2)
V4 D (3/2,4)
2.5 V5 D (0,4)
V3
2
xE D (19/14,38/21)
xE
1.5
hE D 5
1
jEj D 21/2
0.5
0
V1 V2
−0.5
−0.5 0 0.5 1 1.5 2 2.5 3 3.5
5 4 5 9 4
3 10 3
11
1 2 1 6 2
4.1. VEM matrices p for the unit square. Set d equal to the ratio between the diagonal and the edge of
the square, i.e. d= 2.
case k D 1
We show for k D 1 the matrices B, D, and G D BD defined respectively in (3.14), (3.17), and (3.10).
" # 2 4 -d -d 3 " #
1 1 1 1 1 1 4 4 d -d 5 1 2 0 0
B= -d d d -d , D= , G= 0 1 0 .
4 4 4 d d 2 0 0 1
-d -d d d
4 -d d
Since on a square harmonic functions are bilinear polynomials, the exact local stiffness matrix K
defined in (3.1) (or in (3.20)) coincides with the stiffness matrix obtained from the classical bilinear
finite elements. Instead, in agreement with Remark 3.7, the approximate VEM-matrix Kh given in
(3.22) is not close to K , as shown here below:
2 8 -2 -4 -2 3 2 9 -3 -3 -3 3
1 4 -2 8 -2 -4 5 1 4 -3 9 -3 -3 5.
K D , Kh D
12 -4 -2 8 -2 12 -3 -3 9 -3
-2 -4 -2 8 -3 -3 -3 9
case k D 2
2 0 0 0 0 0 0 0 0 12
3
6 -d d d -d 0 4d 0 -4d 0 7
1 6 -d -d d d -4d 0 4d 0 0 7
B= 6
6 1
7
12 4 1 1 1 0 4 0 4 -12 7
5
1 -1 1 -1 0 0 0 0 0
1 1 1 1 4 0 4 0 -12
2 24 -6d -6d 3 3 3 3
6 24 6d -6d 3 -3 3 7 2 24 0 0 1 0 1
3
6 24 6d 6d 3 3 3 7
6
24 -6d 6d 3 -3 3
7 6 0 12 0 0 0 0 7
1 6 7 1 6
6 0 0 12 0 0 0 7
D= 7, G=
6 7
6 24 0 -6d 0 0 3 7
24 6 24 6d 4 0 0 0
24 6 2 0 0 7
0 3 0 0
7 5
6
6 24
7 0 0 0 0 1 0
0 6d 0 0 3 7
4 5 0 0 0 0 0 2
24 -6d 0 3 0 0
24 0 0 1 0 1
THE HITCHHIKER’S GUIDE TO VEM 13
case k D 1
2 1470 -399 -532 3
" #
1 4 4 4 4 4 1 6 1470 483 -532 7
B= 8 4 8 4 -8 , D= 6 1470 483 56 7
20 -6 -6 3 6 3 1470 4 1470 42 644
5
" # 1470 -399 644
1 1050 30 40
G= 0 441 0
1050 0 0 441
case k D 2
1
B=
88200
0 0 0 0 0 0 0 0 0 0 88200
2 3
6 -11760 5880 11760 5880 -11760 0 23520 23520 0 -47040 0 7
6
6 -8820 -8820 4410 8820 4410 -35280 0 17640 17640 0 0 7
7
6
4 6384 3864 7728 336 6384 0 15456 8400 0 25536 -74088 75
6650 -5026 1897 2828 -6349 -1008 -3808 8750 -2142 -1792 0
6384 6384 336 7728 3864 25536 0 8400 15456 0 -74088
5. T HE L2 - PROJECTOR
Suppose that we are given the degrees of freedom of a function vh 2 Vk .E/. In the previous sections
we have shown that we can recover the following information about the function vh :
( the pointwise value of v on the edges of the polygon E;
h
the L2 -projection of vh on the space of polynomials of degree k 2; (5.1)
the projection …rvh on the space of polynomials of degree k.
It has beenR shown in [1, 5, 6] how to compute from (5.1) an approximation bhE of the local load term
.bE /i WD E f 'i which ensures that the resulting VEM solution uh satisfies the optimal error estimates
However, the information in (5.1) is not sufficient in slightly more complicated situations, like for in-
stance the presence of a time-dependent term or a zero-order term in the equation. In fact, in this case
we would need to compute a good approximation of the local mass matrix
Z
.ME /ij WD 'i 'j ;
E
and the information in (5.1) is not enough, both for accuracy and stability reasons.
In this Section we present an enhanced version of the Virtual Element Method that will allow us to
compute, using only the degrees of freedom, the full L2 projection on Pk .E/ of any function vh 2
Vk .E/. This possibility greatly increases the number of situations in which the VEM can be used,
including a simple treatment of the load term, the presence of other terms in the differential equation,
and the extension to three-dimensional problems.
5.1. Definition and properties of the L2 -projector. The idea here is to compute the L2 -projection
…0E;k vh onto the space of polynomials Pk .E/ of every function vh 2 Vk .E/ using (again) only the
degrees of freedom of vh . Also in this case we will simply write …0 , …0E or …0k when no confusion can
arise.
To this aim, we recall that for every function vh 2 Vk .E/ (and, actually, for every function in L2 .E/)
the polynomial …0 vh is defined by the orthogonality conditions
pk ; …0 vh vh 0;E D 0; pk 2 Pk .E/:
(5.2)
Proceeding as before, we define the matrix
H˛ˇ WD m˛ ; mˇ 0;E
˛; ˇ D 1; : : : ; nk (5.3)
Then, mimicking what we did for the operator …r, we define the nk -vectors t and c with components,
respectively, t ˛ and
c ˛ WD m˛ ; vh 0;E :
(5.5)
Using this notation (namely (5.4), (5.3), and (5.5)) we can re-write (5.2) as
1
Ht D c that is t DH c; (5.6)
and we have just to compute c in (5.5) using only the degrees of freedom of vh . This looks clearly
impossible. In particular, in (2.1), for k D 1 we have no internal degrees of freedom at all for vh , for
k D 2 we have only m1 ; vh 0;E 1; vh 0;E , and for a general k we have the moments (to be used in
(5.5)) only for the monomials m˛ in Pk 2 .E/. No way...
The escape from this (apparent) cul-de-sac is given, once more, by the operator …r. Indeed, we recall
first that we have been able to compute …rvh , for every vh 2 Vk .E/, using only the degrees of freedom
of vh . Then we point out that, for every vh 2 Vk .E/, both …rvh and …0 vh are good approximations
of vh , and coincide with vh whenever vh is a polynomial in Pk .E/. Hence, they must be close to each
other. So the idea could be to replace (5.5), for the monomials m˛ of degree k and k 1, by:
c ˛ WD m˛ ; …rvh 0;E
(5.7)
which is computable from the degrees of freedom of vh . In so doing, we are apparently introducing
some small mistakes in the computation. Instead, we will show now that this is not the case. We do that
by imagining new spaces Wk .E/ that share all the previous good properties of Vk .E/, i.e.,
the elements of Wk .E/ are polynomials of degree k on each edge of E;
Wk .E/ contains Pk .E/;
in Wk .E/ we can use the same degrees of freedom used in Vk .E/,
THE HITCHHIKER’S GUIDE TO VEM 15
according to whether you need to represent …0 wh in the monomial basis m˛ (of Pk .E/) or in
the VEM basis 'i of Wk .E/.
Remark 5.2. As the final result depends only on the degrees of freedom, we might also think that the
above function is, somehow, “the L2 .E/ projection of the degrees of freedom”.
5.2. The cases k D 1 and k D 2. If k D 1 or k D 2, we can easily see that …r D …0 .
k D 1:
…0 vh is defined by equation (5.2):
p1 ; …0 vh
0;E
D p1 ; vh 0;E
; p1 2 P1 .E/;
and condition (5.8) in this case is equivalent to
p1 ; …rvh 0;E D p1 ; vh 0;E ;
p1 2 P1 .E/:
Hence …r D …0 .
k D 2:
Condition (3.3) and definition (3.4b) imply
1; …rvh
0;E
D 1; vh 0;E
which, together with (5.8), shows that
p2 ; …rvh
0;E
D p2 ; vh 0;E
; p2 2 P2 .E/:
Hence, by (5.2) we conclude that …r D …0 .
16 BEIRÃO DA VEIGA, BREZZI, MARINI, AND RUSSO
Remark 5.3. At this point it is clear why we made the choice (3.4b) instead of (3.4a) for k 2.
5.3. Construction of the L2 -projection of the basis functions. In the code, you will need to compute
the L2 .E/-projection of each basis function 'i in Wk .E/, and the corresponding matrices …0 and …0
that give the projection in terms of the monomial basis or in terms of the VEM basis, respectively.
The former is
nk
ˇ
X
…0 ˛i WD t ˛ .'i / D H 1 ˛ˇ ci D H 1 C ˛i
(5.9)
ˇ D1
where H is given in (5.3), and C is the nk dof
N matrix
(
m˛ ; 'i 0;E if 1 ˛ nk 2
C˛i WD m˛ ; 'i 0;E D (5.10)
m˛ ; …r'i 0;E
if nk 2 C 1 ˛ nk
for i D 1; : : : ; N dof and ˛ D
1; : : : ; nk . The definition of C in (5.10) can also be expressed by saying
that the coefficients m˛ ; 'i 0;E have been written using (5.7) when m˛ has a degree bigger than k 2,
and (5.5) otherwise. Note that this means that
1
C˛i D .HG B/˛i when m˛ has degree k 1 and k:
The latter instead is
nk
X
0
Dj˛ …0 1
… ji
WD ˛i
D DH C ji (5.11)
˛D1
where D is always defined in (3.17). Note that, in particular, from (5.4) and (5.9) we also have
nk
X nk
X
0 ˛
…0
… 'i D t .'i /m˛ D ˛i
m˛ : (5.12)
˛D1 ˛D1
Remark 5.4. The structure of the matrix C can be easily described as follows:
if ˛ is between 1 and nk 2 , then C˛i D 0 except for i D kN V C ˛ (corresponding to the ˛-th
internal degree of freedom) for which C˛i D jEj;
if ˛ is between nk 2 C 1 and nk (corresponding to scaled monomials of degree k 1 and k)
then
C˛i D .H…r 1
/˛i D .HG B/˛i :
ZE (6.2)
h 0
bE i WD f …k 2 'i for k 3:
E
We remark that using (6.2) instead of (6.1) produces a larger approximation error, notwithstanding the
convergence curves retain the same (optimal) slope. We finally observe that a different approximation of
the load term was proposed initially in [5]; such an approximation coincides with that given in (6.2) for
k 3 but not for k D 1; 2. The present choice is better as it guarantees an optimal rate of convergence
THE HITCHHIKER’S GUIDE TO VEM 17
in the L2 norm also for k D 2. A different, but in the end equivalent, presentation of (6.1) for k D 2
was proposed in [6].
6.2. Approximation of the local mass matrix ME . In this section we show how to compute the VEM
approximation MhE of the local mass matrix
Z
.ME /ij D 'i 'j :
E
Mimicking what we did in Subsection 3.3 for the local stiffness matrix, we use the identity
to obtain
Z Z Z
0 0
.ME /ij D 'i 'j D … 'i … 'j C .I …0 /'i .I …0 /'j C
E E E
Z Z
…0 'i .I …0 /'j C .I …0 /'i …0 'j : (6.3)
E E
the last two terms in (6.3) are zero and we end up with the identity
Z Z
.ME /ij D … 'i … 'j C .I …0 /'i .I
0 0
…0 /'j :
E E
As before, the first term ensures consistency and must be computed exactly, while the second one guar-
antees stability and, as shown in [1], can be approximated by
Z N dof
X
0 0
…0 'i dofr …0 'j ;
.I … /'i .I … /'j jEj dofr I I
E rD1
where jEj is, as usual, the area of the polygon E. Then, using (5.12), we have
Z nk X
X nk Z
…0 'i …0 'j D .…0 /˛i .…0 /ˇj m˛ mˇ D ..…0 /T H…0 /ij D .CT H 1
C/ij
E ˛D1 ˇ D1 E
and
Z
.I …0 /'i .I …0 /'j jEj Œ.I …0 /T .I …0 /ij : (6.4)
E
The final formula for the local VEM mass matrix is
MhE D CT H 1
C C jEj.I …0 /T .I …0 / ; (6.5)
where the matrices C; H and …0 were introduced in equations (5.10), (5.3) and (5.11), respectively.
* Remark 6.2. Note that, as already discussed in Remark 3.4, the integral of 'i 'j on an element E
scales like the area of E. This justifies the choice (6.4) for the stabilizing term.
* Remark 6.3. We point out that the stabilization term (6.4) for the local mass matrix is only needed
when the equation is reaction-dominated.
* Remark 6.4. Also in this case we can multiply the stabilization term (6.4) by a factor which stays
bounded with h. See Remark 3.6.
18 BEIRÃO DA VEIGA, BREZZI, MARINI, AND RUSSO
Remark 7.2. As for polygons, there are no internal degrees of freedom in the case k D 1. However
in three dimensions we do not recover exactly the harmonic barycentric coordinates (see [9]), as our
functions are not harmonic, in general, on the faces (see iii)’ in Remark 5.1). This however will allow
us to satisfy, also in 3D, the patch-test exactly.
As we did before, we number the degrees of freedom from 1 to NPdof WD dim Vk .P / and we define
the operator dofi from Vk .P / to R as
dofi .vh / WD i -th degree of freedom of vh ; i D 1; : : : ; NPdof :
The basis functions 'i 2 Vk .P / are defined as usual as the canonical basis functions:
dofi .'j / D ıij ; i; j D 1; : : : ; NPdof ;
so that we have a Lagrange-type interpolation identity:
NPdof
X
vh D dofi .vh / 'i for all vh 2 Vk .P /:
i D1
Now we can define the global finite element space Vh as
Vh WD fvh 2 H01 ./ : vhjE 2 Vk .P / for all P 2 Ph g
with the following global degrees of freedom for vh :
i) the value of vh at the internal vertices of the decomposition;
8
ˆ
ˆ ii) on each internal edge e, the value of vh at the k 1 internal points
ˆ
ˆ
ˆ
of the .k C 1/-points Gauss-Lobatto quadrature rule on e;
ˆ
ˆ
ˆ
ˆ
iii) for each internal face f , the moments up to order k 2 of vh in f :
ˆ
ˆ
ˆ
ˆ
< Z
vh m˛ ; ˛ D 1; : : : ; nk 2 I (7.3)
ˆ
ˆ
ˆ
ˆ f
ˆ
ˆ
ˆ
ˆ
ˆ iv) for each polygon P , the moments up to order k 2 of vh in P :
ˆ
ˆ Z
ˆ
ˆ
: vh ˛ ; ˛ D 1; : : : ; k 2 :
P
7.3. Guidelines for constructing the stiffness matrix. First of all, we point out that, on each internal
face f of the decomposition Ph , the degrees of freedom i) – iii) in (7.3) identify, in a unique way, a
function vhjf 2 Wk .f /. Then one can, proceeding as in Section 5.1, construct the projection operator
…fr applied to vh (and then, if necessary, its L2 .f /-projection).
Now, for each polyhedron P 2 Ph , and for each vh in Vk .P / we can proceed as in Subsection 3.1
r
and construct …P vh defined by
8
< rpk ; r …r vh vh D 0 for all pk 2 Pk .P /;
P
0;P
r
P0 …P vh vh D 0;
:
where, here too, P0 is a projection operator onto constant functions, that we choose (following the 2D
case) as
V
NP
1 X
P0 vh WD vh .Vi / for k D 1 (7.4a)
NPV i D1
1
Z
P0 vh WD vh for k 2: (7.4b)
jP j P
Note that, integrating by parts as in (3.12), we have again, for every pk 2 Pk .P /,
@pk
Z Z
rpk ; rvh 0;P D pk vh C vh : (7.5)
P @P @n
Since pk 2 Pk 2 .P /, the first term can again (for k > 1) be computed using the degrees of freedom
iv) of (7.2). The second term, instead, cannot be computed directly from the degrees of freedom iii) of
20 BEIRÃO DA VEIGA, BREZZI, MARINI, AND RUSSO
@pk
(7.2), since on each face f of @P , is in Pk 1 .f /, but the choice of using vhjf 2 Wk .f / allows us
@n
to compute the moments of order k 1 and k as well, as in (7.1).
r
Once we know how to compute …P vh for vh 2 Vk .P /, we can follow step by step the path of the
two-dimensional case.
7.4. Reviewing the whole procedure. We summarize here the main steps of the whole procedure.
For each face f :
we compute the matrices: Gf as in (3.10), Bf as in (3.14), and Df as in (3.17). Note that Gf
can be obtained as Bf Df as done in (3.19). However an independent computation from (3.10)
could be a very valuable check of the code;
from the matrices Gf , Bf , and Df , we can compute the matrix …fr as in (3.18);
given …fr , we know the moments up to order k 1 of each basis function 'i : using the original
degrees of freedom iii) of (7.2) for the moments of order up to k 2, and those of …fr 'i for the
moments of order k 1.
With this information we can use (7.5) to compute r'i ; r˛ 0;P for all basis functions 'i 2 Vk .P /
and for all ˛ 2 Mk .P /. Next, following the 2D track:
We compute the matrices
P0 1 P0 2 ::: P0 k
2 3
6 0 r2 ; r2 0;P ::: r2 ; rk 0;P 7
GP WD 6 ::
6 7
:: : : :: 7
4 : : : :
5
0 rk v; r2 0;P : : : rk ; rk 0;P
2 3
P0 '1 ::: P0 'N dof
P
6 r ; r' :::
r2 ; r'N dof 0;P 7
6 2 1 0;P 7
P
BP D 6 :: :: :: 7;
: : :
6 7
4 5
rnk ; r'1 0;P : : : rnk ; r'N dof 0;P
P
Obviously, also in this case we have the useful relationship (3.19), i.e. GP D BP DP .
Finally, we compute the VEM local stiffness matrix as
h
KP D .…r Te r
;P / GP .…;P / C hP .I
r T
…P / .I r
…P / (7.6)
following the strategy shown above. Note that the space Vk .E/ in this section is more general with
respect to that in Section 2 and may represent also vector valued functions. Although the global bilinear
form A (defined on the whole space V ) is supposed to be positive definite, its local counterpart AE could
easily be only positive semidefinite. This happens, for instance, in the case of the Laplace operator, both
for VEM and for classical FEM. We therefore introduce ker.AE / as the kernel of the local bilinear form
AE n o
ker.AE / D v 2 VjE W AE .v; v/ D 0 :
We assume that we have a polynomial space Pk .E/ that can provide, in E, a sufficiently good approx-
imation of the solution u of our problem. We make the following two assumptions (with the obvious
modifications for the vector valued case):
(C1) It holds
ker.AE / Pk .E/ Vk .E/ VjE I
(C2) for all vh 2 Vk .E/ and pk 2 Pk .E/ the term AE .vh ; pk / is explicitly computable on the basis
of the available degrees of freedom.
We introduce a (scaled) polynomial basis
Pk .E/ D spanfe
m1 ; m enk g
e2 ; :::; m
is such a way that the first nker functions span the kernel of AE
ker.AE / D spanfe
m1 ; m enker g:
e2 ; :::; m
Moreover let P˛ , for ˛ D 1; 2; ::; nker , be some projection from Vk .E/ on the one dimensional space
spanned by m
e˛ that satisfies the following assumption:
(C3) for any ˛ D 1; 2; ::; nker , the operator P˛ acting on Vk .E/ is computable on the basis of the
available degrees of freedom for Vk .E/.
Example 1 In the case of the Laplace operator (1.1) we have V D H 1 ./ (possibly with boundary con-
ditions) and A.v; w/ D .rv; rw/0; . The local discrete space Vk .E/ is the one introduced in Section
2. Since in this case ker.A/ D P0 .E/, condition (C1) is immediately verified, while condition (C2) fol-
lows as explained in (3.12). The scaled polynomial basis is given by the monomials fm1 ; m2 ; :::; mnk g
introduced in (1.3), the dimension nker of the kernel is 1 and P1 D P0 is defined in (3.4).
Example 2 In the case of plate bending problems, say, 2 u D f in with u D @u=@n D 0 on @, the
space V will be taken as H02 ./ and the bilinear form (for simplicity) A.v; w/ WD .".rv/; ".rw//0; .
The simplest (lowest order) local discrete space V2 .E/ will be made of bi-harmonic functions that are
polynomials of degree 3 on each edge, with normal derivative linear on each edge (see [17]) and the
degrees of freedom will be the values of vh and of its two (scaled) derivatives at each vertex. Clearly
this space contains all polynomials in P2 .E/. Since in this case ker.A/ D P1 .E/, condition (C1) is
immediately verified, while condition (C2) follows, similarly to (3.12), integrating by parts. The scaled
22 BEIRÃO DA VEIGA, BREZZI, MARINI, AND RUSSO
polynomial basis is given by the monomials fm1 ; m2 ; :::; mnk g introduced in (1.3), the dimension nker
of the kernel is 3, and the projection operators can be taken as
N V
1 X
P1 vh WD V vh .Vi /;
N
i D1
N V N V
1 X @vh .x xP /1 1 X @vh .x xP /2
P2 vh WD V .Vi / ; P3 vh WD V .Vi / :
N @x1 hP N @x2 hP
i D1 i D1
dof
We have now all the tools to define the three fundamental matrices B; D; G. Let as usual f'i gNi D1 indicate
the basis for Vk .E/ that is dual to the degrees of freedom. Then, in the spirit of (3.14), the “right-hand
side” matrix B is defined by
2 3
P1 '1 ::: P1 'N dof
6 :: :: :: 7
6
6 : : : 7
7
6 Pnker '1 ::: Pnker 'N dof 7
BD6 E 6 E
7:
6A .e mnker C1 ; '1 / : : : A .e
mnker C1 ; 'N dof / 7
:: ::
7
6 ::
:
7
4 : : 5
AE .e mnk ; '1 / ::: AE .e
mnk ; 'N dof /
Note that matrix B is computable due to the assumptions (C2)-(C3).
The “change of basis” matrix D, see (3.17), is given by
2 3
dof1 .em1 / dof1 .e m2 / : : : dof1 .e mnk /
6 dof2 .e m1 / dof2 .e m2 / : : : dof2 .e mnk / 7
DD6 7:
6 7
:: :: : : ::
4 : : : : 5
dofN dof .e
m1 / dofN dof .e
m2 / : : : dofN dof .e
mnk /
Finally, the matrix G is defined by
2 3
P1 m
e1 : : : P1 m enker P1 m
enker C1 ::: P1 m
enk
6 :: : :: :: :: :: :: 7
6 :
6 : : : : 7
7
6Pnker m 1 : : : P m
nker nker Pnker m
enker C1 ::: Pnker menk 7
G WD 6 7:
e e
6 0 : : : 0 AE .e
mnker C1 ; m
e2 / : : : E
A .e
mnker C1 ; m
enk /7
6 :: :: :: ::
6 7
:: ::
: :
7
4 : : : : 5
0 ::: 0 AE .e
mnk ; m
e2 / ::: AE .e
mnk ; m
enk /
Note that, for the same reason described in Remark 3.3, once the matrices B; D are computed, the matrix
G can be calculated simply as G D BD.
We can now define the operator …r, acting from Vk .E/ to Pk .E/, that is, the projection with respect
to the bilinear form A and operators fP˛ gn˛D1
ker
. More precisely, for all vh 2 Vk .E/ the operator …r is
defined by 8
< P˛ …rvh vh D 0
˛ D 1; : : : ; nker ;
: AE .em˛ ; …rvh vh / D 0 ˛ D nker C 1; : : : ; nk :
Following the same arguments of Section 3.1, the matrix representation of the operator …r in the
m˛ gn˛D1
fe k
basis of Pk .E/ is
…r 1
WD G B;
dof
while in the f'i gN
i D1 basis of Vk .E/ is
…r WD DG 1
B:
To conclude, the local VEM stiffness matrix is computed, as in (3.25), by
Kh D .…r /T G
E
e .…r / C .I …r /T .I …r /;
(8.1)
e is the matrix that coincides with G except for the first nker rows which are set to zero.
where G
THE HITCHHIKER’S GUIDE TO VEM 23
R EFERENCES
[1] B. Ahmed, A. Alsaedi, F. Brezzi, L.D. Marini, and A. Russo. Equivalent Projectors for Virtual Element Methods. Comput.
Math. Appl., 66(3):376–391, 2013.
[2] P.F. Antonietti, N. Bigoni, and M. Verani. Mimetic Discretizations of Elliptic Control Problems. J. Sci. Comput.,
56(1):14–27, 2013.
[3] L. Beirão da Veiga. A residual based error estimator for the mimetic finite difference method. Numer. Math., 108(3):387–
406, 2008.
[4] L. Beirão da Veiga. A mimetic finite difference method for linear elasticity. M2AN: Math. Model. Numer. Anal.,
44(2):231–250, 2010.
[5] L. Beirão da Veiga, F. Brezzi, A. Cangiani, L.D. Marini, G. Manzini, and A. Russo. The basic principles of Virtual
Elements Methods. Math. Models Methods Appl. Sci., 23(1):199–214, 2013,
[6] L. Beirão da Veiga, F. Brezzi, and L.D. Marini. Virtual Elements for linear elasticity problems. SIAM J. Num. Anal.,
5(2):794–812, 2013.
[7] L. Beirão da Veiga, K. Lipnikov, and G. Manzini. Arbitrary-Order Nodal Mimetic Discretizations of Elliptic Problems
on Polygonal Meshes. SIAM J. Numer. Anal., 49(5):1737–1760, 2011.
[8] L. Beirão da Veiga and G. Manzini. A virtual element method with arbitrary regularity. IMA J. Numer. Anal., in press,
2013. DOI:10.1093/imanum/drt018
[9] J. E. Bishop. A displacement-based finite element formulation for general polyhedra using harmonic shape functions. Int.
J. Numer. Meth. Engrg., published online 29 Aug 2013.
[10] P. Bochev and J. M. Hyman. Principle of mimetic discretizations of differential operators. In D. Arnold, P. Bochev,
R. Lehoucq, R. Nicolaides, and M. Shashkov, editors, Compatible discretizations. Proceedings of IMA hot topics work-
shop on compatible discretizations, IMA Volume 142. Springer-Verlag, 2006.
[11] J. Bonelle and A. Ern. Analysis of compatible discrete operator schemes for elliptic problems on polyhedral meshes.
ArXiv preprint arXiv:1211.3354, 2012.
[12] F. Brezzi, A. Buffa, and K. Lipnikov. Mimetic finite differences for elliptic problems. M2AN: Math. Model. Numer. Anal.,
43:277–295, 2009.
[13] F. Brezzi, R.S. Falk and L.D. Marini. Basic Principles of Mixed Virtual Element Methods. (Submitted to ESAIM Math.
Model. Numer. Anal.).
[14] F. Brezzi, K. Lipnikov, and M. Shashkov. Convergence of mimetic finite difference method for diffusion problems on
polyhedral meshes. SIAM J. Num. Anal., 43:1872–1896, 2005.
[15] F. Brezzi, K. Lipnikov, M. Shashkov, and V. Simoncini. A new discretization methodology for diffusion problems on
generalized polyhedral meshes. Comp. Meth. Appl. Mech. Engrg., 196:3682–3692, 2007.
[16] F. Brezzi, K. Lipnikov, and V. Simoncini. A family of mimetic finite difference methods on polygonal and polyhedral
meshes. Math. Models Methods Appl. Sci., 15:1533–1553, 2005.
[17] F. Brezzi and L.D. Marini. Virtual elements for plate bending problems. Comput. Methods Appl. Mech. Engrg., 253:455–
462, 2013.
[18] A. Cangiani, G. Manzini, and A. Russo. Convergence analysis of a mimetic finite difference method for general second-
order elliptic problems. SIAM J. Num. Anal., 47(4):2612âĂŞ-2637, 2009.
[19] P. Chow, M. Cross, and K. Pericleous. A natural extension of the conventional finite volume method into polygonal
unstructured meshes for CFD application. Applied Mathematical Modeling 20(2):170–183, 1996.
[20] J. Droniou , R. Eymard, T.R. Gallouët, and R. Herbin. A unified approach to Mimetic Finite Difference, Hybrid FiniteVol-
ume and Mixed Finite Volume methods. Math. Models Methods Appl. Sci., 20(2):265–295, 2010.
[21] M. S. Floater, K. Hormann, and G. Kós. A general construction of barycentric coordinates over convex polygons. Ad-
vances in Computational Mathematics, 24(14):311–331, 2006.
[22] J.M. Hyman, M. Shashkov. The Orthogonal Decomposition Theorems for Mimetic Finite Difference Methods. SIAM J.
Num. Anal., 36 (3), 788–818, 1999.
[23] J.M. Hyman, M. Shashkov, and S. Steinberg. The effect of inner products for discrete vector fields on the accuracy of
mimetic finite difference methods. Comput. Math. Appl., 42:1527–1547, 2001.
[24] Y. Kuznetsov and S. Repin. New mixed finite element method on polygonal and polyhedral meshes. Russ. J. Numer. Anal.
Math. Model, 18(3): 261âĂŞ-278, 2003.
[25] K. Lipnikov, G. Manzini, and M. Shashkov. Mimetic finite difference method. Review paper, to appear in J. Comput.
Phys.
[26] K. Lipnikov, J.D. Moulton, and D. Svyatskiy. A multiscale multilevel mimetic (M3) method for two-phase flows in porous
media. J. Comput. Phys., 227, 6727-6753, 2008.
[27] K. Lipnikov, M. Shashkov, I. Yotov. Local flux mimetic finite difference methods. Numer. Math., 112:115–152, 2009.
[28] K. Lipnikov, D. Svyatskiy, and Y. Vassilevski. Interpolation-free monotone finite volume method for diffusion equations
on polygonal meshes. J. Comput. Phys., 228(3):703–716, 2009.
[29] S. E. Mousavi and N. Sukumar. Numerical integration of polynomials and discontinuous functions on irregular convex
polygons and polyhedrons. Comput. Mech., 47(5):535–554, 2011.
[30] S. Natarajan, S. Bordas, and D. R. Mahapatra. Numerical integration over arbitrary polygonal domains based on Schwarz-
Christoffel conformal mapping. Int. J. Numer. Meth. Engrg., 80(1):103–134, 2009.
[31] S. Rjasanow and S. Weißer. Higher order BEM-based FEM on polygonal meshes. SIAM J. Num. Anal., 50(5):2357–2378,
2012.
24 BEIRÃO DA VEIGA, BREZZI, MARINI, AND RUSSO
[32] Z. Sheng and G. Yuan. An improved monotone finite volume scheme for diffusion equation on polygonal meshes. J.
Comput. Phys., 231(9):3739–3754, 2012.
[33] N. Sukumar and A. Tabarraei. Conforming polygonal finite elements. Int. J. Numer. Meth. Engrg., 61(12):2045–2066,
2004.
[34] A. Tabarraei and N. Sukumar. Extended finite element method on polygonal and quadtree meshes. Comput. Methods
Appl. Mech. Engrg., 197(5):425–438, 2008.
[35] C. Talischi, G. H. Paulino, A. Pereira, and I.F.M. Menezes. Polygonal finite elements for topology optimization: A
unifying paradigm. Int. J. Numer. Methods. Engrg., 82:671âĂŞ-698, 2010.
[36] C. Talischi, G. H. Paulino, A. Pereira, and I.F.M. Menezes. PolyMesher: a general-purpose mesh generator for polygonal
elements written in Matlab. Struct. Multidisc Optimiz.. 45(3):309–328, 2012.
[37] M. Vohralik and B. Wohlmuth. Mixed finite element methods: implementation with one unknown per element, local flux
expressions, positivity, polygonal meshes, and relations to other methods. Math. Models Methods Appl. Sci., 23(5):803–
838, 2013.
[38] E. Wachspress. A Rational Finite Element Basis. Academic Press, New York, 1975.
[39] E. Wachspress. Barycentric coordinates for polytopes. Comput. Math. Appl., 61(11):3319–3321, 2011.