Error example: Drag minimization over an obstacle in Stokes-flow


as an example, I downloaded the code at / tree / master / examples / stokes-shape-opt.

Well, trying to generate the mesh using the code, generated the following error:

File "/Users/xyz/opt/anaconda3/envs/fenics2/lib/python3.8/site-packages/pygmsh/built_in/", line 522, in <listcomp>
     nodes = list (set ([ for and in edges_list for p in e.points]))

AttributeError: 'EllipseArc' object has no attribute 'points'

Some help?

What version of pygmsh are you using? Based on the directory structure looks like it’s old.

The code in the file is based on an older version of pygmsh. I am updating it to use the GMSH python API. I’ll let you know once it is pushed.

1 Like

I am using pygmsh version 6.1.1.

A branch with updated mesh generation can be found here. Note that it does no longer depend on pygmsh, but directly on the python API. See the following Pull request for updates on when this is in master.


Thanks, it worked, but the names of the facets marker values must be changed in the code

line 99: from create_mesh import inflow_marker, outflow_marker, wall_marker, obstacle_marker, c_x, c_y, L, H

and the other lines that call those names.

They have been changed in the corresponding file in the pull request.

1 Like