neperfepx / neper

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

Error : You have discovered a bug in Neper! | Tessellation error #527

Open mauroarcidiacono opened 2 years ago

mauroarcidiacono commented 2 years ago

Hi,

I am building a microstructure where some of the grains have thin lamella of a different phase. To do so, I create a basic polycrystal without the lamella to determine with a volumetric calculation which grains will have the lamella. Then, with this information, I create two files with the lamella width relationship and the normal vectors. Finally, I run the tessellation and the mesh commands. When I was running the tessellation, the following message appeared: "Error : You have discovered a bug in Neper! Please file an issue at https://github.com/rquey/neper/issues. Thank you".

neper -T -n $number_grains::from_morpho -domain "cube(0.15,0.15,0.15)" -id 1::1 -morpho "diameq:lognormal(1,0.35),1-sphericity:lognormal(0.145,0.03)::lamellar(w=file(lamwidth.txt),v=file(lamnormal.txt),pos=optimal)" -reg 1 -sel 0.08 -oridescriptor e -group "w<0.006?1:2" -statcell "scaleid(1)" -format tess,ori -o Polycrystal_laminated

========================    N   e   p   e   r    =======================
Info   : A software package for polycrystal generation and meshing.
Info   : Version 4.4.2-16
Info   : Built with: gsl|muparser|opengjk|openmp|nlopt|libscotch (full)
Info   : Running on 16 threads.
Info   : <https://neper.info>
Info   : Copyright (C) 2003-2022, and GNU GPL'd, by Romain Quey.
Info   : Ignoring initialization file.
Info   : ---------------------------------------------------------------
Info   : MODULE  -T loaded with arguments:
Info   : [ini file] (none)
Info   : [com line] -n 300::from_morpho -domain cube(0.15,0.15,0.15) -id
         1::1 -morpho
         diameq:lognormal(1,0.35),1-sphericity:lognormal(0.145,0.03)::lamellar(w=file(lamwidth.txt),v=file(lamnormal.txt),pos=optimal)
         -reg 1 -sel 0.08 -oridescriptor e -group w<0.006?1:2 -statcell
         scaleid(1) -format tess,ori -o Polycrystal_laminated
Info   : ---------------------------------------------------------------
Info   : Reading input data...
Info   : Creating domain...
Info   : Creating tessellations...
Info   :   [level] Running in multiscale mode (2 scales)...
Info   :   [    1]  1/1 Info   :   - Setting seeds... 100%
Info   :   - Generating crystal orientations...
Info   :   - Running tessellation...
Info   :     > Initial solution: f   =2.087236984
Info   :     > Iteration  94026: fmin=0.000196552 f=0.000196552
Info   :     > Final solution  : f   =0.000196552 (94026 iterations)
Info   :     > Reached `eps' criterion.
Info   :   [    2]  1/300 Info   :   - Running tessellation...
Info   :   - Generating crystal orientations...
Info   :   [    2]  2/300 Info   :   - Running tessellation...
Info   :   - Generating crystal orientations...
Info   :   [    2]  3/300 Info   :   - Running tessellation...
Info   :   - Generating crystal orientations...
Info   :   [    2]  4/300 Info   :   - Running tessellation...
...
Info   :   - Generating crystal orientations...
Info   :   [    2]  296/300 Info   :   - Running tessellation...
Info   :   - Generating crystal orientations...
Info   :   [    2]  297/300 Info   :   - Running tessellation...
Info   :   - Generating crystal orientations...
Info   :   [    2]  298/300 Info   :   - Running tessellation...
Info   :   - Generating crystal orientations...
Info   :   [    2]  299/300 Info   :   - Running tessellation...
Info   :   - Generating crystal orientations...
Info   :   [    2]  300/300 Info   :   - Running tessellation...
Info   :   - Generating crystal orientations...
Info   : Flattening 2-scale tessellation...
Info   :   [level] Flattening 2-scale tessellation...
Info   :   [    1]  1/1: id=1
Error  : You have discovered a bug in Neper!  Please file an issue at
         https://github.com/rquey/neper/issues.  Thank you.

Aborted

The first 10 lines of the lamwidth.txt and lamnormal.txt files are the following (I also attached the files):

lamwidth.txt 1 10.0:9.0 2 10.0:9.0 3 0.0225:0.002625 4 0.0225:0.002625 5 0.0225:0.002625 6 0.0225:0.002625 7 10.0:9.0 8 10.0:9.0 9 10.0:9.0 10 0.0225:0.002625

lamnormal.txt 1 1 0 0 2 1 0 0 3 0.98 -0.15 -0.17 4 -0.83 0.07 0.59 5 -0.94 0.28 -0.24 6 -0.13 0.35 0.24 7 1 0 0 8 1 0 0 9 1 0 0 10 -0.76 -0.94 -0.38

lamnormal.txt lamwidth.txt

Thank you for your continuous support.