This file is indexed.

/usr/include/gerris/boundary.h is in libgfs-mpi-dev 20131206+dfsg-7.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
/* Gerris - The GNU Flow Solver
 * Copyright (C) 2001 National Institute of Water and Atmospheric Research
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 * 02111-1307, USA.  
 */

#ifndef __BOUNDARY_H__
#define __BOUNDARY_H__

#include "fluid.h"
#include "utils.h"

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

typedef struct _GfsBox                    GfsBox;
typedef struct _GfsBoxClass               GfsBoxClass;
typedef struct _GfsBoundary               GfsBoundary;
typedef struct _GfsBoundaryClass          GfsBoundaryClass;

/* GfsBc: Header */

typedef struct _GfsBc         GfsBc;

struct _GfsBc {
  /*< private >*/
  GtsObject parent;
  GfsLinearProblem * lp;

  /*< public >*/
  GfsBoundary * b;
  GfsVariable * v;
  gboolean extra;
  FttFaceTraverseFunc bc, homogeneous_bc;
  FttFaceTraverseFunc homogeneous_bc_stencil;
  FttFaceTraverseFunc face_bc;
};

typedef struct _GfsBcClass    GfsBcClass;

struct _GfsBcClass {
  /*< private >*/
  GtsObjectClass parent_class;

  /*< public >*/  
};

#define GFS_BC(obj)                    GTS_OBJECT_CAST (obj,\
				                        GfsBc,\
				                        gfs_bc_class ())
#define GFS_BC_CLASS(klass)            GTS_OBJECT_CLASS_CAST (klass,\
						        GfsBcClass,\
						        gfs_bc_class())
#define GFS_IS_BC(obj)                 (gts_object_is_from_class (obj,\
					gfs_bc_class ()))

GfsBcClass * gfs_bc_class  (void);
GfsBc *      gfs_bc_new    (GfsBcClass * k, 
			    GfsVariable * v, 
			    gboolean extra);

/* GfsBcValue: Header */

typedef struct _GfsBcValue         GfsBcValue;

struct _GfsBcValue {
  /*< private >*/
  GfsBc parent;

  /*< public >*/
  GfsFunction * val;
};

#define GFS_BC_VALUE(obj)            GTS_OBJECT_CAST (obj,\
					         GfsBcValue,\
					         gfs_bc_value_class ())
#define GFS_IS_BC_VALUE(obj)         (gts_object_is_from_class (obj,\
						 gfs_bc_value_class ()))

GfsBcClass * gfs_bc_value_class  (void);

/* GfsBcDirichlet: Header */

#define GFS_IS_BC_DIRICHLET(obj)         (gts_object_is_from_class (obj,\
						 gfs_bc_dirichlet_class ()))

GfsBcClass * gfs_bc_dirichlet_class  (void);

/* GfsBcNeumann: Header */

#define GFS_IS_BC_NEUMANN(obj)         (gts_object_is_from_class (obj,\
						 gfs_bc_neumann_class ()))

GfsBcClass * gfs_bc_neumann_class  (void);

/* GfsBcAngle: Header */

#define GFS_IS_BC_ANGLE(obj)         (gts_object_is_from_class (obj,\
						 gfs_bc_angle_class ()))

GfsBcClass * gfs_bc_angle_class  (void);

/* GfsBcNavier: Header */

typedef struct _GfsBcNavier         GfsBcNavier;

struct _GfsBcNavier {
  /*< private >*/
  GfsBcValue parent;

  /*< public >*/
  GfsFunction * lambda;
};

#define GFS_BC_NAVIER(obj)            GTS_OBJECT_CAST (obj,\
					         GfsBcNavier,\
					         gfs_bc_navier_class ())
#define GFS_IS_BC_NAVIER(obj)         (gts_object_is_from_class (obj,\
						 gfs_bc_navier_class ()))

GfsBcClass * gfs_bc_navier_class  (void);

/* GfsBoundary: Header */

typedef enum {
  GFS_BOUNDARY_CENTER_VARIABLE,
  GFS_BOUNDARY_FACE_VARIABLE,
  GFS_BOUNDARY_MATCH_VARIABLE,
  GFS_BOUNDARY_VARIABLE_NUMBER
} GfsBoundaryVariableType;

