aboutsummaryrefslogtreecommitdiff
path: root/src/ioHDF5GH.h
blob: 1c2fc5a3b220ddf56f20c61e3663c0af04cf9603 (plain)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
 /*@@
   @header    ioHDF5GH.h
   @date      Jun 20 2000
   @author    Thomas Radke
   @desc 
              The extensions to the GH structure from IOHDF5.
   @version $Id$
 @@*/

#ifndef _IOHDF5_IOHDF5GH_H_
#define _IOHDF5_IOHDF5GH_H_

#include "BetaThorns/IOHDF5Util/src/ioHDF5UtilGH.h"
#include "StoreNamedData.h"

/* IOHDF5 GH extension structure */
typedef struct
{

  /* how often to output */
  int  out_every;

  /* directories in which to output */
  char  *outdir;

  /* the last iteration output */
  int   *out_last;

  /* filename database for opened files */
  pNamedData *open_output_files;

  /* timer array for checkpointing/recovery */
  int timers[IOHDF5_NUM_TIMERS];

  /* flag to indicate request for timer output */
  int print_timing_info;

  /* I/O request description list (for all variables) */
  ioRequest **requests; 

  /* ring buffer for list of successfully created cp files */
  int    cp_filename_index;
  char **cp_filename_list;

} ioHDF5GH;

#ifdef __cplusplus
extern "C"
{
#endif

/* prototypes of functions to be registered as IOHDF5's IO method */
int IOHDF5_OutputGH (const cGH *GH);
int IOHDF5_TriggerOutput (const cGH *GH, int);
int IOHDF5_TimeFor (const cGH *GH, int);
int IOHDF5_OutputVarAs (const cGH *GH, const char *var, const char *alias);
int IOHDF5_Recover (cGH *GH, const char *basefilename, int called_from);

/* other function prototypes */
int IOHDF5_Write (const cGH *GH, int vindex, const char *alias);
int IOHDF5_WriteIsosurface (const cGH *GH,
                            const char *filename,
                            const char *GVname,
                            CCTK_INT iteration,
                            CCTK_INT timelevel,
                            CCTK_REAL isoval,
                            CCTK_REAL minval,
                            CCTK_REAL maxval,
                            int nTriangles,
                            const CCTK_INT4 *triangles,
                            int nVertices,
                            const CCTK_REAL4 *vertices);

#ifdef __cplusplus
} // extern "C"
#endif

#endif  /* _IOHDF5_IOHDF5GH_H_ */