# A frontal approach to hex-dominant mesh generation

- Tristan Carrier Baudouin
^{1}Email author, - Jean-François Remacle
^{1}, - Emilie Marchandise
^{1}, - François Henrotte
^{1}and - Christophe Geuzaine
^{2}

**1**:8

**DOI: **10.1186/2213-7467-1-8

© Carrier Baudouin et al.; licensee Springer. 2014

**Received: **19 August 2013

**Accepted: **16 January 2014

**Published: **10 February 2014

## Abstract

### Background

Indirect quad mesh generation methods rely on an initial triangular mesh. So called triangle-merge techniques are then used to recombine the triangles of the initial mesh into quadrilaterals. This way, high-quality full-quad meshes suitable for finite element calculations can be generated for arbitrary two-dimensional geometries.

### Methods

In this paper, a similar indirect approach is applied to the three-dimensional case, i.e., a method to recombine tetrahedra into hexahedra. Contrary to the 2D case, a 100% recombination rate is seldom attained in 3D. Instead, part of the remaining tetrahedra are combined into prisms and pyramids, eventually yielding a mixed mesh. We show that the percentage of recombined hexahedra strongly depends on the location of the vertices in the initial 3D mesh. If the vertices are placed at random, less than 50% of the tetrahedra will be combined into hexahedra. In order to reach larger ratios, the vertices of the initial mesh need to be anticipatively organized into a lattice-like structure. This can be achieved with a frontal algorithm, which is applicable to both the two- and three-dimensional cases. The quality of the vertex alignment inside the volumes relies on the quality of the alignment on the surfaces. Once the vertex placement process is completed, the region is tetrahedralized with a Delaunay kernel. A maximum number of tetrahedra are then merged into hexahedra using the algorithm of Yamakawa-Shimada.

### Results

Non-uniform mixed meshes obtained following our approach show a volumic percentage of hexahedra that usually exceeds 80%.

### Conclusions

The execution times are reasonable. However, non-conformal quadrilateral faces adjacent to triangular faces are present in the final meshes.

### Keywords

Advancing front methods Tetrahedra recombination Mixed hexahedral meshes## Background

Whether hex-meshing or tet-meshing is better for finite element computations is a long-standing controversy. This paper does not aim at deciding on that issue. Yet, it is a fact that a large number of finite element users would highly appreciate having automatic hex-meshing procedures for general 3D domains. A number of arguments can indeed be stated in favor of hex-meshing. For the same number of vertices, hex meshes have fewer elements, which speeds up the matrix/residual assembly. In solid mechanics, hexahedra exhibit higher accuracy than tetrahedra [1], which are plagued by locking problems [2]. In fluid dynamics, boundary layers made of hexahedra are effective for capturing large gradients and resolving viscous flows near the boundary, and semi-structured boundary-layer meshes attract significant interest (see, e.g. [3–5]).

Hexahedral mesh generation is still an ongoing research [6], and a major conclusion so far is that the generation of full-hex conforming meshes on arbitrary domains is beyond our reach nowadays. Relaxing a bit the requirements, hex-dominant meshes [7], in contrast with full-hex meshes, are allowed to aggregate a mixture of hexahedra, prisms, pyramids and tetrahedra. The goal of hex-dominant meshing is to generate meshes where hexahedral elements dominate, both in number and volume. This paper presents such an algorithm to automatically generate non-uniform isotropic hex-dominant meshes in arbitrary geometries. However, quadrilateral faces adjacent to triangular faces are usually found in the resulting meshes. Such non-conformities represent an additional complication for finite element methods. Various attempts at palliating the impact of these non-conformities have been discussed in the literature [8].

The proposed approach relies on an indirect strategy. The tetrahedra of an initial mesh are combined into hexahedra using Yamakawa-Shimada’s algorithm [9], which works basically as follows: (*i*) All tetrahedra of an initial mesh are considered one after the other. (*i* *i*) The neighbors of each tetrahedron are visited in order to identify potential hexahedra. Candidate hexahedra are stored in an array and sorted with respect to their geometrical quality. (*i* *i* *i*) The algorithm then iterates through this array, starting from the highest quality hexahedron, in order to effectively generate the hexahedral elements. Hexahedra that are composed of available tetrahedra (not marked for deletion) and that preserve hexahedral conformity are successively added to the mesh.

In a perfect hexahedral mesh, each interior vertex is linked with six other vertices: left-right, above-below, front-back (four vertices in case of a perfect quadrangular mesh). The main idea of our vertex placement algorithm is based on that observation. Knowing the prescribed local mesh size and the local preferred mesh directions, each interior vertex attempts to spawn six new vertices. A prospective vertex, however, is effectively created only if it lays inside the domain and if it is not too close to an existing vertex. This algorithm is applied to the boundaries of the geometry, prior to the volumes. When done, the vertices are tetrahedralized and Yamakawa-Shimada’s algorithm can be applied.

