[Gmsh] Mesh file with physical entities

Christophe Geuzaine cgeuzaine at ulg.ac.be
Thu Nov 13 19:31:03 CET 2008


Rudolf Hellmuth wrote:
> Hi,
> 
> I'm meshing a geometry with 6 different physical entities, points and 
> lines. I'm having problems with the mesh file. I wanted to have an 
> output as the format version 2 described in manual, but it isn't in the 
> same format. For better handling the output information, I'd like to 
> have the node list, element list and a list for each physical entity. 
> I'm getting the node and element list but not the physical one. I'll 
> exemplify:
> 
> I wanted, as manual:
> 
> $MeshFormat
> 2 0 8
> $EndMeshFormat
> $Nodes
> 746
> 1 .435 3 0
> ...
> $EndNodes
> $Elements
> 844
> 1 15 3 5 1 0 1
> 
> ...
> $EndElements
> $PhysicalNames
> 8
> 1 "cx"
> ...
> $EndPhysicalNames
> $NodeData
> 6
> "cx"
> ...
> number-of-real-tags
> 
> < real-tag >
> ...
> number-of-integer-tags
> < integer-tag >
> ...
> node-number value ...
> ...
> 
> $EndNodeData
> $ElementData
> number-of-string-tags
> < "string-tag" >
> ...
> number-of-real-tags
> < real-tag >
> ...
> 
> number-of-integer-tags
> < integer-tag >
> ...
> elm-number value ...
> ...
> $EndElementData
> $ElementNodeData
> number-of-string-tags
> 
> < "string-tag" >
> ...
> number-of-real-tags
> < real-tag >
> ...
> number-of-integer-tags
> < integer-tag >
> 
> ...
> elm-number number-of-nodes-per-element value ...
> ...
> $ElementEndNodeData
> 
> ========================================
> But I'm getting:
> $MeshFormat
> 2 0 8
> $EndMeshFormat
> $PhysicalNames
> 8
> 1 "cx"
> ...
> $EndPhysicalNames
> $Nodes
> 746
> 1 0.5 0 0
> ...
> $EndNodes
> $Elements
> 844
> 1 15 3 5 1 0 1
> $EndElements
> ====================================
> 
> Plus, there are duplicated points and elements, which belongs to more 
> than one physical entity. The output format is set for v. 2 
> (Mesh.MshFileVersion=2;).
> 
> Is there an option that I should set on?

I don't quite understand your question. The .msh you gave is exactly in 
the format given the the documentation... Elements have several tags; if 
an entity belongs to 2 physical groups, two elements with different 
physical tags will be saved.

The NodeData, ElementData, etc. are fields that store post-processing 
data (floating point results that you want to display), not meshes 
(connectivities).


> 
> I'd like to transfer this mesh to Calculix (an Abaqus like FEM solver). 
> I think the way the manual presents format version 2 shall let easier to 
> do that.
> 
> ====================================
> I have an other issue; I tried to find a text file with all the options 
> availeble in Gmsh, but couldn't. Where do the binary saves the options 
> input? Can I edit this file?
> 
> Thanks,
> Rudolf
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh


-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine