Next Article in Journal
Bidenichthys okamotoi, a New Species of the Bythitidae (Ophidiiformes, Teleostei) from the Koko Seamount, Central North Pacific
Previous Article in Journal
The Sizes, Growth and Reproduction of Arrow Worms (Chaetognatha) in Light of the Gill-Oxygen Limitation Theory (GOLT)
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Unsupervised Machine Learning for Improved Delaunay Triangulation

1
College of Computer Science and Technology, China University of Petroleum, Qingdao 266580, China
2
Department of Artificial Intelligence, Faculty of Computer Science, Polytechnical University of Madrid, Campus de Montegancedo, Boadilla del Monte, 28660 Madrid, Spain
3
Guangdong Laboratory of Marine Science and Engineering, Zhuhai 519080, China
4
School of Geosciences, China University of Petroleum, Qingdao 266580, China
*
Author to whom correspondence should be addressed.
J. Mar. Sci. Eng. 2021, 9(12), 1398; https://doi.org/10.3390/jmse9121398
Submission received: 23 November 2021 / Revised: 2 December 2021 / Accepted: 4 December 2021 / Published: 7 December 2021

Abstract

:
Physical oceanography models rely heavily on grid discretization. It is known that unstructured grids perform well in dealing with boundary fitting problems in complex nearshore regions. However, it is time-consuming to find a set of unstructured grids in specific ocean areas, particularly in the case of land areas that are frequently changed by human construction. In this work, an attempt was made to use machine learning for the optimization of the unstructured triangular meshes formed with Delaunay triangulation in the global ocean field, so that the triangles in the triangular mesh were closer to equilateral triangles, the long, narrow triangles in the triangular mesh were reduced, and the mesh quality was improved. Specifically, we used Delaunay triangulation to generate the unstructured grid, and then developed a K-means clustering-based algorithm to optimize the unstructured grid. With the proposed method, unstructured meshes were generated and optimized for global oceans, small sea areas, and the South China Sea estuary to carry out data experiments. The results suggested that the proportion of triangles with a triangle shape factor greater than 0.7 amounted to 77.80%, 79.78%, and 79.78%, respectively, in the unstructured mesh. Meanwhile, the proportion of long, narrow triangles in the unstructured mesh was decreased to 8.99%, 3.46%, and 4.12%, respectively.

1. Introduction