The *Methods* section first examines more closely a number of data structures, tools and concepts that contribute to make the algorithm more efficient. It then describes the two- and three-dimensional versions of the frontal algorithm. Finally, it discusses Yamakawa-Shimada’s algorithm and the issue of finite element conformity. The *Results and discussion* section presents a number of application examples, including mesh statistics and execution times.

### Previous work

A large variety of procedures for hexahedral meshing have been proposed over the years. This section reviews a certain number of them, focusing on the automatic ones.

Several techniques extract hexahedral meshes from octree data structures [12]. These methods can generate non-uniform full-hex meshes in arbitrary geometries. The hexahedra orientation is defined by the octree root, which is a cube englobing the geometry. Boundary hexahedra perpendicular to the boundary surface can be achieved by projecting buffer layers [13, 14]. The main limitations of octree-based approaches is that the generated hexahedra cannot be oriented flexibly, and that the quality of the hexahedra near boundaries is degraded [15].

Certain parametrization methods have been able to mesh complex three-dimensional domains [16, 17]. These methods start by computing a three-dimensional direction field. The singularities of the direction field are then identified. Later on, the domain is cut in order to place all singularities on the boundary and to reduce the genus to 0 [18]. A parametrization minimizing the difference between the hexahedra orientation and the three-dimensional direction field is selected [19]. The supplementary cutting required to place all singularities on the boundary is necessary because it leads to a better parametrization [16]. Full hexahedral meshes of very good quality can be obtained for complicated domains. However, a variable mesh size cannot be prescribed [20]. Parametrization methods are very diverse. For example, a few algorithms capable of deforming a three-dimensional domain into a polycube model have been developed [21]. The polycube model is meshed and re-deformed back into its original shape.

Graph theory can be applied to the problem of creating hexahedra by recombining tetrahedra [22]. The starting point of the method is a tetrahedral mesh, which can be viewed as a graph. The method consists in searching through the mesh to identify subgraphs yielding hexahedra. There are six particular subgraphs to look for. Potential hexahedra can be constructed immediately or after classification along various criterions. This approach can be applied to prisms and pyramids as well. The recombination algorithm used throughout this article has been devised by Yamakawa and Shimada [9]. These authors have also designed an iterative procedure to align vertices in three dimensions. The first step of the procedure consists of filling the domain with crystal cells. Each crystal cell has the shape of a cube: there is one atom at the center and eight atoms in the corners. Crystal cells exert force on each other via their atoms. A set of equations of motion govern the cells positions. Throughout the process, cells can be added or removed depending on the local density. Once cells velocities have sufficiently decrease, the center of each crystal cell becomes a mesh vertex.

To improve the spatial distribution of the set of vertices (which has a large impact on the effectiveness of such graph-based approaches), several techniques have been proposed, such as a modified version of Lloyd’s algorithm. Lloyd’s algorithm repeatedly moves vertices to the centroid of their Voronoi cell [23]. As the number of iterations increases, the Voronoi cells take the shape of perfect hexagons. In fact, it has been proven that Lloyd’s algorithm minimizes an energy functional equal to the sum of the moments of inertia of the Voronoi cells [24]. Lévy-Liu’s algorithm consists of minimizing higher order moments of inertia: the Voronoi cells then become squarely instead of hexagonal, which has the effect of aligning vertices in precise directions. Tetrahedral meshes smoothed by Lévy-Liu’s algorithm make excellent candidates for recombination. When used in conjunction with the graph method discussed above, Lévy-Liu’s algorithm can generate mixed meshes with high hexahedra percentages [24]. However, the method presented in this article is frontal, not iterative. The vertices are created layer by layer.

## Methods

We have pointed out above the importance of having the mesh vertices pre-aligned to ensure a good recombination rate. It is the purpose of the *vertex placement algorithm* to achieve this. This algorithm, however, relies on a number of data structures and geometrical concepts that are first introduced and developed below.

First, the vertex placement algorithm needs to know, at each point of the domain, the prescribed local mesh size and the local preferred mesh directions. In practice, those geometrical quantities are conjointly obtained by evaluating a specific field structure called *cross field*. The generation of direction fields was extensively studied in [25].

Secondly, the notion of distance itself represents another degree of freedom of the method. We shall show that it is particularly appropriate when dealing with hex-meshing, to compute distances with the *infinity norm*, instead of the standard Euclidean norm.

Finally, the algorithm is characterized by a large number of spatial searches, in order to check whether or not a prospective vertices is too close to any already existing vertex. To optimize the efficiency of this operation, an *R-tree* data structure is employed [26, 27].

### Cross fields

At each point of a region $\Omega \subset {\mathcal{R}}^{3}$, the *frame field* (**d**_{1},**d**_{2},**d**_{3}) represents the three local orthogonal preferred directions of the hexahedral mesh. Frame fields are usually required to satisfy many constraints [16, 28]. On the geometrical edges of *Ω*, one of the three directions should be tangent to the edge itself [9]. On the surfaces of *Ω*, one of the three directions should be perpendicular to the surface [9, 16]. A last requirement is that the frame field should be as smooth as possible.

