summaryrefslogtreecommitdiff
path: root/src/include/cGH.h
blob: f92be81ebf691316e8526861d3705b3279c7f265 (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
79
80
81
82
83
84
85
86
87
88
89
 /*@@
   @header    cGH.h
   @date      Wed Feb 17 03:17:47 1999
   @author    Tom Goodale
   @desc 
   The cGH structure.
   @enddesc 
   @version $Header$
 @@*/

#ifndef _CGH_H_
#define _CGH_H_ 1

#include "cctk_Types.h"

typedef struct
{
  char storage;
  char comm;
} cGHGroupData;

typedef struct _cGH
{
  int cctk_dim;
  int cctk_iteration;

  /* ...[dim]*/
  int *cctk_gsh;
  int *cctk_lsh;
  int *cctk_lbnd;
  int *cctk_ubnd;

  /* allocated shape */
  int *cctk_ash;

  /* unused */
  int *cctk_to;
  int *cctk_from;
  
  /* The grid spacings */
  CCTK_REAL cctk_delta_time;
  CCTK_REAL *cctk_delta_space;

  /* FIXME we want coordinate registration instead of this */
  CCTK_REAL *cctk_origin_space;

  /* The bounding box - 1 => a real boundary, 0 => a local grid boundary. */
  /* bbox[2*dim] */
  int *cctk_bbox;

  /* The refinement factor over the top level (coarsest) grid. */
  int *cctk_levfac;

  /* Offset between this level's and the coarsest level's origin */
  int *cctk_levoff;
  int *cctk_levoffdenom;

  /* The refinement factor in time over the top level (coarsest) grid. */
  int cctk_timefac;

  /* The convergence level (numbered from zero upwards) */
  int cctk_convlevel;

  /* The (per level) convergence factor */
  int cctk_convfac;

  /* The number of ghostzones in each direction */
  int *cctk_nghostzones;

  /* The coordinate time */
  CCTK_REAL cctk_time;

  /* An identifier string for this hierarchy
    (used to construct names for output files) */
  const char *identity;

  /* data[variable_index][timelevel][ijk]
     (ijk is as calculated e.g. by CCTK_GFINDEX3D) */
  void ***data;

  /* The extension array */
  void **extensions;

  /* All the group data for this GH (storage, comm, etc. */
  cGHGroupData *GroupData;

} cGH;

#endif /* _CGH_H_ */