neperfepx / neper

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

Problem with instant abortion when trying to mesh simplest possible example #30

Closed KristofferC closed 4 years ago

KristofferC commented 4 years ago

I have some troubles meshing the simplest possible example:

➜  build ./neper -T -n 2 -id 1

========================    N   e   p   e   r    =======================
Info   : A software package for polycrystal generation and meshing.
Info   : Version 3.5.1
Info   : Built with: gsl|muparser|opengjk|nlopt
Info   : <http://neper.info>
Info   : Copyright (C) 2003-2019, and GNU GPL'd, by Romain Quey.
Info   : No initialization file found (`/Users/kristoffer/.neperrc').
Info   : ---------------------------------------------------------------
Info   : MODULE  -T loaded with arguments:
Info   : [ini file] (none)
Info   : [com line] -n 2 -id 1
Info   : ---------------------------------------------------------------
Info   : Reading input data...
Info   : Creating domain...
Info   : Creating tessellation...
Info   :   - Setting seeds...
Info   :   - Generating crystal orientations...
Info   :   - Running tessellation...
Info   : Writing results...
Info   :     [o] Writing file `n2-id1.tess'...
Info   :     [o] Wrote file `n2-id1.tess'.
Info   : Elapsed time: 0.004 secs.
========================================================================

➜  build ./neper -M n2-id1.tess

========================    N   e   p   e   r    =======================
Info   : A software package for polycrystal generation and meshing.
Info   : Version 3.5.1
Info   : Built with: gsl|muparser|opengjk|nlopt
Info   : <http://neper.info>
Info   : Copyright (C) 2003-2019, and GNU GPL'd, by Romain Quey.
Info   : No initialization file found (`/Users/kristoffer/.neperrc').
Info   : ---------------------------------------------------------------
Info   : MODULE  -M loaded with arguments:
Info   : [ini file] (none)
Info   : [com line] n2-id1.tess
Info   : ---------------------------------------------------------------
Info   : Reading input data...
Info   :   - Reading arguments...
Info   : Loading input data...
Info   :   - Loading tessellation...
Info   :     [i] Parsing file `n2-id1.tess'...
Info   :     [i] Parsed file `n2-id1.tess'.
Info   : Meshing...
Info   :   - Preparing... (cl = 0.3969) 100%
Info   :   - 0D meshing... 100%
Info   :   - 1D meshing... 100%
Info   :   - 2D meshing...   0% (0|0/ 0| 0| 0)Error  :     > Meshing of face 1 failed
[1]    1088 abort      ./neper -M n2-id1.tess

I am guessing one of the dependencies are to blame but is there anything I can run that would help pinpoint a bit more clearly what the problem is?

I tried poke a bit with lldb but didn't really get what was happening except that this triggers:

https://github.com/rquey/neper/blame/devel/src/neper_m/nem_meshing/nem_meshing_2D/nem_meshing_2D2.c#L92-L94

(lldb) p (*pMultim)
(MULTIM) $9 = {
  algoqty = 3
  algos = 0x0000000100605b00
  algohit = 0x0000000100602950
  mOdis = 0x0000000100603750
  mOsize = 0x0000000100603aa0
  mO = 0x0000000100603b90
  Oalgo = 0x0000000100603da0
  Odis = 0x0000000100603de0
  Osize = 0x0000000100603e50
  O = 0x0000000100603ec0
}
(lldb) p (*pMultim).Oalgo[face]
(int) $10 = -1

(Running the tests shows the same problem with the meshing):

43% tests passed, 160 tests failed out of 283

Total Test time (real) =  12.40 sec

The following tests FAILED:
        116 - M_meshing (Child aborted)
        117 - M_meshing_hex (Child aborted)
        118 - M_cl (Child aborted)
        119 - M_rcl (Child aborted)
        120 - M_cl_hex (Child aborted)
...
rquey commented 4 years ago

You are missing a (functional) Gmsh. Try this:

./neper -T -n 2 -id 1 -format geo
gmsh -3 n2-id1.geo

I think the second line with fail.

To install Gmsh, proceed from http://gmsh.info. Gmsh (and therefore Neper's meshing) will run faster if you compile it from the source code (mind the dependencies).

KristofferC commented 4 years ago

Thanks, providing a functional gmsh made it start meshing. I wonder if it would at all make sense for neper to link against libgmsh instead of relying on an executable provided by the user. Anyway, thanks a lot for the quick help!

bebebapu commented 2 years ago

hey i am facing an error while giving the meshing command

WhatsApp Image 2021-12-05 at 12 01 45

please help