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