In marine science and engineering, a physical oceanographic model generally consists of a set of partial differential equations, with its performance largely dependent on a mesh discretization scheme [1,2,3,4]. Currently, there are two kinds of mesh discretization schemes widely adopted in physical oceanographic models: structured mesh and unstructured mesh. It is well known that an unstructured mesh is one where its inner points do not have identical neighboring units, i.e., it differs from the number of meshes that connect different inner points within the mesh division area. Unstructured mesh is often used for the numerical simulation of coastal oceans, because it has no regular topological relation and well fits the complex coastal boundaries [5,6,7,8,9,10]. Therefore, the automatic generation of high-quality unstructured meshes is of critical importance in ocean scientific calculations.
The most common algorithm for the generation of unstructured meshes is Delaunay triangulation [11,12,13,14,15,16,17]. However, in a triangular mesh generated after Delaunay triangulation, there are many long, narrow triangles whose interior angle is smaller than 30 degrees. These long, narrow triangles will cause errors in ocean numerical calculation and influence the calculation accuracy, leading to increased error of the interpolation and reduced accuracy of the algorithm. Hence, it is necessary to optimize the quality of the Delaunay triangulation-based unstructured mesh of global oceans. In recent decades, extensive work has been carried out on the generation and optimization of unstructured meshes.
In [18], a new technology was proposed for the generation and element optimization of Delaunay triangular meshes, where sample points to be triangulated were generated through mapping (a new method). Then, these points were subjected to traditional Delaunay triangulation. The generated triangle elements were optimized through addition, removal, and re-positioning of mapped sample points (element nodes), thus forming a mesh consisting of triangular units with an aspect ratio of less than 2 and a minimum skewness of greater than 45°.
In [19], Wang Z et al. proposed an automatic mesh generation algorithm—FlowMesher—which may be used for the generation of unstructured meshes of any shape in the mesh domain. The mesh domain is considered an “enclosed container” where fluid particles are “injected” into one or several of its selected internal points. The particles repel each other and occupy the entire domain. When the container is filled with fluid particles that stop flowing, Delaunay triangulation is adopted to connect the fluid particles, generating an unstructured mesh (then, it is optimized through a combination of three-dimensional automatic mesh smoothing and element removal). The results show that the quality of the meshes is good and the accuracy of the edge length can be guaranteed.
Keith J. Roberts [20] used MATLAB’s DistMesh2D smoothing algorithm to develop an independent toolkit that was used for the automatic generation of a two-dimensional triangular unstructured mesh of an ocean coastal model. The mesh resolution was controlled according to a variety of feature-driven geometric and topo-bathymetric functions. Mesh generation was achieved through a force balance algorithm to locate vertices and a number of topological improvement strategies aimed at improving the worst-case triangle quality. Through real-world examples, the authors demonstrated how this method can produce high-quality, multiscale, unstructured meshes that are faithful to a variety of constraints and automatically conform to arbitrary shoreline vector datasets.
Tom Gustafsson [21] introduced an algorithm for the generation of triangular meshes for explicit polygonal domains based on the standard adaptive finite element method and centroidal patch triangulation smoothing. He demonstrated that a generic adaptive finite element solver can be repurposed into a triangular mesh generator if a robust mesh smoothing algorithm is applied between the mesh refinement steps. He presented a prototype implementation that demonstrates that many of the resulting meshes are reasonable and have average triangle quality equal to or above 0.9.
Quanbing Luo [22] developed an automatic Delaunay mesh generation method and a physical-based mesh optimization method on two-dimensional regions. For the Delaunay mesh generation method, the definition of node bubbles and element bubbles was provided to control local mesh coarseness and fineness automatically. For the physical-based mesh optimization method, the positions of interior node bubbles were adjusted according to interbubble forces. Several examples showed that high-quality meshes were obtained after mesh optimization.
Artificial intelligence has experienced great development in oceanography and meteorology [23,24,25,26,27,28]. Some work has also focused on utilizing artificial intelligence to optimize Delaunay triangulation-based unstructured meshes.
Wang Nianhua et al. [29] designed a sample data format to achieve the automatic extraction of an unstructured mesh’s sample datasets. By combining the advancing front technique (AFT) with an artificial neural network, a novel machine learning-based two-dimensional triangular mesh generation method was developed. Finally, several isotropic unstructured grids and hybrid grids (2D cylinder, etc.) were generated, which indicated that the mesh quality was generally equivalent to commercial software and the efficiency was 30% higher than when the traditional AFT method was used.
Tingfan Wu [30] proposed a mesh optimization method that embeds a machine learning regression model into the variational mesh adaptation. The regression model captures the mapping between the initial mesh nodes and the flow field, so that the variational method can move mesh nodes iteratively by solving the mesh functional, which is built from the estimated flow field on the updated mesh via the regression model. Results showed that the proposed method significantly improves the accuracy of the local flow features on the adaptive meshes.
In recent years, machine learning has been widely studied and applied in various fields, becoming a new research paradigm after theoretical analysis, numerical calculation, and experimental techniques and bringing new research ideas and methods to all fields. In the field of mesh generation, the adoption of machine learning for the generation and optimization of unstructured meshes will simplify traditional algorithms, reduce the need for the manual adjustment of meshes, manual workload, and the dependence on artificial experience and improve the mesh generation efficiency.
In this work, an attempt was made to use machine learning to optimize the unstructured triangular meshes formed with Delaunay triangulation in the global ocean field, so that the triangles in the triangular mesh were closer to equilateral triangles and the long, narrow triangles in the triangular mesh were reduced. As a result, the mesh quality was improved. Specifically, a primary adjustment was made to each triangle in the triangular mesh, so that the corresponding vertex of the maximum interior angle was moved by one step in the direction that was away from the longest side of the triangle. Then, the K-means clustering algorithm was used for clustering all of the triangular mesh’s nodes. Next, each cluster center was added into the triangular mesh’s node set successively to judge whether the number of long, narrow triangles in the triangular mesh was decreased compared with the number before the addition. If the number was reduced, the cluster center was included in the triangular mesh’s node set; if the number was not decreased, the cluster center was excluded from the triangular mesh’s node net. Then, the points in the triangular mesh’s node set were deleted successively to judge whether the number of long, narrow triangles in the mesh was decreased after the deletion of each node. If the number is decreased, the node is excluded from the triangular mesh’s node net; if the number was not decreased, the node was recovered. The final triangular mesh’s node set was saved and its optimized result was visualized. Finally, the quality of the unstructured mesh was evaluated with the triangle shape factor and the proportion of long, narrow triangles. The proportion of long, narrow triangles, or, namely, the proportion of long, narrow triangles with an interior angle of smaller than 30 degrees in all triangles in the unstructured triangular mesh, was adopted as a new mesh quality evaluation method herein. The smaller the proportion of long, narrow triangles, the better the triangular mesh quality.
With the proposed method, unstructured meshes were generated for global oceans, small sea areas, and the South China Sea estuary to carry out data experiments. The results suggested that the proportion of triangles with a triangle shape factor greater than 0.7 amounted to 77.80%, 79.78%, and 79.78%, respectively, in the unstructured mesh. Meanwhile, the proportion of long, narrow triangles in the unstructured mesh was decreased to 8.99%, 3.46%, and 4.12%, respectively.
The main contribution of the work is as follows:
(1) A machine learning-based unstructured mesh generation and optimization method is developed;
(2) A novel mesh quality evaluation method is proposed.

2. Method

2.1. Delaunay Triangulation Algorithm

Delaunay triangulation is a triangulation formed by connecting pairs of scattered points with common domain boundaries after the domain partition of scattered data points in the plane. Delaunay triangulation triangulates a set of points in a unique way that maximizes the minimum angle of each triangle formed in the mesh system. The advantage is that the generated triangulated meshes are optimal for a given set of points because they usually do not contain many extremely skewed cells.
Delaunay triangulation conforms to the null circle property and the maximizing minimum angle property. The null circle property means that any four points in the Delaunay triangle network do not share a circle, and no other points exist within the outer circle of any triangle in the Delaunay triangle network. The maximized minimum angle property means that the minimum angle of the triangle formed by the Delaunay triangle profile is the largest among the possible triangle profiles formed by the scattered point set. It can be said that the Delaunay triangulation is the closest to the regularized triangulation network. In addition, Delaunay triangulation has many other excellent properties: the final result of the triangulation will be consistent regardless of where the region is constructed from; if the diagonals of any two adjacent triangles form a convex quadrilateral, the smallest of the six interior angles of the two triangles will not be larger if they are interchangeable, etc.

2.2. K-Means Clustering Algorithm

Assume a data sample X having n objects, X = X 1 , X 2 , X 3 , , X n , where each object has m dimensional attributes. The goal of the K-means algorithm is to aggregate n objects into a specified k class cluster based on the similarity between objects, with each object belonging to one and only one of the class clusters with the smallest distance to the center of the class cluster. For K-means, it is necessary to first initialize k cluster centers C 1 , C 2 , C 3 , , C k , 1 < k < n , and then calculate the Euclidean distance from each object to each cluster center by the following equation:
d i s X i , C j = t = 1 m X i t C j t 2
In Equation (1), X i denotes the i th object 1 i n , C j denotes the j th cluster center, 1 j k , X i t denotes the t th attribute of the i th object 1 t m , and C j t denotes the t th attribute of the j th cluster center. The distance of each object to each clustering center is compared in turn, and the object is assigned to the class cluster of the nearest clustering center to obtain k class clusters S 1 , S 2 , S 3 , , S k . The K-means algorithm defines the prototype of class clusters in terms of centers, and the class cluster center is the mean value of all objects within the class cluster in each dimension, which is calculated by C l = Σ X i S l X i S l , where C l denotes the center of the l th cluster, 1 l k , S l denotes the number of objects in the l th cluster, X i denotes the i th object in the l th cluster, 1 i S l .

