-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
44 lines (33 loc) · 1.11 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "intecplot.h"
int main( int argc, char *argv[] )
{
char *fname = (char *) (argv[1]);
//while(1) {
inTec_File f( fname );
f.OpenRead();
f.Parse();
f.Close();
inTec_Zone *z = f.GetZone( 0 );
z->Dump( (char*) "CRAPCRAP.dat");//HACK
printf("Zone type: %d \n", z->GetType() );
printf("Zone variables: %d \n", z->GetNumVariables() );
printf("Zone (not real) im: %ld \n",z->GetNumIndices( 1 ) );
printf("Zone (not real) jm: %ld \n",z->GetNumIndices( 2 ) );
printf("Zone (not real) km: %ld \n",z->GetNumIndices( 3 ) );
printf("Zone nodes: %ld elements: %ld \n",
z->GetNumNodes(), z->GetNumElements() );
const unsigned long* icon = z->GetConnectivityPtr();
printf(" %ld %ld %ld %ld \n",icon[0],icon[1],icon[2],icon[3]);
// 41 42 2 1
// 42 43 3 2
// 43 44 4 3
const double* d = z->GetVariablePtr( 0 );
printf(" %16.9e %16.9e %16.9e \n", d[0], d[1], d[2] );
// 5.000000000E-02 5.214617101E-02 5.437147251E-02
printf("========================= LOOP ==========================\n");
//}
return(0);
}