meshpro / dmsh

:spider_web: Simple mesh generator inspired by distmesh.
GNU General Public License v3.0
210 stars 25 forks source link

Run crashed, when the geometrical parameter > 10.0 #11

Closed anliangw closed 4 years ago

anliangw commented 4 years ago

Dear Authors, Thank you for your excellent job. I found the geometrical parameters (e.g. radius, length of rectangle) are all less then 5 in your examples. When I tried some others like lenght>10, the program went dead and crashed with nothing appearing on the command line window.

My codes are listed as followed:

r = dmsh.Rectangle(-10.0, +20.0, -10.0, +20.0)
c = dmsh.Circle([.0, .0], 3)
geo = dmsh.Difference(r, c)

np.random.seed(0)
X, cells = dmsh.generate(
    geo, 0.25, tol=1.0e-10
)

plt.triplot(X[:,0], X[:,1], cells)
plt.show()

Could you give some advice? Thank you!

nschloe commented 4 years ago

Fixed now, but you might want to relax your tolerance to the default 1.0e-5, otherwise convergence will take a long time. Try verbose=True for the generation step to get some insight.