2.3. Our Method

Based on the foregoing algorithm, a K-means cluster-based unstructured mesh optimization method is proposed for the optimization of the Delaunay triangulation-based unstructured mesh of global oceans. The optimization of the triangular mesh is to homogenize the interior angles of each triangle in the triangular mesh to the greatest, so that each triangle is close to a regular triangle as far as possible and the number of long, narrow triangles with an interior angle of 30 degrees is decreased.

2.3.1. Primary Optimization Method for Unstructured Meshes

First, as shown in Figure 1, for each long, narrow triangle ABC in an unstructured mesh, with the longest side AB as one side, the third point of an equilateral triangle, which is marked as the target position D, is found based on the two vertices of A and B. Then, the vertex C of the greatest interior angle of the long, narrow triangle is moved by one step toward the direction of point D, reaching point E. At this time, the triangle ABC is adjusted to triangle ABE. Then, the next long, narrow triangle is also subjected to the foregoing adjustment, until all long, narrow triangles in the unstructured mesh are adjusted once. This process is denoted as the first iteration. After several iterations, the initial optimization of the unstructured mesh is completed.
This process is also described in detail in Algorithm 1.
Algorithm 1 Unstructured Grid Preliminary Optimization
Precondition: M is an array of narrow triangles
Precondition: T is the number of times to adjust
Precondition: Z is an array of coordinates of all nodes
Input: M and Z
for i = 1 to T do
 for each triangle ABC in M do
  Calculate cosA, cosB, cosC
  Find the coordinates [x0, y0] of the angle with the smallest cos value
  Calculate the target position [xg, yg] that [x0, y0] is to move to
  Move [x0, y0] in the direction of [xg, yg] by a certain step
 end for
 Recalculating the set of narrow triangles M2
 M ← M2
end for
Output: Z

2.3.2. Further Optimization Method for K-Means Cluster-Based Unstructured Meshes

Let us assume that q points are evenly distributed around a cluster center and form q triangles when connected with the cluster center. In order to ensure that the interior angle of the q triangles is greater than 30 degrees, the value of q should be 4 ≤ q ≤ 11.
The K-means clustering algorithm is used to cluster all triangular nodes in the unstructured mesh into multiple clusters, each of which contains q points, thus obtaining the cluster center of each cluster. Then, as shown in Figure 2, each cluster is added into the unstructured mesh’s node set to judge whether the number of long, narrow triangles in the unstructured mesh is decreased after the addition. If the number is decreased, the cluster center is included in the unstructured mesh’s node set; if the number is not decreased, the cluster center is excluded from the node set. Through several iterations, the addition of all cluster centers will not decrease the number of long, narrow triangles in the triangular mesh. At this time, it is considered that the optimization bottleneck has been reached and the final node set is saved.
Then, as shown in Figure 3, delete each point in the final node set obtained above successively to judge whether the number of long, narrow triangles in the triangular mesh is decreased. If the number is decreased, the point is deleted from the node set; if the number is not decreased, the point is retained. When all nodes in the unstructured mesh are deleted once, the process is referred to as one iteration. After several iterations, when the deletion of each node will not decrease the number of long, narrow triangles in the triangular mesh, it is considered that the deletion work has been completed and the final node set is saved.
This process is also described in detail in Algorithm 2.
Algorithm 2 Further Optimization of Unstructured Grid Based on K-Means Clustering
Precondition: NUM is the number of nodes in the unstructured grid
Precondition: XY is an array of coordinates of all nodes
Precondition: BT is the number of narrow triangles
Input: XY, BT
for q in [5,6,7,8,9,10]
  Repeat
    BTbefore ← BT
    Clustering all nodes using K-means clustering to obtain NUM/m clustering centers
    C ← clustering centers
    for each [xc, yc] in C
     Add [xc, yc] to XY
     Nodes are connected to form an unstructured grid using Delaunay triangulation algorithm
     Count the number of narrow triangles BT2
      If BT2 >= BT
       delete [xc, yc] from XY
      end if
      else
       BT ← BT2
      end else
    end for
    BTafter ← BT
  Until BTbefore == BTafter
  Repeat
    BTbefore ← BT
    for each [x, y] in XY
      delete [x, y] from XY
      Nodes are connected to form an unstructured grid using Delaunay triangulation algorithm
      Count the number of narrow triangles BT3
      If BT3 >= BT
       Add [x, y] to XY
      end if
      else
       BT ← BT3
      end else
    end for
     BTafter ← BT
  Until BTbefore == BTafter
  Output: XY
end for

3. Data Experiments

The data used in the experiment were derived from the NC file of the global ocean depth data, with a resolution of 1° × 1° and 0.5° × 0.5°, respectively. The data with a resolution of 1° × 1° included 360 pieces of longitudinal ocean depth data (range: 0.5°~359.5°) × 180 latitudinal data (range: −89.5°~89.5°). The data with a resolution of 0.5° × 0.5° included 360 pieces of longitudinal ocean depth data (range: −80.0°~180.0°) × 180 latitudinal data (range: −90.0°~90.0°).
Our data experiments were performed on a PC with a simulation environment as follows.
(1) Hardware: I7-8750H processor, 32 G memory, 4 blocks NVIDIA Tesla P100.
(2) System environment: Ubuntu 16.04 system, python 3.6.5, matplotlib 3.3.4, numpy 1.18.5, pandas 1.2.3, scipy 1.6.1, sklearn 0.24.1.

3.1. Experiment 1: Generation and Optimization of the Unstructured Mesh of Global Oceans

