mesh.Mesh.fix_volumes#

Mesh.fix_volumes()#

Reverse the elements with negative volume.

Elements with negative volume may result from incorrect local node numbering. This method will reverse all elements in a Mesh of dimensionality 3, provided the volumes of these elements can be computed. See method reverse().

Returns#

Mesh

A Mesh of dimensionality 3 with fixed volumes.

Examples#

>>> Q1 = Mesh(eltype='quad4')
>>> Q2 = Q1.rotate_y(180.0)
>>> Q = Q1+Q2
>>> H1 = Q.extrude(1, dir=2, length = 1.0, fix=False)
>>> print(H1.volume())
0.0
>>> H2 = H1.fix_volumes()
>>> print(H2.volume())
1.9999999