neperfepx / neper

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

Reconstructing mesh bug #75

Closed LifengGan closed 3 years ago

LifengGan commented 3 years ago

Is it possible for Neper to generate cohesive element from .msh file? I found a bug when runing the following command

neper -T -n 5 -dim 2 -o test
neper -M test.tess -o test
neper -M -loadmesh test.msh -interface 'cohesive' -o test_new

======================== N e p e r ======================= Info : A software package for polycrystal generation and meshing. Info : Version 4.0.2 Info : Built with: gsl|muparser|opengjk|openmp|nlopt Info : Running on 2 threads. Info : http://neper.info Info : Copyright (C) 2003-2020, and GNU GPL'd, by Romain Quey. Info : MODULE -M loaded with arguments: Info : [ini file] (none) Info : [com line] -loadmesh test.msh -interface cohesive -o test_new Info : --------------------------------------------------------------- Info : Reading input data... Info : - Reading arguments... Info : Loading input data... Info : Loading result mesh... Info : [i] Parsing file test.msh'... Info : [i] Parsed filetest.msh'. Info : - Reconstructing mesh... Error : You have discovered a bug in Neper! Please file an issue at https://github.com/rquey/neper/issues. Thank you.

Aborted (core dumped)

rquey commented 3 years ago

It can if you provide the tess as input (this makes Neper's life easier):

$ neper -M test.tess -loadmesh test.msh -interface 'cohesive' -o test_new

========================    N   e   p   e   r    =======================
Info   : A software package for polycrystal generation and meshing.
Info   : Version 4.0.2
Info   : Built with: gsl|muparser|opengjk|openmp|nlopt|libscotch (full)
Info   : Running on 8 threads.
Info   : <http://neper.info>
Info   : Copyright (C) 2003-2020, and GNU GPL'd, by Romain Quey.
Info   : Loading initialization file `/home/rquey/.neperrc'...
Info   : ---------------------------------------------------------------
Info   : MODULE  -M loaded with arguments:
Info   : [ini file] -gmsh /home/rquey/bin/gmsh -tmp /home2/tmp
Info   : [com line] test.tess -loadmesh test.msh -interface cohesive -o
         test_new
Info   : ---------------------------------------------------------------
Info   : Reading input data...
Info   :   - Reading arguments...
Info   : Loading input data...
Info   :   - Loading tessellation...
Info   :     [i] Parsing file `test.tess'...
Info   :     [i] Parsed file `test.tess'.
Info   : Loading result mesh...
Info   :     [i] Parsing file `test.msh'...
Info   :     [i] Parsed file `test.msh'.
Info   :   - Reconstructing mesh...
Info   :   - Processing mesh at interfaces...
Info   :     > Making mesh discontinuous...
Info   :     > Adding cohesive elements...
Info   : Searching nsets and fasets...
Info   : Writing mesh results...
Info   :   - Preparing mesh...
Info   :   - Mesh properties:
Info   :     > Node number:      185
Info   :     > Elt  number:      235
Info   :     > Mesh area:    1.000
Info   :   - Writing mesh...
Info   :     [o] Writing file `test_new.msh'...
Info   :     [o] Wrote file `test_new.msh'.
Info   :     [o] Writing file `test_new.intf'...
Info   :     [o] Wrote file `test_new.intf'.
Info   : Elapsed time: 0.018 secs.
========================================================================