21
ELSEVIER Finite Elements in Analysis and Design 25 (1997) 297-317 FINITE ELEMENTS IN ANALYSIS AND DESIGN Improvements on Delaunay-based three-dimensional automatic mesh generator Paul Louis George INRIA, Domaine de Voluceau, Rocquencourt, BP 105, 78153 Le Chesnay Cedex, France Abstract This paper describes an automatic mesh generator providing tetrahedral meshes suitable in general for finite element simulations. The mesh generator is of the Delaunay type and the paper focuses on recent improvements relative to this a priori well-known method. Keywords: Mesh generation; Tetrahedral element; Delaunay triangulation; Finite element 1. Introduction Reliable and efficient mesh generation algorithms are an essential prerequisite for PDE (such as CFD) simulations using the finite element method. In the context of unstructured meshes, several methods have been addressed in the last 20 years including advancing-front, octree and Delaunay-based methods. The mesh generation algorithm we would like to propose in this paper is of the Delaunay type. A great attention has been paid to Delaunay algorithms both by the computational geometry people and by the PDE groups. Delaunay, himself, has proposed, in 1934, a work which is regarded as the basis of todays methods. Nevertheless, one had to wait until the early 1980's for constructive algorithms essentially proposed by Bowyer, Watson and Hermeline whose works were recognized as the basic foundations for effective algorithms. Recent improvements have been proposed to obtain reliable and efficient implementation of such algorithms. The paper, we would like to propose, clearly takes place in such a context. Our goal is to discuss an algorithm for the triangulation problem, subject to a geometrical, a mesh quality and a CPU requirement constraints. The data necessary for a Delaunay-based algorithm are a discrete form of the boundary of the domain. This form is a triangulation of the surface defining the domain seen as a conformal triangular mesh of the latter. The first constraint relies in maintaining exactly this surface mesh in 0168-874X/97/$17.00 © 1997 Elsevier Science B.V. All rights reserved PII S0 1 68-874X(96)00063-7

Improvements on Delaunay-based three-dimensional automatic mesh generator

Embed Size (px)

Citation preview

Page 1: Improvements on Delaunay-based three-dimensional automatic mesh generator

ELSEVIER Finite Elements in Analysis and Design 25 (1997) 297-317

FINITE ELEMENTS IN ANALYSIS AND DESIGN

Improvements on Delaunay-based three-dimensional automatic mesh generator

Paul Louis George

INRIA, Domaine de Voluceau, Rocquencourt, BP 105, 78153 Le Chesnay Cedex, France

Abstract

This paper describes an automatic mesh generator providing tetrahedral meshes suitable in general for finite element simulations. The mesh generator is of the Delaunay type and the paper focuses on recent improvements relative to this a priori well-known method.

Keywords: Mesh generation; Tetrahedral element; Delaunay triangulation; Finite element

1. Introduction

Reliable and efficient mesh generation algorithms are an essential prerequisite for PDE (such as CFD) simulations using the finite element method.

In the context of unstructured meshes, several methods have been addressed in the last 20 years including advancing-front, octree and Delaunay-based methods. The mesh generation algorithm we would like to propose in this paper is of the Delaunay type. A great attention has been paid to Delaunay algorithms both by the computational geometry people and by the PDE groups. Delaunay, himself, has proposed, in 1934, a work which is regarded as the basis of todays methods. Nevertheless, one had to wait until the early 1980's for constructive algorithms essentially proposed by Bowyer, Watson and Hermeline whose works were recognized as the basic foundations for effective algorithms.

Recent improvements have been proposed to obtain reliable and efficient implementation of such algorithms. The paper, we would like to propose, clearly takes place in such a context. Our goal is to discuss an algorithm for the triangulation problem, subject to a geometrical, a mesh quality and a CPU requirement constraints.

The data necessary for a Delaunay-based algorithm are a discrete form of the boundary of the domain. This form is a triangulation of the surface defining the domain seen as a conformal triangular mesh of the latter. The first constraint relies in maintaining exactly this surface mesh in

0168-874X/97/$17.00 © 1997 Elsevier Science B.V. All rights reserved PII S0 1 6 8 - 8 7 4 X ( 9 6 ) 0 0 0 6 3 - 7

Page 2: Improvements on Delaunay-based three-dimensional automatic mesh generator

