New quality measures for quadrilaterals and new discrete functionals for grid generation

In this paper, we review some grid quality metrics Robinson1987, Lo1989, Field2000, Knupp2001, Remacle2012 and define some new quality measures for quadrilateral elements. Usually, a maximum value of a quality measure corresponds to the minimum value of the energy density over the grid Ivanenko2000. We also define new discrete functionals which are implemented as objective functions in an optimization-based method for quadrilateral grid generation and improvement. These functionals are linearly combined with a discrete functional whose domain has an infinite barrier at the boundary of the set of unfolded grids like $S_{\omega,\epsilon}(G)$, see Barrera2010, in order to preserve convex grid cells in each step of the optimization process.


INTRODUCTION
There is a relatively large number of papers on numerical grid generation of unstructued grids.There is also a special interest in studying meshes formed by triangular elements.Our interest here is to generate structured meshes with quadrilateral elements, however, all the disscussion can be applied to unstructured meshes.
The simplest way to generate a structured mesh is by interpolation of the boundaries, but it is difficult to ensure that the mesh thus obtained is a convex one.In 7 , the authors made a review of some functionals and conditons that guarantee the existence of optimal meshes which are -convex over irregular planar regions.Our interest now is to improve mesh quality via the control the shape of the elements.The improvement of mesh quality can be done in two ways: Clean-up.Basically it consists in elimination, insertion and reconnection of nodes in order to eliminate the worst elements.
Some authors call that this procedure as topological optimization in the sense that the connectivity of the nodes is removed to obtain an optimal configuration.
Smoothing.It consists on node reposition without changing the connectivity of the elements.
In both cases, the goal is to obtain a quality mesh with a low number of distorted elements.To achieve this goal for a quadrilateral it is neccesary to define an ad hoc quality measure.Definition 1.We say that a real valued function ( ) over a quadrilateral is a quality measure in the sense of Field-Oddy, if it 1) has the ability to detect degenerate elements; 2) is bounded and continuous; 0 Abbreviations: ANA, anti-nuclear antibodies; APC, antigen-presenting cells; IRF, interferon regulatory factor arXiv:2205.10634v1 [math.NA] 21 May 2022 3) is independent of scale; 4) is normalized;

5) and it is invariant under rigid transformations;
For practical purposes it is convenient to define an acceptability interval [ 0 , 1] for the quality value when a quadrilateral has a suitable shape.When the quality value lies outside this interval the quadrilateral is distorsioned.
In this work we are interested in identifying the shape of the cells and quantifying the distortion of a quadrilateral when it is not a square or a rectangle.For this purpose, we will review the most used quality measures for rectangles and then we will propose new quality measures.

BACKGROUND
Following the ideas behind the quality measures reported for triangles, it is straightforward to define some figures that measure the shape of the quadrilaterals.One of these is the aspect ratio, which is defined by comparing with the ideal case when the quadrilateral is a rectangle: the ratio of the largest to the smallest sides.An estimator for this ratio was discussed in 1987 by Robinson 1 .The idea is to associate a rectangle to the convex quadrilateral: a rectangle passing through the midpoints of the sides of the quadrilateral, see the figure bellow.This idea is usual in continuum mechanics.Robinson proposes a practical way of calculating it by means of the bilinear mapping between the unit square and the quadrilateral which yields aspect ratio = max The associated rectangle has sides which are parallel to the coordinate axes and pass through the midpoints of the sides of the quadrilateral.In spite of its simplicity, this analytic representation is not satisfactory since it depends on a orthogonal coordinate system.In 2000, Field 3 reviewed this definition and suggested to calculate the aspect ratio of Robinson orthogonalizing the main axes and proposes a quality measure to detect squares.
In 1989, Lo 2 reviewed the quality measure for triangules ( , , ) with side lengths 1 , 2 and 3 which attains its optimum value in equilateral triangles and proposed again to calculate each one of those values over the four triangles which are defined by the sides and diagonals of a quadrilateral, but reordering these quantitites in such a way that . as quality measure.Lo points out that the optimal value of 1 is obtained for rectangles.This is a quality measure because it is continuous, bounded and identifies degenerate and even non-convex quadrilaterals.The measure that Lo uses for triangles is the reciprocal of the number of condition of a linear mapping ( ) = 1∕ 2 ( ), that Knupp 4 used in 2001 to measure the distortion of the elements.Locally, Lo's measure may have more critical points which can be far from representing a rectangle.
Another measure of quality, described by van Rens et al. 8 for quadrilaterals, is given as follows: compute the inner angles and define This function is continuous, dimensionless and 0 ≤ ( ) ≤ 1.One can see that ( ) = 0 if is a triangle and ( ) = 1 only if is a rectangle.In 2012, Remacle et al. 5 described the Blossom-Quad algorithm to construct a non-structured mesh with quadrilaterals elements obtained from a previous triangulation and used a cost-function to produce a quality mesh.They used and observed that the value of this function is 1 the is a perfect quadrilateral and 0 if any of the angles is greater than or equal to , id est when the quadrilateral degenerates into a triangle or is nonconvex.This function is also a quality measure.As noted, unlike other measures for rectangles we have discussed up to this point, the two last ones do not depend neither on the shape of the quadrilaterals, nor the aspect ratio or proportion of their sides; they only measure how near or far away is a quadrilateral from being a rectangle using only the internal angles.
Another function based on inner angles was proposed by Wu 9 .This author used the same idea of Lo: to order the inner angles so that 1 ≤ 2 ≤ 3 ≤ 4 and define .
Wu observed that this function attains its optimal value of 1 on rectangles.However, this is not a good measure in the sense of Field-Oddy, since it is not capable of detecting degenerate quadrilaterals.