The main steps of this experiment were as follows.
Step 1. The global ocean depth data were processed to obtain an isobath coordinate set.
For global ocean depth data with a resolution of 1° × 1°, the corresponding ocean depth data of each latitude and longitude coordinate were extracted and sorted into a mat data file readable by MATLAB. The contourf function was used to draw the isobath, as shown in Figure 4, thus obtaining the coordinates of points on the isobath. Then, the coordinates of isobaths with different depths were classified into four different isobath coordinate sets: coastal lines, neritic zone, bathyal zone, and abyssal zone.
Step 2. Nodes of different density were generated within the enclosed range of each isobath.
In the generation of an unstructured mesh, the common stationing methods include the parallel line placement method [31] and the bubble packing method [32,33]. In this paper, randomly generated points were adopted for stationing. This was because randomly generated points are more unordered and more long, narrow triangles will be created in the unstructured mesh formed through connections with Delaunay triangulation, thus better verifying the validity of the proposed algorithm for triangular mesh optimization. As shown in Figure 5, during stationing, random points of different densities were generated based on different ocean depths. For inshore regions with a relatively smaller ocean depth, random points of greater density were generated; for regions with greater ocean depth, random points of smaller density were generated. Meanwhile, the points on the isobath were extracted with a specific interval and their coordinate set was obtained. The greater the ocean depth, the greater the extraction interval; the smaller the ocean depth, the smaller the extraction interval. Finally, the coordinates of all nodes were saved.
Step 3. Delaunay triangulation was used for connecting nodes to form an unstructured triangular mesh.
As shown in Figure 6, during Delaunay triangulation, all points were placed into a triangular linked list first. The scattered points in the point set were inserted successively. Next, we identified triangles (influencing triangles of the point) whose circumcircle contained the inserted point from the triangular linked list and deleted the common side of influencing triangles. The inserted points and all vertices of influencing triangles were connected to the complete insertion of a point into the Delaunay triangular linked list. Then, the newly formed triangles were optimized locally based on the optimization criteria (the exchange of diagonal lines was adopted to ensure that the formed triangular mesh was a Delaunay mesh) and the formed triangles were placed into the Delaunay triangular linked list. Finally, upon multiple circulations, all scattered points were inserted.
After all nodes were subjected to Delaunay triangulation, an unstructured triangular mesh was formed. Next, the triangular mesh of land needed to be removed. As the coordinates of the coastal line had been obtained in Step 1, a decision was made regarding whether the coordinates of the gravity center of each triangle in the unstructured triangular mesh were within the enclosed range of the costal line. If they were, the triangle was deleted. Finally, the unstructured triangular mesh with the ocean was obtained, as shown in Figure 7. In this figure, a long, narrow triangle whose interior angle was smaller than 30 degrees is indicated in yellow.
Step 4. The unstructured mesh was primarily optimized.
The primary optimization method for unstructured meshes in Section 2.3.1 was used to adjust each long, narrow triangle in the triangular mesh. After several iterations, the unstructured mesh was primarily optimized.
Step 5. The K-means cluster-based algorithm was used for further optimization of the unstructured mesh.
The further optimization method for K-means cluster-based unstructured meshes in Section 2.3.2 was used for further optimization of the unstructured mesh. As mentioned in the foregoing, the value of q should be 4 ≤ q ≤ 11. The experiments were carried out by setting the number q of K-means clustering points as 5, 6, 7, 8, 9, and 10, respectively. For each value of m, three experiments were performed. Finally, the optimized result was saved for comparative analysis, whereby the optimal optimization effect was obtained and visualized.

3.2. Experiment 2: Optimization of the Unstructured Mesh of a Small Sea Area

The optimization of the unstructured triangular mesh of a small sea area was also studied. In the unstructured mesh of global oceans after optimization in Section 3.1, a small sea area with many long, narrow triangles was selected for optimization of its unstructured mesh.
The main steps of this experiment were as follows.
Step 1. The unstructured mesh of a small sea area in the North Atlantic Ocean was selected for optimization, as shown in Figure 8.
Step 2~Step 3 were the same as Step 4~Step 5 in Section 3.1.

3.3. Experiment 3: Generation and Optimization of the Unstructured Mesh of South China Sea Estuary

In the South China Sea estuary, the coastal line is rugged, with many islands. Therefore, the generation and optimization of its unstructured mesh were focused on how to better fit the coastal line with the boundary of islands in the unstructured mesh with guaranteed quality of the unstructured mesh.
The main steps of the experiment were as follows.
Step 1. The global ocean depth data were processed to obtain coordinates of the coastal line within the South China Sea estuary.
For the global ocean depth data with a resolution of 0.5° × 0.5°, the ocean depth data corresponding to each latitude and longitude coordinate within the inlet area of the South China Sea (112°E–117.3°E, 20.5°N–23.5°N) were extracted and the isobaths were drawn to obtain the coordinates of the points on the coastline, as shown in Figure 9.
Step 2. Unstructured mesh nodes were generated within the region.
Random points of appropriate density were generated within the South China Sea estuary and its surrounding regions to obtain a coordinate set, as shown in Figure 10. The points on the coastal line were also added to the coordinate set.
Step 3~Step 5 were the same as Step 3~Step 5 in Section 3.1, as shown in Figure 11.

4. Results and Analysis

4.1. Evaluation Indicators and Parameters

First, we use the triangle shape factor [34] to measure the quality of the triangular mesh. Let the lengths of the three sides of triangle ABC be a ,   b ,   c ,   where   α is the shape factor:
α = a + b c b + c a c + a b a b c , α 0 , 1
In Equation (2), α = 1 for a positive triangle, and the larger α is, the closer the triangle is to the square triangle, and the better the mesh quality is. α does not depend on the size of triangle ABC, but only on its shape. This algorithm also proposes a novel evaluation criterion for mesh quality, namely the ratio of long, narrow triangles. This refers to the proportion of long, narrow triangles whose interior angle is smaller than 30 degrees among the total triangles in the triangular mesh. The smaller the proportion of long, narrow triangles, the better the mesh quality.

4.2. Experimental Results