298 P,L. George, Finite Elements in Amdysis aml Design 25 (1997j 297 3l 7

the 3D resulting mesh. To be siJitable for finite element computations, a mesh must enjoy a good quality. The latter is defined as the ratio h/l~ where h is the element diameter and p is the element in-radius. The second constraint is to obtain a mesh whose elements offer a good quality. Due to the size of the meshes used in the computations, in terms of number of elements, the third constraint has the capability of creating large size meshes in very short times.

The paper will focus on these three aspects and aims to show that the proposed method has the capability to produce one million elements in a few minutes on a reasonably fast work station. To achieve this, new algorithms are proposed to deal both with the Delaunay aspects of the method and with the other parts of the global algorithm including the regeneration of the initial surface mesh, the way in which the field points are created and the optimization procedures used at the end of the process.

As it appears to be too long and not so easy to give the state of the art in terms of Delaunay mesh generation methods, we assume that the bibliography the paper allow the reader to compare the discussed method with similar algorithms proposed in the literature.

The first phase of such a generator, i.e. a yenerator preservinq a yiven boundary (the resulting mesh must contain the boundary faces) can be a ~lenerator (?fspecffied points (the mesh needs only contain given points). The generation method is based upon a modified Delaunay's method as the latter (in its classical meaning) induces some numerical difficulties (Section 2). The second phase is the construction from the previous mesh, of a mesh including the specified faces exactly as the latter cannot be completed, in general, by using the Delaunay's method (Section 3). The following phase concerns the creation of internal points, after which the insertion method is used to update the current mesh. Point creation methods are addressed in Section 4. Optimization procedures used to enhance the quality of the resulting meshes are discussed in Section 5. The general scheme of the generator as well as capabilities and application examples are given in Section 6.

2. Insertion point process

2. 1. General principles

Let {Pk} be a set of points in R 3. The Delaunay method consists in creating a triangulation composed of tetrahedra or convex polyhedra whose vertices are the members of {Pk }. An initial triangulation can be obtained as the dual of the Voronoi cells, V~, defined as

V,. = {P such that IdP - Pid[ <~ iJP - Pill, V.j # i l

V~ is a closed convex polyhedron; for simplicity, Section 3.1 describes the problem in two dimensions. Thus, these ceils (Fig. 1, dotted lines) cover the space and do not overlap, and are known as the Dirichlet tesselation of the entire space including the initial points. The cell sides are midways between the two points they separate, so that it is obvious to obtain the Delaunay triangulation associated with the Voronoi cells by constructing the elements formed by joining the points of two cells sharing a side. More precisely, the above construction enables us to create the triangulation of the convex hull of the specified points which consists of triangles and convex polygons (other than triangles) in R z (see Fig. 1} and tetrahedra and convex polyhedra (different from tetrahedra) in R3: see [1]. In practice, non-simplicial elements can be easily split into

Page 3: Improvements on Delaunay-based three-dimensional automatic mesh generator

P.L. George/Finite Elements in Analysis and Design 25 (1997) 297-317 299

I I

I t

Fig. I. The Delaunay triangulation.

simplices. The resulting triangulation is also said to be the Delaunay triangulation of the convex hull of the given set of points and elements resulting from such a partition are said to be special. In the case where special elements exist, the Delaunay triangulation is not unique.

This type of triangulation is optimal in some sense as it enjoys a series of properties resulting from the following: the circumball associated with the non-special elements does not contain any other point of the triangulation.

2.2. Connection .from points to points

The above method for constructing a Delaunay triangulation of a set of points proves to be ineffective in practice. This is why alternative methods have been proposed to solve the problem. The incremental method depicted below was introduced, almost simultaneously, by Hermeline [2] and Watson [3] in the early 1980's. Let {Pk} = {P~, P2, ..., P,} be a set of n distinct points, and Told a Delaunay triangulation whose element vertices are the first i points of {Pk}; then triangula- tion Tnew can be derived from triangulation To~d in such a way that point Pi+~ becomes one of its element vertices.

For simplicity and without loss of generality, we assume that there exists an enclosing triangula- tion To such that all points in the given set fall within To. Then a constructive method for creating the triangulation T, ew can be as follows (the two-dimensional case is described, which can easily be extended to t h e three-dimensional case by replacing planes, circumcircles and edges by spaces, circumballs and faces).

Let cg be the set of elements in To~d, the so-called cavity, whose circumballs contain point Pi+ 1 and let F1, .. . , Fr be the external edges of this set; then

T.~w = (Told - (~)~..J~i+ 1 (1)

with ~i+ 1 ----- U2= ~,p{Fj, Pi+ ~ } the ball associated with point P~+ 1.

Page 4: Improvements on Delaunay-based three-dimensional automatic mesh generator

300 P.L. George/' Finite Elements in Analysis and Design 25 (1997) 297-317

/

' v - - - - I > .............. - / )

Fig. 2. Insertion of point P. alias P~_ ~ (after Hermeline).

In other words, the Delaunay construct ion consists in defining properly the cavity, removing it from the current tr iangulation and replacing it by the ball ,~;+t.

Thus, the element vertices of the resulting mesh 71,e,,, are the first (i + 1) points of set {&}. As previously mentioned, this mesh is obtained by replacing the cavity cg by the ball ~i+ ~, i.e. by joining P;+ 1 to the edges Fj (Fig. 2). This method is initialized by creating To constructed by hand as a Delaunay tr iangulation of the enclosing box.

The points of [ P ~ are inserted one-at-a-time and the final tr iangulation Tnew covers the int roduced box (To) and is Delaunay; see e.g. [2].

The sole condit ion for which process (1) results in a valid mesh if that the cavity is defined in such a way that ~ + 1 is composed of valid elements. It means that the key of the process is the correct definition of ~.

2.3. Robust insertion point method

Unfortunately, the construction of % is based on numerical computa t ions involving circles (spheres) and thus is very sensitive to round-off errors, so there is no guarantee about the correct definition of the cavity. Two situations frequently encountered when construct ing ~ using the classical Delaunay criterium must be corrected. The first one consists in finding an element whose relevant face defines a plane from which the point under considerat ion is too close. The other case consists in enclosing a previously inserted point in ~. As these two cases result in an incorrect mesh, an alternative way to construct the triangulation, not neccessarily strictly Delaunay (this does not mat ter as constrained items related to maintaining the boundary integrity must be present), has been developed.

We first introduce an enclosing tr iangulation To to fall into the above situation. Then the only thing to do is to find in To~d a suitable set ~g, i.e., the following properties are required: external sides

Page 5: Improvements on Delaunay-based three-dimensional automatic mesh generator

P.L. George/Finite Elements in Analysis and Design 25 (1997) 297-317 301

of ~ are visible f rom Pg + 1; ~ is a connected set and Z is empty, meaning that it does not contain points of { Pk } other than Pi + 1. The main interest of this alternative me thod is that, as will be seen below, it involves only the computa t ion of surfaces (volumes) and does not necessitate a precise considerat ion of circumcircles (spheres). The following algori thm is proposed:

• Initialization. Const ruc t ion of the base:

1. Find the element(s) (the base) in Told enclosing P~+ t and stack this (these) in cg;

• Const ruc t ion of an approximate cavity:

2. Recursively construct the cavity by visiting the neighbors of its elements and check if point P~ + 1 satisfies the circle (sphere) criterium. If an element is selected, it is stacked and we return to 2. This operat ion, performed with round-odd errors, results in a set cg~ possibly not valid;

• Cons t ruc t ion of a valid cavity:

3. Find F1, . . . , Fp the external sides of cg and check if cg is a connected set, i.e. verify that each element in this set has at least one neighbor in the set. If one element fails in this property, it must be removed from ~; Define the p simplices, K~, formed by joining the sides Fj with Pi+ 1 and denote by Det(K~) the surface (volume) of element K j; Define nv to be the number of distinct endpoints of Fj and ns to be that of distinct vertices in c¢;

4. Set ,9 ~ = ~. Loop for j -- 1, p; - If Det(K~) > 0, continue; - If Det (Kj ) < O, 5"; = ~ - K i where Kj is the simplex of 90 with side F~; - If Det (Kj ) = O, 5¢ = 5e u K~, where Kj is the simplex of Told, with side F~, not in ~9 ~'.

5. If ~9 ~ is not affected by step 4, go to 6; if not, update the set of Fj and return to 3; 6. If nv and ns are equal, set qf = 9° and go to 7; If not, set 90 = 5 ~ - K and return to 3 (K is any

"possible" simplex (i.e. not in the base) in To30 having a vertex, distinct from Pi + 1, in .90 and not in the Fjs);

7. Then, apply process (1), End.

This a lgori thm is repeated for all points in {Pk}. Computa t ion involved in the process are of integer type (for nF and ns) and floating type for the surfaces (volumes) used to compute the relevant Det(Kj) . Thus, it obviously produces a valid t r iangulat ion of the enclosing box since the computa- t ion of surfaces (volumes) is exact; to obtain this, the coordinates of the points are converted to integers. One can notice that steps 4 and 6 of the above algori thm clearly deal with the two invalid situations ment ioned at the beginning of this section.

Up now, the boundary integrity phase can be envisaged, before proceeding to this impor tan t step, we wish to give some numerical details on the effective implementa t ion of the algorithm.

2.4. Numerical aspects

To be suitable and to lead to a reasonable efficiency, the data structure used to store the t r iangulat ion must be defined carefully. The data structure we propose consist, in three dimensions,

Page 6: Improvements on Delaunay-based three-dimensional automatic mesh generator

302 P.L. (ieor~,le/ Finite Elements in Am~l)'sis and Desi~/n 25 (1997) 297 317

of the following (he is the number of elements, ,p is that of points):

• a table containing the element vertices, simp( 1 : 4, l :he), • a table containing the vicinity relationships, neiqh(1:4, l:ne), where the (4) element numbers

sharing a face with a given element are indicated, • a table containing the circumcenter coordinates, cent(l: 3, 1: ne), • a table containing the circumcircle radii, radii{l:nel, • a table containing the vertex coordinates, coor(l : 3, l:npj, • a table indicating, for each point, a simplex having it as vertex, start(l:,p), • a background grid where the points are encoded to facilitate some useful requests.

The effective implementation of this algorithm necessitates the correct management of these tables, thus it includes the

• construction of the base, . construction of a possibly inaccurate cavity, • correction of this cavity, • effective insertion of the point under consideration including:

- the enumeration of the (new) elements vertices, - the update of the vicinity relationships, - the computat ion of the centre and radius of the circumcircles (circumspheres) associated with

the new elements, the update of the background grid.

All of these steps can be time consuming so special attention must be paid to obtain a reasonable efficiency. In that follows, we aim to give some indications about a possible startegy to deal with these steps.

The construction of the base consists in finding the element(s) within which a given point falls. Thanks to the enclosing triangulation, we are in a convex domain and the searching method, briefly, is initialized by an arbitrary simplex: then, by adjacency, we visit the elements in the mesh until the convergence holds. Basically, the first candidate is selected using the background grid as well as table start already mentioned. The examined point is assumed to fall within the current element of the visit and we compute the 4 volumes constructed by joining this point with the faces of this element. The sign of these volumes is used to select such or such neighbour and continue the process until the 4 volumes are positive. Clearly, the efficiency of this procedure is strongly connected to the number of elements we have to visit.

The construction of a guest cavity relies in comparing the distance between the point and the centre of the examined element with the radius of the circumsphere associated with this element.

The correction of the cavity uses only volume computation. Now, the effective construction of the new elements requires, as coasting operations, the correct

definition of the new vicinity relationships and the computat ion of the new centres and radii of the circumspheres associated with the elements. Vicinity relationships are constructed by hashing the edges of the relevant ball (in two dimensions they may be obtained directly without hashing as they inherit from the old relationships and as this property can be easily exploited). New centres and radii clearly inherit from the old values and are obtained at a low cost.

Page 7: Improvements on Delaunay-based three-dimensional automatic mesh generator

P.L, George~Finite Elements in Analysis and Design 25 (1997) 297-317

Table l Constrained Delaunay point insertion method

- n p n e t v

Mesh 1 3 090 20 276 0.81 1 483 000 Mesh 2 26012 166 556 I0.94 904000 Mesh 3 32 380 216 373 14.56 882000 Mesh 4 12 656 69 889 5.34 785 000 Mesh 5 62 666 370 578 24.14 921000 Mesh 6 214 249 1 307 608 89.12 880 000

303

Remark 1. In the case of a finite element application of this point insertion algorithm, a con- strained variation must be employed to preserve the specified faces and edges (i.e. that of the given boundary) that can be removed when a point is inserted. To achieve this, steps 2 and 4 of the process are modified to ensure that a specified face, existing in the current mesh, cannot be traversed (of course, this constraint is time consuming).

Remark 2. It is well known that a Delaunay-type method may produce, in three dimensions, very undesirable elements in terms of aspiect ratio; among them are the so-called silver elements. The above process can be designed so that such elements are avoided.

2.5. Performances

Table 1 reports the performance, in terms of elements per minute, of the above method, np denotes the number of vertices, ne is the number of elements, t is the time in seconds (using an HP 9000/735 99 Mhz workstation) while v is the number of elements created within 1 min. The method depicted is a constrained version (see the above remarks) of the previous algorithm in three dimensions.

The first three lines of the table report the efficiency of the constrained Delaunay process sequentially applied with a light control about the element quality while the other three lines report the same in the case of a randomized insertion of a set of points and a more restrictive condition about the element quality (i.e. the control avoiding the sliver elements).

3. Boundary integrity

In the context of finite element simulations, domains are commonly known via their boundaries. The latter are formed by a set of edges in R 2 and a set of triangles in R 3. A natural idea is to constitute the set of all the endpoints of these edges (faces) as set {Pk} and to apply the above method. This results in the creation of a triangulation with element vertices at all the points of the boundaries. But such a triangulation does not a priori include the items of the initial boundaries (see Fig. 3 where a simple example is depicted in two dimensions). The rest of this section discusses the way in which these missing items can be regenerated.

Page 8: Improvements on Delaunay-based three-dimensional automatic mesh generator

304 P.L. George / F i n i t e Elements in Analys is and Design 25 ~'1997/ 297 317

A 2

T - 7 ! i I

i , I i

t j ;5

6----- -c,- ......... o -

Fig. 3. Edges are missing while their endpoints exist.

3.1. Boundary problem in two dimensions

Several methods are usually used to deal with the problem of the maintaining of the integrity of the boundary of a domain. All of these prove to produce the desired solution. Some are based on the creation of the midpoint of all missing boundary edges; see [4], or on the creation of one internal point for every boundary edge. What we propose uses only some diagonal swapping procedures.

First, all specified points are inserted and a check of the mesh enables us to find the missing boundary edges. After having obtained all of them, we define the pipes associated with each of them and deal with these as described below.

A pipe associated with a missing edge, say PiP~, is the collection of the following elements: one having vertex Pi such that P;P~ intersects the edge opposite to P;; one with vertex Pj- such that the edge opposite to P; is intersected by P; Pj-; and those possessing two edges intersected by e;P;.

We define the diagonal swapping procedure as the local modification of two elements sharing an edge and forming a convex quadrilateral in two new elements by using as common edge the other diagonal of the initial quadrilateral. Then the algorithm consists of processing each pipe in the mesh, and: • if the pipe contains only two members, swap them, End. • if not, consider its first member and as a second member the element sharing the edge intersected

by the missing edge: if these two elments can be swapped: swap them,

- if the swap is not possible, then either reverse the pipe and try again or if the pipe has already been reversed, look for two consecutive members in the pipe which can be swapped.

Remark 3. A variation consisting in swapping randomly an undesirable edge in the pipe has proved to converge to the desired solution.

Remark 4. One has to notice that the sole operation used in the above algorithm is the diagonal swapping.

Page 9: Improvements on Delaunay-based three-dimensional automatic mesh generator

P.L. George~Finite Elements in Analysis and Design 25 (1997) 297-317

A A

B B

Fig. 4. Transformation Tr2~3.

305

This algorithm converges as soon as the boundary of the domain is not crossed; see [5] for example. The key of the method is to reduce the cardinality of the encountered pipes so that it becomes 2.

3.2. Boundary problem in three dimensions

The three methods discussed for the two-dimensional case extend to this situation and prove to produce the desired solution. Only the third method is now depicted. First, as in R 2, all specified points are inserted and a check of the mesh enables us to list the missing boundary edges and faces. The method considers, firstly, the missing edges and then the missing faces.

We define the following two sets of elements: (1) the pipes associated with a missing edge, and (2) the local shells associated with an edge. These, two basic sets, correspond to the possible situations in which a line (the missing edge under consideration), whose endpoints are element vertices, passes into the tetrahedra.

Similarly as in R 2, the pipe associated with the missing edge Pi Pj is the collection of the following elements: one having vertex P/such that PiPj intersects the face opposite to Pi; one with vertex Pj such that the face opposite to Pi is intersected by P/Pj; and those possessing two faces intersected by P,. Pa. While a local shell associated with any edge P,.P~ is composed of all the elements sharing an edge intersected by Pi Pj.

Considering one missing edge, namely Pi P~, we find the elements having at least one edge or one face intersected by Pi Pa. Two cases are encountered: either this set of elements is a pipe, or at least one element exists with one edge, c~fl, intersected by P~Pj such that the set of interesting elements contains the local shell aft.

We define some local element modifications in such a way as to create desirable edge(s) or face(s) or remove undesirable edges(s) or face(s).

Among these we consider the case of two elements sharing a face and forming a convex polyhedron: let ~flTA and Befit be these elements; then the associated polyhedron can be remeshed by the elements A B ~ , AB~y and ABTe. It implies that facde eft7 was deleted and edge AB is created; this process is, for simplicity, denoted as Tr243 (2 elements are replaced by 3 elements, see Fig. 4). Such a local transformation will be used in the case where pipes are encountered.

In the case where a shell must be dealt with and if it is convex, it can be remeshed in such a way that its defining edge is deleted.

Page 10: Improvements on Delaunay-based three-dimensional automatic mesh generator

306 P.L. Georqe/ Finite Elements in Analysis and Desi.qn 25 (1997) 297 317

Let us denote by Mi~[4M~ ~, l\~r i = 1, n (with M,,+ ~ = M~) the n elements in the shell associated with edge :~[~: then it suffices to remesh the polyhedron defined by the M;'s with triangles properly and to connect these triangles both with ~ and [~ to obtained the desired solution (see also Section 5).

For a non-convex shell, the above remeshing process can be applied successfully when the shell is star-shaped in some sense.

The proposed algorithm consists in visiting all pipes and shells in the mesh and applying the appropriate local transformation as far as the pipe contains more than two elements or the shell can be reduced. It should be noticed that in some cases, it is necessary to create one internal point, the so-called Steiner point, to be able to reduce a configuration. This algorithm converges to the desired solution as soon as the boundary of the domain is not crossed (this is trivially true); see [6].

Remark 5. Contrary to the two-dimensional case, one has to notice that the operations needed in the process include local rewriting of shells, face swapping and Steiner point creation(s). The latter is one of the main diffculty of the process.

Once all specified edges are recovered in the lriangulation, the specified faces can be regenerated. To achieve this, we basically apply a quite similar algorithm for every missing face. After this process all specified faces exist in the triangulation.

Remark 6. The cpu time required for the boundary regeneration is connected to different para- meters. Clearly, a given surface composed of well-shaped triangles is very easy to regenerate while bad-shaped surfaces lead to expensive computations.

3.3. Definition o f the connected components ()[ the domain

Once the boundary items have been regenerated using one of the above methods, it is possible to define the elements which are inside the domain (assumed to the non-convex) precisely from those which are outside the domain. In general, i.e. in the case where the domain includes different connected components, it is possible to enumerate all of them. The following algorithm is proposed.

1. Assign v = - 1 to all elements and set c = 0 (in fact, c can be interpreted as a color). 2. Find an element which is clearly outside the domain and assign c = c to it. 3. Visit its neighbours recursively: if the color of this element is not - 1 return to 3; else if

the common face is not a boundary face: v = c: else if the common face is a boundary face, return to 3.

4. If an element with ~, = - 1 still exist: c = c + 1. return to 3.

In this way, elements can easily be classified with respect to the different connected components of the domain and the suitable components can thus be retained (the outside corresponds to v = 0). Note that the deletion of outside elements is generally not performed at this step but only at the very end of the generation process in order to simplify the insertion of field points. This is a convenient way to remain in a convex domain so that searching operations will be easy to perform at the time the field points will be considered.

Page 11: Improvements on Delaunay-based three-dimensional automatic mesh generator

P.L. Geor.qe/ Finite Elements in Analysis and Design 25 (1997) 297-317 307

4. F i e l d p o i n t s

In the case where the data consist only of the domain boundaries, it is required to create and insert internal points. On contrary, internal points are known and must only be connected using a constrained version of algorithm (1).

4. I. Creation and insertion o f the internal points

One of the advantages of the Delaunay method is that a mesh of the domain is known since the boundary integrity has been completed. The element vertices of this mesh are the given points, i.e. essentially the boundary vertices. Thus, this mesh can be used as a background to help in the creation of the internal point. Two major classes of methods are popular: one consists in creating and inserting, element by element, a certain number of internal points as long as some criterion is not reached; the other involves a different method (advancing-front, algebraic, octree . . . . ) to create the points and then uses the Delaunay method (in the case where the mesh is not Delaunay, the insertion method must be adapted; see Remark 1) to insert them. In this section, we assume that only data of geometrical nature are known. Thus, the creation of internal points can only involve geometrical ideas (the case where physical information is available is discussed in 1-7]).

As an example of a first type method, we propose one which is purely local and involves only the Delaunay method. First a local (isotropic) stepsize hio~ is associated with each data point, this value is computed by taking into account the length, the surface . . . . of boundary edges and faces. Then, consider the elements in the mesh, and:

Insert a point if the element is too large with respect to a value related to the h~o~ associated with its vertices [2]. A variation consists of inserting a point inside each element whose circumcircle (circumsphere) is "large". The location of the internal point to be created is computed by a weighted barycentre.

The loop over the elements is then repeated until no creation of points is required.

Remark 7. This method, advocated in the first, suffers from some bad properties. While the base is known in advance and the cost necessary to search for it is null, it produces generally not so good locations for the field points so that the resulting mesh must be optimized at the end of the process. This is our experience, in particular, in three dimensions.

As an example of a second type method, we propose the following which is based on a simplified algebraic method for the creation of points and uses the Delaunay method to insert them. As above a local (isotropic) stepsize hloc is associated with each data point. Then, consider the elements in the mesh, and:

For every non-boundary edge, el, of the element - compare the length of the edge with the local stepsize of its endpoints, hlocl and hloe2;

determine ni the number of points to create on edge ei such that they follow a given distribution (arithmetic or geometric) varying smoothly from h~ocl to hloc2; then stack the so-created points and compute their h~oc

Page 12: Improvements on Delaunay-based three-dimensional automatic mesh generator

3 0 8 P.L. George/Finite Elements in Analysis and Design 25 (1997) 297-317

• Remove, using the background grid as a filter, from the stack those points which are too close to another point and insert the points in the resulting stack (if it is not empty).

This method has proved to be efficient both in R 2 and R 3.

Remark 8. This method is preferred in terms of efficiency. While the base is not known in advance and the cost necessary to search for it is not null, it produces in average good locations for the field points so that at the time the resulting mesh is optimized, we have to pay a relatively low cost.

Remark 9. As the field points are created in a (large) stack, the point insertion process can be randomized so that its cost is "optimal".

4.2. Numerical aspects

Here are some indications regarding the way in which the field are created. The example of an arithmetic distribution is considered.

As mentioned above, the edges in the current mesh are examined by comparing their lengths, say d, with the stepsizes of their endpoints, thocl and hlo~2. The aim of the method is to determine n, the number of points, we need to create in the visited edge so that the edge is, on the one hand, saturated and, on the other, the distribution of these points is smoothly balanced in an arithmetic manner.

Let us denote the following: • h(0) = h¿,,cl the stepsize of one endpoint, say Po, • h(n + 1) = h~o~2 the stepsize of P,,+ ~ the other endpoint, and define the series ~ by . % = h ( 0 ) + r , • ~ , = h ( n + 1 ) - r , • ~xi=D(Pi, Pi+1), where D is the distance between P~ and P~ ~ ~, and r is the ratio of the distribution. The problem turns into solving the following system:

~ i = d , i=o (2) ~ i + 1 = 3(i @ t'.

this leads to

2d H =

h(O) + h(n + l) and

- I

iih(n + l) - h(0)ll

n + 2

As n must be an integer value, the solution is scaled so that n and r lead to an exact discretization of the visited edge. At the time n and r are known, the series of points is obtained. This process is

Page 13: Improvements on Delaunay-based three-dimensional automatic mesh generator

P.L. George/Finite Elements in Analysis and Design 25 (1997) 297-317 309

repeated for all the edges in the mesh and the so-created points are then filtered, using the background grid, before being connected using algorithm (1).

Remark 10. The above algorithm can be interpreted in a different way. It is a manner to create unit edges everywhere inside the domain, this unit value being evaluated in a local metric defined as a smooth interpolate from h(0) to h(n + 1).

Remark 11. This way of generating the field points has proved to be very efficient, in terms of mesh quality (see Section 5) both in two dimensions and three dimensions. If two dimensions, in most of the examples, the mesh resulting from algorithm (1) processed with such points does not need additional smoothing operations as the quality is very good. In three dimensions, most of the examples dealt with, indicate that while most of the element enjoy a good quality, there are still a small number of elements with bad aspect ratio; thus smoothing processes are necessary.

5. Smoothing procedures

5. I. Mesh quality

Good mesh quality is a major key to obtain precise solution (and/or to facilitate the solution step of the computation, in particular when an iterative method is used). The mesh quality is defined in terms of element qualities. There exist several ways to measure the quality of the elements in a mesh. We have experienced some of them among which are

hM hMS Q h M ~ - ~ - ~ ~ - p V '

Qh, = hl V '

where h M = maxi= 1,6 hi, hi being the length of edge i of the element under consideration, p is the in-radius S = ~i=1,4 Si, Si being the surface of face i, V is the element volume,

hs = X/i =~1. 6 I' hl ,,2,

and, finally, ~ (resp. ~') is a scaling factor ensuring that an equilateral element's value is 1. These two measures vary from 1, the value associated with well-shaped elements, to 0% the value

of very bad-shaped elements. In practice, Qh~, is more expensive to compute but is more sensitive so that this measure leads to better solutions. Thus, Qh~ is only used in some case where the sensitivity is not a crucial aspect.

The mesh quality is then appreciated with regard to three aspects: • Qmesh = maxi= 1,,eQi where Q~ is such or such of the above element quality, ne being the number

of elements in the mesh, • the distribution of the elements in terms of their quality,

Page 14: Improvements on Delaunay-based three-dimensional automatic mesh generator

310 P.L. (;(,orfte Finite Elements in Amllysis amt Design 25 (1997) 297 317

• Qm,~h compared with a target value, Target. This value is the quality of the best element that can be constructued using the worst face in the data.

The aim is to obtain a mesh with most ()fits elements with quality close to 1 such that Qmesh is in the range of Tar qet. To achieve this, several types of local processes can be envisaged which are detailed in the rest of the section.

5.2. Relocatinq the rertices

The local tool consists in processing the balls associated with the vertices in the mesh whose location can be modified to enhance the mesh quality. The quality of the ball is measured as above, i.e. the goal is to optimize the worst element in the ball.

Let P be a free vertex in the mesh. Relocating the point P consists in moving P, step by step (via a given coefficient (,~) towards an "'optimal" point Pop, which is determined by simulating the ideal elements lying on the triangles which are the external faces of the ball Be. This operation can be seen as follows:

P = P + d ,

d = (oPt)opt,

Pop! = ~ /~.iPid,, i = !

w h e r e , is the number of elements in the ball Be, P~d, is the "ideal" location of P with regard to triangle number./, external face of By and fli ( Y,_, fii = I.i is the weight associated with point Pia,.

Point P is moving towards Pop, as long as the shape quality of Be becomes better; on the contrary, the step ~,) is reduced and inversed. The effect of (o is to fall within the kernel of Bp.

This simple process has proved to be efficient in the case where the mesh quality is not too bad; in other words, such a tool is not very efficient for increasing the quality of very bad-shaped element.

5.3. Local trans;/ormations

This local tool consists in processing the shells (see Section 3) associated with the edges in the mesh that can be removed in order to obtain new meshes with a better quality. As above the quality of the initial shell as compared with that of the resulting local mesh must be increased.

Let ~fl be a free edge in the mesh. A shell is written as (Mi:~Mi+ 1 fl)i- 1,,,. Ira shell is convex, ~ it is possible to re-mesh it using one or several different manners. Such a re-mesh can be written as (MjMkMI~) (fiMiMkMl) for/, k and / ly ing in the set of indices 1 to n. Thus, such a process results in the re-meshing of the "polygon" lying on the M/s (i.e. find the indices j, k and l), after which the so-formed triangles are linked with ~ and fl (see the right-hand side of Fig. 5).

In the case wtlere a shell is nol convex, the number of valid re-meshings is reduced.

Page 15: Improvements on Delaunay-based three-dimensional automatic mesh generator

P.L. George/Finite Elements in Analysis and Design 25 (1997) 297-317

M5 []

M4 ~ M ~ M4

M2 m~

Fig. 5. Shell C~¢ consisting of 5 elements.

311

Table 2 Number of possible triangulations

n 3 4 5 6 7 8 9 10 1l 12 13

N. 1 2 5 14 42 132 429 1430 4862 16796 587786

There is a large number of possibilities for re-meshing the shell, which leads to a large number of quality computations. Let n be the number of elements in the initial shell; n is also the number of vertices M,-. Let N, be the number of possible re-meshings for the set of M;; then, following I-8], we have

N. = ~ N/-1N,,+2-i i = 3

with N2 = 1. IV, is listed in Table 1 as a function of n: As, on the one hand, N, varies very rapidly, and, on the other, in a reasonable mesh, the average

value for n is about 6: we limit, in practice, the process of edge removal for the shells including at the most 6 elements.

As the quality of a set of elements is that of its worst element, among the possible re-meshings of the set, the only ones retained are those where this worst element is not present. This trick allow us to reduce the computat ional effort. To achieve this objective, we pay attention to the triangle ( M j M k M t ) (from which the worst element is constructed) and we do not consider any triangulation including a triangle with indices ( jkl) . To do this, we store the following informations (see Table 3 for n -- 5): • tjk for j varying from 1 to the number of triangles, k varying from 1 to 3 (the number of vertices in

a triangle), • n f the number of different re-meshings where triangle tjk appears, • pos a table giving the number n f of the re-meshings where triangle tjk appears.

Page 16: Improvements on Delaunay-based three-dimensional automatic mesh generator

312 P.L. Georqe/ Finite Elements in Analysis and Desiqn 25 (1997) 297 317

Table 3

Tr iangu la t ions for ~ = 5

1 ~ri [11 t12 113 nl po,s t2L 122 I23 ~!l po5 t31 f32 133 llf pOS

l l 2 3 I 4 1 4 5 l "~ 1 3 4 0 "~ 2 3 4 1 3 I 4 ~ 0 l "~ 4 0

4 3 4 5 I 5 I 2 3 0 1 3 5 0 5 1 2 5 () 3 4 5 <1 2 3 5 0

.112 ,'11+ ~1 ~ 1 1 : ~

Fig. 6. The 5 t r i angu la t ions for 5 points .

where Nt is the number of the triangulation of the M/s, ( t j l t j 2 t j . ~ ) a r e the indices on Mi of the t r iangle . / ( j = 1, 3: there are 3 triangles for 5 points), i{fis the number of times where this triangle appears and pos is the number of the triangulations where this triangle appears.

Thus, (123) for the first triangulation, appears once ( n f = 1) in the fourth triangulation (pos -- 4) as can be seen in Fig. 6.

Remark 12. The different triangulations have been sorted in such a way that triangles which occur many times are the first ones which are examined.

5.4. Other local transjbrmations

In the case where the two previous tools do not result in a good mesh, other local procedures can be employed.

Among them is the face removal processes consisting in removing 2 elements sharing a face and creating 3 elements with better quality in the polyhedron so defined. This operation can be operated in the case where the polyhedron in question is convex.

Another useful process consists in creating the midpoint of an edge defining a shell in order to remove it. Formally, the initial shell, written a s ( M i o ~ M i + l f l ) i = l . , , is replaced by the sets (Mio~Mi + 1P) i = 1.n and ( m i PM¢ + 1 ~) i= 1.n"

In addition, in some cases, a vertex can be removed. This process is trivial if the ball associated with the point includes only 4 elements. Thus, the method consists in using the edge removal so that the cardnality of the ball under consideration becomes 4. Another way to remove a point is to collapse it with its closest neighbour; in this case, the method consists in rewriting properly the set of elements affected by the process.

Page 17: Improvements on Delaunay-based three-dimensional automatic mesh generator

P.L. George/Finite Elements in Analysis and Design 25 (1997) 297-317 313

6. Mesh generator scheme and application examples

6.1. General scheme

As a result of the previous sections, we now propose the following scheme for the automatic mesh generator.

Firstly, we create the set of points associated with the data, i.e., the boundary points of the domain and the field points if they are known; then

Step 1: We compute the location of eight supplementary points in such a way that the cuboid formed in this way contains all the above points and mesh this box using five tetrahedra.

Step 2: We insert the points of the initial set ot obtain a mesh including these points as element vertices.

Step 3: Step 4: Step 5: Step 6: Step 7: Step 8:

We regenerate the boundaries and define the outside elements. We create the internal points (if desired). We insert them, We remove the outside elements. We apply the smoothing tools. We write the resulting mesh on a file.

6.2. Application examples

See Figs. 7-12.

6. 3. Capabilities o f the proposed method

We have selected a series of 8 examples of meshes created using the present method to allow the reader to appreciate the capabilities of the proposed method. These examples claim to be significant in terms of different aspects. The three first cases correspond to "small volumes" used when simulating solid mechanical problems, resulting in a relatively small mesh, in terms of the number of elements. The following two examples show the case where the created mesh is larger as the three last examples are CFD meshes with large size.

Tables 4 and 5 illustrate the capability of the method in terms both of cpu requirements and mesh quality. • np is the number of vertices in the mesh, ne is that of elements. • tl denotes the cpu time, in s (HP9000/735), excluding i/o. • vl is the efficiency, in terms of elements per minute, associated with tl, • t2 is the cpu time including i/o and v2 is the corresponding efficiency. • Del indicates the part, in percentage, of effort corresponding to steps 2 and 5 of the general

scheme, i.e. the Delaunay part of the mesh generator. • ne recalls the number of elements in the mesh, • Taryet is the target value, i.e. the quality of the best element that can be created using the worst

boundary face, • Qmesh is the mesh quality, i.e. the quality of the worst created element,

Page 18: Improvements on Delaunay-based three-dimensional automatic mesh generator

314 P.L. George/' Finite Elements in Analysis and Design 25 (1997) 297 -317

• 1-2 gives the number of elements, to be compared with ne, whose quality is "very good", i.e falling between 1 and 2,

• 2 -3 similarly shows the number of ~good" dement, • pe rcen t indicates the part, in percentage, of elements with a quality falling between 1 and 3, • bad gives the number of elements with a quality worse than Target .

Z y Z

k)-~- _y <-. ~ / / O X" ' - ~ X

Fig. 7. Mesh I {courtesy of GIAT-EDF). Fig. 8. Mesh 2 (courtesy of Cisigrapht.

,z

Fig. 9. Mesh 3 (courtesy of SDRC).

Z

x/Q- Y Fig. 10. Mesh 4 (courtesy of Matra Datavision).

z

Fig. 11. Mesh 6 (courtesy of Dassault-Aviation).

Page 19: Improvements on Delaunay-based three-dimensional automatic mesh generator

P.L. George/Finite Elements in Analysis and Design 25 (1997) 297-317 315

Fig. 12. Mesh 7 (courtesy of Dassault-Aviation).

Table 4 GH3D: cpu requirements

- n p n e t I v I t 2 v 2 D e l

Mesh l 882 2 662 1.08 147 800 1.33 120 000 21 Mesh 2 1 527 5 202 1.67 186 800 2.05 152000 21 Mesh 3 1 881 6 391 1.09 351 700 1.53 250 600 36 Mesh 4 4 786 22 101 6.81 194 800 7.52 176 400 25 Mesh 5 12 656 69 889 15.47 271000 16.75 250 300 43 Mesh 6 62 666 370 578 58.13 382 400 63.90 347 900 43 Mesh 7 214256 1244372 188.65 395700 212.76 350900 67 Mesh 8 522 797 3 092 961 608.02 305 216 635,05 292 200 69

It can be observed in Table 4 that the cpu requirements are connected to the number of elements in the resulting meshes. The larger the mesh, the smaller in proposition is the time necessary to create the triangulation. This a priori surprising feature is clearly explained by the ratio between the Delaunay steps of the method versus the other steps.

Table 5 indicates that most of the elements enjoys a good aspect ratio and that the Target compares well with Qm~sh. In most of the examples we have noticed that the worst elements in the mesh are those connected to a bad-shaped face of the boundary serving the data.

Page 20: Improvements on Delaunay-based three-dimensional automatic mesh generator

316

Table 5 GH3D: mesh quality

P.L. Georqe Finite Elements in Analysis and Desi,qn 25 (1997) 297-317

m, Tar qet Q.,,,,~h I 2 2 3 percent bad

Mesh 1 2 662 5.72 6.93 2 079 465 94 9 Mesh 2 5 202 6.17 7.91 4 254 805 97 2 Mesh 3 6 391 2.51 3.95 5 877 258 99 34 Mesh 4 22 l lO 8.01 10.91 20573 1 872 98 5 Mesh 5 69889 37.77 42.57 50560 7890 97 4 Mesh 6 370 578 37.77 39.40 313 849 23 348 98 2 Mesh 7 I 244 372 4.72 6.40 1 030 721 40 923 99 11 Mesh 8 3092961 4.72 9.09 3340156 140319 99 23

These two features of the proposed mesh generation method lead us to think that the method is, in some sense, optimal.

6.4. Concluding remarks and fi~ture works

We have presented some improvements leading to a better efficiency of a Delaunay-type mesh generated method. Among them thave been discussed a robust and efficient insertion point process suitable in the case where constraints are to be followed, a way to regenerate the boundary items and a simple and efficient method for locating the field points leading to a minimization when smoothing the resulting mesh. Both theoretical and numerical aspects have been developed and significant mesh examples have been shown to illustrate the capabilities of the method.

This scheme is used in the GHS3D software package developed at INRIA in collaboration with F. Hecht and E. Saltel. This software is distributed via Simulog as an option of the Simail mesh generation system.

Future works include, in short, the following: • the improvement of some parts of the present method in order to increase the efficiency of the

method (in terms both of quality and cpu times), • the extension of the method in the case where a desired density is specified in advance leading to

a method governed not only by the boundary discretization but also governed by this density, • the extension of the method in the case where anisotropic specifications are entered in the data.

The two last extensions concern the problem in three dimensions as they have already been developed in two dimensions.

References

[1] H.S.M. Coxeter, L. Few and C.A. Rogers, "Covering space with equal spheres", Mathematika 6, pp. 147-151, 1959. [2] F. Hermeline, "Une mdthode automatique de mailage en dimension n", Thesis lect., Universit6 Paris 6, Paris, 1980. [3] D.F. Watson, "Computing the n-dimensional Delaunay tesselation with applications to Voronoi polytopes".

Comput. J. 24, p. 167-172, 1981.

Page 21: Improvements on Delaunay-based three-dimensional automatic mesh generator

P.L. George~Finite Elements in Analysis and Design 25 (1997) 297-317 317

[4] N.P. Weatherill, "The integrity of geometrical boundaries in the two-dimensional Delaunay triangulation", Comput. Appl. Numer. Methods 6, pp. 101-109, 1990.

[5] P.L. George, "G6n~ration de maillages par une m&hode de type VoronoT', RR INRIA, no. 1398, 1991. [63 P.L. George, F. Hecht and E. Saltel, "Automatic mesh generator with specified boundary" Comput. Methods Appl.

Mech. Eng. 92, pp. 269-288, 1991. [7] P.L. George, F. Hecht and M.G. Vallet, 'Creation of internal points in Voronoi's type method. Control and

adaptation", Adv. Eng. Soft. Work., 13, pp. 303-313, 1991. [8] E. Briere de l'Isle and P.L. George, "Optimization of tetrahedral meshes", IMA Math. Appl. 75, pp. 97-128, 1995. [9] T.J. Baker, "Generation of tetrahedral meshes around complete aircraft", Numerical Grid Generation in Computa-

tional Fluid Mechanics '88, Miami, 1988. [10] H. Borouchaki and S.H. Lo, "Fast Delaunay triangulation in three dimensions", Comput. J. Numer. Methods Eng.

128, pp. 153-167, 1995. [111 H. Borouchaki, P.L. George and S.H. Lo, "Optimal Delaunay point insertion", Int. J. Numer. Methods Eng. 39, pp.

3407-3437, 1996. [12] H. Borouchaki and P.L. George, "Quelques conclusions sur la construction d'un mailleur 2D de type Delaunay",

RR INRIA no 2463, 1995. [133 J.C. Cavendish, "Automatic triangulation of arbitrary planar domains for the finite elment method", Int. J. Numer.

Methods Eng. 8, pp. 679-696, 1974. [143 D.A. Field, "Implementing Watson's algorithm in three dimensions", Proc. 2nd Ann. ACM Symp. on Comp. Geom.,

pp. 246-696, 1974. [153 P.L. George, "Automatic mesh generation", in: Application to Finite Element Methods, Wiley, New York, 1991. [163 P.L. George, "G6n6ration de maillages par une m6thode de type Vorono'/. Partie 2: le cas tridimensionnel", RR

INRIA no. 1664, 1992. [17] P.L. George, F. Hecht and E. Saltel, "Fully automatic mesh generator for 3D domains of any shape", Impact

Comput. Sci. Eng. 2, pp. 187-218, 1990. [ l 8] P.L. George and F. Hermeline, "Delaunay's mesh of a convex polyhedron in dimension d. Application for arbitrary

polyhedra", Int. J. Numer. Methods Eng. 33, pp. 975-995, 1992. [193 C.L. Lawson, "Generation of a triangular grid with application to contour plotting", California institute of

technology, JPL, 299, 1972.