1 | #ifndef DATA_H |
---|
2 | #include "../inc/streams.h" |
---|
3 | #include "registry.h" |
---|
4 | |
---|
5 | typedef struct node_struct { |
---|
6 | |
---|
7 | int node_kind ; |
---|
8 | int type_type ; |
---|
9 | char name[NAMELEN] ; |
---|
10 | struct node_struct * fields ; |
---|
11 | struct node_struct * type ; |
---|
12 | int ndims ; |
---|
13 | struct node_struct * dims[MAXDIMS] ; |
---|
14 | int proc_orient ; /* ALL_[ZXY]_ON_PROC which dimension is all on processor */ |
---|
15 | int ntl ; |
---|
16 | int stag_x ; |
---|
17 | int stag_y ; |
---|
18 | int stag_z ; |
---|
19 | int subject_to_communication ; |
---|
20 | int boundary_array ; |
---|
21 | int boundary_array_4d ; |
---|
22 | char use[NAMELEN] ; |
---|
23 | char dname[NAMELEN] ; |
---|
24 | char descrip[NAMELEN] ; |
---|
25 | char units[NAMELEN] ; |
---|
26 | |
---|
27 | /* Fields for 4D scalar arrays */ |
---|
28 | int scalar_array_member ; |
---|
29 | int has_scalar_array_tendencies ; |
---|
30 | struct node_struct * members ; |
---|
31 | |
---|
32 | /* I/O flags */ |
---|
33 | unsigned int io_mask[ IO_MASK_SIZE ] ; |
---|
34 | unsigned int nest_mask ; |
---|
35 | int restart ; |
---|
36 | int boundary ; |
---|
37 | int namelist ; |
---|
38 | char namelistsection[NAMELEN] ; |
---|
39 | struct node_struct * next ; |
---|
40 | struct node_struct * next4d ; |
---|
41 | |
---|
42 | char force_aux_fields[2048] ; |
---|
43 | char force_fcn_name[2048] ; |
---|
44 | char interpd_aux_fields[2048] ; |
---|
45 | char interpd_fcn_name[2048] ; |
---|
46 | char interpu_aux_fields[2048] ; |
---|
47 | char interpu_fcn_name[2048] ; |
---|
48 | char smoothu_fcn_name[2048] ; |
---|
49 | char smoothu_aux_fields[2048] ; |
---|
50 | |
---|
51 | /* fields used by rconfig nodes */ |
---|
52 | char nentries[NAMELEN] ; |
---|
53 | char howset[NAMELEN] ; |
---|
54 | char dflt[NAMELEN] ; |
---|
55 | |
---|
56 | /* fields used by Dim nodes */ |
---|
57 | |
---|
58 | char dim_name[32] ; |
---|
59 | char dim_data_name[NAMELEN] ; |
---|
60 | int coord_axis ; /* X, Y, Z, C */ |
---|
61 | /* DOMAIN_STANDARD, NAMELIST, CONSTANT */ |
---|
62 | int len_defined_how ; |
---|
63 | char assoc_nl_var_s[NAMELEN] ; /* for NAMELIST */ |
---|
64 | char assoc_nl_var_e[NAMELEN] ; /* for NAMELIST */ |
---|
65 | int coord_start ; /* for CONSTANT */ |
---|
66 | int coord_end ; /* for CONSTANT */ |
---|
67 | int dim_order ; /* order that dimensions are specified |
---|
68 | in framework */ |
---|
69 | int subgrid ; /* 1=subgrid dimension */ |
---|
70 | |
---|
71 | /* fields used by Package nodes */ |
---|
72 | char pkg_assoc[NAMELEN] ; |
---|
73 | char pkg_statevars[NAMELEN] ; |
---|
74 | char pkg_4dscalars[NAMELEN_LONG] ; |
---|
75 | |
---|
76 | /* fields used by Comm (halo, period, xpose) nodes */ |
---|
77 | char comm_define[2*8192] ; |
---|
78 | |
---|
79 | /* marker */ |
---|
80 | int mark ; |
---|
81 | |
---|
82 | } node_t ; |
---|
83 | |
---|
84 | #ifndef DEFINE_GLOBALS |
---|
85 | # define EXTERN extern |
---|
86 | #else |
---|
87 | # define EXTERN |
---|
88 | #endif |
---|
89 | |
---|
90 | EXTERN int sw_deref_kludge ; |
---|
91 | EXTERN int sw_io_deref_kludge ; |
---|
92 | EXTERN int sw_3dvar_iry_kludge ; |
---|
93 | EXTERN int sw_distrib_io_layer ; |
---|
94 | EXTERN int sw_limit_args ; |
---|
95 | EXTERN int sw_dm_parallel ; |
---|
96 | EXTERN int sw_move ; |
---|
97 | EXTERN int sw_all_x_staggered ; |
---|
98 | EXTERN int sw_all_y_staggered ; |
---|
99 | EXTERN int sw_dm_serial_in_only ; |
---|
100 | EXTERN int sw_fort_kludge ; |
---|
101 | EXTERN char sw_commpath[NAMELEN] ; |
---|
102 | EXTERN int sw_new_bdys ; /* 20070207 JM support decomposed boundary arrays */ |
---|
103 | EXTERN int sw_unidir_shift_halo ; /* 20100210 JM assume that halo to shift is same in both directions and only gen one of them */ |
---|
104 | EXTERN int sw_new_with_old_bdys ; /* 20070207 JM for debugging interim phase, new comms w/ old data structs */ |
---|
105 | |
---|
106 | EXTERN node_t * Type ; |
---|
107 | EXTERN node_t * Dim ; |
---|
108 | EXTERN node_t * Packages ; |
---|
109 | EXTERN node_t * Halos ; |
---|
110 | EXTERN node_t * Periods ; |
---|
111 | EXTERN node_t * Xposes ; |
---|
112 | EXTERN node_t * FourD ; |
---|
113 | EXTERN node_t * Swaps ; |
---|
114 | EXTERN node_t * Cycles ; |
---|
115 | |
---|
116 | EXTERN node_t Domain ; |
---|
117 | |
---|
118 | EXTERN char t1[NAMELEN], t2[NAMELEN], t3[NAMELEN], t4[NAMELEN], t5[NAMELEN], t6[NAMELEN] ; |
---|
119 | EXTERN char thiscom[4*NAMELEN] ; |
---|
120 | EXTERN int model_order[3] ; |
---|
121 | |
---|
122 | EXTERN int max_time_level ; /* Maximum number of time levels of any state variable */ |
---|
123 | |
---|
124 | #define P_XSB 1 |
---|
125 | #define P_XEB 2 |
---|
126 | #define P_YSB 3 |
---|
127 | #define P_YEB 4 |
---|
128 | |
---|
129 | |
---|
130 | #define DATA_H |
---|
131 | #endif |
---|