cashocs.geometry.quality.SkewnessCalculator#
- class cashocs.geometry.quality.SkewnessCalculator[source]#
Bases:
MeshQualityCalculator
Implements the skewness quality measure.
Methods Summary
compute
(mesh)Computes the skewness of the mesh.
Methods Documentation
- compute(mesh: fenics.Mesh) ndarray [source]#
Computes the skewness of the mesh.
This measure the relative distance of a triangle’s angles or a tetrahedron’s dihedral angles to the corresponding optimal angle. The optimal angle is defined as the angle an equilateral, and thus equiangular, element has. The skewness lies in \([0,1]\), where 1 corresponds to the case of an optimal (equilateral) element, and 0 corresponds to a degenerate element. The skewness corresponding to some (dihedral) angle \(\alpha\) is defined as
\[1 - \max \left( \frac{\alpha - \alpha^*}{\pi - \alpha*} , \ \frac{\alpha^* - \alpha}{\alpha^* - 0} \right),\]where \(\alpha^*\) is the corresponding angle of the reference element.
- Parameters:
mesh (fenics.Mesh) – The mesh whose quality shall be computed.
- Returns:
The element wise skewness of the mesh on process 0.
- Return type:
ndarray