4.2.1. Experiment 1: Generation and Optimization of Unstructured Mesh of Global Oceans

Figure 12 shows the generation and optimization of the unstructured mesh of global oceans. Compared with Figure 7 (before optimization), it can be seen that the number of long, narrow triangles in the unstructured mesh after optimization was significantly decreased; the triangles in the mesh were closer to equilateral triangles, and the mesh quality was significantly improved. Furthermore, the following characteristics were maintained: the smaller the ocean depth, the greater the density of the triangular mesh; the greater the ocean depth, the smaller the density of the triangular mesh.
Figure 13 shows a comparison of the distribution of the triangle shape factor before and after the unstructured mesh of global oceans was optimized. The horizontal ordinate refers to the range of the triangle shape factor; the longitudinal coordinate refers to the number of triangles. Blue indicates the mesh before optimization; green indicates the mesh after optimization. It can be seen from the figure that the number of triangles with a triangle shape factor within 0–0.6 was significantly reduced; the number of triangles with a triangle shape factor within 0.6–0.7 was slightly reduced; the number of triangles with a triangle shape factor within 0.7–1.0 was significantly increased. The triangles with a triangle shape factor of greater than 0.7 amounted to 77.80%. This indicates that the triangles in the unstructured mesh after optimization were closer to equilateral triangles compared with those in the unstructured mesh before optimization; the number of long, narrow triangles was significantly reduced; the mesh quality was significantly improved.
Before optimization, the proportion of long, narrow triangles in the unstructured mesh of global oceans was 54.23%. Table 1 shows the proportion of long, narrow triangles in the unstructured mesh of global oceans after optimization. The number of clustering points in the K-means clustering algorithm was set as 5, 6, 7, 8, 9, and 10, respectively. Three experiments were performed for each number of clustering points to solve the mean value of the proportion of long, narrow triangles after each optimization. It can be seen from the table that the optimal optimization effect is achieved when the number of K-means clustering points is set as 8, where the proportion of long, narrow triangles can be lowered to 8.99% on average. This indicates that the proportion of long, narrow triangles in the unstructured mesh after optimization is significantly lower than that in the unstructured mesh before optimization and that the mesh quality is greatly improved.
In summary, this algorithm can be applied to the optimization of the Delaunay triangulation-based unstructured mesh of global oceans and achieve a noticeable effect.

4.2.2. Experiment 2: Optimization of Unstructured Mesh of Small Sea Area

Figure 14 shows the optimization result of the unstructured mesh of a small sea area. Compared with Figure 8 (before optimization), it can be seen that the number of long, narrow triangles in the unstructured mesh after optimization was significantly decreased, and the mesh quality was significantly improved.
Figure 15 shows a comparison of the distribution of the triangle shape factor before and after the unstructured mesh of the small sea area is optimized. It can be seen from the figure that the number of triangles with relatively equal interior angles is increased. The triangles with a triangle shape factor greater than 0.7 amount to 77.80%. This indicates that the triangles in the unstructured mesh after optimization are closer to equilateral triangles compared with those in the unstructured mesh before optimization; the mesh quality is significantly improved.
Before optimization, the proportion of long, narrow triangles in the unstructured mesh of a small sea area was 54.23%. Table 2 shows the proportion of long, narrow triangles in the unstructured mesh of a small sea area after optimization. It can be seen from Table 2 that the optimal optimization effect is achieved when the number of K-means clustering points is set as 10, where the proportion of long, narrow triangles can be lowered to 3.46% on average. This indicates that the proportion of long, narrow triangles in the unstructured mesh after optimization is significantly lower than that in the unstructured mesh before optimization and that the mesh quality is greatly improved.
In summary, this algorithm can be applied to the optimization of an unstructured mesh of a small sea area and achieve a noticeable effect.

4.2.3. Experiment 3: Generation and Optimization of Unstructured Mesh of South China Sea Estuary

Figure 16 shows the optimized unstructured mesh of seas with a rugged coastal line within the South China Sea estuary. Compared with Figure 11 (before optimization), it can be seen that the number of long, narrow triangles in the unstructured mesh after optimization is significantly decreased. The triangular mesh is more regular and achieves a better fitting effect between the coastal line and the boundary of islands. The mesh quality is significantly improved.
Figure 17 shows a comparison of the distribution of the triangle shape factor before and after the unstructured mesh of the South China Sea estuary is optimized. It can be seen from the figure that the number of triangles with a triangle shape factor within 0.7–1.0 is significantly increased. The triangles with a triangle shape factor greater than 0.7 amount to 79.65%. This indicates that the mesh quality is significantly improved.
Before optimization, the proportion of long, narrow triangles in the unstructured mesh was 45.09%. Table 3 shows the proportion of long, narrow triangles in the unstructured mesh of the South China Sea estuary after optimization. It can be seen from Table 3 that the optimal optimization effect is achieved when the number of K-means clustering points is set as 10, where the proportion of long, narrow triangles can be lowered to 4.12% on average. This indicates that the proportion of long, narrow triangles in the unstructured mesh after optimization is significantly lower than that in the unstructured mesh before optimization and that the mesh quality is greatly improved.
In summary, this algorithm can be applied to the optimization of the unstructured mesh of the South China Sea estuary, and other seas with rugged coastal lines and many islands, and achieve a noticeable effect. Meanwhile, for a self-adaptive unstructured mesh whose density varies with ocean depth, a much better effect is achieved for an evenly distributed unstructured mesh.

5. Conclusions

