neperfepx / neper

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

Issue with flattening in 2D tesselation #38

Closed xajezade closed 4 years ago

xajezade commented 4 years ago

Hi Romain, The following steps prompt a SIGABRT() in the flattening process.

neper -T -dim 2 -domain "square(1024,1024)" -n from_morpho -id 1 -morpho "diameq:0.3*lognormal(70,25,from=1)+0.7*lognormal(70,25,from=1),1-sphericity:lognormal(0.145,0.03),aspratio(586,1,1)" -tesrsize "2048,2048" -statcell modeid -o 2DScale1 -for vtk,tess,tesr

awk '{if ($1==1) {print NR,"diameq:lognormal(2.624,1.29,from=0.5),diameq:interval(0.5,5),1-sphericity:lognormal(0.145,0.03)"} else {print NR,"diameq:lognormal(2.4,1.49,from=0.5),diameq:interval(0.5,5),1-sphericity:lognormal(0.145,0.03)"}}' 2DScale1.stcell > scale2-morpho

neper -T -dim 2 -domain "square(1024,1024)" -n from_morpho::from_morpho -morpho "diameq:0.3*lognormal(70,25,from=1)+0.7*lognormal(70,25,from=1),1-sphericity:lognormal(0.145,0.03),aspratio(586,1,1)::file(scale2-morpho)" -morphooptialgo "subplex::subplex" -morphooptistop "val=1.5::val=0.01" -tesrsize 2048:2048 -o scale2 -tesrformat "ascii" -format tess,tesr,vtk -statcell ncells_samedomain

backtrace of dgb of the core file gives me:

#0  0x00002b6e5e537214 in raise () from /cvmfs/soft.computecanada.ca/nix/store/63pk88rnmkzjblpxydvrmskkc8ci7cx6-glibc-2.24/lib/libc.so.6
#1  0x00002b6e5e53867a in abort () from /cvmfs/soft.computecanada.ca/nix/store/63pk88rnmkzjblpxydvrmskkc8ci7cx6-glibc-2.24/lib/libc.so.6
#2  0x0000000000549e05 in neut_tess_domedge_edges_sorted ()
#3  0x000000000048a00a in net_mtess_flatten_edge_domedge_edges ()
#4  0x000000000048912f in net_mtess_flatten_edge_domedge ()
#5  0x00000000004889d4 in net_mtess_flatten_edge ()
#6  0x0000000000487fe3 in net_mtess_flatten ()
#7  0x0000000000487add in net_flatten ()
#8  0x000000000046077c in neper_t ()
#9  0x0000000000439f6b in main ()

Please let me know if there is a quick fix for this. Thanks, Ali

rquey commented 4 years ago

Here is how I would proceed for this microstructure.

xajezade commented 4 years ago

Hi Romain,

I have tried this and I think this should work fine for me. However, I think there's something wrong with "-statcell ncells_samedomain". While the generated VTK file reads 141015 grain IDs, the stat file is 141010 lines. 5 less. I believe some of the grain IDs are wrong. I have done some post-processing on the data and I found out there are some IDs that are recorded as the neighbors but they cannot be inside the parent cell. I am saying this as the end of the tess file doesn't have those IDs!

I'll redo the generation to make sure of it. But I am 99% sure.

Kindest Regards, Ali