xref: /phasta/phSolver/common/phIO.h (revision abb450f30d2974aee33eff21b60aefc81178b6df)
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   void phio_readheader(
29       int* fileDescriptor,
30       const  char keyphrase[],
31       void* valueArray,
32       int*  nItems,
33       const char  datatype[],
34       const char  iotype[] );
35   void phio_writeheader(
36       const int* fileDescriptor,
37       const char keyphrase[],
38       const void* valueArray,
39       const int* nItems,
40       const int* ndataItems,
41       const char datatype[],
42       const char iotype[] );
43   void phio_readdatablock(
44       int* fileDescriptor,
45       const  char keyphrase[],
46       void* valueArray,
47       int*  nItems,
48       const char  datatype[],
49       const char  iotype[] );
50   void phio_writedatablock(
51       const int* fileDescriptor,
52       const char keyphrase[],
53       const void* valueArray,
54       const int* nItems,
55       const char datatype[],
56       const char iotype[]);
57   void phio_openfile_read(
58       const char filename[],
59       int* numFiles,
60       int* fileDescriptor);
61   void phio_openfile_write(
62       const char filename[],
63       int* numFiles,
64       int* numFields,
65       int* numPPF,
66       int* fileDescriptor);
67   void phio_restartname(int* step, char* filename);
68   void phio_closefile_read(int* fileDescriptor);
69   void phio_closefile_write(int* fileDescriptor);
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif
75 
76