Closed sharanroongta closed 12 months ago
Thanks @sharanroongta. I fixed the $Entities
bug. The $MeshVersion
and $Domain
(and possibly other) sections are specific to Neper - they are not recognized by Gmsh and are ignored during parsing.
Thanks @rquey for the fix. Can I ask another question here? While loading the msh4 file to view in Gmsh, I get several warnings
Info : Reading 'C:\Users\s.roongta\Downloads\msh4\msh4\n2-id1.msh4'...
Info : 49 entities
Warning : Entity 4 not found in the Brep of entity 2
Warning : Entity 5 not found in the Brep of entity 2
Warning : Entity 5 not found in the Brep of entity 3
Warning : Entity 3 not found in the Brep of entity 3
Warning : Entity 2 not found in the Brep of entity 4
Warning : Entity 2 not found in the Brep of entity 5
Warning : Entity 6 not found in the Brep of entity 5
Warning : Entity 6 not found in the Brep of entity 6
Warning : Entity 7 not found in the Brep of entity 6
Warning : Entity 7 not found in the Brep of entity 7
Warning : Entity 7 not found in the Brep of entity 8
Warning : Entity 8 not found in the Brep of entity 8
Warning : Entity 8 not found in the Brep of entity 9
Warning : Entity 2 not found in the Brep of entity 10
Warning : Entity 3 not found in the Brep of entity 10
Warning : Entity 5 not found in the Brep of entity 11
Warning : Entity 6 not found in the Brep of entity 11
Warning : Entity 8 not found in the Brep of entity 12
Warning : Entity 4 not found in the Brep of entity 12
Warning : Entity 9 not found in the Brep of entity 13
Warning : Entity 10 not found in the Brep of entity 13
Warning : Entity 10 not found in the Brep of entity 14
Warning : Entity 11 not found in the Brep of entity 14
Warning : Entity 11 not found in the Brep of entity 15
Warning : Entity 5 not found in the Brep of entity 15
Warning : Entity 4 not found in the Brep of entity 16
Warning : Entity 9 not found in the Brep of entity 16
Warning : Entity 12 not found in the Brep of entity 17
Warning : Entity 13 not found in the Brep of entity 17
Warning : Entity 13 not found in the Brep of entity 18
Warning : Entity 7 not found in the Brep of entity 18
Warning : Entity 6 not found in the Brep of entity 19
Warning : Entity 12 not found in the Brep of entity 19
Warning : Entity 13 not found in the Brep of entity 20
Warning : Entity 10 not found in the Brep of entity 20
Warning : Entity 9 not found in the Brep of entity 21
Warning : Entity 8 not found in the Brep of entity 21
Warning : Entity 11 not found in the Brep of entity 22
Warning : Entity 12 not found in the Brep of entity 22
Warning : Entity 1 not found in the Brep of entity 1
Warning : Entity -1 not found in the Brep of entity 5
Info : 90 nodes
Info : Creating discrete point 2
Info : Creating discrete point 3
Info : Creating discrete point 4
Info : Creating discrete point 5
Info : Creating discrete point 6
Info : Creating discrete point 7
Info : Creating discrete point 8
Info : Creating discrete point 9
Info : Creating discrete point 10
Info : Creating discrete point 11
Info : Creating discrete point 12
Info : Creating discrete point 13
Info : Creating discrete curve 1
Info : 496 elements
Info : Done reading 'C:\Users\s.roongta\Downloads\msh4\msh4\n2-id1.msh4'
Info : Writing 'C:\Users\s.roongta\Downloads\msh4\msh4\test'...
There is also an additional point generated which is out of the domain.
Having said that, if i output the neper tessellation in .geo
format, and load in gmsh everything seems fine, but i lose the $PhysicalNames section.
Any idea as to why it might be happening?
I can create a new issue if you want. Wasn't sure
Thanks, Sharan
There is also an additional point generated which is out of the domain.
What command(s) are you running?
neper -T -n 2 -o test
======================== N e p e r =======================
Info : A software package for polycrystal generation and meshing.
Info : Version 4.7.1-5
Info : Built with: gsl|muparser|opengjk|openmp|nlopt|libscotch (full)
Info : Running on 4 threads.
Info : <https://neper.info>
Info : Copyright (C) 2003-2022, and GNU GPL'd, by Romain Quey.
Info : No initialization file found (`/nethome/s.roongta/.neperrc').
Info : ---------------------------------------------------------------
Info : MODULE -T loaded with arguments:
Info : [ini file] (none)
Info : [com line] -n 2 -o test
Info : ---------------------------------------------------------------
Info : Reading input data...
Info : Creating domain...
Info : Creating tessellation...
Info : - Setting seeds...
Info : - Running tessellation...
Info : Generating crystal orientations...
Info : Writing results...
Info : [o] Writing file `test.tess'...
Info : [o] Wrote file `test.tess'.
Info : Elapsed time: 0.035 secs.
========================================================================
meshing:
neper -M test.tess -format msh4
======================== N e p e r =======================
Info : A software package for polycrystal generation and meshing.
Info : Version 4.7.1-5
Info : Built with: gsl|muparser|opengjk|openmp|nlopt|libscotch (full)
Info : Running on 4 threads.
Info : <https://neper.info>
Info : Copyright (C) 2003-2022, and GNU GPL'd, by Romain Quey.
Info : No initialization file found (`/nethome/s.roongta/.neperrc').
Info : ---------------------------------------------------------------
Info : MODULE -M loaded with arguments:
Info : [ini file] (none)
Info : [com line] test.tess -format msh4
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 : Meshing...
Info : - Preparing... (cl = 0.3969) 100%
Info : - 0D meshing... 100%
Info : - 1D meshing... 100%
Info : - 2D meshing... 100% (0.44|0.8/100%| 0%| 0%)
Info : - Fixing 2D-mesh pinches...
Info : - 3D meshing... 100% (0.89|0.89/100%| 0%| 0%)
Info : Searching nsets and fasets...
Info : Writing mesh results...
Info : - Preparing mesh...
Info : - Mesh properties:
Info : > Node number: 90
Info : > Elt number: 232
Info : > Mesh volume: 1.000
Info : - Writing mesh...
Info : [o] Writing file `test.msh4'...
Info : [o] Wrote file `test.msh4'.
Info : Elapsed time: 6.320 secs.
========================================================================
Thereafter visualizing the file in Gmsh gui. Tools->options->Geometry shows this additional point (not a part of the mesh)
Thanks, Sharan
No idea why this point shows up, as it is not part of the msh4 file.
An even simpler example is:
neper -T -n 1 -domain "cube(0.1,0.1,0.1)" -o test
neper -M test.tess -cl 1 -for msh4
In Gmsh's GUI, you'll see a point at (2,0.1,0.1), while grep "2\.0" test.msh4
returns nothing.
Strange. In any case, I don't think it would be a problem. Just wondered why it happened. Shall contact the gmsh people if needed.
Also, any comment on the removal of $PhysicalNames bit while saving the mesh file using gmsh? It is probably not a neper thing?
Yes, more a Gmsh issue.
Many thanks for the quick response, and the help.
Incorrect msh4 format generated from neper. There are two extra sections added in the msh file which is not present in the official gmsh documentation: $MeshVersion
$EndMeshVersion $Domain
$EndDomain
Also,
In the $Entities section, the volumes are malformed. We have
1 0.000000000000 0.000000000000 0.000000000000 1.000000000000 1.000000000000 0.921109989703 0 2 1 2 3 4 5 6 2 0.000000000000 0.000000000000 0.000000000000 1.000000000000 1.000000000000 1.000000000000 0 2 7 8 9 10 11 12 6
So the number of bounding surfaces is "2", but 6 and 7 surface tags are given respectively. This contradicts the GMsh format
To Reproduce
The commands I ran using the latest development version of neper:
The msh4 file until the end of $Entities section look like this:
Thanks
Sharan