1 Introduction

Since its introduction in [1], the Virtual Element Method (VEM) has been recognised as a valuable tool for the solution of partial differential equations (PDEs). One of the key advantages of the VEM is that it allows any type of polygonal meshes, thanks to the introduction of a virtual component in the local basis functions. We will discuss this aspect in a later section. Curved meshes can also be used more naturally than iso-parametric finite elements [2]. Furthermore, given the rising interest in structure-preserving discretisation, it is worth mentioning that the VEM allows the mimicry of many interesting physical structures that arise at the level of the continuous PDE [3]. For example, the VEM, unlike the standard finite element method (FEM), can be used to construct arbitrary low-order divergence-free \(H^1\) conforming discretisations for Stokes flow [3], without any restriction on the mesh. The sophisticated mathematical infrastructure that allows the proof of accurate a priori error estimates, which are a key advantage of the FEM over other numerical schemes, can also be applied with some adjustments to the VEM. Another feature of the VEM, perhaps the one of greatest importance, is the ability to easily produce discretisations with a high order of continuity, a property that is well known to be a weakness of the classical FEMs. It is also worth mentioning that VEM accuracy can be improved with the p and hp versions of VEMs introduced in [4], clearly reflecting the intimate relation between the FEMs and VEMs.

The advantages just mentioned lead to the application of the VEM to a wide variety of problems from linear elasticity [5,6,7], fluid-dynamics [8,9,10], fourth-order problems [11,12,13], acoustic wave propagation and Helmholtz problem [14, 15], and magnetostatics [16, 17]. While the mathematical infrastructure is what makes the VEM shine and reveals the advantages listed above, the challenges of the VEM are the practical aspects of its implementation. The true novelty behind the VEM is the use of the so-called projection operators that allow assembling stiffness and mass matrices without the necessity of computing the virtual component of the basis functions. Resorting to projection operators results in a lack of coercivity that requires the introduction of an additional stabilisation term in the weak formulation of the problem.

The lightning VEM proposed here eliminates the stabilisation term by actually computing, in an extremely efficient manner, the virtual component of the local VEM basis functions. In particular, the lightning VEM approximates the virtual part of the basis functions using rational functions with poles clustered exponentially close to the corners of each element of the polygonal tessellation. It is worth mentioning that in the literature other ideas have been proposed in order to get rid of the stabilisation term [18,19,20,21]. The key difference between the lightning VEM and these methods is the fact that the lightning VEM does not make use of any projection operators. Therefore, the mathematical analysis of a priori error estimates is much easier and essentially identical to that for any other non-conforming Galerkin discretisation.

Furthermore, the fact that the lightning VEM truly computes the basis function allows the user to access pointwise values of the numerical solution without the need for any reconstruction technique. This is particularly appealing considering that a common reconstruction technique is based on polynomial interpolation and may require the triangulation of the polygonal mesh.

The local construction of the VEM basis is the implementation price that one has to pay for the advantages of the lightning VEM method, but as we will see the embarrassingly parallelizable nature of this operation will ultimately result in a cost-efficient scheme compared to standard VEM and FEM.

Before diving in the core aspects of the paper, the authors would like to stress the difference between the meaning of the word “virtual” in the context of the VEM and in the context of the lightning VEM. In the first case“virtual” refers to the fact that we have no point-wise knowledge of the basis functions in the interior of an element. In the lightning VEM we compute a set of basis functions, for which we can access point-wise values, and “virtual” refers to the fact that we are approximating the standard virtual element space.

2 Virtual element method

For the sake of simplicity, we focus our attention on the Laplace problem. The VEM has been applied to a large number of equations but we want to keep the focus on the simplest scenario. Given a polygonal open, bounded, convex domain \(\Omega \subset \mathbb {R}^2\) with boundary \(\Gamma \), we consider the problem of finding a function \(u:\Omega \rightarrow \mathbb R\) such that

$$\begin{aligned} \left\{ \begin{aligned} - \Delta u&= f \quad \text {in }\Omega \, , \\ u&= 0 \quad \text {on }\Gamma \, , \end{aligned} \right. \end{aligned}$$
(1)

where \(f \in L^2(\Omega )\) is the load term. It is well known that the standard weak formulation of (1) reads as

$$\begin{aligned} \left\{ \begin{aligned}&\text {find }u \in V:=H^1_0(\Omega )\text { such that: }\\&a(u,v) = \langle f , v \rangle \quad \forall v \in H_0^1(\Omega ) \, , \end{aligned} \right. \end{aligned}$$
(2)

where the bilinear form \(a(\cdot ,\cdot ): V \times V \rightarrow \mathbb R\) is defined as

$$\begin{aligned} \forall u,v \in V \, , \quad a(u,v) :=\int _\Omega \nabla u \cdot \nabla v \, . \end{aligned}$$
(3)

2.1 The local space

We decompose the domain \(\Omega \) in a tessellation \(\mathcal {T}_h\) by a finite number of non-overlapping convex polygons K. In particular, we assume that there exists a positive constant \(\rho \) such that every element \(K \in \mathcal {T}_h\) is star-shaped with respect to a ball of a radius greater or equal than \( \rho h_K\), where \(h_K\) denotes the diameter of the element K. Let \(k \ge 1\) be the “order" of the method. For every element \(K \in \mathcal {T}_h\) we define the local virtual element space as

$$\begin{aligned} V_h^k(K) :=\left\{ v_h \in H^1(K) \, \text { such that } \, \Delta v_h \in \mathbb P_{k-2}(K) \, \text { and } \, v_h \in \mathbb B_K(\partial K) \right\} , \end{aligned}$$
(4)

where

$$\begin{aligned} \mathbb B_k (\partial K) :=\left\{ v_h \in \mathcal {C}^0(\partial K) \, \text { such that } \, \forall e \in \partial K , \, v_h |_e \in \mathbb P_k(e) \right\} , \end{aligned}$$
(5)

where e denotes an edge of \(\partial K\) and we have denoted \(\mathbb P_{-1} :=\{0\}\). One can check that the following quantities represent a set of degrees of freedom for the space \(V_h^k(K)\):

  1. 1.

    \(\mathcal {V}^{K,k}\): the pointwise values of \(v_h\) at the vertexes of the polygon K;

  2. 2.

    \(\mathcal {E}^{K,k}\): the values of \(v_h\) at \(k-1\) internal points of a Gauss-Lobatto quadrature for every edge \(e \in \partial K\);

  3. 3.

    \(\mathcal {P}^{K,k}\): the moments \(\dfrac{1}{| K |} \int _K v_h \, m_{\alpha \beta } \, \textrm{d} K\, \), \(\forall m_{\alpha \beta } \in \mathcal {M}_{k-2}(K)\) where \(\mathcal {M}_{k-2}(K)\) is the set of monomials defined as

    $$\begin{aligned} \mathcal {M}_{k-2}(K) :=\left\{ m_{\alpha \beta } :=\left( \dfrac{x - x_K}{h_K} \right) ^\alpha \left( \dfrac{y - y_K}{h_K} \right) ^\beta \ \alpha ,\beta \in \mathbb N\, , \alpha + \beta \le k - 2 \right\} . \end{aligned}$$
    (6)
Fig. 1
figure 1

Degrees of freedom on a pentagon, for \(k=1,2,3\)

Details of the proof are in [1]. A graphic representation of the degrees of freedom is given in Fig. 1. Thanks to the definition of the degrees of freedom, it is possible to construct the projection operator \(\Pi ^{\nabla , K}_k: V_h^k(K) \rightarrow \mathbb P_k(K)\) defined as

$$\begin{aligned} \left\{ \begin{aligned}&\int _K \nabla \, p_k \cdot \nabla ( v_h - \, {\Pi }_{k}^{\nabla ,K} v_h)\, \textrm{d} K = 0 \quad \text {for all }v_h \in V_h^k(K)\text { and }p_k \in \mathbb P_k(K), \\&\int _{\partial K}(v_h - {\Pi }_{k}^{\nabla , K} v_h) \, \textrm{d}s= 0 \, . \end{aligned} \right. \end{aligned}$$

Indeed, thanks to integration by parts, we note that

$$\begin{aligned} \int _K \nabla \, p_k \cdot \nabla \, v_h \,\textrm{d}K = - \int _K v_h \, \Delta p_k \, \textrm{d} K + \int _{\partial K} \dfrac{p_k}{\partial n} \, v_h \, \textrm{d} s. \end{aligned}$$
(7)

The first integral is known thanks to \(\mathcal {P}^{K,k}\), for the second one we use \(\mathcal {E}^{K,k}\) and \(\mathcal {V}^{K,k}\). The operator \(\Pi ^{\nabla ,K}\) is an orthogonal projection into the space of polynomials with respect to the \(H^1\)-seminorm. This is the cornerstone around which we can construct a discretisation of the bilinear form \(a(\cdot , \cdot )\). The global virtual element space is obtained by gluing together the local spaces

$$\begin{aligned} V_h^k(\mathcal {T}_h) = \{v_h \in V \quad \text {s.t.} \quad v_h|_K \in V_h(K) \quad \text {for all }K \in \mathcal {T}_h \} \, , \end{aligned}$$

therefore obtaining a space characterized by the following degrees of freedom:

  1. 1.

    \(\mathcal {V}^{k}\): the values of \(v_h\) at the vertices;

  2. 2.

    \(\mathcal {E}^{k}\): the values of \(v_h\) at \(k-1\) points on each edge e;

  3. 3.

    \(\mathcal {P}^{k}\): the moments up to order \(k-2\) for each element \(E\in \mathcal {T}_h\).

2.2 The discrete problem

First, we decompose the global bilinear form into local contributions

$$\begin{aligned} a(u,v) = \sum _{K \in \mathcal {T}_h} a^K(u,v) \, . \end{aligned}$$
(8)

We point out that, except for a particular structures of the element K, we do not have an analytic expression for all the functions in \(V_h^k(K)\). Hence, given two generic virtual functions, we are not able to compute the quantity

$$\begin{aligned} a^K(u_h,v_h) = \int _K \nabla u_h \cdot \nabla v_h \, \textrm{d} K \, , \qquad u_h,v_h \in V_h^k(\mathcal {T}_h). \end{aligned}$$
(9)

We would like to construct a discrete bilinear form \(a_h^K: V_h^k(K) \times V_h^k(K) \rightarrow \mathbb R\) that is computable for all the virtual functions and acts as a discrete counterpart of \(a^K(\cdot , \cdot )\). The idea is to split the virtual functions as

$$\begin{aligned} v_h = \Pi ^{\nabla , K}_k v_h + (I - \Pi ^{\nabla , K}_k) v_h \, . \end{aligned}$$
(10)

Thanks to this choice, the bilinear form is split as

$$\begin{aligned} \begin{aligned} a^K(u_h,v_h)&= a^K(\Pi ^{\nabla , K}_k u_h,\Pi ^{\nabla , K}_kv_h) + a^K((I - \Pi ^{\nabla , K}_k) u_h, (I - \Pi ^{\nabla , K}_k) v_h) \\&\quad + a^K(\Pi ^{\nabla , K}_k u_h, (I - \Pi ^{\nabla , K}_k) v_h) + a^K((I - \Pi ^{\nabla , K}_k) u_h,\Pi ^{\nabla , K}_k v_h) \, . \end{aligned} \end{aligned}$$
(11)

Thanks to the orthogonality of \(\Pi ^{\nabla ,K}_k\), the last two terms are equal to zero. The first term involves only polynomials hence is computable. This term is known in the VEM literature as the consistency term. The only thing that remains to be done is to handle the second term. The idea in the VEM framework is to replace it with a computable bilinear form \(\mathcal {S}^K(\cdot ,\cdot ):V_h^k(K) \times V_h^k(K) \rightarrow \mathbb R\) that satisfies

$$\begin{aligned} \alpha _*|v_h|_{1,E}^2 \le \mathcal S(v_h, v_h) \le \alpha ^* |v_h|_{1,E}^2 \, , \qquad \text {for all }v_h \in \textrm{Ker}(\Pi ^{\nabla ,K}_k) \, , \end{aligned}$$
(12)

for two positive uniform constants \(\alpha _*\) and \(\alpha ^*\). This term is called stability term. We define the bilinear form

$$\begin{aligned} a_h^K(u_h,v_h) :=a^K( \Pi ^{\nabla ,K}_k u_h, \Pi ^{\nabla ,K}_k v_h ) + \mathcal {S}^K( (I - \Pi ^{\nabla ,K}_k) u_h , (I - \Pi ^{\nabla ,K}_k) v_h) \, .\nonumber \\ \end{aligned}$$
(13)

The global bilinear form is obtained summing all the local contributions

$$\begin{aligned} a_h(u_h,v_h) :=\sum _{K \in \mathcal {T}_h} a^K_h(u_h, v_h) \end{aligned}$$
(14)

It remains to discretise the load term. A standard choice is the following procedure:

  1. 1.

    if \(k \ge 2\), we replace f with \(f_h\) defined locally as the \(L^2\)-orthogonal projection into the space \(\mathbb P_{k-2}(K)\). In detail, we consider

    $$\begin{aligned} \langle f_h, v_h \rangle = \sum _{K \in \mathcal {T}_h} \int _K f_h \, v_h \textrm{d}K = \sum _{K \in \mathcal {T}_h} \int _K f \, \Pi ^{0,E}_{k-2} v_h \textrm{d}K \, ; \end{aligned}$$
    (15)
  2. 2.

    if \(k=1\), we replace f with a piecewise constant and define

    $$\begin{aligned} \langle f_h, v_h \rangle = \sum _{K\in \mathcal {T}_h} \int _K P_0^K f \, \overline{v}_h \textrm{d}K \, \end{aligned}$$
    (16)

    where

    $$\begin{aligned} \overline{v}_h = \dfrac{1}{n} \sum _{i=1}^n v_h(V_i) \, ,\quad V_i = \text {vertices of }K\, . \end{aligned}$$
    (17)

The discrete problem reads as

$$\begin{aligned} \left\{ \begin{aligned}&\text {find }u_h \in V_h^k(\Omega _h)\text { such that: }\\&a_h(u_h,v_h) = \langle f_h , v_h \rangle \quad \forall v_h \in V_h^k(\Omega _h) \, . \end{aligned} \right. \end{aligned}$$
(18)

Remark 1

If we desire an \(H^1\) conforming discretisation the most common choice of virtual operator is the negative Laplacian as in (4). The well-posedness of the local virtual element space is guaranteed even if we choose any other elliptic operator with sufficiently smooth coefficients. To guarantee that the virtual space has optimal approximation properties it will be convenient also to assume that \(\mathbb {P}_{k}\) is a subset of the co-domain of the chosen operator when applied to the space \(\mathbb {P}_{k-2}\). A common misunderstanding when first approaching the VEM is to think in terms of Trefftz methods, i.e. to assume that the operator appearing in (4) has to be the same as the one appearing in (1). We direct the reader interested in Trefftz methods to [22, 23]. We should think of the operator appearing in (4) only in terms of the conformity we desire.

Remark 2

In general, if we require an \(H^k\) conforming discretisation the most common choice of operator in (4) would be the polylaplacian \(-\Delta ^k\). Of course, we need to modify slightly our definition of local VEM space to accommodate the fact that we have to prescribe not only the value of the solution at the boundary but also the first \(k-1\) normal derivatives. More detail on this topic can be found in [11,12,13, 24, 25].

Remark 3

An important observation is that the VEM only provides the value of the degrees of freedom as result. If one is interested in the value of the discrete solution outside of \(\mathcal {V}^k\) and \(\mathcal {E}^k\) a reconstruction technique has to be used. A common reconstruction technique is to triangulate each polygonal element and perform a linear interpolation using the nodal degrees of freedom. We will see later on that the lightning virtual element method avoids this issue.

3 The lightning approximation

The key idea behind the lightning VEM is to consider a different local discrete space which is obtained by approximating \(V_h^k(K)\) using rational functions with poles clustered exponentially close to the corners of K. For the sake of clarity, we will focus our discussion on the lowest order case, \(k=1\). We will discuss in a later section how to deal with the case \(k>1\) and the case where higher conformity is required. Thanks to the linearity of the Laplacian, if K has \(N_K\) edges, to construct \(V_h^k(K)\) we are interested in solving \(N_K\) problems of the form

$$\begin{aligned} \Delta \phi _i = 0 \;\;&\text {in}\; K,\nonumber \\ \phi _i= \varphi _i\;\;&\text {on}\;\partial K. \end{aligned}$$
(19)

where \(\varphi _i\) are the functions in \(\mathbb B_1(\partial K)\) that are equal to one on the i-th vertex and zero on the others. If we are working with a structured rectangular mesh we can solve this problem exactly. As the geometry of K gets more complicated we need to find an efficient way of solving (19). To address this problem we turn to the lightning Laplace solver presented in [26,27,28]. The idea behind the lightning Laplace method is to search for an approximation \(\hat{\phi }_i\) of \(\phi _i\) of the form

$$\begin{aligned} \hat{\phi }_i = \Re \bigg \{\sum _{j=0}^{N_P}\frac{a_j}{z-z_j}+\sum _{j=0}^{N_Z}b_j(z-z_*)^j\bigg \}, \end{aligned}$$
(20)

where \(\{z_j\}_{j=1}^{N_P}\) are points in the complex plane, \(z_*\) is a point in the complex plane close to the barycenter of K, and \(\Re \) denotes the real part of a complex number. Finding the optimal coefficients, \(\{z_j\}_{j=1}^{N_P}\) and \(z_*\) to minimize \(\Vert \hat{\phi }_i-\phi _i\Vert _{L^\infty (K)}\) in general is a highly non-linear problem. To transform this non-linear problem into a linear one the position of the points \(\{z_j\}_{j=1}^{N_P}\) and \(z_*\) are fixed only based upon the geometry of K. In particular, the \(N_P\) poles are clustered exponentially closer to the corners of the polygon K. Under this hypothesis, the following result was proven in [29]:

Lemma 1

Let K be a convex polygon with corners \(w_1,\dots ,w_{N_K}\) and let f be an analytic function on K that is analytic on the interior of each side segment. Furthermore, we assume that f can be analytically continued to a disk near any corner \(w_k\) with a slit along the exterior bisector of the corner. Lastly, we assume that at each corner \(w_k\) the function f satisfies \(|f(z)-f(w_k)|=\mathcal {O}(|z-w_k|^\delta )\) as \(z\rightarrow w_k\), for some \(\delta >0\). Under these assumptions, there exists a rational function r of the form

$$\begin{aligned} r = \Re \bigg \{\sum _{j=0}^{N_P}\frac{a_j}{z-z_j}+\sum _{j=0}^{N_Z}b_j(z-z_*)^j\bigg \}, \end{aligned}$$
(21)

with \(N_P\) poles \(z_j\) only at points exponentially clustered along the exterior bisectors at the corners, such that the following approximation bound holds, for \(C>0\):

$$\begin{aligned} \Vert f-r\Vert _{L^\infty (K)} \le C_K e^{-C\sqrt{N_P}}. \end{aligned}$$
(22)

The previous lemma is a strong indication that the lightning Laplace scheme will be able to converge to an extremely accurate solution, yet it can not be applied in any straightforward manner to derive a priori error estimates with respect to the \(H^1\) and \(L^2\) norms. An idea might be to mimic the reasoning presented in [30], which can be used to derive an a priori error estimate on a least squares collocation method in terms of Lebesgue constant and the best approximation estimate presented above. The reason why this is not a viable path is that we are interested here in \(H^1\) error estimates, which can not be produced using the type of \(L^\infty \) bound presented in [30]. To produce a priori error estimates for the overall scheme, we decide to proceed adaptively when it comes to the resolution of (19) using the lightning Laplace method. The exact algorithm used to compute the solution \(\hat{\phi }_i\) to (19) is presented in Algorithm 1. The implementation of Algorithm 1 used in our lightning VEM code, can be found in [31]. Furthermore, we redirect the reader interested in more detail about Algorithm 1 to [26, 32], where one can find an in-depth discussion about the tunning of the parameters appearing in Algorithm 1 as a function of the number \(N_K\) of edges of the polygon K.

Algorithm 1
figure a

For computing the solution \(\hat{\phi }_i^{(e)}\) of (19).

We then observe that since \(\sum _{j=0}^{N_P}\frac{a_j}{z-z_j}+\sum _{j=0}^{N_Z}b_j(z-z_*)^j\) is analytic in the convex hull described by the vertex of any polygonal element K of the tessellation \(\mathcal {T}_h\) where \(z_j\) are the vertices of K, then its real part is a harmonic function. We direct the reader unfamiliar with this notion to [33, 34]. Since \(\hat{\phi }_i\) is harmonic we know that the function defined as \(\hat{\phi }_i-\phi _i\) is harmonic and by applying boundary regularity estimates for harmonic functions we obtain the following result.

Proposition 2

Let \(\phi _i\) be as in (19) and \(\hat{\phi }_i\) be the outcome of Algorithm 1. Then

$$\begin{aligned} \Vert \hat{\phi }_i-\phi _i\Vert _{H^1(K)}\le C_1\varepsilon , \qquad \Vert \hat{\phi }_i -\phi _i\Vert _{L^{\infty }(\partial K)}\le C_2\varepsilon , \end{aligned}$$
(23)

where the constants \(C_1\) and \(C_2\) only depend on K and \(\partial K\).

Proof

Since we assumed the elements K of our tessellation \(\mathcal {T}_h\) are polygonal, proof for the boundary estimates used to produce the first inequality in (23) can be found in [35, 36]. The second estimate comes from the Morrey’s inequality on a parametrization of the boundary [37]. \(\square \)

From now on we will adopt the notation \(\hat{V}_{h,\varepsilon }(K)\) to express the discrete function space that is obtained from the solution of (19) using the lightning Laplace method on the element K of the tessellation and \(\hat{V}_{h,\varepsilon }(\mathcal {T}_h)\) to denote the global space constructed starting from the various \(\hat{V}_{h,\varepsilon }(K)\).

Remark 4

It is clear that a fundamental step in the lightning VEM is solving the least squares problem

$$\begin{aligned} A\textbf{x}\approx \textbf{d} \end{aligned}$$
(24)

that appears in Algorithm 1. In particular the least squares problem (24) is observed to be terribly ill-conditioned. Yet is still possible to solve (24) with great accuracy if standard regularisation are adopted [26]. In particular in [32] it is discussed the effect that the pole at infinity in (20) have on the 2-norm of \(\textbf{x}\). In fact bounding the 2-norm of \(\textbf{x}\) will guarantee the solvability of (24) to a high degree of accuracy in spite its ill-conditioned nature. An other route to solve (24) to a great deal of accuracy, inspite its ill-conditioned nature, is to use the Vandermonde with Arnoldi algorithm, introduced in [38] as discussed in [29, 30].

4 The lightning virtual element method

Fig. 2
figure 2

The lightning virtual element method is a non-conforming method. In fact, even if the degrees of freedom are continuous across the vertices of the elements, here depicted in red, the basis functions might jump across the edges, here depicted in blue

We begin by observing that the degrees of freedom \(\mathcal {V}^k\) and \(\mathcal {E}^k\) are not decoupled in adjacent elements. In fact, if \(\hat{\phi }_i\) had been a polynomial on the edges of the element K as in the standard VEM space \(V^k_h(K)\), then this would have ensured the continuity of the function \(\hat{\phi }_i\) across the elements interface. Instead, since each \(\hat{\phi }_i\) is a rational function on the edges of the element K even if over adjacent elements \(\hat{\phi }_i\) would have the same value on the edges and vertex degrees of freedom we still might have a jump across the elements interface, as depicted Fig. 2. It is important to notice that this jump is bounded by adaptively solving the lightning approximation problem in Algorithm 1, i.e. \(\Vert \hat{\phi }_i-\phi _i\Vert _{H^{1/2}({\partial K})}\le \varepsilon \). Since the functions in \(\hat{V}_{h,\varepsilon }(\mathcal {T}_h)\) are no longer continuous we need to consider a broken version of the bilinear form a in (3), i.e.

$$\begin{aligned} \hat{a}(\hat{u}_h,\hat{v}_h) = \sum _{K\in \mathcal {T}_h} a^K(\hat{u}_h,\hat{v}_h) \end{aligned}$$
(25)

This bilinear form on \(H^1(\Omega )\) is still symmetric positive definite with respect to the broken \(H^1(\Omega )\) norm and for the continuous solution to the problem we have that \(\hat{a}(u,v)=a(u,v)\) since \(u,v\in H^1(\Omega )\). Furthermore, in \(\hat{V}_{h,\varepsilon }(\mathcal {T}_h)\) the kernel of the bilinear form \(\hat{a}(\cdot ,\cdot )\) are only functions that are constant on each element of the tessellation, using the fact that such constants must have the same value on the vertices of neighboring elements we have that the boundary conditions impose that \(\hat{a}(\cdot ,\cdot )\) has a trivial kernel. We now derive an a priori error estimate using the following Lemma from [39].

Lemma 3

Let \(\hat{a}(\cdot ,\cdot )\) be a symmetric positive definite bilinear form on \(H^1(\Omega )+\hat{V}_{h,\varepsilon }(\mathcal {T}_h)\) which reduces to \(a(\cdot ,\cdot )\) on \(H^1(\Omega )\). We will further assume that u is the solution of (2) and \(\hat{u}_h\) is such that:

$$\begin{aligned} \hat{a} (\hat{u}_h,\hat{v}_h) = \langle f,\hat{v}_h\rangle \text { for all } \hat{v}_h \in \hat{V}_{h,\varepsilon }(\mathcal {T}_h), \end{aligned}$$
(26)

where in both the previous variation equation and (2) we assume \(f\in L^2(\Omega )\cap \hat{V}_{h,\varepsilon }(\mathcal {T}_h)^*\). Under this hypothesis the following best approximation estimate holds,

$$\begin{aligned} \Vert u-\hat{u}_h\Vert _h \le \underset{\hat{v}_h \in \hat{V}_{h,\varepsilon }}{\inf }\Vert u-\hat{v}_h\Vert _h + \underset{\hat{w}_h \in \hat{V}_{h,\varepsilon }}{\sup }\frac{|\hat{a}(u-\hat{u}_h,\hat{w}_h)|}{\Vert \hat{w_h}\Vert _h}, \end{aligned}$$
(27)

where \(\Vert \cdot \Vert _h:= \sqrt{\hat{a} (\cdot ,\cdot )}\).

We begin observing that we can consider the trace of functions in \(\hat{V}_{h,\varepsilon }(\mathcal {T}_h)\) since it is a subset of \(H^{\frac{3}{2}+\varepsilon }(K)\). Furthermore, by elliptic regularity [35], we also know that \(u\in H^{2}(K)\) hence it would make sense to consider the trace of \(\nabla u\). To apply the previous lemma, in order to obtain an a priori error estimate, we need first to provide an estimate for the second term in the right-hand side of (27).

$$\begin{aligned} \hat{a} (u-\hat{u}_h,\hat{w}_h )&= \sum _{K\in \mathcal {T}_h} (\nabla u,\nabla \hat{w}_h)_{L^2(\Omega )}-(f, \hat{w}_h)_{L^2(\Omega )}\end{aligned}$$
(28)
$$\begin{aligned}&= \sum _{K\in \mathcal {T}_h} \int _{\partial K} (\nabla u \cdot \textbf{n}) \hat{w}_h = \sum _{e \in \mathscr {E}_h} \int _e \nabla u \cdot \llbracket \hat{w}_h \rrbracket \, , \end{aligned}$$
(29)

where \(\mathscr {E}_h\) are the internal edges of the tessellation \(\mathcal {T}_h\) and \(\llbracket \hat{w}_h \rrbracket \) denotes the vector jump of \(\hat{w}_h\) across the edge e, i.e.

$$\begin{aligned} \llbracket \hat{w}_h \rrbracket = \hat{w}_h\big |_{K_1} \textbf{n}_1 + \hat{w}_h\big |_{K_2} \textbf{n}_2 \, . \end{aligned}$$
(30)

We now rewrite the last term using the basis functions \(\hat{\phi }_i \big |_e\),

$$\begin{aligned} \sum _{e \in \mathscr {E}_h} \int _e \nabla u \cdot \llbracket \hat{w}_h \rrbracket \le \sum _{e \in \mathscr {E}_h} \sum _{i=1}^{N_K} \int _e \hat{w}_i \big |_e \nabla u \cdot \llbracket \hat{\phi }_i\rrbracket \le \sum _{K\in \mathcal {T}_h} \varepsilon \Vert \hat{w}_h\Vert _{h,K}|u|_{H^2(K)}, \end{aligned}$$
(31)

where the last inequality comes from the trace theorem combined with Cauchy-Schwarz inequality and the fact that we have constructed the basis function \(\hat{\phi }^{(e)}_i\) in such a way that \(\llbracket \hat{\phi }^{(e)}_i \rrbracket \le \hat{C}\varepsilon \), where \(\hat{C}\) only depends on the shape of all the elements in the tessellation but not on their size. Therefore assuming that each element in the tessellation is convex, so that we can use the usual elliptic regularity result, we rewrite (27) as

$$\begin{aligned} \Vert u-\hat{u}_h\Vert _h \le \!\!\underset{\hat{v}_h \in \hat{V}_{h,\varepsilon }}{\inf }\Vert u-\hat{v}_h\Vert _h + \sum _{K\in \mathcal {T}_h} \hat{C}\varepsilon \Vert f\Vert _{L^2(K)}\le \!\!\underset{\hat{v}_h \in \hat{V}_{h,\varepsilon }}{\inf }\Vert u-\hat{v}_h\Vert _h + \hat{C}\varepsilon \Vert f\Vert _{L^2(\Omega )}. \end{aligned}$$
(32)

We are therefore left estimating the best approximation property for objects that are in \(\hat{V}_{h,\varepsilon }(\mathcal {T}_h)\). If we denote \(\Pi _k u\) the standard VEM interpolant, [1], then we can write \(\Pi _k u\) in terms of the basis functions \(\phi _i\), i.e. \(\Pi _k u = \sum _{K\in \mathcal {T}_h}\sum _{i=1}^{N_K} u_i \phi _i\) and introduce \(\hat{\Pi }_k u = \sum _{K\in \mathcal {T}_h}\sum _{i=1}^{N_K} u_i \hat{\phi }_i\).

$$\begin{aligned}&\Vert \Pi _k u -\hat{\Pi }_j u \Vert _h \le \sum _{K\in \mathcal {T}_h}\sum _{i=1}^{N_K} |u_i|\Vert \phi _i -\hat{\phi }_i\Vert _{H^1(K)} \le \sum _{K\in \mathcal {T}_h}\sum _{i=1}^{N_K} |u_i| \hat{C}\varepsilon \nonumber \\&\quad \le \Vert f\Vert _{L^2(\Omega )}\hat{C}h^{-2}\varepsilon \end{aligned}$$
(33)

where to obtain the last inequality we used the fact if \(\Pi _ku\) is the nodal interpolant, then \(|u_i|\le \Vert u\Vert _{L^\infty (\Omega )}\), hence by Sobolev embedding \(|u_i|\le C \Vert u\Vert _{H^2(\Omega )}\) and we are summing over approximately \(h^{-2}\) terms. Therefore using the previous estimate together with the approximation estimates of the standard VEM interpolant we obtain

$$\begin{aligned} \Vert u-\hat{\Pi }_ku\Vert _h&\le \Vert u-{\Pi }_ku\Vert _h+\Vert \Pi _k u-\hat{\Pi }_ku\Vert _h \end{aligned}$$
(34)
$$\begin{aligned}&\le C(\Omega )h^{\max \{k,m-1\}} |u|_{H^m(\Omega )}+\Vert f\Vert _{L^2(\Omega )}\hat{C}h^{-2}\varepsilon . \end{aligned}$$
(35)

Substituting this last estimate in the infimum appearing in the right hand side of (27), we get

$$\begin{aligned} \Vert u-\hat{u}_h\Vert _h \le C(\Omega )h^{\max \{k,m-1\}} |u|_{H^m(\Omega )}+\Vert f\Vert _{L^2(\Omega )}\hat{C}h^{-2}\varepsilon . \end{aligned}$$
(36)

5 Numerical experiments

To investigate the behavior of the method, we consider a family of model problems in the unit square \(\Omega = (0,1) \times (0,1)\) with as analytic solution the function

$$\begin{aligned} u(x,y) :=\sin (\pi x) \sin ( \pi y) + \log (1 + xy) \, . \end{aligned}$$
(37)

The meshes \(\mathcal {T}_h\) that we will consider are centroidal Voronoi tessellations of the unit square. An example of a Voronoi tesselation is given in Fig. 3.

Fig. 3
figure 3

A Voronoi tesselation made by 64 polygons

Before presenting the cases of interest and the numerical results, we point out that in the usual VEM framework, the errors in the \(L^2-\)norm and \(H^1-\)seminorm are replaced by the following quantities:

$$\begin{aligned} e_{H^1} := \sqrt{\sum _{E\in \mathcal {T}_h}\left\| \nabla (u-\Pi _k^\nabla u_h)\right\| ^2_{0,E}}\, \qquad e_{L^2} := \sqrt{\sum _{E\in \mathcal {T}_h}\left\| (u-\Pi _k^\nabla u_h)\right\| ^2_{0,E}}\,. \end{aligned}$$
(38)

This choice is due to not knowing the analytic expression of the virtual functions. Using lighting approximation, we can access the pointwise values of the approximated virtual element functions. This permits to compute the local errors using a quadrature formula without projecting into the space of polynomials. We therefore use the usual definitions of the \(H^1\) and \(L^2\) errors. The source code to reproduce all the numerical experiment presented in this section can be found in [31].

The Poisson problem As first model problem, we consider (1) with non-homogeneous Dirichlet boundary conditions. We start from this equation since it represents the simplest elliptic PDE that one can consider. Given a sequence of Voronoi tesselations that quadruples the number of polygons, we obtain the orders of convergence represented in Fig. 4, with \(k=1\).

Fig. 4
figure 4

Convergence results for the Laplace problem

We observe that we have achieved the expected order of convergence for this equation. In particular, the error in \(L^2\)-norm and \(H^1-\)seminorm decay as \(\mathcal {O}(h^2)\) and \(\mathcal {O}(h)\), respectively.

The diffusion–reaction problem We add to the previous equation a reaction term. We obtain the following PDE

$$\begin{aligned} \begin{aligned} - \epsilon \Delta u + \gamma u&= f \quad \text {in }\Omega \, ,\\ u&\equiv g \quad \text {on } \partial \Omega \, , \end{aligned} \end{aligned}$$
(39)

where \(\epsilon >0\) and \(\gamma \in L^\infty (\Omega )\) is a bounded non-negative function. This problem is of interest because the usual VEM approach to discretising the \(L^2-\)scalar product is to construct the \(L^2-\)orthogonal projection operator \(\Pi ^{0,E}_k: V_h^k(E) \rightarrow \mathbb P_k(E)\). This is not possible with the standard definition of the virtual element space. To overcome this difficulty, the idea is to use the enhanced virtual element space defined as

$$\begin{aligned}{} & {} \tilde{V}_h(E) = \left\{ v_h \in H^1(E) \cap C^0(\partial E) \quad \text {:} \quad v_h|_e \in \mathbb P_k (e) \text {for all }e \in \partial E, \right. \nonumber \\ {}{} & {} \left. \Delta v_h \in \mathbb P_k(E) \,, \, \langle v - \Pi ^{\nabla ,E}_k v, \, \widehat{p}_k \rangle {=} 0 \quad \text {for all }\widehat{p}_k \in \mathbb P_k(E) / \mathbb P_{k{-}2}(E) \right\} \,. \end{aligned}$$
(40)

Thanks to the lighting approximation, we do not need to project the virtual functions into the space of polynomials. This implies that we do not have to change the definition of the discrete space. This gives benefits also from the theoretical point of view. For the numerical tests, we set \(\epsilon = \gamma = 1\). The results are shown in Fig. 5 and we observe that also for this equation we recovered the expected order of convergence.

Fig. 5
figure 5

Convergence results for the diffusion–reaction problem

The advection–diffusion–reaction problem As the last model problem, we consider the advection–diffusion–reaction problem given by

$$\begin{aligned} - \epsilon \Delta u + \beta \cdot \nabla u + \gamma u{} & {} = f \quad \text {in }\Omega \, ,\nonumber \\ u{} & {} \equiv g \quad \text {on } \partial \Omega \, . \end{aligned}$$
(41)

where \(\epsilon \) and \(\gamma \) are as in the previous case and \(\beta \in [W^{1,\infty }(\Omega )]^2\) with \(\text {div} \beta = 0\). We point out that the bilinear form associated to the advective field

$$\begin{aligned} b(u,v) :=\int _\Omega (\beta \cdot \nabla u ) \, v \textrm{d} \Omega \, , \end{aligned}$$
(42)

is skew-symmetric. When we discretise \(b(\cdot , \cdot )\) by inserting the projections onto the polynomial space, we lose this property. Instead, to preserve the skew-symmetry property, we discrtize

$$\begin{aligned} b^{\text {skew}}(u,v) :=\dfrac{1}{2} \bigl ( b(u,v) - b(v,u) \bigr ) \, . \end{aligned}$$
(43)

Using the lighting approximation, we avoid this difficulty and do not require (43). We select the same solution of the previous case and we set

$$\begin{aligned} \beta (x,\,y):= \left[ \begin{array}{r} -2\,\pi \,\sin (\pi \,(x+2\,y))\\ \pi \,\sin (\pi \,(x+2\,y)) \end{array}\right] \,, \end{aligned}$$

with \(\epsilon = \sigma = 1\). To overcome problems related to the hyperbolicity of the advection term, we have assumed that we are not in an advection-dominated regime. The numerical results are represented in Fig. 6. In Table 1 we compare the average local assembly time between a classical VEM implementation and the lightning VEM method, clearly as the mesh becomes finer the lightning VEM method is outperformed by the standard VEM method because we need to solve (19) to a greater accuracy.

Fig. 6
figure 6

Convergence results for the advection–diffusion-reaction problem

Table 1 A comparison between a classical VEM implementation and the lightning VEM implementation, of the average time (in seconds) taken by the assembly of the local stiffness matrix for the Poisson problem, with different number N of elements

Condition number In this paragraph, we compare the condition number of the global stiffness matrix for the Poisson problem between a classical VEM implementation and the lightning VEM implementation. We will consider two different types of meshes: some regular meshes obtained via a Voronoi tesselation (similar to the one depicted in Fig. 3) and some non-regular meshes (similar to the one depicted in Fig. 7). The non-regular meshes are obtained by splitting a regular square mesh in such a way as to add a star-shaped domain at the center of each element. As we can see in Table 2, when we consider a regular mesh, the conditioning number of the global stiffness matrix is very similar between the two methods. When considering a non-regular mesh, we can see in Table 3 that the lightning VEM has a much lower conditioning number than the classical VEM. We would like to remark that the non-regular mesh adopted in these tests is an extreme case of the one depicted in Fig. 7. In particular, as the mesh becomes more and more irregular, the conditioning number of the global stiffness matrix of the classical VEM increases significantly more than the one of the lightning VEM. Lastly, we would also like to remark that the classical VEM implementation here considered has a dofi-dofi stabilisation term, while the lightning VEM implementation does not have any stabilisation term.

Table 2 A comparison between a classical VEM implementation and the lightning VEM implementation, of the conditioning number of the global stiffness matrix for the Poisson problem. We vary the number N of elements in a Voronoi tesselation mesh similar to the one depicted in Fig. 3
Table 3 A comparison between a classical VEM implementation and the lightning VEM implementation, of the conditioning number of the global stiffness matrix for the Poisson problem. We vary the number N of elements in a non-regular mesh similar to the one depicted in Fig. 7
Fig. 7
figure 7

A non-regular mesh made by 64 non-regular polygons

6 Extensions of the lightning virtual element method

As seen in the literature about the VEM it is possible to generalise a vast variety of ideas developed on the FEM framework also the lightning VEM. In this section we would like to detail some of these extensions that we plan to investigate in the near future. The authors would like to point out that most of these extensions are only possible thanks to the large body of work on the lightning and AAA approximation by Nick Trefethen, Yuji Nakatsukasa and colleagues.

  1. 1.

    High order discretisation, we have focused our attention on the lowest order VEM, i.e. the one that has only degree of freedom the nodal evaluation in the vertices of our mesh. We would like to point out that extending the lightning VEM idea to higher order approximation is an easy task. In particular, it is enough to consider as (4) a modified version similar to the lowest degree case, i.e.

    $$\begin{aligned} V_h^k(K) = \Big \{u \in C^2(K)\;:\; u_{|e} \in \mathbb {P}_{k}(e)\; \text {and} \; \Delta (u-\pi ) = 0\Big \}, \end{aligned}$$
    (44)

    where \(\pi \in \mathbb {P}_{k}\) is determined, in a non-unique manner by the internal moment degrees of freedom.

  2. 2.

    \(C^k\) discretisation, as mentioned in Remark 2 it is possible to obtain discretisation with a high degree of conformity substituting (4) with

    $$\begin{aligned} V_h^k(K) = \Big \{u \in C^{k+2}(K)\;:\; \partial _n^j u_{|e} \in \mathbb {P}_{2k-j}(e), \;\;&u_{|e} \in \mathbb {P}_{2k-1}(e),\;\; \Delta ^k u = 0,\;\;\end{aligned}$$
    (45)
    $$\begin{aligned}&j=2,\dots , p\Big \}. \end{aligned}$$
    (46)

    In this case we can still proceed constructing a set of basis functions in the same spirit as the lightning VEM method but following [29].

  3. 3.

    Curved elements, a careful reader might have notice that an essential requirement for the lightning virtual element method is that the tessellation \(\mathcal {T}_h\) is made by polygonal elements. In fact in order to transform the non-linear problem of fitting (20) in a linear one we made the a priori choice to cluster the poles of (20) exponentially close to the corner of the polygonal elements. How do we choose the position of the poles if we have a curved element? This question has been addressed in [40, 41] and we plan to use a similar reasoning to extend the lightning virtual element method to tessellations with curved elements.

  4. 4.

    Eigenvalue problems, it has been observed in [42, 43] that the stabilisation term plays a harmful role in the discretisation of eigenvalue problems using a virtual element discretisation. Possible fixes have been proposed in [20, 44]. We plan to study the role that the absence of a stabilisation term plays when discretising an eigenvalue problem using the lightning virtual element method.

We would also like to briefly comment on the possible extensions of the lightning virtual element method to three-dimensional problems. It is well known that the construction of a virtual element space in three dimensions is not as straightforward as in two dimensions. One can think of replicating the same construction presented in [45], where the authors construct the overall space, from local two-dimensional virtual element spaces defined on each face and extend, via a Poisson problem, the basis functions to the whole polyhedron. While the local construction of the virtual element space on each face can be done in a lighting virtual element fashion, the extension to the whole polyhedron is not as straightforward. In fact, since we are working in a three-dimensional space, we can’t construct harmonic functions using a lightning approximation, which heavily relies on the identification of \(\mathbb {R}^2\) with the complex plane.