How i can make geometry and mesh in my program?

I want paint my geometry in python code. I see in tutorial demo program some variant, example,
channel = Rectangle(Point(0, 0), Point(2.2, 0.41))
cylinder = Circle(Point(0.2, 0.2), 0.05)
domain = channel - cylinder
mesh = generate_mesh(domain, 64)

I know about GMSH, don’t advice it.
Where i can read, how i make geometry yet? Thanks for your answer.

As shown above, you can use mshr to create your geometry. However, as mshr is no longer maintained, I would suggest using the GMSH python API, pygmsh, dmsh or seismicmesh

A comparison of these mesh generators can be found at GitHub - nschloe/meshgen-comparison: A comparison of mesh generators.

1 Like