In this paper, a novel unstructured mesh generation and optimization method is proposed—an unsupervised machine learning-based method for the automatic generation and optimization of the unstructured mesh of global oceans. In this method, Delaunay triangulation and the K-means clustering algorithm are used for the generation and optimization of the unstructured mesh. In such a mesh, the number of long, narrow triangles is significantly reduced; the triangles are closer to equilateral triangles, with a triangle shape factor that is closer to 1, and the mesh quality is significantly improved.
The optimization of the unstructured mesh will effectively improve the mesh quality, lead to better fitting of the complex shoreline boundaries in the study area, dramatically improve the accuracy of numerical ocean calculations, and reduce computational error.
There were also some limitations to the research. The unstructured mesh after optimization may fail to achieve the optimal effect in the same field, and there is room for further improvement. The reasons are as follows: (1) In order to fully verify the validity of the proposed optimization algorithm of an unstructured mesh, the unstructured mesh is deliberately unordered at the time of generation. Before the generation of the unstructured mesh, the existing stationing method is not applied. Instead, the generation of random points is adopted to make the mesh more unordered. This is more suitable to verify the validity of the proposed mesh optimization algorithm, but it also results in the mesh optimization effect being poorer than that achieved in other research in the same field. (2) The proposed optimization method is relatively simple. The proposed method only involves machine learning other than deep learning. If the generation and optimization of the mesh is conducted upon neural network learning of the characteristics and laws of the unstructured mesh, a better optimization effect may be achieved.
Due to the limitations of the study, it is possible that the proposed method cannot be used as an independent method for the generation and optimization of unstructured meshes. Nonetheless, it is undeniable that a novel idea is proposed in the generation and optimization of an unstructured mesh and this method may be used alongside other methods for the optimization of unstructured meshes.
In the future, more methods for the optimization of unstructured meshes will be explored. The more advanced and more efficient artificial technologies will be applied in the optimization of unstructured meshes to further improve the effect of mesh optimization, thus further improving the accuracy of ocean numerical calculation and reducing calculation error.

Author Contributions