On the other hand, at each point of *Ω*, the *size field* represents the prescribed local mesh size value. Mesh sizes *h*_{1},*h*_{2},*h*_{3} are defined for every point of the volume in each of the directions **d**_{1},**d**_{2},**d**_{3}. In this paper, the mesh size field at a point **x** is isotropic, i.e. *h*(**x**)=*h*_{1}(**x**)=*h*_{2}(**x**)=*h*_{3}(**x**). The extension to anisotropic meshing will be done in a forthcoming work.

The user fixes the mesh size at the geometrical vertices of the model. One-dimensional size fields are then computed along the geometrical edges. Because the surfaces are bounded by geometrical edges, Dirichlet conditions can be imposed on the surfaces boundaries. A Laplace equation is used to obtain the size field over the surfaces. The size field over the volume is calculated in a similar manner. Continuous finite elements of the first order are employed in each case. The final size field is therefore a three-dimensional piecewise continuous field. The Laplace equation was chosen because it leads to smooth and gradual solutions.

The *cross field* (*h*_{1}**d**_{1},*h*_{2}**d**_{2},*h*_{3}**d**_{3}), now, combines both information into a single field. At each vertex of the mesh, the cross field evaluates into a symmetric real 3 by 3 tensor whose columns are the three orthogonal vectors parallel to the local preferred directions of the hexahedral mesh. Moreover, the norm of the vectors represent the local mesh size; the three norms are identical in case of an isotropic mesh (which is the case considered in this paper), but they may differ in case of an anisotropic mesh.

The construction of a frame field on a region *Ω* belongs to the category of elliptic problems. Boundary conditions must be imposed on the boundary *∂* *Ω*. We thus proceed logically by explaining first how the frame field is constructed on surfaces, and deal afterwards with the prolongation into the volumes.

**t**

^{′}

_{1}=(1,0) and

**t**

^{′}

_{2}=(0,1) of the parameter plane . Because they are not parallel for any point of , one can build the unit normal vector

**n**=

**t**

_{1}×

**t**

_{2}/∥

**t**

_{1}×

**t**

_{2}∥. Each vector

**t**tangent to can be expressed as

**t**=

*u*

**t**

_{1}+

*v*

**t**

_{2}with (

*u*,

*v*) the covariant coordinates of

**t**. The tangent vector

**t**is thus the image of a vector

**t**

^{′}=(

*u*,

*v*) in the parameter plane. It is easy to compute covariant coordinates of any tangent vector

**t**using the metric tensor of the parametrization. By definition,

**t**=

*u*

**t**

_{1}+

*v*

**t**

_{2}. Then,

**t**·

**t**

_{1}=

*u*

**t**

_{1}·

**t**

_{1}+

*v*

**t**

_{2}·

**t**

_{1}and

**t**·

**t**

_{2}=

*u*

**t**

_{1}·

**t**

_{2}+

*v*

**t**

_{2}·

**t**

_{2}, which reads in matrix form

where is the metric tensor, invertible for any smooth parametrization.

**s**

_{1},

**s**

_{2},

**n**) is first constructed at all points

**x**of with

**s**

_{1}=

**t**

_{1}/∥

**t**

_{1}∥,

**s**

_{2}=

**n**×

**t**

_{1}/∥

**n**×

**t**

_{1}∥. Next, the direction

**d**

_{1}of the frame field is computed at the points

**x**

_{ b }of the boundaries of surface :

**d**

_{1}is the tangent vector to the boundary. The local orientation of the frame field $\stackrel{\u0304}{\theta}$ at the boundary can then be computed as the oriented angle between

**s**

_{1}and

**d**

_{1}. Then, an elliptic boundary value problem is used to propagate the complex number

*z*(

**u**)=

*a*(

**u**)+

*i*

*b*(

**u**)=

*e*

^{4i θ(u)}in the parametric domain. More specifically, two Laplace equations with Dirichlet boundary conditions are solved in the parametric space in order to compute the real part

*a*(

**u**)= cos4

*θ*and the imaginary part

*b*(

**u**)= sin4

*θ*of

*z*:

*θ*as the argument of

*z*is motivated by symmetry arguments: frame fields are equivalent when they are rotated around

**n**by any angle that is a multiple of

*π*/2. Details of that procedure are given in [32]. Finally, the frame field (

**d**

_{1},

**d**

_{2},

**d**

_{3}) can be computed on the whole surface as follows:

where *θ* is the solution of the elliptic boundary value problem (3).

*a*and

*b*components discussed earlier was used in order to obtain the same number of frames regardless of the mesh density. As seen from the figure, the frame field (a) is not entirely radial and contains defects because the mesh (a) is too coarse.

The frame field at any point inside the volume is then chosen to be equal to the frame field at the closest surface vertex [24]. (ANN nearest neighbor library is employed for the queries [33].)

These frame fields are not going to be smooth whenever the distance function to the walls is not itself smooth. Recently, two methods capable of generating smooth frame fields have been developed [16, 17]. Both of these methods employ LBFGS optimization to minimize energy functionals.

