Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

Engineering with Computers

https://doi.org/10.1007/s00366-023-01908-6

ORIGINAL ARTICLE

Bc‑hexmatching: an improved hexahedral mesh matching approach


based on base‑complex structure
Qingfeng Zhao1 · Gang Xu1,2 · Zhoufang Xiao1 · Haiyan Wu1 · Renshu Gu1 · Yang Liu3 · Yufei Pang3

Received: 18 April 2023 / Accepted: 18 September 2023


© The Author(s), under exclusive licence to Springer-Verlag London Ltd., part of Springer Nature 2023

Abstract
Automatic generation of hexahedral meshes for complex geometries is still a challenging problem, the domain-decomposition
based method is one of the promising methods for such problems. When generating the meshes of sub-components of a
domain, it is often necessary to impose consistent mesh constraints on the interfaces between sub-components. The adop-
tion of mesh matching algorithms can relax such constraints, and improve the efficiency and robustness of mesh generation
framework. In this paper, a new mesh matching algorithm based on base-complex structure is proposed. In our method,
the base-complex structures of the sub-components to be matched are obtained and optimized first, and then they are used
to match the interfaces between the sub-components via dual chord operations on the base-complex structures. After the
matching process, an optimization problem is formulated and solved to adjust the positions of corresponding vertices on
the interfaces. Compared to the current mesh matching algorithms, instead of performing dual operations directly on mesh
elements, the proposed method needs less dual operations and is able to obtain higher quality elements near the interfaces.
Finally, the effectiveness of the proposed algorithm is verified by several matching examples.

Keywords Mesh matching · Base-complex structure · Dual operation · Simplification

1 Introduction problems [2]. Various hexahedral mesh generation methods


have been developed. Most of them directly generate the
In numerical simulation methods, i.e., finite element method, hexahedral mesh for the entire model. The polycube-based
finite volume method and so on, the input computational methods [3–6] can generate high-quality hexahedral mesh.
domain has to be discretised into a mesh representation. For Still, such methods cannot produce high-quality results for
3D problems, the tetrahedral mesh is widely used since the complex models since it is difficult to construct the polycube
automatic generation technology [1] of tetrahedral mesh is structure for complex models. The octree-based method
relatively mature, and it can be applied to complex geom- [7–13] can generate the hexahedral mesh for the complex
etries. Compared to the tetrahedral mesh, the hexahedral model. However, the quality and topology of the generated
mesh has higher computational accuracy and lower storage mesh cannot meet the simulation requirements. All in all, the
costs and it is therefore preferred in numerical simulation automatic generation of hexahedral meshes with high quality
for arbitrary complex models is still a challenging problem.
Instead of generating the hexahedral mesh for the whole
* Gang Xu
gxu@hdu.edu.cn computational domain directly, an alternative way is to
decompose the complex model into several components with
* Yufei Pang
pangyufei@cardc.cn simple shape. These components can be meshed automati-
cally, and then the hexahedral meshes of these components
1
School of Computer Science and Technology, Hangzhou are merged together [14, 15]. However, in many cases, the
Dianzi University, Hangzhou, China interfaces of the hexahedral meshes of these different com-
2
Key Laboratory of Discrete Industrial Internet of Things ponents are usually non-conforming. For simple decomposi-
of Zhejiang Province, Hangzhou, China tion interfaces, it is possible to solve an integer programming
3
Institute of Computational Aerodynamics, China problem to ensure conforming mesh elements on the inter-
Aerodynamics Researching and Development Center, faces when generating the hexahedral meshes of the different
Mianyang, China

13
Vol.:(0123456789)
Engineering with Computers