NEW QUALITY MEASURES
In the previous section, we have reviewed some measures that characterize rectangles and we have also pointed out some intervals of acceptability to decide whether that a quadrilateral is close to having the desired shape is distorted.However, we have not noticed how it is that square or rectangle.

Minrect 2015
A very interesting problem in computational geometry is the following: given a cloud of points, calculate the rectangle of the minimum area that contains them.It is known that this problem can be raised directly on the convex hull of the cloud of points and therefore the problem can be regarded as to calculate a rectangle of minimum area that contains a polygon convex.We propose to use the rectangle of minimum area to define a distortion measure of the quadrilateral in the sense that measures how close or far is a quadrilateral of being a rectangle (see 2(a)).
On one hand, the cell area , is less than the rectangle area; that is, ≤ , and is easy to see that see Lassak 10 for the proof.The quotient thus defined reaches its maximum value of 1 on rectangles.Therefore, we propose the value as a quality measure to characterize rectangles.One must note that ( ) is a good quality measure according to Field-Oddy, and ( ) = 0 when is a triangle.Another good quality measure in this sense is where is the minimum area between the four triangles defind by taking the four vertices of a quadrilateral into groups of three.

New aspect ratio
Using the rectangle of minimum area for , we propose to use the ratio of the largest to the smallest side as aspect ratio.This measures is invariant under rigid and scaling transformations.This measure is better than the Robinson aspect ratio.It is easy to construct an example for which the Robinson aspect ratio 1 but very distorted Example : For the quadrilateral (3.53, 10.21), (−10, −4), (11.81, −1.38) y (9.27, 11.94) the Robinson's aspect ratio is 1.00 and using the rectangle of minimum area our aspect ratio is 1.62.See the figure 2(b).

Rectangles 2015
As we have discussed, some measures to characterize rectangles are based on the inner angles.Another way to do this is to ask to be a parallelogram and one of its inner angles to be a right one.This is, we use a measure that imposes a particular condition of a rectangle instead of one on the form of .
Our interest is to characterize the rectangles geometrically.A well known result in the literature is as follows: Theorem 1.Let be a quadrilateral of vertices , , and whose sides are , , and .The quadrilateral is a rectangle if and only if the area of the quadrilateral is written as The proof of this result can be found in Josefsson 11 .The interesting fact about this theorem is that it provides of an analytical expression of the area of a hypothetical rectangle formed by the sum of the square of the opposite sides of and compare the square of the area of to identify how far if is from being a rectangle.
On the other hand, following the proof of the theorem, it is easy to see that the area of any convex quadrilateral satisfies Using this idea we propose the measure where − is defined in equation ( 3).This is a good quality measure in the Field-Oddy sense, since it is continuous, bounded, and capable of indentifying degenerate quadrilaterals (to triangle) as well as to identify if a quadrilateral is non-convex.This measure reaches its optimal value of 1 for rectangles.
An acceptability interval to consider that the quadrilateral is rectangle under this measure is [.95, 1].

