Skip to content

Commit

Permalink
parses dataset aux data in plt header
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Park authored and Mike Park committed Nov 14, 2022
1 parent cad9ddc commit 6a2ccf5
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/ref_part.c
Original file line number Diff line number Diff line change
Expand Up @@ -2316,13 +2316,14 @@ REF_FCN static REF_STATUS ref_part_plt_header(FILE *file, REF_INT *nvar,
char header[9];
int endian, filetype;
char title[1024], varname[1024], zonename[1024];
char auxname[1024], auxvalue[1024];
int var, numvar;
float zonemarker;
int parent, strand, notused, zonetype, packing, location, neighbor;
double solutiontime;
int miscellaneous, i;
int numpts, numelem;
int dim, aux;
int dim, aux, auxiliary_value_format;
REF_BOOL verbose = REF_FALSE;

RAS(header == fgets(header, 6, file), "header error");
Expand Down Expand Up @@ -2350,6 +2351,17 @@ REF_FCN static REF_STATUS ref_part_plt_header(FILE *file, REF_INT *nvar,
}

REIS(1, fread(&zonemarker, sizeof(float), 1, file), "zonemarker");

while (ABS(799.0 - (double)zonemarker) < 1.0e-7) {
RSS(ref_part_plt_string(file, auxname, 1024), "read auxname");
if (verbose) printf("plt auxname '%s'\n", auxname);
REIS(1, fread(&auxiliary_value_format, sizeof(int), 1, file),
"auxiliary_value_format");
RSS(ref_part_plt_string(file, auxvalue, 1024), "read auxvalue");
if (verbose) printf("plt auxvalue '%s'\n", auxvalue);
REIS(1, fread(&zonemarker, sizeof(float), 1, file), "zonemarker");
}

while (ABS(299.0 - (double)zonemarker) < 1.0e-7) {
RSS(ref_part_plt_string(file, zonename, 1024), "read zonename");
if (verbose) printf("plt zonename '%s'\n", zonename);
Expand Down

0 comments on commit 6a2ccf5

Please sign in to comment.