APPMATH ISRN Applied Mathematics 2090-5572 International Scholarly Research Network 134097 10.5402/2012/134097 134097 Research Article A Simple Anisotropic Mesh-Refinement Strategy for Triangular Elements in 2D Larsson Fredrik Braack M. Wang Y. Department of Applied Mechanics Chalmers University of Technology 41296 Göteborg Sweden chalmers.se 2012 25 12 2012 2012 26 11 2012 13 12 2012 2012 Copyright © 2012 Fredrik Larsson. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

A novel approach to anisotropic mesh-refinement of linear triangular elements in the finite element method is proposed. Using the method of solving a hierarchically refined dual problem in the a posteriori error analysis, indicators for edge refinement, rather than element refinement, can be obtained. A complete adaptive strategy is presented and illustrated by some numerical examples.

1. Introduction

Designing the optimal finite element mesh for a certain problem is a key issue in order to make inexpensive and accurate computations. Standard h-refinement strategies rely on adapting the mesh size, that is, the element diameters, in different areas of the computational domain. The refinement of the elements is, typically, carried out with the goal of conserving or “improving” aspect ratios with some uniform shapes, confer to [1, 2]. However, for many problems, the need for resolution is very different in different directions. For instance, in case of boundary layers, much higher resolution is needed perpendicular to the boundary than in the parallel direction. The reason for this is the anisotropic nature of the error with respect to generation and transport. Traditionally, these effects are dealt with a priori when constructing the initial mesh. If the nature of the error is not known a priori, or in order to save time generating meshes, one wishes to adapt the mesh with respect to shape and orientation a posteriori together with the mesh-size adaptation. The important issue is then how to obtain indicators for such a refinement. Methods used for anisotropic mesh-refinement rely on estimation of error in different directions, for instance, in terms of interpolation errors or Hessian approximations, confer to . For application to fluid mechanics, see . In this paper, we propose a simple novel approach to relate regular, isotropic, error indicators to edges of triangular elements, whereby anisotropic refinement is achieved by subdividing edges with large error contributions.

Developments in establishing strategies for goal-oriented error computations rely heavily on the idea of solving a dual problem, confer to . Much of current research is based on guaranteed bounds, confer to [13, 14]. However, resorting to approximate error estimation is often appealing, confer to , and —in the case of general nonlinear problems—necessary. The combination of goal-oriented error estimation and anisotropic mesh refinement is discussed by Richter .

Introducing an enhanced dual solution in terms of hierarchically added basis, as introduced in , standard element indicators can be replaced by edge indicators in a straight-forward manner. In particular, our approach enables anisotropic mesh-refinement without adding cost or complexity to the error estimation. Indicating the edges to be refined also gives the advantage that element refinement becomes a one-step local procedure, since the edges to refine are indicated for the mesh globally.

In this paper we first recall the general framework for a posteriori error computation for an abstract problem. Secondly, we discuss the relations between the a posteriori error estimation and error indicators related to the discretization. Next, a strategy for subdividing the mesh for given error indicators is suggested. Finally, we study the procedure on two test problems on a unit square, comparing anisotropic mesh-refinement with a (nearly) isotropic strategy. The Poisson problem illustrates the behavior for a problem of isotropic nature, while we use a reaction-diffusion problem with low conductivity to induce strong anisotropy along boundaries.

2. A Posteriori Error Estimation 2.1. Derivation of Exact Error Representation

For completeness, we recall the general strategy in establishing the error representation for an abstract problem as described by for example, Eriksson et al.  and Becker and Rannacher . We thus consider the general nonlinear PDE in the space-time domain Ω. Considering a standard Galerkin-scheme with homogeneous Dirichlet-conditions, the standard variational format of the problem is the following: Find u𝒱 such that (2.1)a(u;v)=l(v)v𝒱, where u is the exact (weak) solution, a(·;·) is a semilinear form (linear in the second argument), l(·) is a linear functional, and 𝒱 is the appropriate Sobolev space (with the appropriate regularity and boundary/initial conditions).

In order to define the corresponding finite element solution, we introduce the approximation space 𝒱h𝒱. In the Finite Element Method, we construct 𝒱h as piecewise polynomials on Nel elements Ωe, constituting the domain Ω¯=e=1NelemΩ¯e. We thus solve the problem. Find the approximate solution uh𝒱h such that (2.2)a(uh;vh)=l(vh)vh𝒱h. The difference in exact and approximate solution can now be defined as e=defu-uh.

We will now introduce the appropriate secant form of a(·;·). Upon using the Gateaux derivative with respect to the first argument of a, we construct the secant form (2.3)aS(u,uh;v,w)=def01ξa(u-(s)+ξw;v)|ξ=0ds, where u-(s)=defuh+se, s(0,1). The form aS(·,·;v,w) is nonsymmetrical (in general) but bilinear in v and w. Using the fundamental theorem of calculus, we obtain the difference (2.4)aS(u,uh;v,e)=a(u;v)-a(uh;v)=R(uh;v)v𝒱, where we introduced the weak residual (2.5)R(uh;v)=defl(v)-a(uh;v).

From (2.2) we obtain the Galerkin orthogonality for general nonlinear equations: (2.6)aS(u,uh;vh,e)=R(uh;vh)=0vh𝒱h, which will be used in the error analysis, confer to below.

We will now turn to the error analysis. In order to retain maximal generality in the formulation, we select the appropriate goal-oriented error measure E(u,u) that can be any (Gateaux-differentiable) functional that satisfies the condition E(v,v)=0 for any function v. Hence, E(·,·) may be a norm of e a special case. Using the Gateaux-derivative of E(·,·) with respect to the first argument, we define the secant form of E(u,uh) as follows: (2.7)ES(u,uh;w)=def01ξE(u-(s)+ξw,uh)|ξ=0ds which is a linear functional in w. We then obtain the relation (2.8)ES(u,uh;e)=E(u,uh)-E(uh,uh)=E(u,uh).

We are now in the position to introduce the variational format of the dual problem. Find φ𝒱 such that (2.9)aS(u,uh;φ,v)=ES(u,uh;v)v𝒱.

Having computed φ, we can use (2.8), (2.9), and (2.4) to formulate the exact error representation as follows: (2.10)E(u,uh)=aS(u,uh;φ,e)=R(uh;φ-ρh), for any ρh𝒱h. Here, the arbitrary function ρh can be subtracted due to the Galerkin-orthogonality (2.6). Typically, we may choose ρh as some projection πφ of φ onto 𝒱h, for example, the nodal interpolant, the L2-projection, or the FE-interpolant (solution).

2.2. Approximation of Error

In general, aS and ES depend on the solution u, which is unknown. Hence, approximations are needed in the definition of the dual problem. For instance, the most straightforward assumption is to replace the secant forms with the corresponding tangent forms around the primal FE-solution, confer to . Disregarding the nonlinear effects, we henceforth assume the approximate dual problem. Find φ𝒱 such that (2.11)a~S(φ,v)=E~S(v)  v𝒱, where the approximations a~S*(·,·)aS*(u,uh;·,·) and E~S(·)ES(u,uh;·) were used.

Remark 2.1.

In the case of a linear problem, the secant form aS is equal to the semilinear form of the variational format and therefore (2.12)a~S(v,w)=aS(u,uh;v,w)=a(w,v)      v,w𝒱, which is linear in both arguments.

The exact error representation is given by (2.10). In order to approximate the error, we introduce the approximation of φ as φ~𝒱~. Following the method described in , we compute the enhanced dual solution in an enriched solution space 𝒱~=𝒱hΔ𝒱.

First, we note that the dual problem can be solved using the same FE-mesh as for the primal problem, that is, φh𝒱h is the solution of (2.13)a~S(φh,vh)=E~S(vh)      vh𝒱h. Based on the solution of the dual problem on the primary FE-mesh, φh𝒱h, the enhancement is solved globally or locally resulting in the enhancement ΔφΔ𝒱. Substituting the enhanced dual solution, φ~=φh+Δφ, into (2.10) and choosing πφ=φh, results in the following, approximate, error estimate: (2.14)E(u,uh)R(uh;Δφ).

3. Error Indicators Contributions from Discretization

Based on the error estimation above, we wish to use an adaptive h-refinement strategy. Thus, reliable indicators are needed, holding information of where and how the error is generated (in terms of lacking discretization). We will now turn to the special case of a 2D spatial (boundary value) problem, for which the FE-mesh is made up by linear triangular elements.

3.1. Relating Error Indicators to Edge Refinement

Usually, error indicators are obtained through restricting the error estimator (2.10) or (2.14) to each element Ωe, whereby E(u,uh) can be estimated or bounded by a sum of contributions from each element. Based on the error contribution, it is then decided upon whether or not to refine the specific element. Such a contribution scheme would appear as (3.1)E(u,uh)e=1Nelemηeelem,ηeelem=Re(uh;Δφ), where Re(·;·) is the restriction of R(·,·) to Ωe. The contribution ηeelem is related to the size of element Ωe, and in the adaptive procedure we hope to reduce ηeelem by decreasing the local mesh-size.

We now propose, instead of computing the contributions of error from each element, to derive the error estimate as a sum of contributions from each element edge {Γf}f=1Nedge. Thus, we want to create a contribution scheme like (3.2)E(u,uh)f=1Nedgeηfedge, where ηfedge is the contribution to the chosen measure E(·,·) due to the interpolation error related to the edge Γf, that is, the error that arises from the absence of further basis functions in the primal solution space 𝒱h.

First, we write the error contributions as a sum over the added basis functions. The enhancement space Δ𝒱 is spanned by the basis {ΔNi}i=1NΔ of hierarchical polynomials with corresponding coefficients ΔΦi, such that Δφ=i=1NΔΔNiΔΦi. Thus, (2.14) can be rewritten as (3.3)E(u,uh)i=1NΔηiΔ,  ηiΔ=R(uh;ΔNi)ΔΦi, since R(·;·) is linear in its second argument. The next step is to relate {ηfedge}f=1Nedge to {ηiΔ}i=1NΔ. We propose to introduce coefficients {cfi}f=1Nedgei=1NΔ such that (3.4)ηfedge=i=1NΔcfiηiΔ,f=1,2,,Nedge. In order for (3.2) and (3.3) to coincide, it is clear that the coefficients must satisfy the relation (3.5)f=1Nedgecfi=1,i=1,2,,NΔ. In addition to this, we need to construct the coefficients so that the error contribution is related to the edge in a reasonable way, that is, the error corresponding to ηfedge must be reduced when edge Γf is subdivided.

3.2. Anisotropic Distribution of Error Indicators to Edges

We now turn to the case of using piecewise linear approximation for the primal problem (i.e., 𝒱h) and enriching this with hierarchical basis functions, one edge bubble on each edge (full quadratic basis) and one internal bubble on each element (cubic parasitic term). The linear bases functions are depicted in Figure 1, while the hierarchical basis are depicted in Figure 2 (quadratic bases) and Figure 3 (cubic base), for one element.

The conventional linear basis functions on a triangular element in 2D used for the FE-approximation.

Hierarchical basis functions utilized in error analysis; 3 basis functions constituting the complete quadratic polynomial space (top) and 1 (parasitic) basis function of cubic order (bottom).

Illustration of the similarity in adding a quadratic basis function (a) and subdividing the element with remaining linear approximation (b).