components. Nevertheless, such an integer programming within the base-complex components are considered to
problem may not have a solution for complex interfaces match. Compared to the methods with direct mesh ele-
due to complex constraints. To solve the non-conforming ment operation, the proposed method is able to avoid many
problem for such cases, it is better to relax the constraints unnecessary dual operations and thus gains high efficiency.
to generate the hexahedral meshes of components after and Finally, after the matching process, an optimization problem
perform a mesh matching process to make the elements on is formulated to adjust the positions of corresponding ver-
the sharing interface being conformal afterwards. The adop- tices on the interfaces. The optimization process can avoid
tion of the mesh matching process can not only reuse exist- the generation of inverted elements and ensure the resulting
ing meshes, but also extend the ability of the hexahedral mesh quality.
mesh algorithm for complex geometries. The rest of this paper is organized as follows: Sect. 2
Several mesh matching methods have been proposed dur- briefly introduces some basic concepts and gives an over-
ing the last two decades. Jankovich et al. proposed a graft- view of this algorithm. Sections 3, 4, and 5 present the
ing tool [16] to project the boundary outline of an interface details of the algorithm at each main step. Section 6 presents
to another interface. However, this method only focuses on examples to demonstrate the effectiveness of the proposed
the projection of the boundary outline but does not discuss method. And a conclusion is given in Sect. 7.
the consistency of the internal mesh of the outline. Staten
et al. first proposed an automatic hexahedral mesh matching
algorithm [17] by conducting dual operators to change the
2 Basic concepts and overview
dual chord structures of the interfaces. However, the pro-
of the algorithm
posed dual operation can not handle the localization of self-
intersection sheets, which will cause robustness issues. Chen
In this section, we will first briefly introduce some concepts
et al. [18] further improved the algorithm by introducing a
that frequently appear in this study, including the base-com-
more precise criterion for chords matching and a new con-
plex structure and its dual structure, dual operations that are
cept of partition chord set. These improvements enable the
just like hexahedral mesh. After that, we will give an over-
algorithm to handle more complex interfaces, such as inter-
view of the proposed algorithm, which will be explained in
faces with internal loops. They also proposed a dual opera-
detail in the following sections.
tor to handle self-intersection sheet extraction and inflation
locally. However, their dual operator still cannot handle
sheets intersecting itself more than once. Recently, Chen 2.1 Basic concepts
et al. [19] proposed a hex-mesh matching approach to handle
complex sheet inflation under constraints. The approaches The mesh matching algorithm continuously performs dual
proposed by Staten et al. and Chen et al. directly perform operations on the two non-conforming interfaces of two
topology operation on the quadrilateral mesh elements on hexahedral meshes. Unlike traditional hexahedral mesh
the interfaces, however, these methods do not consider the matching algorithms, the dual operations in this study are
topology structure on these interfaces. This leads to many conducted on the base-complex structure of a hexahedral
unnecessary dual operations, such that the robustness, effi- mesh. We will introduce the key concepts that we use in
ciency and quality of the corresponding matching methods this study, such as the base complex and the dual structures
still have some improvement space. Although the proposed based on it, but leave out some more basic concepts such as
chords matching criterion is more accurate, it removes the interface, dual sheet, dual chords, dual columns and dual
spatial distance threshold and can not ensure that the cor- operation like pillowing, sheet extraction, sheet inflation
responding vertices have the same location, which causes (they can be found in previous works [17, 19–23]). In this
inverted hex elements in the resulting merged mesh. study, as a distinction, the concepts like dual operation, dual
In this paper, a new hexahedral mesh matching algorithm sheet, etc., relate to a hexahedral mesh, while the concepts
is proposed. The new algorithm is based on base-complex like base-complex sheet, base-complex chord, etc., relate to
structure and considers the topology of the matching inter- a base-complex structure.
faces. Firstly, a simplification step is conducted to optimize Base-complex
the topology of the interfaces and reduce the number of The valence of vertex, edge, and face is expressed in
base-complex chords. This step will make the two interfaces terms of the number of their adjacent hex elements. An
easier to be matched. Secondly, a new subdivision strategy is mesh edge is defined as an irregular edge if its valence is
proposed to improve the simplification rate while maintain- not two on the boundary or four in the interior. A singularity
ing the interface’s boundary features and mesh quality. In is composed of a series of connected irregular edges with
the proposed matching step, the base-complex structures of the same valence, and its valence is defined as the valence
the interfaces are matched first, then the number of segments of the irregular edge it has.

13
Engineering with Computers

From an n-valence singularity, n separated surfaces can base-complex chords CAi and CBi , they are considered to
be extended, and they terminate at another singularity or
match each other if they satisfy the following conditions:
the surface boundary. A hexahedral mesh can be divided
into a number of cube-like components by all the surfaces
1. The intersections of CAi and CBi with other chords should
extended from its singularities, and each component con-
be the same. To be specific, if CA , CA , etc., in M inter-
j1 j2
tains at least one hex element. Such components and the
sect with CAi , then the matched base-complex chords CB ,
j1
corresponding vertices, edges and faces represent the base-
CB , etc., corresponding to CA , CA , etc. should also inter-
j2 j1 j2
complex structure [24] of a hexahedral mesh as shown in
sect with CBi .
Fig. 1. The base-complex structure can be considered as a
2. The intersections order should be the same. That is, if CAi
coarsened hexahedral mesh, which has the same topological
intersects with CA , CA , etc., in this order, then CBi should
j1 j2
properties as a hexahedral mesh.
also intersect with CB , CB , etc., in corresponding order.
j1 j2
Dual structures on base-complex structure As men-
tioned earlier, a base-complex structure has the same
topological properties as a hexahedral mesh. Thus, a base- 2.2 Overview of the algorithm
complex structure also has dual structures like the sheet, col-
umn, and so on [25]. Starting from a base-complex edge and The algorithm takes two hexahedral meshes (denoted as HA
iteratively finding its topologically parallel edges, we can and HB ), and two depth parameters that represent the maxi-
eventually find a set of base-complex components, just like mum range of each mesh that dual operations can modify as
a dual sheet of a hexahedral mesh; we call this set the base- inputs. Besides, the user should also specify the interfaces
complex sheet. Similarly, starting from a base-complex face of the two meshes that need to be matched. Then, the algo-
and iteratively finding its topologically parallel faces, we can rithm extracts a local part of each mesh according to the
define a base-complex column. Note that the base-complex depth parameter.
The local part is denoted as HA and HB (Fig. 3), respec-
′ ′
chord defined in [25] is the same as the base-complex col-
umn defined in [17, 18], and the base-complex chord defined tively. Then, the base-complexes of these two parts can
in [17, 18] is the set of quadrilaterals of a base-complex be obtained, denoted as BA and BB . Let CA and CB be the
sheet on an interface. This paper uses the same definition base-complex chords set on the two interfaces going to
for base-complex column and chord as in [17, 18]. Figure 2 be matched. As shown in Fig. 4, the proposed algorithm
shows different dual structures of a base-complex structure. includes the following three main steps:
Chord matching criteria
We use the criteria proposed in [18] for the chord match- 1. Interface simplification (Sect. 3). The base-complex
ing. To make this paper self-contained, we will briefly intro- structure of two interfaces may be quite complex, espe-
duce the criteria here (please refer to [18] for more details). cially when there are many base-complex chords in CA
Give two sets of base-complex chords CA and CB , which and CB . Therefore, we try to perform a simplification
are on interfaces QA and QB , respectively. M is the set of process on these two interfaces. It attempts to remove as
matched base-complex chord pairs. For the two given many base-complex chords as possible while ensuring
no inverted elements are generated and no mesh features

Fig. 1  a Hexahedral mesh. b Base-complex structure. c Different components are denoted as different colors

13
Engineering with Computers

Fig. 2  a The base-complex


of mesh. b Base-complex
sheet(red). c Base-complex
column (blue). d Base-complex
chord on interface correspond-
ing to the sheet (red)

base-complex chords that are not matched are denoted


as Cu−A and Cu−B . Then, iterate over each chord in Cu−A
and Cu−B , and perform a sheet inflation operation on the
opposite interface to create a new chord so that the cur-
rent chord can be matched. The top-right part of Fig. 4
shows the two interfaces after base-complex sheet infla-
tion. After all the base-complex chords are matched, the
number of segments in a pair of chords may be different.
Thus, another step is needed to match the number of
segments for each pair of matched chords.
3. Optimization (Sect. 5). After the matching process, an
optimization process is conducted to enforce the loca-
tions of the matched points being the same, and to
improve the quality of mesh elements near the inter-
faces.
Fig. 3  The input of our algorithm

are lost. A new subdivision strategy is proposed to bal- 3 Interface simplification


ance the mesh density for preserving the mesh features.
The top-left part and top-middle part of Fig. 4 shows the We first simplify the base complex of the interfaces, which
interfaces before and after simplification respectively. will reduce the number of base-complex chords of interfaces,
2. Matching (Sect. 4). An initial matching process is per- and then make the matching step easier. We use the approach
formed to find pairs of chords on the two interfaces that proposed by Gao et al. in [25]. They proposed base-complex
are already matched and put them into the set M . The column/sheet extraction using local parameterization. They

13
Engineering with Computers

Fig. 4  The pipeline of the proposed algorithm. The interfaces of the input meshes in every step are presented (the interfaces are in red, and the
edges and points of its base complex are in black). The final mesh is also shown

use SLIM [26] to solve it. Although it’s an expensive opera- 1. Starting from the interface, find the d th layer of the hex-
tion, it improves the mesh quality and ensures no inverted ahedral mesh and denote it as Sd (Fig. 5c). According to
elements are generated. They also proposed some crite- the number of segments of the base-complex sheet Si
ria to filter out base-complex sheets/columns that cannot to be deleted, say n , subdivide the dth layer Sd n times
be deleted. Since our algorithm has a depth parameter, we (Fig. 5d).
need to limit the modification to the local region. We add 2. After the subdivision step, the intersection part between
the localization before we perform a base-complex sheet Si and Sd can be regarded as a base-complex column with
extraction. We will discuss this detail in Sect. 3.1. And to segment number n. As shown in (Fig. 6a, b), to achieve
preserve the interface’s boundary feature, we also proposed the localization of Si, we collapse this base-complex col-
a new subdivision strategy after extraction, and this will be umn.
discussed in section 3.2.
After the localization process, the base-complex sheet Si is
3.1 Base‑complex sheet localization been limited to a local region of the hexahedral mesh, and
thus it can be extracted while satisfying the depth constraint.
According to the definition, a base-complex sheet may span
over a large region of the mesh (see Fig. 5b). Thus, if we 3.2 Base‑complex chord subdivision
directly delete a base-complex sheet, a large region of the
mesh will be affected such that the user-specified depth con- During the simplification process, if we keep performing
straint will be violated. To avoid the constraint violation, base-complex sheet extraction, the density of the mesh will
localization has to be performed before the deletion of a decrease and thus affects the success rate of the parameteri-
base-complex sheet. The aim of a localization operation is zation of the sheet extraction operation. Besides, as the den-
to change the orientation of a base-complex sheet and to sity of the mesh gets smaller, it is more difficult to preserve
make the sheet spanning over a mesh region within depth the features. Therefore, we use dicing [17] to subdivide a
d (Fig. 6). And it is achieved by collapsing base-complex dual sheet of a base-complex sheet, which will not change
columns. The details are as follows: the base-complex structure of the mesh but increase the

