[Gmsh] write a .pos file and read it back -> different results
Al Danial
al.danial at gmail.com
Sun May 23 06:02:31 CEST 2004
I'm trying to write a program that writes .pos files and am having a
hard time getting the sequence of terms just right. Probably one of
those ubiquitous "off by one" goofs somewhere. I figured a good way
to get the format right is to match the output that gmsh itself
writes.
I start with this file (called "A.pos"):
View "vname_A" {
ST(0.5,0.5,0.0,1.0,0.5,0.0,1.0,1.0,0.0){1,2,3,4,5,6,7,8,9,10};
ST(0.5,0.5,0.0,1.0,1.0,0.0,0.5,1.0,0.0){2,3,4,5,6,7,8,9,10,11};
};
I load it into gmsh and it looks fine. Then I do "Save as/ASCII
view..." and write the view to the file "B.pos". It looks like this:
$PostFormat /* Gmsh 1.2, ascii */
1.2 0 8
$EndPostFormat
$View /* vname_A */
vname_A 3 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 2 0.5 1 1 0.5 0.5 1 0 0 0 1 2 3 4 5 6 7 8 9 10 0.5 1 0.5 0.5 1 1
0 0 0 2 3 4 5 6 7 8 9 10 11
$EndView
The problem is that when B.pos is loaded back in it does not resemble
A.pos at all.
What am I missing? -- Al