In view of the similarity of the quadratic basis function and the piecewise linear basis function that corresponds to a subdivision of that edge, confer to Figure 2, it is natural to relate the entire contribution ηiΔ to that edge. Thus the coefficients cfi for all i such that ΔNi is an edge bubble are (3.6)cfi={1for  f=f*(i)0for  ff*(i), where f*(i) indicates the edge on which the bubble ΔNi lives.

Concerning the internal bubble function, that has its support inside an element, we distribute its error contribution over the surrounding edges based on fractions of the circumference. Thus the coefficients fei for all i such that ΔNi is an internal bubble function are (3.7)cfi={|Γf|j(i)|Γj|for  f(i)0for  f(i), where (i) indicates edges surrounding the element on which the bubble ΔNi lives and |Γj| is the length of edge number j.

Remark 3.1.

In our experience, the use of a fully quadratic basis (one order higher in convergence) is in many cases sufficient to obtain sharp error estimate, confer to . The rationale for using the, higher order, internal bubble functions as well as the quadratic edge functions is to obtain error indicators for all edges. If only edge-based hierarchical basis functions are added, no error contributions will be obtained for edges on Dirichlet boundaries, since Δφ=0 means that the nodal values, ΔΦ, are zero as well. Thus, if higher resolution is needed along a Dirichlet boundary, it cannot be detected without adding internal functions in the hierarchical basis.

4. Mesh Refinement and Adaptivity 4.1. Subdivision of Triangular Elements in 2D

In the case of element indicators, one important issue is to control the quality of the refined mesh. This is in most cases done adopting strategies to either (i) conserve the initial shape of elements, confer to , or (ii) to thrive at making new elements as isotropic (uniform) as possible in each subdivision, confer to .

In the proposed method, the refinement of an element is governed by which edge/edges of the element is marked for division due to high error contribution. In this fashion, we wish to construct the optimal mesh, depending on the problem, with respect to both size, aspect ratio, and orientation of elements. If the nature of the error (generation and transport) is anisotropic, the algorithm will generate an anisotropic mesh, while for an isotropic behavior of the error, an isotropic mesh will develop during remeshing.

Turning again to the case of linear triangular elements, the refinement of an element is based on the edges to be subdivided, 0, 1, 2, or 3. In the case that 1 edge is indicated for subdivision, two new elements are created. If all three edges are marked for subdivision, an isotropic refinement of the old element into 4 new elements is performed. In the case that 2 of the edges are indicated, the old triangle is subdivided into three new triangles. Two possible subdivisions are possible, based on which of the two error indicators (on marked edges) is the highest. The edge corresponding to the highest error indicator is made vertex for all three triangles, thus enriching interpolation quality in the element primarily along that edge. The possible subdivisions of a triangle are illustrated in Figure 4.

Local subdivision of triangular elements with given edges to refine. 1, 2, or 3 edges can be marked for subdivision (indicated with circles, "" or ""). In the case that two edges are marked for refinement the sub-triangulation depends on which of the two edges has the highest error indicator (marked with filled circle, "").

Note that using the proposed method, each element is refined independently of its neighbors once the subdivided edges are indicated on a global level. Thus neither transitional elements nor iterative procedures need to be adopted.

4.2. Refinement Strategy

The adaptive refinement is set to perform mesh-refinements until a certain tolerance is met, that is, until |f=1Nedgeηfedge|<TOL. When the error is larger than the preset tolerance, edges with indicators, ηfedge larger than a certain value are refined. This value, the local tolerance, is chosen as a fraction of the largest single error contribution. We thus subdivide all edges, f, with contributions (4.1)ηfedge>C·maxf{ηfedgesign(j=1Nedgeηjedge)}, with a suitably chosen constant C(0,1). By multiplying with the sign of the estimate we may deal with negative errors, that is, we only refine edges with contributions increasing the absolute value of the error.

Remark 4.1.

Considering the linear triangular elements, we map the basis functions from a reference element onto the actual element in Ω in standard fashion. When an extremely anisotropic mesh evolves, problems can occur in the element formulation due to an ill-conditioned Jacobian. In order to circumvent this problem, we can restrain the refinement in such a fashion that we always refine the longest edge of a triangle that has become too anisotropic. We can, for instance, control the condition number of the Jacobian or the maximum ratio for the lengths of the edges.

5. Numerical Examples

We will investigate two scalar problems defined in 2D on the unit square, Ω:=(0,1)×(0,1). The first problem, the Poisson problem, has isotropic character, while the second problem, that of reaction diffusion, is constructed such that it contains (anisotropic) boundary layers. For each of the two problems, we compare the proposed anisotropic refinement strategy to those of isotropic and uniform mesh-refinement. For isotropic mesh-refinement, element indicators are used for a procedure of longest-edge splitting, as proposed by Rivara . In the presented examples, a refinement ratio of C=0.3 is used. No shape-control of the elements is applied (or needed) in the presented results.

5.1. Poisson Problem

We study the model problem (5.1)-Δu=1in  Ω,u=0on  Ω. The symmetric problem has a corresponding energy, which is the square of the energy norm, defined by (5.2)vE2=defΩ(v)2dΩ, For illustration, we choose the error measure for adaptation to be the energy of the error. This results in the well-known property that the dual solution and the error function are the same. The energy for the solution of this problem is computed as uE23.51·10-2. The solution is shown in Figure 5. In Figure 6, we study the convergence of error with mesh-refinement using uniform, isotropic and anisotropic strategies. Finally, in Figure 7, adapted meshes for isotropic and anisotropic mesh-refinement are shown.

Solution for the Poisson problem, illustrated by the isolines of the solution.

Convergence of error with refinement (Ndof = no. of degrees of freedom) using different mesh-adaption strategies for the Poisson problem.

Final meshes using different refinement strategies for the Poisson problem. 14th isotropic mesh with eE2/uE26.35·10-4 (a) and 17th anisotropic mesh with eE2/uE28.26·10-4 (b).

5.2. Reaction-Diffusion Problem

We study the model problem (5.3)-ϵΔu+u=1in  Ω,(5.4)u=0on  Ω. The symmetric problem has a corresponding energy (5.5)vE2:=Ωϵ(v)2+v2dΩ. In the example, the diffusion-coefficient is chosen to be ϵ=10-41 to provoke appearance of boundary layers. For illustration, we choose the error measure for adaptation to be the energy of the error. The energy for the solution of this problem is computed as uE20.96. The solution is shown in Figure 8. In Figure 9, we study the convergence of error with mesh-refinement using uniform, isotropic and anisotropic strategies. Finally, adapted meshes for isotropic, and anisotropic mesh-refinement are shown in Figure 10. We note that with anisotropic mesh-refinement the mesh develops differently in the four corners of the domain. This is due to the indeterminacy of choosing how to refine an element, for which two edges of equal size error contributions are marked for subdivision, confer to Figure 4.

Solution for the reaction-diffusion problem, illustrated by the isolines for the solution. Note the pronounced boundary layers produced by the Dirichlet boundary conditions.

Convergence of error with refinement (Ndof = no. of degrees of freedom) using different mesh-adaption strategies for the reaction-diffusion problem.

Final meshes using different refinement strategies for the reaction-diffusion problem. 15th isotropic mesh with eE2/uE27.14·10-4 (a) and 8th anisotropic mesh with eE2/uE27.90·10-4 (b).

6. Conclusions and Outlook

The proposed method shows promising behavior in the following respects: (i) it is more efficient than an isotropic refinement strategy for problems of anisotropic nature, (ii) its behavior is similar to that of the isotropic strategy when the nature of the problem is isotropic. Thus the method is truly adaptive, in the sense that the mesh becomes anisotropic if and only if, the nature of the error demands it, without adding any extra cost to the computation. Furthermore, the refinement procedure is extremely simple, since all element subdivisions are completely independent of their neighbors once the edges to subdivide are indicated.

For future work, the method seems appealing to extend to 3D due to (i) the efficiency in terms of degrees of freedom and (ii) the ease of implementation. If a corresponding method is to be used for quadrilateral (or hexahedral) elements, additional constraints must be applied, in order to control the legality of the iso-parametric mapping.

Bank R. E. Sherman A. H. An adaptive, multilevel method for elliptic boundary value problems Computing 1981 26 2 91 105 10.1007/BF02241777 MR619932 Rivara M. C. Algorithms for refining triangular grids suitable for adaptive and multigrid techniques International Journal for Numerical Methods in Engineering 1984 20 4 745 756 10.1002/nme.1620200412 MR739618 ZBL0536.65085 Goodman J. Samuelsson K. Szepessy A. Anisotropic refinement algorithms for finite elements Report, NADA KTH, Stockholm, Sweden, 1996 Stein E. Ohnimus S. Anisotropic discretization- and model-error estimation in solid mechanics by local Neumann problems Computer Methods in Applied Mechanics and Engineering 1999 176 1–4 363 385 10.1016/S0045-7825(98)00345-4 MR1665353 ZBL0954.74072 Siebert K. G. An a posteriori error estimator for anisotropic refinement Numerische Mathematik 1996 73 3 373 398 10.1007/s002110050197 MR1389492 ZBL0873.65098 Apel T. Grosman S. Jimack P. K. Meyer A. A new methodology for anisotropic mesh refinement based upon error gradients Applied Numerical Mathematics 2004 50 3-4 329 341 10.1016/j.apnum.2004.01.006 MR2074008 ZBL1050.65122 Rachowicz W. An anisotropic h-adaptive finite element method for compressible Navier-Stokes equations Computer Methods in Applied Mechanics and Engineering 1997 146 3-4 231 252 10.1016/S0045-7825(96)01230-3 MR1455170 Darmofal D. L. Venditti D. A. Output-based error estimation and adaptation for aerodynamics Proceedings of the 5th World Congress on Computational Mechanics 2002 Formaggia L. Micheletti S. Peretto S. Anisotropic mesh adaption with application to CFD problems Proceedings of the 5th World Congress on Computational Mechanics 2002 Eriksson K. Estep D. Hansbo P. Johnson C. Introduction to adaptive methods for differential equations Acta Numerica 1995 4 1 105 158 Becker R. Rannacher R. An optimal control approach to a posteriori error estimation in finite element methods Acta Numerica 2001 10 1 102 10.1017/S0962492901000010 MR2009692 ZBL1105.65349 Oden J. T. Prudhomme S. Goal-oriented error estimation and adaptivity for the finite element method Computers & Mathematics with Applications 2001 41 5-6 735 756 10.1016/S0898-1221(00)00317-5 MR1822600 ZBL0987.65110 Ladevze P. Strict upper error bounds on computed outputs of interest in computational structural mechanics Computational Mechanics 2008 42 271 286 Parés N. Santos H. Díez P. Guaranteed energy error bounds for the Poisson equation using a flux-free approach: solving the local problems in subdomains International Journal for Numerical Methods in Engineering 2009 79 10 1203 1244 10.1002/nme.2593 MR2560964 ZBL1176.65127 Zienkiewicz O. C. Zhu J. Z. A simple error estimator and adaptive procedure for practical engineering analysis International Journal for Numerical Methods in Engineering 1987 24 2 337 357 10.1002/nme.1620240206 MR875306 ZBL0602.73063 Richter T. A posteriori error estimation and anisotropy detection with the dual-weighted residual method International Journal for Numerical Methods in Fluids 2010 62 1 90 118 10.1002/fld.2016 MR2597357 ZBL1192.65144 Larsson F. Hansbo P. Runesson K. Strategies for computing goal-oriented a posteriori error measures in non-linear elasticity International Journal for Numerical Methods in Engineering 2002 55 8 879 894 10.1002/nme.513 MR1928975