13
Engineering with Computers

Fig. 5  a The base-complex


sheet to be collapsed in local
region. b The entire base-com-
plex sheet. c d th layer (green)
of hexahedral mesh. d The new
layers (red) after subdividing
twice and the original layer
(green)

Fig. 6  a The intersection of


Si and Sd is the base-complex
column to be extracted (blue). b
After extracting the base-com-
plex column, the base-complex
sheet changes its orientation

13
Engineering with Computers

mesh density. If the sheet with the longest average mesh sheet is subdivided. The number of subdivisions depends on
edge length or a random base-complex sheet is chosen to the number of hex elements deleted in base-complex sheet
subdivide, it is probably to increase the mesh density in the extraction. Figure 8 shows the difference without and with
wrong direction. In this study, a subdivision strategy based subdivision, the proposed method balances the density of
on the intersection relation is proposed to find the base-com- the mesh and preserves the features.
plex sheet for subdivision.
Let the base-complex chord to be deleted currently be Ci ,
and the base-complex chords intersects with it be Ci1, Ci2, Ci3, 4 Matching
and so on (see Fig. 7a). After the deletion of Ci, the mesh and
After the simplification step, we have two sets of base-com-
its base-complex structure are updated. If the intersecting
plex chords CA and CB on the two interfaces QA and QB . We
base-complex chords Ci1, Ci2 , Ci3, and so on are not changed
need to find which base-complex chords are already matched
(sometimes it may be merged with other chords), then the
and put the chord pairs into M , and put the unmatched
base-complex chord that intersects with them the most times
is selected as the candidate chord that needs subdivision base-complex chords in Cu−A, Cu−B , this step is called initial
and it is put into the set of chords Ccandi (Fig. 7). After that, matching. Thanks to the simplification step, the number of
base-complex chords is greatly reduced at this point. Ide-
the base-complex chord in the set Ccandi with the longest
ally, if we simplify the two interfaces, all the base-complex
average mesh edge length is selected and its base-complex

Fig. 7  a Ci is the base-complex


chord to be deleted, and Ci1,Ci2,
Ci3 intersect with Ci . b After
deleting the chord, Ccandi
1
, Ccandi
2

intersect with Ci1, Ci2, Ci3

Fig. 8  a The base-complex of the interface before simplification. b The interface after simplification without subdivision. c The interface after
simplification with subdivision

13
Engineering with Computers

Fig. 9  Two original interfaces


(top), Two interfaces after
simplification(bottom)

chords will be matched (Fig. 9). However, in most cases, 2. The hausdorff distance between chords belonging to
Cu−A and Cu−B are not empty. Therefore, we perform base- each pair in Mcandi is calculated. We put the pair with
complex sheet inflation to generate a new chord to match the closest distance into M .
the base-complex chord in Cu−A and Cu−B . As we mentioned 3. We continue the above two steps until no more valid
before, the base-complex structure can be considered a pair can be found. Finally, the rest chords that are not
coarsened hexahedral mesh so that the dual sheet inflation matched are put into Cu−A and Cu−B.
can be used to inflate a base-complex sheet. In this paper, we
use the initial matching and dual sheet inflation methods pro-
posed by Chen et al. [18]. To make this paper self-contained, 4.2 Base‑complex sheet inflation
we will briefly introduce them in Sect. 4.1 and Sect. 4.2(For
more details, please refer to [18]). After we perform base- The sheet inflation method proposed by Chen et al. [18]
complex inflation for each base-complex chord in Cu−A and can handle self-intersection sheets and localization of
Cu−B , all the chords are matched. Then, we iterate through sheets. Given a base-complex chord Cu−A i
, it first finds the
all chord pairs in M and match the number of segments of candidate nodes and edges that satisfy the matching crite-
each base-complex chord in one pair. We will discuss this ria listed in Sect. 2.1 on the interface QB , a polyline that is
in section 4.3. spatially closest to the inflated chord can be found by using
Dijstra to connect the nodes and edges (Fig. 10b). Then,
4.1 Initial matching an initial shrink-set is selected according to the polyline
to perform a pillowing operation [27], and it is optimized
Let Mcandi be the set of matched chord pairs. For the given afterward to improve the quality. After that, a new base-
two sets of base-complex chords CA and CB , the initial complex chord on interface QB is created (see Fig. 10c),
matching is to find as many matched chord pairs as possible. and this new chord matches with Cu−A i
. The new chord pair
It mainly consists of three steps: is put into M , and Cu−A is deleted from Cu−A.
i