Cuadrados: Harmonic mean 2017
An ideal mesh is one in which its cells are close to being squares.If ( ) is a good quality measure for triangles, the harmoic mean of the four triangles is a good quality measure for quadrilaterals, because it is continuous, bounded, invariant under rigid and scaling transformations and identifies degenerate and even non-convex quadrilaterals since it inherits those properties from ( ).Here is a normalization parameter.
Rewriting (4) we obtain To characterize squares we require a property ( ) as seen from Theorem 2. If ( ) is a good quality measure for triangles according to Field-Oddy in which for isosceles triangle the highest energy among all right triangles is achieved, sothe harmoic mean (5), characterize squares at their maximum value.
The proof is simple, and can be reviewed at 12 it is based on the fact that the four triangles must be congruent to have the same energy.
Some measures ( ) for triangles with those properties are whree 1 ( ) is proposed by Joe, 13 , 2 ( ) is the radius ratio measure, 3 ( ) is described by Shewchuk y 4 ( ) is the Cavendish's measure, see 14 .

GRID QUALITY IMPROVEMENT 4.1 A distorsion measure
In general, if ( ) is a good quality measure for quadrilaterals, a way of measuring the distortion of an -convex quadrilateral with respect to ( ) is using ( ) because if ( ) is much greater than 1, the cell will be far from the value for which ( ) characterizes the geometric shape of the cell (square, rectangle, parallelogram, etc.) and we can say that is a distorsioned quadrilateral with respect to that measure.
Under this idea, the distortion of the mesh can be measured as the average of the distortions of all the cells where its the number of the cells.We have in consequence the follow definition Definition 2. A grid ̂ has better quality than the mesh ̄ if where ( ) is a distorsion measure.
As an optimization problem, improving the quality of a G-mesh can be considered as the problem * = arg min ( ) = 1 where the inner node of are the unknowns.The optimization problem is a large scale one when mesh dimension × is very large.It is important to notice that the initial mesh 0 must be convex and remain so in each step of the optimization process.Usually the quality measures for quadrilaterals are non differentiable functions, in an optimization process is better to build convex function with similar characteristics as the quality measure.

NEW QUALITY DISCRETE FUNCTIONALS
From the proof of theorem 1 it is easy to see that for any convex quadrilateral; then 4 2 its a positive convex function whose critical points are rectangles.With this function we can define a discrete functional ( ) over all the grid cells In Figure 4 the shape of the surface of is sketched.We propose to combine this functional with a convex area functional ( ) (see 7 ) to guarantee the convexity of the cells and and that their shape is close to a rectangle: where > 0. In addition, the function 4 2 can be interpreted (by cells) as a normalization (with respect to the jacobian) of Knupp's area-orthogonility functional 15 As we have discussed, because quality measures are usually non-differentiable functions it is difficult to use them as objective function; it is advisable to design convex and differentiable functions ( ) whose optimal values also satisfy ( ) ≈ 1 for a specific quality measure ( ).
As it is known, a rectangle is a parallelogram where its diagonals are equal and a quadrilateral is a parallelogram if its diagonals intersect at the midpoints.In Figure 5, you can see those elements.

EXAMPLES
For both functionals we can obtain optimal grids whose cells have a very large aspect ratio, see the Figure 6  over all the signed areas of all the grid cells triangles.Here > 0 is an adecuate value.This distortion measures have a barrier on the boundary of the set of grids consisting of convex quadrilateral cells and its very similar to one proposed by Garanzha 18 , but now we have a better control of the global distribution of the area.

CONCLUSIONS
In this work we have described new quality measures for quadrilaterals, that help us to improve mesh and aspect ratio.Also we have proposed new functionals for grid generation that our computational tests, give us bases for using as alternative for area-orthogonal grid generation.

FIGURE 1 A
FIGURE 1 A rectangle associated with a quadrilateral.

FIGURE 2
FIGURE 2 (a) The rectangle of minimum area for one quadrilateral.(b) Comparación entre aspect ratio of Robinson and the aspect ratio of rectangle of minimum area

FIGURE 6 A
FIGURE 6 A mesh over the Strait of Gibraltar.