Meaning of mesh_size

101 Views Asked by At

In the following, does "mesh_size" refer to the maximum perimeter or maximum area of each element?

with pygmsh.geo.Geometry() as geom:
    geom.add_polygon(
        [
            [0.0, 0.0],
            [1.0, 0.0],
            [1.0, 1.0],
            [0.0, 1.0],
        ],
        mesh_size=0.1,
    )
    mesh = geom.generate_mesh()

The PyPI website of pygmsh provides little information.

1

There are 1 best solutions below

3
Ro.oT On

As per documentation:

enter image description here

You might wanna checkout pygmsh repo for more info. As per the discussion earlier regarding the inclusion of mesh_size function into the pygmsh library, this is how they defined mesh_size:

def mesh_size(entity_dim, entity_tag, x, y, z):
    return 1.0e-2 + (x ** 2 + y ** 2)