Skip to content
Snippets Groups Projects
Commit cc22d34b authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

typo

parent acb4da14
No related branches found
No related tags found
No related merge requests found
...@@ -53,18 +53,18 @@ Gmsh Ascii Post-Processing File Format ...@@ -53,18 +53,18 @@ Gmsh Ascii Post-Processing File Format
nb-ST nb-VT nb-TT nb-ST nb-VT nb-TT
nb-SS nb-VS nb-TS nb-SS nb-VS nb-TS
time-step-values time-step-values
SP-values SP-value SP-value SP-value ...
VP-values VP-value VP-value VP-value ...
TP-values TP-value TP-value TP-value ...
SL-values SL-value SL-value SL-value ...
VL-values VL-value VL-value VL-value ...
TL-values TL-value TL-value TL-value ...
ST-values ST-value ST-value ST-value ...
VT-values VT-value VT-value VT-value ...
TT-values TT-value TT-value TT-value ...
SS-values SS-value SS-value SS-value ...
VS-values VS-value VS-value VS-value ...
TS-values TS-value TS-value TS-value ...
$endView $endView
$View $View
... ...
...@@ -83,9 +83,10 @@ Gmsh Ascii Post-Processing File Format ...@@ -83,9 +83,10 @@ Gmsh Ascii Post-Processing File Format
scalar points, vector points, tensor points, scalar lines, vector lines, scalar points, vector points, tensor points, scalar lines, vector lines,
tensor lines, scalar triangles, vector triangles, tensor triangles, tensor lines, scalar triangles, vector triangles, tensor triangles,
scalar tetrahedra, vector tetrahedra and tensor tetrahedra. scalar tetrahedra, vector tetrahedra and tensor tetrahedra.
- 'SP-values' is a list of double precision numbers: - 'SP-value' consists of a list of double precision numbers: the three
the three first represent the corrdinates of the point first represent the coordinates of the point, and the
the 'nb-time-step' following 'nb-time-step' following represent the field values.
Gmsh Binary Post-Processing File Format Gmsh Binary Post-Processing File Format
======================================= =======================================
...@@ -102,16 +103,33 @@ Gmsh Binary Post-Processing File Format ...@@ -102,16 +103,33 @@ Gmsh Binary Post-Processing File Format
which contains the value '1'. This integer serves as a test for little/big endian which contains the value '1'. This integer serves as a test for little/big endian
detection. detection.
Here is an example, of C code to write the binary format: Here is an example, of C code to write a view in binary format (nb-SP, nb-VP, ...
have their classical meaning; SP-values, VP-values, ... are arrays of double
precision numbers containing respectively nb-SP, nb-VP, ... 'SP-value'.
'Time-values' is an array of 'nb-time-step' double precision numbers):
int one=1; int one=1;
fprintf(file, "$View /* %s */\n", name); fprintf(file, "$View /* test */\n");
fprintf(file, "%s %g\n", name, version); fprintf(file, "test %d %d %d %d %d %d %d %d %d %d %d %d %d\n",
nb-time-step,
nb-SP, nb-VP, nb-TP, nb-SL, nb-VL, nb-TL,
nb-ST, nb-VT, nb-TT, nb-SS, nb-VS, nb-TS);
fwrite(&one, sizeof(int), 1, file);
fwrite(Time-values, sizeof(double), nb-SP, file);
fwrite(SP-values, sizeof(double), nb-SP, file);
fwrite(VP-values, sizeof(double), nb-VP, file);
fwrite(TP-values, sizeof(double), nb-TP, file);
fwrite(SL-values, sizeof(double), nb-SL, file);
fwrite(VL-values, sizeof(double), nb-VL, file);
fwrite(TL-values, sizeof(double), nb-TL, file);
fwrite(ST-values, sizeof(double), nb-ST, file);
fwrite(VT-values, sizeof(double), nb-VT, file);
fwrite(TT-values, sizeof(double), nb-TT, file);
fwrite(SS-values, sizeof(double), nb-SS, file);
fwrite(VS-values, sizeof(double), nb-VS, file);
fwrite(TS-values, sizeof(double), nb-TS, file);
fprintf(file, "$EndView\n"); fprintf(file, "$EndView\n");
fwrite(&One, sizeof(int), 1, PostStream);
Gmsh Parsed Post-Processing Format Gmsh Parsed Post-Processing Format
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment