neperfepx / neper

Polycrystal generation and meshing
http://neper.info
GNU General Public License v3.0
205 stars 53 forks source link

Bug in Neper #649

Closed Siamak-Shiahvan closed 1 year ago

Siamak-Shiahvan commented 1 year ago

I am using the command: neper -T -n 120 -reg 1 -domain "sphere(10,100)" and getting:

========================    N   e   p   e   r    =======================
Info   : A software package for polycrystal generation and meshing.
Info   : Version 4.5.1-1
Info   : Built with: gsl|muparser|opengjk|nlopt|libscotch
Info   : <https://neper.info>
Info   : Copyright (C) 2003-2022, and GNU GPL'd, by Romain Quey.
Info   : No initialization file found (`/home/siamak/.neperrc').
Info   : ---------------------------------------------------------------
Info   : MODULE  -T loaded with arguments:
Info   : [ini file] (none)
Info   : [com line] -n 120 -reg 1 -domain sphere(10,100)
Info   : ---------------------------------------------------------------
Info   : Reading input data...
Info   : Creating domain...
Info   : Creating tessellation...
Info   :   - Setting seeds...
Info   :   - Generating crystal orientations...
Info   :   - Running tessellation...
Info   : Regularizing tessellation...
Info   :   - loop 1/2:  17% del=139Error  : You have discovered a bug in Neper!  Please file an issue at
         https://github.com/rquey/neper/issues.  Thank you.
rquey commented 1 year ago

Regularization sometimes fails for domains such as spheres.

You can try to use a different -id, to see if it gets to larger percentages.

Knowing the percentage at failure, you can use -rsel to stop regularization earlier. In your case, use -rsel 0.17. During meshing, it may be necessary to increase the value of -pl to avoid local refinements.

Siamak-Shiahvan commented 1 year ago

Many thanks. I have tried your suggestion. It worked in tesselation stage. But, the mesh quality will eventually very bad as there are some short edges remaining in the domain.

rquey commented 1 year ago

I would try to run several tessellations (with different -id values) to "maximize" the -rsel value.

There is currently no much better option...