[Gmsh] export only quadrangle elements in a mesh

Umut Tabak u.tabak at tudelft.nl
Sun Sep 28 18:16:58 CEST 2008


Dear all,

I am a rather new user of gmsh who spent the all sunday afternoon for a 
problem in gmsh. I would like to export/write only quadrangle mesh 
information, binary or ascii does not matter. However when I use the 
t6.geo tutorial file with some modifications I am getting as the output 
all the relevant element information. I only need the element 
connectivities for real elements(in a finite element context, I only 
need the quadrangles/triangles) where I can continue to numerical 
gaussian integration to generate element matrices in my own code. Is 
there a way to somehow export only this information or is that possible 
to make a seperate section in the output file furnished with this 
information only? For instance only elements  9 to 12 so that I will 
have the necessary connectivity...

Thanks in advance for the replies...

Output of a my simple grid information

$MeshFormat
2 0 8
$EndMeshFormat
$PhysicalNames
1
100 "My fancy surface label"
$EndPhysicalNames
$Nodes
9
1 0 0 0
2 0.1 0 0
3 0.1 0.3 0
4 0 0.3 0
5 0.04999999999991952 0 0
6 0.1 0.150000000000104 0
7 0.05000000000012142 0.3 0
8 0 0.150000000000104 0
9 0.05000000000000205 0.1500000000000936 0
$EndNodes
$Elements
12
1 15 3 1 1 0 1
2 15 3 1 2 0 2
3 1 3 99 1 0 1 5
4 1 3 99 1 0 5 2
5 1 3 99 2 0 3 6
6 1 3 99 2 0 6 2
7 1 3 99 4 0 4 8
8 1 3 99 4 0 8 1
9 3 3 100 6 0 1 5 9 8
10 3 3 100 6 0 8 9 7 4
11 3 3 100 6 0 5 2 6 9
12 3 3 100 6 0 9 6 3 7
$EndElements

--
U.T.
--
There are some things which cannot
be learned quickly, and time, which is all we have,
must be paid heavily for their acquiring.
They are the very simplest things,
and because it takes a man's life to know them
the little new that each man gets from life
is very costly and the only heritage he has to leave.
- Ernest Hemingway