### Measuring distances

For inserting a new mesh vertex in our frontal algorithm, the distance between a prospective vertex **x**_{
i
} and any already existing vertex **x** must be smaller than *kh*, where *h* is the local mesh size and *k* a free parameter of the algorithm ranging from 0 to 1. Parameter *k* absolutely needs to be inferior to one. If not, too many valid vertices will be missing from the cloud. In the implementation described in this work, *k* is equal to 0.7.

*infinity norm*, instead of in the Euclidean norm:

*sphere*is actually a cube, which reduces to a square in two dimensions (see Figure 6). The exclusion area around each prospective vertex is therefore a cube, resp. a square, which precisely matches the shape of the elements one wishes to build.

where *M*_{
x
} is the Jacobian matrix of (1), evaluated at **x**.

The infinity distance is not a differentiable function [24]. However, this is not an issue, because the frontal algorithm does not require the computation of distance derivatives.

*L*

_{ ∞ }norm instead of the

*L*

_{2}norm in the R-tree spatial search algorithm described in the next section.

### Using R-trees for spatial searches

As said before, a prospective vertex is effectively created only if there is enough unoccupied space around it. The size of this exclusion area or volume depends on the local mesh size. According to the dimension and the chosen norm, the shape of the exclusion region can be a parallelogram or an ellipse (in 2D), and a cube or a sphere (in 3D).

The computation of the distance between the prospective vertex and all the other vertices would have a quadratic complexity in time and would therefore be prohibitive in terms of computation time. The number of computations required to ensure the exclusions can however be considerably decreased if the exclusion cube of each vertex is enclosed in a bounding box whose edges are parallel to the coordinate axis. An R-tree data structure [26, 27] can efficiently determine bounding boxes intersections and, then, it is enough to compute the distance between pairs of vertices whose boxes intersect each other.

**x**

_{1}is the prospective vertex and

**x**is an existing mesh vertex. The dotted square around

**x**

_{1}is the oriented exclusion area of vertex

**x**

_{1}, that is computed from the surface cross field (

*h*

_{1}

**d**

_{1},

*h*

_{1}

**d**

_{2}) that has a uniform mesh size field

*h*

_{1}. The solid box surrounding the prospective vertex is the bounding box of the exclusion area that is parallel to the

*xy*-coordinate axis. This bounding box should always include the oriented exclusion square of side 2

*kh*. This condition is satisfied in 2D if the box is of side $2\sqrt{2}\mathit{\text{kh}}$ and in 3D if the cube is of side $2\sqrt{3}\mathit{\text{kh}}$. Even if the boxes intersect each other in Figure 8(a), the distance between

**x**

_{1}and

**x**is sufficiently large. Thus,

**x**

_{1}can be inserted in the cloud and added to the queue.

Figure 8(b) shows the same two vertices. Again, the boxes intersect each other. This time, however, **x**_{1} is too close to **x** and **x**_{1} cannot be added to the cloud or to the queue.

It should be noted that on Figures 8(a) and 8(b), ${d}_{\infty}^{\mathit{\text{orien}}}({\mathbf{x}}_{1},\mathbf{x})$ is not necessarily equal to ${d}_{\infty}^{\mathit{\text{orien}}}(\mathbf{x},{\mathbf{x}}_{1})$. The local mesh sizes at **x**_{1} and **x** can also be different as illustrated in Figure 8(a). However, if **x** is outside the dotted square of **x**_{1}, it is considered sufficient.

For non-planar surfaces, the surfaces need to be parametrized. As the parametrization is not necessarily conformal, i.e. the angles between **d**_{1} and **d**_{2} are not conserved, the dotted squares (exclusion area) of Figure 8 become parallelograms in the parametric space. As far as the bounding boxes are concerned, they are computed in the same manner and are then parallel to the *uv*-coordinate axis of the parametric space.

Let’s assume that on surfaces, each vertex attempts to create four vertices in the four cardinal directions. If the surface normal is not constant, these prospective vertices may not rest on the surface. The next section describes a scheme capable of solving this issue by intersecting surfaces with circle arcs.

### Surface meshing: the packing of parallelograms algorithm

*packing of parallelograms*. Consider one vertex located at point

**u**=(

*u*,

*v*) of the parameter plane which correspond to point

**x**(

*u*,

*v*) in the 3D space (see Figure 9). The cross field at this point of the surface is (

*h*

_{1}

**d**

_{1},

*h*

_{2}

**d**

_{2},

*h*

_{ n }

**n**), in terms of the three orthonormal preferred mesh directions, {

**d**

_{1},

**d**

_{2},

**n**}, and the three corresponding mesh sizes, {

*h*

_{1},

*h*

_{2},

*h*

_{ n }},.

In a perfect quad mesh, each vertex is connected to four neighboring vertices forming a cross parallel to the cross field. In our approach, four prospective points **x**_{
i
}, *i*=1,…,4 are constructed in the neighborhood of point **x** with the aim of generating the perfect situation.

Points **x**_{1} and **x**_{2} are constructed as the intersection of the surface
with a circle of radius *h*_{1}, centered on **x** and situated in the plane *Π* of normal **d**_{2} (see Figure 9). Points **x**_{3} and **x**_{4} are constructed as the intersection of the surface
with a circle of radius *h*_{2}, centered on **x** and situated in the plane of normal **d**_{1} (not in the figure for clarity).

**x**, point

**x**

_{1}is situated at

**x**

_{1}=

**x**+

*h*

_{1}

**d**

_{1}. A good initial guess in the parameter plane is

**u**

_{1}=

**u**+

*d*

**u**

_{1}where

*d*

**u**

_{1}=(

*du*

_{1},

*dv*

_{1}) is computed using (2) i.e.

**u**

_{2}=

**u**−

*d*

**u**

_{1},

*d*

**u**

_{3}=(

*du*

_{3},

*dv*

_{3})

**u**_{3}=**u**+*d* **u**_{3} and **u**_{4}=**u**−*d* **u**_{3}.

The algorithm works as follows. Each vertex of the boundary is inserted in a fifo queue. Then, the vertex **x** at the head of the queue is removed and its four prospective neighbors **x**_{
i
} are computed. A new vertex **x**_{
i
} is inserted at the tail of the queue if the following conditions are satisfied: (*i*) vertex **x**_{
i
} is inside the domain and (*i* *i*) vertex **x**_{
i
} is not too close to any of the vertices that have already been inserted.

**x**

_{ i }is inside the bounds of the parameter domain. Concerning the second condition, the distances on the surface should theoretically be measured in terms of geodesics, This is however clearly overkill from a mesh generation point of view. We define an exclusion zone for every vertex that has already been inserted (this includes boundary vertices). This exclusion zone is a parallelogram in the parameter plane (see the yellow parallelogram of Figure 9). This parallelogram is scaled down by a factor

*k*=0.7 in order to allow the insertion of (at least) points

*x*

_{ i }. The different stages of the procedure for a non planar surface are presented on Figure 10 and Figure 11. Then, the surfaces are triangulated in the parameter plane using an anisotropic Delaunay kernel and the triangles are subsequently recombined into quadrilaterals using the Blossom-Quad algorithm [34].

As shown on Figure 11, exclusion areas can become anisotropic parallelograms in the parametric plane. However, they always correspond to squares in the three-dimensional space. The vertices are triangulated in the parametric plane. Anisotropic triangulation is therefore necessary in order to obtain the expected arrangement of right triangles.

### Volume meshing: the 3D point insertion algorithm

Volume meshing proceeds in the same way as surface meshing. The procedure starts from a 2D triangular mesh that has been created using surfacic frame fields. A frontal algorithm is used to create well aligned vertices inside the volume, starting from surface points. The 3D point insertion algorithm works in the same manner as the one used for surfaces.

**Q**popped out of the queue attempts to create six neighboring vertices in the six cardinal directions

**P**

_{1,2}=

**Q**±

*h*

**d**

_{1},

**P**

_{3,4}=

**Q**±

*h*

**d**

_{2},

**P**

_{5,6}=

**Q**±

*h*

**d**

_{3}at a distance

*h*from itself (see Figure 12).

- 1.
It is inside the domain.

- 2.
It is not too close to an existing mesh vertex, i.e. if the distance is smaller than

*kh*.

An octree data structure is again employed to efficiently determine if a vertex is inside the domain [11].

Eventually, no more prospective vertices can be added to the cloud without being too close to existing ones. The process then stops and the cloud is tetrahedralized with a Delaunay procedure [35].

The quality of the alignment inside the geometry is very dependent on the quality of the alignment on the boundaries. If the triangles on the boundaries are far from being right-angled, then the vertices inside the geometry will not be well aligned. Various algorithms are capable of generating sets of aligned vertices on surfaces, such as the Delquad algorithm [32] or Lévy-Liu’s algorithm [24, 36]. However, for the majority of the examples presented in this article, a two-dimensional version of the frontal algorithm was employed.

As explained earlier, each vertex attempts to create six other vertices at a distance *d*=*h* from itself. For smoother size transitions, *d* can instead be an average between the local mesh size at the parent vertex and the local mesh size at the prospective vertex.

### Volume meshing: Yamakawa-Shimada’s algorithm and finite element conformity

This section briefly describes Yamakawa-Shimada’s recombination algorithm. It then discusses the problem of finite element conformity in the case of mixed hex meshes.

Yamakawa-Shimada’s algorithm begins by iterating through the tetrahedra of the initial mesh. For each tetrahedron, it attempts to find neighboring tetrahedra with which to construct a hexahedron. Five, six or seven tetrahedra are required to construct one hexahedron. Three patterns of assembly are considered. Two out of these three patterns are described in [9]. When a potential hexahedron is found, it is added to an array. However, the hexahedron will not necessarily be part of the final mesh. Once all tetrahedra have been visited, the array is sorted by hex quality.

*Q*is defined as follows:

where *i* is the vertex number. For a hexahedron, *i* goes from 1 to 8; *v*_{i 1}, *v*_{i 2} and *v*_{i 3} are the three vectors parallel to the three edges connected to vertex *i*. *Q* is in fact the modulus of the minimum scaled Jacobian [9]. Evidently, *Q* is meaningless for invalid hexahedra. Invalid hexahedra are characterized by a null or negative Jacobian determinant, which renders the mesh improper for calculations.

Starting from the highest quality hexahedron, the algorithm then iterates through the array. Potential hexahedra composed of tetrahedra not yet marked for deletion are added to the mesh. The tetrahedra of the added hexahedron are then marked for deletion. It is to be noted that only a small fraction of potential hexahedra appear in the final mesh.

Prisms can later be added by following a similar procedure [9]. All prisms are composed of three tetrahedra. There is only one pattern of construction for prisms [9].

Yamakawa-Shimada’s algorithm should therefore avoid creating the configurations illustrated on Figures 15, 16, 17 and 18 while iterating through the sorted arrays of potential hexahedra and prisms. Non-conformities can be efficiently identified by employing hashing techniques.

Owen-Canann-Saigal’s algorithm can render a mixed hexahedral mesh completely conformal. However, it has a drawback. It increases the number of tetrahedra and pyramids, which lowers the percentage of hexahedra by number. As a consequence, Owen-Canann-Saigal’s algorithm was not used for the results presented below.

Some quadrilateral faces will be adjacent to one or two triangles. Finite element solvers capable of handling these type of non-conformities are required.

## Results and discussion

*H*

_{ nbr }, the percentage of hexahedra by volume

*H*

_{ vol }and the average hex quality

*Q*defined in Eq. 8. In general,

*H*

_{ vol }is higher than

*H*

_{ nbr }.

*CPU*designates the total execution time (in

*s*) on a 2010 laptop computer. All the data is compiled in Table 1. The following convention is used throughout this section: the hexahedra are white, the prisms are yellow, the pyramids are red and the tetrahedra are blue. The variable

*NC*represents the percentage of non-conformal interior quadrilateral faces.

*H*

_{ nbr }= 81.88

*%*,

*H*

_{ vol }= 91.44

*%*and

*Q*= 0.97. Because of the regularity of the curved face mesh, the hexahedra percentages are much higher than those of the previous cylinder.

*H*

_{ nbr }of 59.39%. The anc101 part was designed by Computer Aided Manufacturing Inc. [39] and is commonly used in mesh generation literature, in particular in Lévy and Liu’s article. For approximately the same mesh size, they obtain a

*H*

_{ nbr }of 77.14% and an execution time of 12 minutes. Pyramid recombination was not employed in both case.

**Mesh convergence analysis (credits: Gaëtan Compère)**

Mesh size | First frequency (Hz) | Second frequency (Hz) |
---|---|---|

2.0 | 770.11 | 1950.65 |

1.0 | 760.46 | 1928.52 |

0.5 | 757.55 | 1921.77 |

struct. | 757.76 | 1921.93 |

**Mesh data**

Surfaces and volumes are meshed sequentially. The two surface meshes bounding a thin region may also not be identical. As a consequence, many non-hexahedral elements can be created. The algorithm is usually less effective for geometrical models featuring many thin regions.

## Conclusion

A method capable of generating mixed hexahedral meshes has been presented. The first step consists of covering geometrical boundaries with aligned vertices using a frontal process. The interior is treated in a similar fashion. Vertices creation are guided by a direction field and a size field. The interior vertices are eventually tetrahedralized with a Delaunay procedure. All tetrahedra combinations yielding hexahedra are identified. They are sorted by quality and the highest quality hexahedra are created first. The same approach is applied to prisms. The final mesh contains hexahedra, prisms, pyramids and remaining tetrahedra.

The method has obvious drawbacks. First, there are no guarantees regarding the hexahedra percentage. It can be higher for certain geometries and lower for others. Secondly, the hexahedra are not anisotropic. For many geometries, well chosen anisotropy could increase the number of hexahedra. Finally, the resulting meshes are useful only to solvers capable of handling a certain number of non-conformal faces.

## Declarations

### Acknowledgements

This work has been partially supported by the Belgian Walloon Region under WIST grants ONELAB 1017086 and DOMHEX 1017074. The authors wish to thank Gaëtan Compère for the mesh convergence analysis and Jonathan Lambrechts for suggesting the use of R-trees. The authors also appreciate the reviewers’ efforts and suggestions.

## Authors’ Affiliations

## References

