# Mmg histograms

### Understand Mmg histograms

In the following section we will describe the histograms printed by Mmg.

The verbosity level (-v command line argument) will determin input and output informations :

• at level 1 (-v 1) : main informations on input and output mesh qualities are printed -> minimal, maximal and mean element quality + index of the lowest quality element
• level 2 (-v 2) : adds main informations on input edge lengths are printed -> smallest, average and largest edge length + indices of extremities of the 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

In the following, we note  $Latex formula$ the element dimension ($Latex formula$ for a triangle, $Latex formula$ for a tetra), $Latex formula$ the $Latex formula$ edges of an element $Latex formula$, $Latex formula$ their lengths, $Latex formula$ the mean metric over this element  and $Latex formula$ the volume of the element in this mean metric. The element quality is computed such as:
$Latex formula$  with  $Latex formula$ a normalization coefficient such as an equilateral element has quality 1 in an isotropic metric.

— MESH QUALITY 11726   the mesh has 11726 elements (tetrahedra in 3D / triangles for surface meshes)
BEST   1.000000     AVRG.    0.777858     WRST.     0.372378 (6029)  ←best elt quality is 1, average qual is 0.778, element of index 6029 is the worst and has a quality of 0.37
HISTOGRAMM:      100.00 % > 0.12    ← 100% of the elements have a quality better than 0.12
99.47 % > 0.5      ← 99% of the elements have a quality better than 0.5
0.8 < Q < 1.0      5340      45.54 %   ← 5340 elements i.e. 45.54% of the elements have a quality between 0.8 and 1
0.6 < Q < 0.8      5701      48.62 %
0.4 < Q < 0.6        681         5.81 %
0.2 < Q < 0.4            4         0.03 %

#### Edge length histogram

— RESULTING EDGE LENGTHS     674      ← the mesh has 674 edges (internal and boundary ones)
AVERAGE LENGTH                       3.0455  ← the average edge length is 3.045
SMALLEST EDGE LENGTH         2.0000     88   108  ← the smallest edge is of length 2 and has vertices 88 and 108
LARGEST EDGE LENGTH          10.1980      16   131   ← the largest edge is of length 10.198 and has vertices 16 and 131

HISTOGRAMM:
1.41 < L < 2.00         120     17.80 %    ← 120 edges (17.8%) have lengths between 1.41 and 2.00
2.00 < L < 5.00        485      71.96 %
5.     < L                       69       10.24 %

Note that we print the edge length computed in the input metric so we always target edges of size 1.