mmg histograms

This section is devoted to the description of histograms printed by mmg.

Verbosity level (set using -v option) determines input and output information:

  • level 1 (-v 1) : main information on input and output mesh qualities are printed: minimal, maximal and mean element quality and index of the lowest quality element.

  • level 2 (-v 2) : adds main information on input edge lengths: smallest, average and largest edge length, indices of extremities of smallest and largest edges.

  • level 3 : adds statistic info on input edge length

  • level 4 : adds detailed histograms for input and output mesh quality and input edge lengths

  • level 5 : adds detailed histograms for output edge lengths

Element quality histogram

Quality histograms of elements may be printed before and after remeshing depending on verbosity levels. Elements are classified according to their quality \(Q\), which is defined as:

\[Q_K = \alpha\frac{V_{\overline{M}}}{(\sum\limits_{i=1}^{6} l_i^2)^{d/2}},\]

where:

  • \(d\) is the element dimension (2 for a triangle, 3 for a tetrahedra)

  • \(l_i\) the length of the \(i^{\text{th}}\) edge of the element

  • \(\overline{M}\) the mean metric over the element

  • \({V_{\overline{M}}}\) the volume of the element with respect to this mean metric

  • \(\alpha\) is a normalization coefficient chosen such as an equilateral element has a quality equal to 1 in an isotropic metric

Below is a example of element histogram:

— MESH QUALITY 11726
  BEST   1.000000     AVRG.    0.777858     WRST.     0.372378 (6029)
  HISTOGRAMM:      100.00 % > 0.12
                    99.47 % > 0.5
    0.8 < Q < 1.0      5340      45.54 %
    0.6 < Q < 0.8      5701      48.62 %
    0.4 < Q < 0.6      681       5.81 %
    0.2 < Q < 0.4      4         0.03 %

In this example, the first line indicates that the mesh has 11726 elements (tetrahdedra in 3D, triangles in 2D and surface meshes). The second line indicates that the best element quality is 1, the average quality is 0.777858 and the worst quality is reached by element of index 6029 and is equal to 0.372378.

The next two lines give the repartition of elements according to their quality. 100% of the elements haev a quality greater than \(0.12\), and 99% of them have a quality greater than 0.5.

Then, the complete histogram is displayed. For every intervals of \(0.2\), mmg gives the number of elements in this interval as well as the corresponding percentage. For instance, there are 5340 elements that have a quality between 0 and 1, which corresponds to 45.54% of the element of the mesh.

Edge length histogram

Edge length histograms may be printed as well. Below is an example of such an histogram:

— RESULTING EDGE LENGTHS     674
  AVERAGE LENGTH                  3.0455
  SMALLEST EDGE LENGTH            2.0000     88   108
  LARGEST  EDGE LENGTH            10.1980    16   131

 HISTOGRAMM:
  1.41 < L < 2.00        120     17.80 %
  2.00 < L < 5.00        485     71.96 %
  5.   < L                69     10.24 %

In this example, there are 674 edges in the mesh, including both internal and boundary ones. The average edge length is 3.0455. The smallest edge is of length 2 and its extremities are vertices 88 and 108. The largest edge has a length of 10.1980 and its extremities are vertices number 16 and 131. Then the histogram is displayed: for each interval of lengths written on the left, the number of corresponding edges and the percentage is displayed. For example, there are 120 edges (or 17.8% of the mesh) that have a length between 1.41 and 2.

Edge length is computed and printed with respect to the input metric, which means that the target length is always equal to 1.