neperfepx / neper

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

all $PhysicalNames not reflected in $Entities #791

Open sharanroongta opened 9 months ago

sharanroongta commented 9 months ago

Describe the bug all $PhysicalNames not reflected in $Entities section - basically the tags of the bounding box (x0,x1,y0,y1,z0,z1)

To Reproduce

$ neper -T -n 1 -o new_test

========================    N   e   p   e   r    =======================
Info   : A software package for polycrystal generation and meshing.
Info   : Version 4.7.1-16
Info   : Built with: gsl|muparser|opengjk|openmp|nlopt|libscotch (full)
Info   : Running on 8 threads.
Info   : <https://neper.info>
Info   : Copyright (C) 2003-2022, and GNU GPL'd, by Romain Quey.
Info   : No initialization file found (`/home/work/.neperrc').
Info   : ---------------------------------------------------------------
Info   : MODULE  -T loaded with arguments:
Info   : [ini file] (none)
Info   : [com line] -n 1 -o new_test
Info   : ---------------------------------------------------------------
Info   : Reading input data...
Info   : Creating domain...
Info   : Creating tessellation...
Info   : Generating crystal orientations...
Info   : Writing results...
Info   :     [o] Writing file `new_test.tess'...
Info   :     [o] Wrote file `new_test.tess'.
Info   : Elapsed time: 0.053 secs.
========================================================================
neper -M new_test.tess -cl 1.0 -format msh4

========================    N   e   p   e   r    =======================
Info   : A software package for polycrystal generation and meshing.
Info   : Version 4.7.1-16
Info   : Built with: gsl|muparser|opengjk|openmp|nlopt|libscotch (full)
Info   : Running on 8 threads.
Info   : <https://neper.info>
Info   : Copyright (C) 2003-2022, and GNU GPL'd, by Romain Quey.
Info   : No initialization file found (`/home/work/.neperrc').
Info   : ---------------------------------------------------------------
Info   : MODULE  -M loaded with arguments:
Info   : [ini file] (none)
Info   : [com line] new_test.tess -cl 1.0 -format msh4
Info   : ---------------------------------------------------------------
Info   : Reading input data...
Info   :   - Reading arguments...
Info   : Loading input data...
Info   :   - Loading tessellation...
Info   :     [i] Parsing file `new_test.tess'...
Info   :     [i] Parsed file `new_test.tess'.
Info   : Meshing...
Info   :   - Preparing... (cl = 1) 100%
Info   :   - 0D meshing... 100%
Info   :   - 1D meshing... 100%
Info   :   - 2D meshing... 100% (0.88|0.88/100%| 0%| 0%)
Info   :   - Fixing 2D-mesh pinches...
Info   :   - 3D meshing... 100% (0.84|0.84/100%| 0%| 0%)
Info   : Searching nsets and fasets...
Info   : Writing mesh results...
Info   :   - Preparing mesh...
Info   :   - Mesh properties:
Info   :     > Node number:       14
Info   :     > Elt  number:       24
Info   :     > Mesh volume:    1.000
Info   :   - Writing mesh...
Info   :     [o] Writing file `new_test.msh4'...
Info   :     [o] Wrote file `new_test.msh4'.
Info   : Elapsed time: 10.976 secs.
========================================================================

The mesh file looks like:

$MeshFormat
4.1 0 8
$EndMeshFormat
$MeshVersion
2.2.3
$EndMeshVersion
$Domain
cube
$EndDomain
$PhysicalNames
33
0 1 "ver1"
0 2 "ver2"
0 3 "ver3"
0 4 "ver4"
0 5 "ver5"
0 6 "ver6"
0 7 "ver7"
0 8 "ver8"
1 1 "edge1"
1 2 "edge2"
1 3 "edge3"
1 4 "edge4"
1 5 "edge5"
1 6 "edge6"
1 7 "edge7"
1 8 "edge8"
1 9 "edge9"
1 10 "edge10"
1 11 "edge11"
1 12 "edge12"
2 1 "face1"
2 2 "face2"
2 3 "face3"
2 4 "face4"
2 5 "face5"
2 6 "face6"
2 7 "x0"
2 8 "x1"
2 9 "y0"
2 10 "y1"
2 11 "z0"
2 12 "z1"
3 1 "poly1"
$EndPhysicalNames
$Entities
8 12 6 1
1 0.000000000000 0.000000000000 0.000000000000 1 1
2 1.000000000000 0.000000000000 0.000000000000 1 2
3 1.000000000000 1.000000000000 0.000000000000 1 3
4 0.000000000000 1.000000000000 0.000000000000 1 4
5 0.000000000000 0.000000000000 1.000000000000 1 5
6 0.000000000000 1.000000000000 1.000000000000 1 6
7 1.000000000000 1.000000000000 1.000000000000 1 7
8 1.000000000000 0.000000000000 1.000000000000 1 8
1 0.000000000000 1.000000000000 0.000000000000 0.000000000000 1.000000000000 1.000000000000 1 1 2 4 6
2 0.000000000000 0.000000000000 1.000000000000 0.000000000000 1.000000000000 1.000000000000 1 2 2 6 5
3 0.000000000000 0.000000000000 0.000000000000 0.000000000000 0.000000000000 1.000000000000 1 3 2 5 1
4 0.000000000000 0.000000000000 0.000000000000 0.000000000000 1.000000000000 0.000000000000 1 4 2 1 4
5 1.000000000000 0.000000000000 0.000000000000 1.000000000000 0.000000000000 1.000000000000 1 5 2 2 8
6 1.000000000000 0.000000000000 1.000000000000 1.000000000000 1.000000000000 1.000000000000 1 6 2 8 7
7 1.000000000000 1.000000000000 0.000000000000 1.000000000000 1.000000000000 1.000000000000 1 7 2 7 3
8 1.000000000000 0.000000000000 0.000000000000 1.000000000000 1.000000000000 0.000000000000 1 8 2 3 2
9 0.000000000000 0.000000000000 1.000000000000 1.000000000000 0.000000000000 1.000000000000 1 9 2 5 8
10 0.000000000000 0.000000000000 0.000000000000 1.000000000000 0.000000000000 0.000000000000 1 10 2 2 1
11 0.000000000000 1.000000000000 0.000000000000 1.000000000000 1.000000000000 0.000000000000 1 11 2 4 3
12 0.000000000000 1.000000000000 1.000000000000 1.000000000000 1.000000000000 1.000000000000 1 12 2 7 6
1 0.000000000000 0.000000000000 0.000000000000 0.000000000000 1.000000000000 1.000000000000 1 1 4 -1 -4 -3 -2
2 1.000000000000 0.000000000000 0.000000000000 1.000000000000 1.000000000000 1.000000000000 1 2 4 -5 -8 -7 -6
3 0.000000000000 0.000000000000 0.000000000000 1.000000000000 0.000000000000 1.000000000000 1 3 4 3 -10 5 -9
4 0.000000000000 1.000000000000 0.000000000000 1.000000000000 1.000000000000 1.000000000000 1 4 4 -11 1 -12 7
5 0.000000000000 0.000000000000 0.000000000000 1.000000000000 1.000000000000 0.000000000000 1 5 4 10 4 11 8
6 0.000000000000 0.000000000000 1.000000000000 1.000000000000 1.000000000000 1.000000000000 1 6 4 2 9 6 12
1 0.000000000000 0.000000000000 0.000000000000 1.000000000000 1.000000000000 1.000000000000 1 1 6 1 2 3 4 5 6
$EndEntities

I believe the faces making up (x0,x1,y0,y1,z0,z1) should also be reflected in the entitites. In this simple case, number of faces = the bounding surface Therefore, apart from physical tags 1,2,3,4,5,6 that is rightly assigned to the faces, the tags 7,8,9,10,11,12 should also be shown in $Entities: `` 1 0.000000000000 0.000000000000 0.000000000000 0.000000000000 1.000000000000 1.000000000000 2 1 7 4 -1 -4 -3 -2 2 1.000000000000 0.000000000000 0.000000000000 1.000000000000 1.000000000000 1.000000000000 2 2 8 4 -5 -8 -7 -6 3 0.000000000000 0.000000000000 0.000000000000 1.000000000000 0.000000000000 1.000000000000 2 3 9 4 3 -10 5 -9 4 0.000000000000 1.000000000000 0.000000000000 1.000000000000 1.000000000000 1.000000000000 2 4 10 4 -11 1 -12 7 5 0.000000000000 0.000000000000 0.000000000000 1.000000000000 1.000000000000 0.000000000000 2 5 11 4 10 4 11 8 6 0.000000000000 0.000000000000 1.000000000000 1.000000000000 1.000000000000 1.000000000000 2 6 12 4 2 9 6 12


Each face has now `2` physical tags. I have just assigned the tags arbitrary to make my point.