neperfepx / neper

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

Periodic tessellations with cohesive interface #105

Open msedlak77 opened 3 years ago

msedlak77 commented 3 years ago
$ neper -T -n 100 -morpho graingrowth -periodicity x -dim 2
$ neper -M n100-id1.tess -interface cohesive

[...]

info - Processing mesh interface...
info > Making mesh discontinuous...
node 151 and dupnode seed 172 are the same 
Aborted (core dumped)

Does periodicity not work with cohesive interfaces?

rquey commented 3 years ago

Quick answer: looks like it did work until version 3.5.1... Not sure why this has got broken.

$ neper -T -n 100 -per x -dim 2

========================    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|openmp|nlopt
Info   : Running on 8 threads.                 
Info   : <http://neper.info>               
Info   : Copyright (C) 2003-2019, and GNU GPL'd, by Romain Quey.
Info   : Loading initialization file `/home/rquey/.neperrc'...
Info   : ---------------------------------------------------------------
Info   : MODULE  -T loaded with arguments:                              
Info   : [ini file] -tesrformat ascii
Info   : [com line] -n 100 -per x -dim 2
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 `n100-id1.tess'...
Info   :     [o] Wrote file `n100-id1.tess'.
Info   : Elapsed time: 0.020 secs.
========================================================================

$ neper -M n100-id1.tess -interface cohesive

========================    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|openmp|nlopt
Info   : Running on 8 threads.
Info   : <http://neper.info>
Info   : Copyright (C) 2003-2019, 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] n100-id1.tess -interface cohesive
Info   : ---------------------------------------------------------------
Info   : Reading input data...
Info   :   - Reading arguments...
Info   : Loading input data...
Info   :   - Loading tessellation...
Info   :     [i] Parsing file `n100-id1.tess'...
Info   :     [i] Parsed file `n100-id1.tess'.
Info   : Meshing...
Info   :   - Preparing... (cl = 0.025) 
Info   :   - 0D meshing... 100%
Info   :   - 1D meshing... 100%
Info   :   - 2D meshing... 100% (0.72|0.91/98%| 0%| 2%) 
Info   :   - Fixing 2D-mesh pinches...
Info   :   - Processing mesh at interfaces...
Info   :     > Making mesh discontinuous...
Info   :     > Adding cohesive elements...
Info   : Searching nsets...
Info   : Writing mesh results...
Info   :   - Preparing mesh...
Info   :   - Mesh properties:
Info   :     > Node number:     3633
Info   :     > Elt  number:     4879
Info   :     > Mesh area:    1.000
Info   :   - Writing mesh...
Info   :     [o] Writing file `n100-id1.msh'...
Info   :     [o] Wrote file `n100-id1.msh'.
Info   :     [o] Writing file `n100-id1.per'...
Info   :     [o] Wrote file `n100-id1.per'.
Info   :     [o] Writing file `n100-id1.intf'...
Info   :     [o] Wrote file `n100-id1.intf'.
Info   : Elapsed time: 0.466 secs.
========================================================================
fzw9381 commented 2 years ago

I encountered the same problem while using neper.

MiguelVCarvalho commented 2 years ago

I encountered the same bug in version 4.2.1-35. Is it something that it is expected to be fixed soon @rquey ?

MiguelVCarvalho commented 2 years ago

Quick answer: looks like it did work until version 3.5.1... Not sure why this has got broken. (...)

Regarding neper 3.5.1, an error occurs while compiling the code (I pasted a picture because it has colour highlighting the errors):

image

neper 3.5.2 is compilable but the error related with periodic and cohesive elements is already present in that version.

rquey commented 2 years ago

Version 3.5.1 compiles fine on my system (despite some warnings). I have

$ gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0 
MiguelVCarvalho commented 2 years ago

I have exactly the same compiler version but the previously mentioned errors still occur. There are some undeclared variables. Even if those are deleted, other problems appear around the 70% mark.

The commit hash is f4ecbfc.

rquey commented 2 years ago

Hmm... Not sure what happened to these commits. v3.4.0 works (4fd71846ce72035a80e32f92ca41dcf5f602a4e2).

MiguelVCarvalho commented 2 years ago

Thank you @rquey! In version v3.4.0 the creation of periodic tesselations and meshes is working for 2D RVEs. Unfortunately, the meshing module outputs an error in the "Making mesh discontinuous..." (or in "Adding cohesive elements...") phase for 3D RVEs.

neper -T -n 10 -per all -dim 3

========================    N   e   p   e   r    =======================
Info   : A software package for polycrystal generation and meshing.
Info   : Version 3.4.0
Info   : Built with: gsl nlopt openmp
Info   : Running on 12 threads.
Info   : <http://neper.sourceforge.net>
Info   : Copyright (C) 2003-2019, and GNU GPL'd, by Romain Quey.
Info   : Comments and bug reports: <neper-users@lists.sourceforge.net>.
Info   : No initialization file found (`/home/miguelcarvalho/.neperrc').
Info   : ---------------------------------------------------------------
Info   : MODULE  -T loaded with arguments:
Info   : [ini file] (none)
Info   : [com line] -n 10 -per all -dim 3
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 `n10-id1.tess'...
Info   :     [o] Wrote file `n10-id1.tess'.
Info   : Elapsed time: 0.025 secs.
========================================================================

neper -M n10-id1.tess -interface cohesive

========================    N   e   p   e   r    =======================
Info   : A software package for polycrystal generation and meshing.
Info   : Version 3.4.0
Info   : Built with: gsl nlopt openmp
Info   : Running on 12 threads.
Info   : <http://neper.sourceforge.net>
Info   : Copyright (C) 2003-2019, and GNU GPL'd, by Romain Quey.
Info   : Comments and bug reports: <neper-users@lists.sourceforge.net>.
Info   : No initialization file found (`/home/miguelcarvalho/.neperrc').
Info   : ---------------------------------------------------------------
Info   : MODULE  -M loaded with arguments:
Info   : [ini file] (none)
Info   : [com line] n10-id1.tess -interface cohesive
Info   : ---------------------------------------------------------------
Info   : Reading input data...
Info   :   - Reading arguments...
Info   : Loading input data...
Info   :   - Loading tessellation...
Info   :     [i] Parsing file `n10-id1.tess'...
Info   :     [i] Parsed file `n10-id1.tess'.
Info   : Meshing...
Info   :   - Preparing... (cl = 0.2321) 100%
Info   :   - 0D meshing... 100%
Info   :   - 1D meshing... 100%
Info   :   - 2D meshing... 100% (0|0.37/97%| 3%| 0%)    
Info   :   - Fixing 2D-mesh pinches...
Info   :   - 3D meshing... 100% (0.2|0.64/80%|20%| 0%)  
Info   :   - Processing mesh at interfaces...
Info   :     > Making mesh discontinuous...
Aborted (core dumped)
MiguelVCarvalho commented 1 year ago

Hi @rquey I have installed version 4.5.0 and periodic tesselations with cohesive interfaces are not working both for 2D and 3D meshes. The same occurs for -order 1 ou 2.

neper -T -n 10 -dim 2 -periodicity all

========================    N   e   p   e   r    =======================
Info   : A software package for polycrystal generation and meshing.
Info   : Version 4.5.0
Info   : Built with: gsl|muparser|opengjk|openmp|nlopt|libscotch (full)
Info   : Running on 12 threads.
Info   : <https://neper.info>
Info   : Copyright (C) 2003-2022, and GNU GPL'd, by Romain Quey.
Info   : No initialization file found (`/home/miguelcarvalho/.neperrc').
Info   : ---------------------------------------------------------------
Info   : MODULE  -T loaded with arguments:
Info   : [ini file] (none)
Info   : [com line] -n 10 -dim 2 -periodicity all
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 `n10-id1.tess'...
Info   :     [o] Wrote file `n10-id1.tess'.
Info   : Elapsed time: 0.014 secs.
========================================================================

neper -M n10-id1.tess -elttype tri -dim 2 -order 1 -interface cohesive

========================    N   e   p   e   r    =======================
Info   : A software package for polycrystal generation and meshing.
Info   : Version 4.5.0
Info   : Built with: gsl|muparser|opengjk|openmp|nlopt|libscotch (full)
Info   : Running on 12 threads.
Info   : <https://neper.info>
Info   : Copyright (C) 2003-2022, and GNU GPL'd, by Romain Quey.
Info   : No initialization file found (`/home/miguelcarvalho/.neperrc').
Info   : ---------------------------------------------------------------
Info   : MODULE  -M loaded with arguments:
Info   : [ini file] (none)
Info   : [com line] n10-id1.tess -elttype tri -dim 2 -order 1 -interface
         cohesive
Info   : ---------------------------------------------------------------
Info   : Reading input data...
Info   :   - Reading arguments...
Info   : Loading input data...
Info   :   - Loading tessellation...
Info   :     [i] Parsing file `n10-id1.tess'...
Info   :     [i] Parsed file `n10-id1.tess'.
Info   : Meshing...
Info   :   - Preparing... (cl = 0.07906) 
Info   :   - 0D meshing... 100%
Info   :   - 1D meshing... 100%
Info   :   - 2D meshing... 100% (0.87|0.9/100%| 0%| 0%) 
Info   :   - Processing mesh at interfaces...
Info   :     > Making mesh discontinuous...
node 14 and dupnode seed 77 are the same
Aborted (core dumped)

Just out of curiosity, are you planning on working on this any time soon?