struct _GfsBoundary {
  /*< private >*/
  GtsObject parent;

  FttCell * root;
  GfsBox * box;
  FttDirection d;
  guint depth;
  GfsBc * default_bc;
  gboolean changed;

  /*< public >*/
  GfsVariable * v;
  GfsBoundaryVariableType type;
  GHashTable * bc;
};

struct _GfsBoundaryClass {
  GtsObjectClass parent_class;

  void (* match)             (GfsBoundary * boundary);
  void (* send)              (GfsBoundary * boundary);
  void (* receive)           (GfsBoundary * boundary,
			      FttTraverseFlags flags,
			      gint max_depth);
  void (* synchronize)       (GfsBoundary * boundary);
  void (* update)            (GfsBoundary * boundary);
};

#define GFS_BOUNDARY(obj)            GTS_OBJECT_CAST (obj,\
					           GfsBoundary,\
					           gfs_boundary_class ())
#define GFS_BOUNDARY_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
						   GfsBoundaryClass,\
						   gfs_boundary_class())
#define GFS_IS_BOUNDARY(obj)         (gts_object_is_from_class (obj,\
						   gfs_boundary_class ()))
     
GfsBoundaryClass * gfs_boundary_class                (void);
GfsBoundary *      gfs_boundary_new                  (GfsBoundaryClass * klass,
						      GfsBox * box,
						      FttDirection d);
void               gfs_boundary_send                 (GfsBoundary * boundary);
void               gfs_boundary_update               (GfsBoundary * boundary);
void               gfs_boundary_receive              (GfsBoundary * boundary,
						      FttTraverseFlags flags,
						      gint max_depth);
void               gfs_boundary_synchronize          (GfsBoundary * boundary);
GfsBc *            gfs_boundary_lookup_bc            (GfsBoundary * b, 
						      GfsVariable * v);
void               gfs_boundary_set_default_bc       (GfsBoundary * b, 
						      GfsBc * bc);
void               gfs_variable_set_default_bc       (GfsVariable * v, 
						      GfsBc * bc);
void               gfs_boundary_add_bc               (GfsBoundary * b, 
						      GfsBc * bc);

/* GfsBoundaryInflowConstant: Header */

typedef struct _GfsBoundaryInflowConstant         GfsBoundaryInflowConstant;
typedef struct _GfsBoundaryInflowConstantClass    GfsBoundaryInflowConstantClass;

struct _GfsBoundaryInflowConstant {
  GfsBoundary parent;

  GfsFunction * un;
};

struct _GfsBoundaryInflowConstantClass {
  GfsBoundaryClass parent_class;
};

#define GFS_BOUNDARY_INFLOW_CONSTANT(obj)  GTS_OBJECT_CAST (obj,\
					 GfsBoundaryInflowConstant,\
					 gfs_boundary_inflow_constant_class ())
#define GFS_BOUNDARY_INFLOW_CONSTANT_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\
					 GfsBoundaryInflowConstantClass,\
					 gfs_boundary_inflow_constant_class())
#define GFS_IS_BOUNDARY_INFLOW_CONSTANT(obj) (gts_object_is_from_class (obj,\
					 gfs_boundary_inflow_constant_class ()))
     
GfsBoundaryInflowConstantClass * gfs_boundary_inflow_constant_class  (void);

/* GfsBoundaryOutflow: Header */

typedef struct _GfsBoundaryOutflowClass    GfsBoundaryOutflowClass;

struct _GfsBoundaryOutflowClass {
  GfsBoundaryClass parent_class;
};

#define GFS_BOUNDARY_OUTFLOW_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
						   GfsBoundaryOutflowClass,\
						   gfs_boundary_outflow_class())
#define GFS_IS_BOUNDARY_OUTFLOW(obj)         (gts_object_is_from_class (obj,\
					    gfs_boundary_outflow_class ()))
     
GfsBoundaryOutflowClass * gfs_boundary_outflow_class    (void);

/* GfsBoundaryGradient: Header */

#define GFS_IS_BOUNDARY_GRADIENT(obj)         (gts_object_is_from_class (obj,\
					    gfs_boundary_gradient_class ()))
     
GfsBoundaryClass * gfs_boundary_gradient_class    (void);

/* GfsBoundaryPeriodic: Header */

typedef struct _GfsBoundaryPeriodic         GfsBoundaryPeriodic;

struct _GfsBoundaryPeriodic {
  /*< private >*/
  GfsBoundary parent;

  GfsBox * matching;
  FttDirection d;
  GArray * sndbuf, * rcvbuf;
  guint sndcount, rcvcount;

  gdouble rotate;
};

#define GFS_BOUNDARY_PERIODIC(obj)            GTS_OBJECT_CAST (obj,\
					           GfsBoundaryPeriodic,\
					           gfs_boundary_periodic_class ())
#define GFS_IS_BOUNDARY_PERIODIC(obj)         (gts_object_is_from_class (obj,\
						   gfs_boundary_periodic_class ()))
     
GfsBoundaryClass *    gfs_boundary_periodic_class    (void);
GfsBoundaryPeriodic * gfs_boundary_periodic_new      (GfsBoundaryClass * klass,
						      GfsBox * box,
						      FttDirection d,
						      GfsBox * matching);
void                  gfs_boundary_periodic_rotate   (GfsBoundaryPeriodic * boundary,
						      FttDirection rotate,
						      gdouble orientation);
GfsBoundaryPeriodic * gfs_boundary_periodic_rotate_new (GfsBoundaryClass * klass,
							GfsBox * box,
							FttDirection d,
							GfsBox * matching,
							FttDirection rotate,
							gdouble orientation);

/* GfsGEdge: Header */
  
typedef struct _GfsGEdge         GfsGEdge;
typedef struct _GfsGEdgeClass    GfsGEdgeClass;

struct _GfsGEdge {
  GtsGEdge parent;

  FttDirection d, rotate;
};

struct _GfsGEdgeClass {
  GtsGEdgeClass parent_class;
};

#define GFS_GEDGE(obj)            GTS_OBJECT_CAST (obj,\
					          GfsGEdge,\
					          gfs_gedge_class ())
#define GFS_GEDGE_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
						  GfsGEdgeClass,\
						  gfs_gedge_class())
#define GFS_IS_GEDGE(obj)         (gts_object_is_from_class (obj,\
						  gfs_gedge_class ()))
     
GfsGEdgeClass * gfs_gedge_class          (void);
GfsGEdge *      gfs_gedge_new            (GfsGEdgeClass * klass,
					  GfsBox * b1, GfsBox * b2,
					  FttDirection d);
void            gfs_gedge_link_boxes     (GfsGEdge * edge);

struct _GfsBox {
  GtsGNode parent;

  FttCell * root;
  GtsObject * neighbor[FTT_NEIGHBORS];
  guint id;
  int pid;
  gint size;
};

struct _GfsBoxClass {
  GtsGNodeClass parent_class;
};

#define GFS_BOX(obj)            GTS_OBJECT_CAST (obj,\
					        GfsBox,\
					        gfs_box_class ())
#define GFS_BOX_CLASS(klass)    GTS_OBJECT_CLASS_CAST (klass,\
						      GfsBoxClass,\
						      gfs_box_class())
#define GFS_IS_BOX(obj)         (gts_object_is_from_class (obj,\
						          gfs_box_class ()))
     
GfsBoxClass *    gfs_box_class                (void);
GfsBox *         gfs_box_new                  (GfsBoxClass * klass);

static inline
GfsDomain * gfs_box_domain (GfsBox * box)
{
  GfsDomain * d;

  g_return_val_if_fail (box != NULL, NULL);
  
  d = GTS_OBJECT (box)->reserved;
  if (GTS_SLIST_CONTAINEE (box)->containers) {
    GSList * i = GTS_SLIST_CONTAINEE (box)->containers;

    while (i->next)
      i = i->next;
    d = i->data;
  }
  return d;
}

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* __BOUNDARY_H__ */