Note that sheet inflation may not generate a new base-


1. We first compute the Cartesian product P between CA complex chord sometimes, because it may not intro-
and CB . Then, iterate over p ∈ P to check whether it duce singularities so that the base-complex of the mesh
satisfies the matching criteria listed in Sect. 2.1 and put remains the same. In this study, after sheet inflation, we
the valid pairs into Mcandi. use the edge of the newly inserted sheet as a constraint to

13
Engineering with Computers

Fig. 10  Base-complex sheet inflation. a Interface QA, CM


1
, CM
2
, CM
3
, CM
4
, CM
5
are the base-complex chord in M , C6 is the chord to inflated. b The

polylines(red) found on interface QB corresponding to C6. c The new base-complex chord(red) C6

reconstruct the base-complex of mesh, and it ensures that 1. Calculate the average value of nA and nB, denoted as navg,
the edge of the new sheet is also the base-complex edge. and navg ≥ 1.
2. Perform a dual sheet extraction or dual sheet subdivision
4.3 Segment matching operation to make the number of segments of CAi and CBi
to be navg.
After base-complex sheet inflation, all the base-complex
chords on the two interfaces are matched. However, this does Note that in process of segment matching, the dual sheet
not guarantee the mesh elements on these two interfaces extraction and dual sheet subdivision operations have no
match. Thus, it also needs to match the number of segments effect on the base-complex structure of the mesh. Besides,
for each base-complex chord pair. The number of segments is these two operations do not introduce inverted hex ele-
defined as the number of dual chords in a base-complex chord. ments and doublets. Thus, it is able to relax the constraint
Figure 11

shows the matched base-complex chord pair of the depth. It means that even if the base-complex sheet
CM1
and CM
1
with different number of segments. To match of a base-complex chord has not been localized, the extrac-
the segments, the algorithm iterates over each base-complex tion and subdivision operations still can be performed.
chord pair in the set M and processes them accordingly. Sup- This can avoid the singularities introduced by the localiza-
pose the current two chords of a pair are CAi and CBi , the cor- tion process and thus ensure the mesh quality. However, a
responding number of segments is nA and nB respectively. parameter is also provided for users to choose whether to
The segment matching process takes the following steps:


Fig. 11  Two interfaces where the base-complex has been matched. a The segment number of CM
1
is five. b The segment number of CM
1
is seven

13
Engineering with Computers

keep the depth constraint or not. And if the constraint is ‖2 ‖J −1 ‖


2
Dt (V) = ‖
‖Jt ‖F + ‖ ‖ (3)
kept, then localization process is performed first. t
‖ ‖F
H is the hex elements set, a vertex in a hexahedron and its
three adjacent edges can form a tetrahedron. In this way, a
5 Optimization
hexahedron can construct eight different tetrahedra denoted
as t, and Vt is the volume of a tetrahedron, and Jt is the Jaco-
After the matching process, the two interfaces are conform-
bian of the transformation from t to its ideal right-angled
ing, which means the mesh topology on these two interfaces
tetrahedron. Dt (V) is the symmetric Dirichlet energy [28].
is the same. However, the matching criteria mentioned in

2.1 do not consider the distance between the base-complex ES (V) = ‖v − ṽ ‖2
chords. Thus, the positions of two corresponding points on (4)
vi,j ∈∀p
the two interfaces may have a large deviation from each
other. Figure 12 shows a pair of two matched interfaces with ES (V) here is the stitching term, p is the point pair which cor-
different positions of corresponding vertices. responds to each other. ṽ is the average position of vi and vj.
If we directly pull the two corresponding points together, ∑ ∑
‖v − v̄ ‖2 + � − v̄ − a d �2
it’s likely to introduce inverted hex elements. In this study, EF (V) = v∈C ∑�
v∈L v l l�
(5)
an optimization problem is solved to adjust the positions of + v∈S ‖n(v − ṽ )‖2
the corresponding points on the two interfaces. It aims to
Here, C is the corner vertices, L is the feature line vertices
stitch the corresponding points together while preventing
and S is the regular vertices on boundary surface [29], v̄ is
introducing inverted hex elements, improving the mesh qual-
the original vertex position,dl is the feature line tangent at
ity and preserving the features. This is quite similar to what
v̄ . al is an auxiliary variable added to the system for feature
the previously mentioned base-complex sheet extraction pur-
line constraints and n is the normal at v̄ .
sues. In the process of base-complex sheet extraction, the
We can still use the SLIM solver to minimize the energy,
optimal volumes of hex elements of the sheet should be zero,
and the strategy proposed by Gao et al. [25] is adopted. We
and this is equivalent to stitch the vertices of hex elements
first minimize (1) to stitch the points quickly, then minimize
together. To this end, the energy function proposed by Gao
the (2) and (5) together to improve the mesh quality.
et al. [25] is selected to formulate an optimization problem
and solved accordingly. The energy function is shown below:
min E (V) = ED (V) + 𝜆t ES (V) + 𝜆f EF (V) (1) 6 Experiment
V

Where V is the vertices of the mesh, ED (V) measures the The proposed algorithm is implemented with the program-
geometric distortion of every hex element, ES (V) stitches the ming language C++ on a 64-bit Windows 11 platform, and
corresponding points together, EF (V) measures the deviation all the tests are conducted on a six-core processor clocked at
of boundary vertices from original mesh surface. 𝜆t and 𝜆f 3.5 GHz with 16 GB of memory. The simplification step is
are the weights of ES (V) and EF (V). currently parallelized, but the code can be further optimized.
∑ ∑∑ In the tests, the maximal number of iterations of SLIM is
ED (V) = Dh (V) = Vt Dt (V) (2) set to 2, and the hausdorff distance threshold is set to 0.06
h∈H h∈H t∈h (0.0−1.0).

Fig. 12  a Interface QA(red). b Interface QB (blue). c The positions of corresponding points are different

13
Engineering with Computers

6.1 Comparison with Chen’s method the quality of all examples. And Table1 shows the number
of hex elements(#H), the number of singular vertices(#S),
Since Chen et al. [18] did not provide their code and exam- the minimal and average scaled Jacobians (MSJ, ASJ), the
ples, we implemented their method according to the paper. number of operations(#O), the number of base-complex
For fairness, we also add optimization to their algorithm components of the interface(#B) and the time. The interface
while keeping other processes unchanged. We tested our of mesh generated by our method has a more clean regular
method and Chen et al.’s method in examples 1–3. Fig- base-complex structure, and our results have fewer singu-
ures 13, 14, 15 and 16 show examples 1–3 inputs. In exam- lar and base-complex components and higher quality. The
ple 1, we perform the mesh grafting algorithm [16] first. The differences are especially apparent in example 1, where no
depth parameter of all mesh in examples 2–3 is set to 5 and localization process is executed. In addition, our algorithm
9, and there is no depth constraint in example 1. Figure 17 has fewer operations in all examples. The reason is that our
shows the resulting mesh and the base-complex of interfaces. algorithm modifies the base-complex of meshes to match
Figure 18 shows the comparison of mesh singularities and their topology first, and based on the idea, we simplified the

Fig. 13  Inputs of examples 1. a Two input meshes. b The interfaces of meshes

Fig. 14  Example 1: The inter-


faces after mesh grafting

Fig. 15  Inputs of examples 2. a Two input meshes. b The interfaces of meshes

13
Engineering with Computers

Fig. 16  Inputs of examples 3. a Two input meshes. b The interfaces of meshes

Fig. 17  Comparison with Chen et al. ’s method. Left is the resulting mesh, right is the base-complex of the interface of the resulting mesh

interface before matching which greatly reduces the number 6.1.1 Mesh matching of meshes generated by different
of singular vertices and the number of operations that need method
to be performed. Except for model 3, our algorithm also has
higher efficiency. The slowdown of our algorithm is due to Our inputs are generated by different methods such as poly-
the parameterization in the base-complex sheet extraction, cube-based method [3, 4], sweeping-based method [30], and
which becomes significantly slower as the number of mesh manual-based method. The inputs of example 3 are manually
elements increases. generated using PointWise (Figs. 19, 20, 21), and there is no
depth constraint in example 4. The inputs of example 5 are

13
Engineering with Computers

Fig. 18  Left is the singularities of the resulting mesh, middle and right are scaled Jacobians statistics of the resulting mesh

13
Engineering with Computers

Table 1  Comparison with chen Models #H #S #B MSJ ASJ #O Time


et al.’s method
Example1
input-part1 2048 44 106 0.792 0.953 – –
input-part2 3472 72 60 0.370 0.960 – –
result(Chen’s) 7262 106 315 0.543 0.954 23 96.8s
result(Our) 5792 24 22 0.727 0.983 11 37.4s
Example2
input-part1 1040 28 71 0.761 0.946 – –
input-part2 2048 44 106 0.792 0.953 – –
result(Chen’s) 2380 171 666 0.109 0.893 19 75.4s
result(Our) 6353 148 738 0.405 0.949 13 63.4s
Example3
input-part1 11,358 170 3,706 0.421 0.945 – –
input-part2 16,745 68 252 0.370 0.978 – –
result(Chen’s) 26,125 387 6,892 0.329 0.958 22 740 s
result(Our) 48,928 305 5568 0.424 0.970 17 728 s

Fig. 19  Inputs of examples 4.


a Two input meshes. b The
interfaces of meshes

generated by [4, 30]. We first match part 1 and part 2 to get


the transition mesh. Then, we match the part 3 and transition
mesh to get the resulting mesh (Fig. 22). The depth of part
2 and part 3 is set to 4 and 5. The transition mesh and part 1
are set to no constraint. Figure 23 shows the original inter-
faces of input meshes. Figure 24 and Table 2 show the result
of example 5. In Table 2, it turns out that our algorithm has
a good result when dealing with the interface with clean
topology. Since we match the two mesh interfaces while sim-
plifying them, Our algorithm can be used to match meshes
continuously to generate more complex hexahedral meshes,
and the results are of high quality. Combined with the above
mesh generation methods, we can achieve high-quality mesh
generation for more complex models.
Fig. 20  Example 4: The interfaces after mesh grafting(left is part1,
right is part2)

13
Engineering with Computers

Fig. 21  Result of examples 4.


a The resulting mesh and its
interface. b The singularities
and quality of the mesh

Fig. 22  Example 5, three


meshes are matched together

7 Conclusions and future work the simplification of the interfaces and the new proposed
subdivision strategy make the matching easier and is able
A hexahedral mesh matching algorithm based on base- to obtain cleaner interfaces with fewer singular vertices and
complex structures is proposed in this study. Compared to higher quality; (3) an optimization method is proposed to
existing mesh matching algorithms, the proposed algorithm stitch the interfaces that have been matched together, and
benefits from three aspects: (1) because of the adoption of therefore, improves the output mesh’s quality greatly, and no
base-complex structures, the algorithm significantly reduces inverted elements are introduced. The presented numerical
the number of dual operations that need to be performed; (2) examples verified the effectiveness of the proposed method.

13
Engineering with Computers

Fig. 23  Interfaces of example


5. a Two interfaces in step 1. b
Two interfaces in step 2

Fig. 24  The transition mesh and resulting mesh of example 5. a The result in step 1. b The result in step 2

13
Engineering with Computers

Table 2  Results of example 4,5 Models #H #S MSJ ASJ #O Time

Example3
Input-part1 1920 8 0.860 0.995 – –
Input-part2 8616 86 0.443 0.965 – –
Result 9704 22 0.529 0.983 5 84.30s
Example4
Input-part1 5113 68 0.467 0.979 – –
Input-part2 5788 64 0.582 0.984 – –
Input-part3 5973 200 0.391 0.941 – –
Transition 20,929 143 0.373 0.970 10 239.66s
Result 30,980 356 0.219 0.969 4 105.38s

Our method performs subdivision in the simplification Provincial Science and Technology Program in China under Grant
step to improve the simplification rate, subsequently, we still 2021C01108, the National Natural Science Foundation of China (No.
U22A2033, 62202130, U1909210), the Zhejiang Provincial Science
perform subdivision in the matching step to match the seg- and Technology Program in China (No.LQ22F020026), and the Open
ment numbers. Therefore, the density of the result mesh is project of State Key Laboratory of CAD & CG at Zhejiang University
likely to be larger than the input mesh. And if the topologies (No.A2212).
of both input meshes are complex and similar, the number
Data availability Data will be made available on request.
of operations will increase. The reason is that our algorithm
prioritizes simplification over the number of operations. Declarations
However, too many operations will reduce robustness and
algorithm efficiency, especially with localization. In addi- Conflict of interest The authors have no competing interests to declare
tion, our algorithm cannot handle arbitrary surface interfaces that are relevant to the content of this article.
with complex base-complex sheets, and our sheet inflation
method is not novel and robust enough, there is a more
robust method [19] that can handle high-quality sheet infla- References
tion under complex constraints. Therefore, future work will
1. Hang S (2015) TetGen, a Delaunay-based quality tetrahedral mesh
mainly focus on three aspects: generator. Acm Trans Math Softw 41(2):11
2. Shepherd JF et al (2008) Hexahedral mesh generation con-
1. Find a method to balance the mesh density, perhaps the straints. Eng Comput 24(3):195–213
segment-matching problem can be regarded as an inte- 3. Cherchi G, Alliez P, Scateni R (2019) Selective padding for
polycube-based hexahedral meshing. Computer graphics forum
ger programming problem. Solving and finding an opti- 38(1):580–591
mal number of segments for each base-complex chord 4. Guo HX, Liu Y et al (2020) Cut-enhanced PolyCube-maps for
to make the output mesh density similar to the input feature-aware all-hex meshing. ACM Trans Graph 39(4):106–1
meshes. 5. Yu Y, Liu JG, Zhang Y (2022) HexDom: polycube-based hex-
ahedral-dominant mesh generation. In: Mesh generation and
2. Modify the algorithm flow, implement an initial match- adaptation: cutting-edge techniques. Cham: Springer Interna-
ing before simplification, and do not extract the matched tional Publishing, pp 137–155
base-complex chords pair during simplification. Provide 6. Yu Y, Wei X, Li A et al (2022) HexGen and Hex2Spline: poly-
a parameter to adjust the balance between simplification cube-based hexahedral mesh generation and spline modeling for
isogeometric analysis applications in LS-DYNA. In: Geometric
rate and the number of operations. challenges in isogeometric analysis. Cham: Springer Interna-
3. Extend this algorithm to arbitrary surface interfaces and tional Publishing, pp 333–363
implement a more robust sheet inflation method. Also if 7. Gao X, Shen H, Panozzo D (2019) Feature preserving
the localization can be done in the depth direction and octree-based hexahedral meshing. Comput Graph Forum
38(5):135–149
breadth direction, the complexity of the sheet will be 8. Hu K, Zhang Y (2016) Centroidal Voronoi tessellation based
greatly reduced, This is one of the keys to extending the polycube construction for adaptive all-hexahedral mesh genera-
algorithm to arbitrary surface interfaces. tion. Comput Methods Appl Mech Eng 305:405–421
9. Livesu M, Pitzalis L, Cherchi G (2021) Optimal dual schemes
for adaptive grid based hexmeshing. ACM Trans Graph
41(2):1–14
10. Zhang Yongjie, Bajaj Chandrajit (2006) Adaptive and quality
Funding This research was supported by the National Key R &D quadrilateral/hexahedral meshing from volumetric data. Comput
Program of China under Grant No.2020YFB1709402, the Zhejiang Methods Appl Mech Eng 195(9–12):942–960

13
Engineering with Computers

11. Zhang Y, Hughes TJR, Bajaj CL (2010) An automatic 3D mesh 22. Merkley K, Ernst C, Shepherd JF et al (2008) Methods and appli-
generation method for domains with multiple materials. Comput cations of generalized sheet insertion for hexahedral meshing. In:
Methods Appl Mech Eng 199(5–8):405–415 Proceedings of the 16th International Meshing Roundtable, pp
12. Qian J, Zhang Y, Wang W et al (2010) Quality improvement of 233–250
non-manifold hexahedral meshes for critical feature determi- 23. Xu G, Ling R, Zhang YJ, Xiao Z, Ji Zg, Rabczuk T (2021) Singu-
nation of microstructure materials. Int J Numer Methods Eng larity structure simplification of hexahedral meshes via weighted
82(11):1406–1423 ranking. Comput-Aided Des 130:102946
13. Zhang YJ (2018) Geometric modeling and mesh generation 24. Gao X, Deng Z, Chen G (2015) Hexahedral mesh re-parameteri-
from scanned images. CRC Press zation from aligned base-complex. ACM Trans Graph 34(4):1–10
14. Kowalski N, Ledoux F, Frey P (2014) Block-structured hexahedral 25. Gao X, Panozzo D, Wang W et al (2017) Robust structure simpli-
meshes for CAD models using 3d frame fields. Proc Eng 82:59–71 fication for hex re-meshing. ACM Trans Graph 36(6):1–13
15. Qian J, Zhang Y (2012) Automatic unstructured all-hexahedral 26. Rabinovich M, Poranne R, Panozzo D et al (2017) Scalable locally
mesh generation from B-Reps for non-manifold CAD assem- injective mappings. ACM Trans Graph 36(4):1
blies. Eng Comput 28:345–359 27. Mitchell SA, Tautges TJ (1995) Pillowing doublets: refining a
16. Jankovich SR, Benzley SE, Shepherd JF et al (1999) The Graft mesh to ensure that faces share at most one edge. Proceedings of
Tool: an all-hexahedral transition algorithm for creating a multi- the 4th International Meshing Roundtable
directional swept volume mesh. Surfaces 5:6 28. Smith J, Schaefer S (2015) Bijective parameterization with free
17. Staten ML, Shepherd JF, Shimada K (2008) Mesh matching– boundaries. ACM Trans Graph 34(4):1–9
creating conforming interfaces between hexahedral meshes. In: 29. Livesu M, Sheffer A, Vining N et al (2015) Practical hex-mesh
Proceedings of the 17th International Meshing Roundtable, pp optimization via edge-cone rectification. ACM Trans Graph
467–484 34(4):1–11
18. Chen J, Gao S, Zhu H (2016) An improved hexahedral mesh 30. Wu H, Gao S, Wang R et al (2017) A global approach to multi-
matching algorithm. Eng Comput 32(2):207–230 axis swept mesh generation. Proc Eng 203:414–426
19. Chen J, Gao S, Wang R et al (2016) An approach to achieving
optimized complex sheet inflation under constraints. Comput Publisher's Note Springer Nature remains neutral with regard to
Graph 59:39–56 jurisdictional claims in published maps and institutional affiliations.
20. Borden MJ, Benzley SE, Shepherd JF (2002) Hexahedral sheet
extraction. In: Proceedings of the 11th International Meshing Springer Nature or its licensor (e.g. a society or other partner) holds
Roundtable, pp 147–152 exclusive rights to this article under a publishing agreement with the
21. Ledoux F, Shepherd JF (2010) Topological modifications of author(s) or other rightsholder(s); author self-archiving of the accepted
hexahedral meshes via sheet operations: a theoretical study. Eng manuscript version of this article is solely governed by the terms of
Comput 26(4):433–447 such publishing agreement and applicable law.

13

You might also like