/usr/include/gerris/variable.h is in libgfs-dev 20131206+dfsg-18.
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 | /* Gerris - The GNU Flow Solver
* Copyright (C) 2001-2012 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 __VARIABLE_H__
#define __VARIABLE_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef struct _GfsSurfaceGenericBc GfsSurfaceGenericBc;
#include "timestep.h"
#include "event.h"
/* GfsVariable: Header */
typedef void (* GfsVariableFineCoarseFunc) (FttCell * cell, GfsVariable * v);
struct _GfsVariable {
/*< private >*/
GfsEvent parent;
/*< public >*/
guint i;
FttComponent component;
GfsVariable * vector[FTT_DIMENSION];
gchar * name, * description;
gboolean centered;
GfsVariableFineCoarseFunc fine_coarse, coarse_fine;
GtsContainer * sources;
GfsSurfaceGenericBc * surface_bc;
GfsBc * default_bc;
GfsDomain * domain;
FttCellCleanupFunc cleanup;
gdouble units;
GfsVariable * face[2][4];
gboolean face_source; /* whether source terms should be evaluated at cell faces only */
gdouble orientation; /* orientation of rotated variable */
gboolean even; /* "eveness" of rotated variable */
};
typedef struct _GfsVariableClass GfsVariableClass;
struct _GfsVariableClass {
/*< private >*/
GfsEventClass parent_class;
/*< public >*/
};
#define GFS_VARIABLE(obj) GTS_OBJECT_CAST (obj,\
GfsVariable,\
gfs_variable_class ())
#define GFS_VARIABLE_CLASS(klass) GTS_OBJECT_CLASS_CAST (klass,\
GfsVariableClass,\
gfs_variable_class())
#define GFS_IS_VARIABLE(obj) (gts_object_is_from_class (obj,\
gfs_variable_class ()))
#define GFS_VALUE(cell,v) ((&GFS_STATE (cell)->place_holder)[(v)->i])
GfsVariableClass * gfs_variable_class (void);
GfsVariable * gfs_variable_new (GfsVariableClass * klass,
GfsDomain * domain,
const gchar * name,
const gchar * description);
#define gfs_temporary_variable(d) (gfs_variable_new (gfs_variable_class (),\
(d), NULL, NULL))
GfsVariable * gfs_variable_from_name (GSList * i,
const gchar * name);
GSList * gfs_variables_from_list (GSList * i,
gchar * list,
gchar ** error);
void gfs_variables_swap (GfsVariable * v1,
GfsVariable * v2);
void gfs_variable_set_vector (GfsVariable ** v,
guint n);
void gfs_variable_set_tensor (GfsVariable * t[2][2]);
GfsVariable * gfs_variable_clone (GfsVariable * v,
gchar * name);
/* GfsVariableBoolean: header */
#define GFS_IS_VARIABLE_BOOLEAN(obj) (gts_object_is_from_class (obj,\
gfs_variable_boolean_class ()))
GfsVariableClass * gfs_variable_boolean_class (void);
/* GfsVariableTracer: header */
typedef struct _GfsVariableTracer GfsVariableTracer;
struct _GfsVariableTracer {
/*< private >*/
GfsVariable parent;
/*< public >*/
GfsAdvectionParams advection;
};
#define GFS_VARIABLE_TRACER(obj) GTS_OBJECT_CAST (obj,\
GfsVariableTracer,\
gfs_variable_tracer_class ())
#define GFS_IS_VARIABLE_TRACER(obj) (gts_object_is_from_class (obj,\
gfs_variable_tracer_class ()))
GfsVariableClass * gfs_variable_tracer_class (void);
/* GfsVariableResidual: header */
#define GFS_IS_VARIABLE_RESIDUAL(obj) (gts_object_is_from_class (obj,\
gfs_variable_residual_class ()))
GfsVariableClass * gfs_variable_residual_class (void);
/* GfsVariableFiltered: header */
typedef struct _GfsVariableFiltered GfsVariableFiltered;
struct _GfsVariableFiltered {
/*< private >*/
GfsVariable parent;
/*< public >*/
GfsVariable * v;
guint niter;
};
#define GFS_VARIABLE_FILTERED(obj) GTS_OBJECT_CAST (obj,\
GfsVariableFiltered,\
gfs_variable_filtered_class ())
#define GFS_IS_VARIABLE_FILTERED(obj) (gts_object_is_from_class (obj,\
gfs_variable_filtered_class ()))
GfsVariableClass * gfs_variable_filtered_class (void);
/* GfsVariableDiagonal: Header */
GfsVariableClass * gfs_variable_diagonal_class (void);
/* GfsVariableFunction: header */
typedef struct _GfsVariableFunction GfsVariableFunction;
struct _GfsVariableFunction {
/*< private >*/
GfsVariable parent;
/*< public >*/
GfsFunction * f;
};
#define GFS_VARIABLE_FUNCTION(obj) GTS_OBJECT_CAST (obj,\
GfsVariableFunction,\
gfs_variable_function_class ())
#define GFS_IS_VARIABLE_FUNCTION(obj) (gts_object_is_from_class (obj,\
gfs_variable_function_class ()))
GfsVariableClass * gfs_variable_function_class (void);
#if FTT_2D
/* GfsVariableStreamFunction: header */
#define GFS_IS_VARIABLE_STREAM_FUNCTION(obj) (gts_object_is_from_class (obj,\
gfs_variable_stream_function_class ()))
GfsVariableClass * gfs_variable_stream_function_class (void);
#endif /* FTT_2D */
/* GfsVariableAge: header */
#define GFS_IS_VARIABLE_AGE(obj) (gts_object_is_from_class (obj,\
gfs_variable_age_class ()))
GfsVariableClass * gfs_variable_age_class (void);
/* GfsVariableAverage: header */
typedef struct _GfsVariableAverage GfsVariableAverage;
struct _GfsVariableAverage {
/*< private >*/
GfsVariableFunction parent;
/*< public >*/
FttComponent c;
};
#define GFS_VARIABLE_AVERAGE(obj) GTS_OBJECT_CAST (obj,\
GfsVariableAverage,\
gfs_variable_average_class ())
#define GFS_IS_VARIABLE_AVERAGE(obj) (gts_object_is_from_class (obj,\
gfs_variable_average_class ()))
GfsVariableClass * gfs_variable_average_class (void);
/* GfsDerivedVariable: Header */
struct _GfsDerivedVariable {
/*< private >*/
GtsObject parent;
/*< public >*/
gchar * name, * description;
gpointer func, data;
};
#define GFS_DERIVED_VARIABLE(obj) GTS_OBJECT_CAST (obj,\
GfsDerivedVariable,\
gfs_derived_variable_class ())
#define GFS_IS_DERIVED_VARIABLE(obj) (gts_object_is_from_class (obj,\
gfs_derived_variable_class ()))
GtsObjectClass * gfs_derived_variable_class (void);
GfsDerivedVariable * gfs_derived_variable_from_name (GSList * i,
const gchar * name);
/* GfsConstant: Header */
typedef struct _GfsConstant GfsConstant;
/** \instance{GfsConstant} */
struct _GfsConstant {
/*< private >*/
GfsEvent parent;
GfsDerivedVariable * derived;
/*< public >*/
gdouble val; /**< the value of the constant */
};
#define GFS_CONSTANT(obj) GTS_OBJECT_CAST (obj,\
GfsConstant,\
gfs_constant_class ())
#define GFS_IS_CONSTANT(obj) (gts_object_is_from_class (obj,\
gfs_constant_class ()))
GfsEventClass * gfs_constant_class (void);
/* GfsSpatialSum: Header */
typedef struct _GfsSpatialSum GfsSpatialSum;
/** \instance{GfsSpatialSum} */
struct _GfsSpatialSum {
/*< private >*/
GfsConstant parent;
/*< public >*/
GfsFunction * v; /**< the function to sum */
};
#define GFS_SPATIAL_SUM(obj) GTS_OBJECT_CAST (obj,\
GfsSpatialSum,\
gfs_spatial_sum_class ())
#define GFS_IS_SPATIAL_SUM(obj) (gts_object_is_from_class (obj,\
gfs_spatial_sum_class ()))
GfsEventClass * gfs_spatial_sum_class (void);
/* GfsVariablePoisson: Header */
typedef struct _GfsVariablePoisson GfsVariablePoisson;
struct _GfsVariablePoisson {
/*< private >*/
GfsVariableFunction parent;
/*< public >*/
GfsMultilevelParams par;
};
#define GFS_VARIABLE_POISSON(obj) GTS_OBJECT_CAST (obj,\
GfsVariablePoisson,\
gfs_variable_poisson_class ())
#define GFS_IS_VARIABLE_POISSON(obj) (gts_object_is_from_class (obj,\
gfs_variable_poisson_class ()))
GfsVariableClass * gfs_variable_poisson_class (void);
/* GfsVariableLaplacian: Header */
#define GFS_IS_VARIABLE_LAPLACIAN(obj) (gts_object_is_from_class (obj,\
gfs_variable_laplacian_class ()))
GfsVariableClass * gfs_variable_laplacian_class (void);
/* GfsHydrostaticPressure: Header */
typedef struct _GfsHydrostaticPressure GfsHydrostaticPressure;
/** \instance{GfsHydrostaticPressure} */
struct _GfsHydrostaticPressure {
/*< private >*/
GfsVariable parent;
FttComponent c;
};
#define GFS_HYDROSTATIC_PRESSURE(obj) GTS_OBJECT_CAST (obj,\
GfsHydrostaticPressure,\
gfs_hydrostatic_pressure_class ())
#define GFS_IS_HYDROSTATIC_PRESSURE(obj) (gts_object_is_from_class (obj,\
gfs_hydrostatic_pressure_class ()))
GfsVariableClass * gfs_hydrostatic_pressure_class (void);
void gfs_hydrostatic_pressure_update (GfsHydrostaticPressure * p,
GfsFunction * alpha);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __VARIABLE_H__ */
|