Formal analysis, J.W. and F.M.; Funding acquisition, T.S. and D.X.; Investigation, W.W.; Methodology, J.W.; Software, R.H. and Y.L.; Supervision, T.S. and D.X.; Visualization, J.W. and P.X.; Writing—original draft, J.W. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by Natural Science Foundation of China (Grant: U1811464); National Key Research and Development Program (No. 2018YFC1406201 and No. 2018YFC1406204); Project supported by Innovation Group Project of Southern Marine Science and Engineering Guangdong Laboratory (Zhuhai) (No. 311021009); Natural Science Foundation of Shandong Province (Grant No. 405 ZR2019MF012); Taishan Scholars Fund (Grant No. ZX20190157).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data is from Guangdong Laboratory of Marine Science and Engineering. If you need the data you can contact the corresponding author by email.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Sane, A.; Fox-Kemper, B.; Ullman, D.S.; Kincaid, C.; Rothstein, L. Consistent Predictability of the Ocean State Ocean Model Using Information Theory and Flushing Timescales. J. Geophys. Res. Oceans 2021, 126, e2020JC016875. [Google Scholar] [CrossRef]
  2. Moritz, K.; Ronja, R.; Nicholas, H.W.; Stefan, P.; Torsten, A.; Georg, F.; Ricarda, W. Coupling framework (1.0) for the PISM (1.1.4) ice sheet model and the MOM5 (5.1.0) ocean model via the PICO ice shelf cavity model in an Antarctic domain. Geosci. Model Dev. 2021, 14, 3697–3714. [Google Scholar]
  3. Prakash, K.V.; Vimala, C.S.G.; Nagamani, P.V.; Baranval, N.K.; Manche, S.; Latha, T.P.; Bhavani, I.V.G.; Rao, Y.U.; Phanindra, C.S.N.; Srinivas, K.; et al. Role of physical oceanography parameters in ocean’s biological response with the passage of cyclone Titli in the Bay of Bengal. J. Earth Syst. Sci. 2021, 130, 123. [Google Scholar] [CrossRef]
  4. Firdaus, R.; Populasi, C.S.; Maulida, T.; Rahayu, S.P.; Pramujo, B.; Widiaratih, R.; Rajaguguk, W.L.P.; Putra, R.P.; Manoto, H. Physical Oceanography Condition and the Turbulent Mixing in Mid-upper Layer of the Eastern Indian Ocean during the InaPRIMA Cruise 2019. IOP Conf. Ser. Earth Environ. Sci. 2021, 750, 012034. [Google Scholar] [CrossRef]
  5. Zhang, Y.; Chen, C.; Beardsley, R.C.; Perrie, W.; Gao, G.; Zhang, Y.; Qi, J.; Lin, H. Applications of an unstructured grid surface wave model (FVCOM-SWAVE) to the Arctic Ocean: The interaction between ocean waves and sea ice. Ocean Model. 2020, 145, 101532. [Google Scholar] [CrossRef]
  6. Manzoor, S.; Edwards, M.G.; Dogru, A.H.; Al-Shaalan, T.M. Interior boundary-aligned unstructured grid generation and cell-centered versus vertex-centered CVD-MPFA performance. Comput. Geosci. 2018, 22, 195–230. [Google Scholar] [CrossRef] [Green Version]
  7. Crispo, L.; Bohrer, R.; Roper, S.W.K.; Kim, I.Y. Spatial gradient interface detection in topology optimization for an unstructured mesh. Struct. Multidiscip. Optim. 2021, 63, 515–522. [Google Scholar] [CrossRef]
  8. Manzoor, S.; Edwards, M.G.; Dogru, A.H. Three-dimensional unstructured gridding for complex wells and geological features in subsurface reservoirs, with CVD-MPFA discretization performance. Comput. Methods Appl. Mech. Eng. 2021, 373, 113389. [Google Scholar] [CrossRef]
  9. De Hoop, S.; Jones, E.; Voskov, D. Accurate geothermal and chemical dissolution simulation using adaptive mesh refinement on generic unstructured grids. Adv. Water Resour. 2021, 154, 103977. [Google Scholar] [CrossRef]
  10. Huang, Q.-M.; Ren, Y.-X.; Wang, Q. High Order Finite Volume Schemes for Solving the Non-Conservative Convection Equations on the Unstructured Grids. J. Sci. Comput. 2021, 88, 37. [Google Scholar] [CrossRef]
  11. Kugunavar, S.; Prabhakar, C.J. Content-Based Medical Image Retrieval Using Delaunay Triangulation Segmentation Technique. J. Inf. Technol. Res. JITR 2021, 14, 48–66. [Google Scholar] [CrossRef]
  12. Wang, W.; Wang, H.; Fei, S.; Wang, H.; Dong, H.; Ke, Y. Generation of random fiber distributions in fiber reinforced composites based on Delaunay triangulation. Mater. Des. 2021, 206, 109812. [Google Scholar] [CrossRef]
  13. Schwab, A.; Lunze, J. A Distributed Algorithm to Maintain a Proximity Communication Network among Mobile Agents Using the Delaunay Triangulation. Eur. J. Control 2021, 60, 125–134. [Google Scholar] [CrossRef]
  14. Ma, Q.; Zou, Q.; Huang, Y.; Wang, N. Dynamic pedestrian trajectory forecasting with LSTM-based Delaunay triangulation. Appl. Intell. 2021, 1–11. [Google Scholar] [CrossRef]
  15. Selimović, F.; Stanimirović, P.; Saračević, M.; Krtolica, P. Application of Delaunay Triangulation and Catalan Objects in Steganography. Mathematics 2021, 9, 1172. [Google Scholar] [CrossRef]
  16. Sastry, S.P. A 2D Advancing-Front Delaunay Mesh Refinement Algorithm. Comput. Geom. 2021, 97, 101772. [Google Scholar] [CrossRef]
  17. Nguyen, N.-S.; Taha, H.; Marot, D. A new Delaunay triangulation-based approach to characterize the pore network in granular materials. Acta Geotech. 2021, 16, 2111–2129. [Google Scholar] [CrossRef]
  18. Perumal, L. New approaches for Delaunay triangulation and optimisation. Heliyon 2019, 5, e02319. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  19. Wang, Z.; Srinivasa, A.R.; Reddy, J.N.; Dubrowski, A. FlowMesher: An automatic unstructured mesh generation algorithm with applications from finite element analysis to medical simulations. arXiv 2021, arXiv:2103.05640. [Google Scholar]
  20. Roberts, K.J.; Pringle, W.J.; Westerink, J.J. OceanMesh2D 1.0: MATLAB-based software for two-dimensional unstructured mesh generation in coastal ocean modeling. Geosci. Model Dev. Discuss. 2018, 2, 1847–1868. [Google Scholar] [CrossRef] [Green Version]
  21. Gustafsson, T. A simple technique for unstructured mesh generation via adaptive finite elements. Rakenteiden Mekaniikka 2021, 54, 69–79. [Google Scholar] [CrossRef]
  22. Luo, Q. Automatic Delaunay mesh generation method and physically-based mesh optimization method on two-dimensional regions. Eng. Comput. 2021, 2021, 1–11. [Google Scholar] [CrossRef]
  23. Meng, F.; Song, T.; Xu, D.; Xie, P.; Li, Y. Forecasting tropical cyclones wave height using bidirectional gated recurrent unit. Ocean Eng. 2021, 234, 108795. [Google Scholar] [CrossRef]
  24. Meng, F.; Xie, P.; Li, Y.; Xu, D.; Song, T. Tropical Cyclone Size Estimation Using deep Convolutional Neural Network. In Proceedings of the International Geoscience and Remote Sensing Symposium, Brussels, Belgium, 11–16 July 2021. [Google Scholar]
  25. Meng, F.; Ma, T.; Xu, D.; Wang, X.; Song, T. Use ensemble learning to estimate the population and assets exposed to tropical cyclones. In Proceedings of the International Geoscience and Remote Sensing Symposium, Brussels, Belgium, 11–16 July 2021. [Google Scholar]
  26. Meng, F.; Tian, Q.; Xu, D.; Wang, X.; Song, T. Cyclone identify Using Two-Branch Convolutional Neural Network from Global Forecasting System analysis. In Proceedings of the International Geoscience and Remote Sensing Symposium, Brussels, Belgium, 11–16 July 2021. [Google Scholar]
  27. Xie, P.; Meng, F.; Li, B.; Li, Y.; Yu, Z.; Song, T.; Xu, D. Visual prediction of tropical cyclones with deep convolutional generative adversarial networks. In Proceedings of the International Geoscience and Remote Sensing Symposium, Brussels, Belgium, 11–16 July 2021. [Google Scholar]
  28. Pang, S.; Xie, P.; Xu, D.; Meng, F.; Tao, X.; Li, B.; Li, Y.; Song, T. NDFTC: A New Detection Framework of Tropical Cyclones from Meteorological Satellite Images with Deep Transfer Learning. Remote Sens. 2021, 13, 1860. [Google Scholar] [CrossRef]
  29. Wang, N.; Lu, P.; Chang, X.; Zhang, L. Preliminary investigation on unstructured mesh generation technique based on advancing front method and machine learning methods. Chin. J. Theor. Appl. Mech. 2021, 53, 740–751. [Google Scholar] [CrossRef]
  30. Wu, T.; Liu, X.; An, W.; Huang, Z.; Lyu, H. A mesh optimization method using machine learning technique and variational mesh adaptation. Chin. J. Aeronaut. 2021, 2021. [Google Scholar] [CrossRef]
  31. Lo, S.H. Delaunay triangulation of non-convex planar domains. Int. J. Numer. Methods Eng. 1989, 28, 2695–2707. [Google Scholar] [CrossRef]
  32. Kenji, S.; David, C.G. Bubble mesh: Automated triangular meshing of non-manifold geometry by sphere packing. In Proceedings of the Third ACM Symposium on Solid Modeling and Applications, Salt Lake City, UH, USA, 17–19 May 1995; pp. 409–419. [Google Scholar]
  33. Wang, Q.S.; Ye, J.; Wu, H.; Gao, B.Q.; Shepherd, P. A triangular grid generation and optimization framework for the design of free-form gridshells. Comput.-Aided Des. 2019, 113, 96–113. [Google Scholar] [CrossRef]
  34. Liu, G.; Liang, S.; Sun, Z.; Zhu, Z. Improved algorithm for automatic dissection of unstructured meshes in marine numerical calculations. J. Waterw. Harb. 2010, 1–6. doi:CNKI:SUN:SDGK.0.2010-01-004. (In Chinese) [Google Scholar]