- Benzley SE, Perry E, Merkley K, Clark B, Sjaardema G:
**A comparison of all hexagonal and all tetrahedral finite element meshes for elastic and elasto-plastic analysis.**In*Proceedings of the 4th International Meshing Roundtable*. Edited by: Tautges T. Albuquerque: Sandia National Laboratories; 1995.Google Scholar - Puso MA, Solberg J:
**A stabilized nodally integrated tetrahedral.***Int J Numer Meth Eng*2006,**67:**841–867. 10.1002/nme.1651MathSciNetView ArticleGoogle Scholar - Ito Y, Nakahashi K:
**Improvements in the reliability and quality of unstructured hybrid mesh generation.***Int J Numer Meth Fl*2004,**45:**79–108. 10.1002/fld.669View ArticleGoogle Scholar - Pirzadeh S:
**Three-dimensional unstructured viscous grids by the advancing-layers method.***AIAA J*1996,**34:**43–49. 10.2514/3.13019View ArticleGoogle Scholar - Kallinderis Y, Ward S:
**Prismatic grid generation for three-dimensional complex geometries.***AIAA J*1993,**31**(10):1850–1856. 10.2514/3.11858View ArticleGoogle Scholar - Shepherd JF, Johnson CR:
**Hexahedral Mesh Generation Constraints.***Eng Comput*2008,**24:**195–213. . https://dl.acm.org/citation.cfm%3Fid=1394234 . 10.1007/s00366-008-0091-4View ArticleGoogle Scholar - Meyers RJ, Tautges TJ, Tuchinsky PM:
**The ‘Hex-Tet’hex-dominant meshing algorithm as implemented in CUBIT.**In*Proceedings of the 7th international meshing roundtable*. Edited by: Freitag L. Dearborn: Sandia National Laboratories; 1998:151–158.Google Scholar - Dewhirst DL, Grinsell PM, Tucker JR, Mahajan A:
**Joining tetrahedra to hexahedra.**In*Proceedings of MSC World Users’ Conference*. Arlington: MSC Software; 1993. . http://web.mscsoftware.com/support/library/conf/wuc93/p04593.pdf .Google Scholar - Yamakawa S, Shimada K:
**Fully-automated hex-dominant mesh generation with directionality control via packing rectangular solid cells.***Int J Numer Meth Eng*2003,**57:**2099–2129. 10.1002/nme.754MathSciNetView ArticleGoogle Scholar - Shewchuk JR:
**Tetrahedral mesh generation by Delaunay refinement.**In*Proceedings of the fourteenth annual symposium on Computational geometry*. Minneapolis: ACM; 1998:86–95.View ArticleGoogle Scholar - Geuzaine C, Remacle JF:
**Gmsh: a three-dimensional finite element mesh generator with built-in pre- and post-processing facilities.***Int J Numer Meth Eng*2009,**79:**1309–1331. 10.1002/nme.2579MathSciNetView ArticleGoogle Scholar - Schneiders R, Schindler R, Weiler F:
**Octree-based Generation of Hexahedral Element Meshes.**In*Proceedings of the 5th International Meshing Roundtable*. Pittsburgh: Sandia National Laboratories; 1996.Google Scholar - Ito Y, Shih AM, Soni BK:
**Octree-based reasonable-quality hexahedral mesh generation using a new set of refinement templates.***Int J Numer Meth Eng*2008,**77:**1809–1833.MathSciNetView ArticleGoogle Scholar - Maréchal L:
**Advances in Octree-Based All-Hexahedral Mesh Generation: Handling Sharp Features.**In*Proceedings of the 18th International Meshing Roundtable*. Edited by: Clark BW. Salt Lake City: Springer; 2009.Google Scholar - Blacker TD:
**Meeting the Challenge for Automated Conformal Hexahedral Meshing.**In*Proceedings of the 9th International Meshing Roundtable*. Edited by: Owen S. New Orleans: Sandia National Laboratories; 2000.Google Scholar - Huang J, Tong Y, Wei H, Bao H:
**Boundary aligned smooth 3D cross-frame field.**In*Proceedings of ACM SIGGRAPH Asia*. Edited by: Bala K. Hong Kong: Association for Computing Machinery; 2011:2011–2011.Google Scholar - Li Y, Liu Y, Xu W, Wang W, Guo B:
**All-hex meshing using singularity-restricted field.**In*Proceedings of ACM SIGGRAPH Asia*. Edited by: Sloan P. Singapore: Association for Computing Machinery; 2012:2012–2012.Google Scholar - Huang J, Jiang T, Wang Y, Tong Y, Bao H:
**Automatic Frame Field Guided Hexahedral Mesh Generation.**2012.http://www.cad.zju.edu.cn/home/hj/12/hex/techreport/hex-techreport.pdf Tech. rep., Zhejiang University. .Google Scholar - Nieser M, Reitebuch U, Polthier K:
**CubeCover - parameterization of 3D volumes.***Comput Graph Forum*2011,**30:**1397–1406. 10.1111/j.1467-8659.2011.02014.xView ArticleGoogle Scholar - Kowalski N, Ledoux F, Frey P:
**A PDE Based Approach to, Multidomain Partitioning and Quadrilateral Meshing.**In*Proceedings of the 21th International Meshing Roundtable*. Edited by: Jiao X, Weill J. San Jose: Springer; 2012.Google Scholar - Gregson J, Sheffer A, Zhang E:
**All-Hex mesh generation via volumetric polyCube deformation.***Comput Graph Forum*2011,**30:**1407–1416. 10.1111/j.1467-8659.2011.02015.xView ArticleGoogle Scholar - Meshkat S, Talmor D:
**Generating a mixed mesh of hexahedra, pentahedra and tetrahedra from an underlying tetrahedral mesh.***Int J Numer Meth Eng*2000,**49:**17–30. 10.1002/1097-0207(20000910/20)49:1/2<17::AID-NME920>3.0.CO;2-UView ArticleGoogle Scholar - Du Q, Faber V, Gunzburger M:
**Centroidal Voronoi Tessellations: Applications and Algorithms.***Siam Rev*1999,**41:**637–676. 10.1137/S0036144599352836MathSciNetView ArticleGoogle Scholar - Lévy B, Liu Y: L
_{ p }**Centroidal Voronoi Tessellation and its Applications.**In*Proceedings of ACM SIGGRAPH 2010*. Edited by: Hoppe H. Los Angeles: Association for Computing Machinery; 2010.Google Scholar - Ray N, Vallet B, Li WC, Lévy B:
**N-Symmetry direction field design.***ACM T Graph*2008,**27:**1–25.View ArticleGoogle Scholar - Guttman A:
**R-Trees: A Dynamic Index Structure for Spatial Searching.**In*ACM Special Interest Group on Management of Data*. Boston: Association for Computing Machinery; 1984:47–57.Google Scholar - Douglas G, Green M, Guttman A, Stonebraker M:
**R-trees: a dynamic index structure for spatial searching.**2004.http://www.superliminal.com/sources/RTreeTemplate.zip .Google Scholar - Vyas V, Shimada K:
**Tensor-Guided Hex-Dominant Mesh Generation with Targeted All-Hex Regions.**In*Proceedings of the 18th International Meshing Roundtable*. Edited by: Clark BW. Salt Lake City: Springer; 2009.Google Scholar - Remacle JF, Geuzaine C, Compère G, Marchandise E:
**High quality surface meshing using harmonic maps.***Int J Numer Meth Eng*2010,**83:**403–425.Google Scholar - Marchandise E, de Wiart CC, Vos WG, Geuzaine C, Remacle JF:
**High-quality surface remeshing using harmonic maps-Part II: Surfaces with high genus and of large aspect ratio.***Int J Numer Meth Eng*2011,**86:**1303–1321. 10.1002/nme.3099View ArticleGoogle Scholar - Marchandise E:
**Remacle JF.***Eng Comput*2013. doi:10.1007/s00366–012–0309–3 doi:10.1007/s00366-012-0309-3Google Scholar - Remacle JF, Henrotte F, Baudouin TC, Geuzaine C, Béchet E, Mouton T, Marchandise E:
**A Frontal Delaunay quad mesh generator using the**L^{ ∞ }**norm.**In*Proceedings of the 20th International Meshing Roundtable*. Edited by: Quadros W. Paris: Springer; 2011.Google Scholar - Mount DM, Arya S:
**ANN: A library for approximate nearest neighbor searching.**In*CGC Workshop on Computational Geometry*. Durham: The Center for Geometric Computing; 1997:33–40.Google Scholar - Remacle JF, Lambrechts J, Seny B, Marchandise E, Johnen A, Geuzaine C:
**Blossom-Quad: a non-uniform quadrilateral mesh generator using a minimum cost perfect matching algorithm.***Int J Numer Meth Eng*2012,**89:**1102–1119. 10.1002/nme.3279MathSciNetView ArticleGoogle Scholar - Si H:
**TetGen: A Quality Tetrahedral Mesh Generator and Three-Dimensional Delaunay Triangulator.**2006.http://tetgen.berlios.de/files/tetgen-manual.pdfGoogle Scholar - Baudouin TC, Remacle JF, Marchandise E, Lambrechts J, Henrotte F:
**Lloyd’s energy minimization in the**L_{ p }**norm for quadrilateral mesh generation.***Eng Comput*2012. DOI:10.1007/s00366–012–0290-x DOI:10.1007/s00366-012-0290-xGoogle Scholar - Fortin A, Garon A:
**Les Eléments finis : de la théorie à la pratique.**2014.http://giref.ulaval.ca/files/afortin/Publications/elements_finis.pdf .Google Scholar - Owen SJ, Canann SA, Saigal S:
**Pyramid Elements for Maintaining Tetrahedra to Hexahedra Conformability.**In*ASME Trends in Unstructured Mesh Generation*. Edited by: Canann S, Saigal S. Evanston: American Society of Mechanical Engineers; 1997:123–129.Google Scholar - Agoston MK:
*Computer Graphics and Geometric Modeling*. USA: Springer-Verlag; 2005.Google Scholar - Rieling R:
**Yamaha XTZ-125.**2013.http://grabcad.com/library/yamaha-xtz-125 .Google Scholar - 5 Bladed Propeller 2011.http://grabcad.com/library/5-bladed-propeller .
- Hall C:
**CV HP1.**2013.http://grabcad.com/library/cv-hp1 .Google Scholar

## Copyright

This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.