xref: /phasta/phSolver/common/phIO.h (revision bc62cfd4f9523e2fcff7faf06823f3eba320b056)
1 #ifndef PHSOLVER_PHIO_H
2 #define PHSOLVER_PHIO_H
3 
4 #include <FCMangle.h>
5 
6 //#define phio_readheader \
7 //  FortranCInterface_GLOBAL_(phio_readheader, PHIO_READHEADER)
8 #define phio_writeheader \
9   FortranCInterface_GLOBAL_(phio_writeheader, PHIO_WRITEHEADER)
10 //#define phio_readdatablock \
11 //  FortranCInterface_GLOBAL_(phio_readdatablock, PHIO_READDATABLOCK)
12 #define phio_writedatablock \
13   FortranCInterface_GLOBAL_(phio_writedatablock, PHIO_WRITEDATABLOCK)
14 //#define phio_openfile_read \
15 //  FortranCInterface_GLOBAL_(phio_openfile_read, PHIO_OPENFILE_READ)
16 #define phio_openfile_write \
17   FortranCInterface_GLOBAL_(phio_openfile_write, PHIO_OPENFILE_WRITE)
18 #define phio_restartname \
19   FortranCInterface_GLOBAL_(phio_restartname, PHIO_RESTARTNAME)
20 //#define phio_closefile_read \
21 //  FortranCInterface_GLOBAL_(phio_closefile_read, PHIO_CLOSEFILE_READ)
22 #define phio_closefile_write \
23   FortranCInterface_GLOBAL_(phio_closefile_write, PHIO_CLOSEFILE_WRITE)
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28   typedef struct phio_file* phio_fp;
29   void phio_readheader(
30       phio_fp fileDescriptor,
31       const  char keyphrase[],
32       void* valueArray,
33       int*  nItems,
34       const char  datatype[],
35       const char  iotype[] );
36   void phio_writeheader(
37       phio_fp fileDescriptor,
38       const char keyphrase[],
39       const void* valueArray,
40       const int* nItems,
41       const int* ndataItems,
42       const char datatype[],
43       const char iotype[] );
44   void phio_readdatablock(
45       phio_fp fileDescriptor,
46       const  char keyphrase[],
47       void* valueArray,
48       int*  nItems,
49       const char  datatype[],
50       const char  iotype[] );
51   void phio_writedatablock(
52       phio_fp fileDescriptor,
53       const char keyphrase[],
54       const void* valueArray,
55       const int* nItems,
56       const char datatype[],
57       const char iotype[]);
58   void phio_openfile_read(
59       const char filename[],
60       int* numFiles,
61       phio_fp* fileDescriptor);
62   void phio_openfile_write(
63       const char filename[],
64       int* numFiles,
65       int* numFields,
66       int* numPPF,
67       phio_fp* fileDescriptor);
68   void phio_restartname(int* step, char* filename);
69   void phio_closefile_read(phio_fp fileDescriptor);
70   void phio_closefile_write(phio_fp fileDescriptor);
71 #ifdef __cplusplus
72 }
73 #endif
74 
75 #endif
76 
77