Figure 1. Preliminary optimization schematic for unstructured meshes using geometric principles.
Figure 1. Preliminary optimization schematic for unstructured meshes using geometric principles.
Jmse 09 01398 g001
Figure 2. The addition of clustering centers reduces the number of narrow triangles.
Figure 2. The addition of clustering centers reduces the number of narrow triangles.
Jmse 09 01398 g002
Figure 3. The deletion of points reduces the number of narrow triangles.
Figure 3. The deletion of points reduces the number of narrow triangles.
Jmse 09 01398 g003
Figure 4. Global ocean segment isobaths.
Figure 4. Global ocean segment isobaths.
Jmse 09 01398 g004
Figure 5. Global ocean node distribution.
Figure 5. Global ocean node distribution.
Jmse 09 01398 g005
Figure 6. Delaunay triangulation principle.
Figure 6. Delaunay triangulation principle.
Jmse 09 01398 g006
Figure 7. Global ocean unstructured grid formed after Delaunay triangulation.
Figure 7. Global ocean unstructured grid formed after Delaunay triangulation.
Jmse 09 01398 g007
Figure 8. Selected unstructured grid of small area of the North Atlantic Ocean to be optimized.
Figure 8. Selected unstructured grid of small area of the North Atlantic Ocean to be optimized.
Jmse 09 01398 g008
Figure 9. Coordinates of points on the coastline within the inlet area of the South China Sea.
Figure 9. Coordinates of points on the coastline within the inlet area of the South China Sea.
Jmse 09 01398 g009
Figure 10. Nodes within the South China Sea inlet.
Figure 10. Nodes within the South China Sea inlet.
Jmse 09 01398 g010
Figure 11. Initial unstructured grid of the inlet range of the South China Sea.
Figure 11. Initial unstructured grid of the inlet range of the South China Sea.
Jmse 09 01398 g011
Figure 12. Global ocean unstructured grids after optimization.
Figure 12. Global ocean unstructured grids after optimization.
Jmse 09 01398 g012
Figure 13. Comparison of triangle shape factor distribution before and after global ocean unstructured grid optimization.
Figure 13. Comparison of triangle shape factor distribution before and after global ocean unstructured grid optimization.
Jmse 09 01398 g013
Figure 14. Optimization of the unstructured grid for a small area of sea.
Figure 14. Optimization of the unstructured grid for a small area of sea.
Jmse 09 01398 g014
Figure 15. Comparison of triangle shape factor distribution before and after unstructured mesh optimization in a small area of sea.
Figure 15. Comparison of triangle shape factor distribution before and after unstructured mesh optimization in a small area of sea.
Jmse 09 01398 g015
Figure 16. Comparison before and after the generation and optimization of the unstructured grid of the inlet range of the South China Sea.
Figure 16. Comparison before and after the generation and optimization of the unstructured grid of the inlet range of the South China Sea.
Jmse 09 01398 g016
Figure 17. Comparison of triangle shape factor distribution before and after generation and optimization of unstructured meshes at the inlet range of the South China Sea.
Figure 17. Comparison of triangle shape factor distribution before and after generation and optimization of unstructured meshes at the inlet range of the South China Sea.
Jmse 09 01398 g017
Table 1. Percentage of narrow triangles after global ocean unstructured grid optimization.
Table 1. Percentage of narrow triangles after global ocean unstructured grid optimization.
Number of Points for K-Means Clustering5678910
Number of Experiments
112.52%10.48%10.61%8.41%9.65%9.49%
213.58%11.87%10.23%9.52%9.61%9.33%
313.26%11.25%10.34%9.04%10.44%9.18%
Average13.12%11.20%10.39%8.99%9.90%9.33%
Table 2. Percentage of narrow triangles after unstructured grid optimization in small area of sea.
Table 2. Percentage of narrow triangles after unstructured grid optimization in small area of sea.
Number of Points for K-Means Clustering5678910
Number of Experiments
14.26%3.55%3.99%3.55%3.82%3.26%
24.05%4.29%4.57%3.79%2.84%3.54%
33.84%5.26%3.75%4.03%4.48%3.59%
Average4.05%4.37%4.10%3.79%3.71%3.46%
Table 3. Percentage of narrow triangles after optimization of the unstructured grid of the South China Sea inlet range.
Table 3. Percentage of narrow triangles after optimization of the unstructured grid of the South China Sea inlet range.
Number of Points for K-Means Clustering5678910
Number of Experiments
16.92%6.10%5.54%5.30%4.58%4.24%
27.05%5.97%5.21%4.97%5.05%3.81%
36.60%5.94%5.30%4.65%4.79%4.30%
Average6.86%6.00%5.35%4.97%4.81%4.12%
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Song, T.; Wang, J.; Xu, D.; Wei, W.; Han, R.; Meng, F.; Li, Y.; Xie, P. Unsupervised Machine Learning for Improved Delaunay Triangulation. J. Mar. Sci. Eng. 2021, 9, 1398. https://doi.org/10.3390/jmse9121398

AMA Style

Song T, Wang J, Xu D, Wei W, Han R, Meng F, Li Y, Xie P. Unsupervised Machine Learning for Improved Delaunay Triangulation. Journal of Marine Science and Engineering. 2021; 9(12):1398. https://doi.org/10.3390/jmse9121398

Chicago/Turabian Style

Song, Tao, Jiarong Wang, Danya Xu, Wei Wei, Runsheng Han, Fan Meng, Ying Li, and Pengfei Xie. 2021. "Unsupervised Machine Learning for Improved Delaunay Triangulation" Journal of Marine Science and Engineering 9, no. 12: 1398. https://doi.org/10.3390/jmse9121398

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop