How to use the dmsh.geometry.Ellipse function in dmsh

To help you get started, we’ve selected a few dmsh examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nschloe / dmsh / test / test_dmsh.py View on Github external
def test_ellipse(h0=0.7, show=True):
    geo = dmsh.geometry.Ellipse([0.0, 0.0], 2.0, 1.0)
    X, cells = dmsh.generate(geo, h0, show=show)

    # X = numpy.column_stack([X[0], X[1], numpy.zeros(X.shape[1])])
    # import meshio
    # meshio.write_points_cells("out.vtk", X, {"triangle": cells})

    assert numpy.array_equal(
        cells,
        [
            [14, 8, 9],
            [8, 4, 9],
            [6, 10, 5],
            [0, 6, 5],
            [14, 13, 8],
            [3, 4, 8],
            [6, 11, 10],