This file is indexed.

/usr/include/ug/formats.h is in libdune-uggrid-dev 2.5.0-1.

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
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
/****************************************************************************/
/*                                                                          */
/* File:      formats.h                                                     */
/*                                                                          */
/* Purpose:   header file for format definition                             */
/*                                                                          */
/* Author:    Henrik Rentz-Reichert                                         */
/*            Institut fuer Computeranwendungen III                         */
/*            Universitaet Stuttgart                                        */
/*            Pfaffenwaldring 27                                            */
/*            70569 Stuttgart                                               */
/*            email: henrik@ica3.uni-stuttgart.de                           */
/*            fon: 0049-(0)711-685-7007                                     */
/*            fax: 0049-(0)711-685-7000                                     */
/*                                                                          */
/* History:   27.03.95 begin, ug version 3.0                                */
/*                                                                          */
/* Remarks:                                                                 */
/*                                                                          */
/****************************************************************************/



/****************************************************************************/
/*                                                                          */
/* auto include mechanism and other include files                           */
/*                                                                          */
/****************************************************************************/

#ifndef __FORMATS__
#define __FORMATS__

#include "gm.h"
#include "udm.h"

#include "namespace.h"

START_UGDIM_NAMESPACE

/****************************************************************************/
/*                                                                          */
/* defines in the following order                                           */
/*                                                                          */
/*        compile time constants defining static data size (i.e. arrays)    */
/*        other constants                                                   */
/*        macros                                                            */
/*                                                                          */
/****************************************************************************/

/** @name Limits for XDATA_DESC handling */
/*@{*/
#define MAX_SUB                         12

#define V_COMP_NAMES            (MAX_VEC_COMP*NVECTYPES)
#define M_COMP_NAMES            (2*V_COMP_NAMES*V_COMP_NAMES)
/*@}*/

/** @name Macros for SUBVEC */
/*@{*/
#define SUBV_NAME(s)            ((s)->Name)
#define SUBV_NCOMPS(s)          ((s)->Comp)
#define SUBV_NCOMP(s,tp)        ((s)->Comp[tp])
#define SUBV_COMP(s,tp,i)       ((s)->Comps[tp][i])
/*@}*/

/** @name Macros for SUBMAT */
/*@{*/
#define SUBM_NAME(s)            ((s)->Name)
#define SUBM_RCOMPS(s)          ((s)->RComp)
#define SUBM_CCOMPS(s)          ((s)->CComp)
#define SUBM_RCOMP(s,tp)        ((s)->RComp[tp])
#define SUBM_CCOMP(s,tp)        ((s)->CComp[tp])
#define SUBM_MCMPPTR(s)               ((s)->CmpsInType)
#define SUBM_MCMPPTR_OF_MTYPE(s,tp)   ((s)->CmpsInType[tp])
#define SUBM_MCMP_OF_MTYPE(s,tp,i)    ((s)->CmpsInType[tp][i])
#define SUBM_COMPS(s)       ((s)->Comps)
#define SUBM_COMP(s,i)      ((s)->Comps[i])
/*@}*/

/** @name Macros for VEC_TEMPLATE */
/*@{*/
#define VT_COMPS(vt)            ((vt)->Comp)
#define VT_COMP(vt,tp)          ((vt)->Comp[tp])
#define VT_COMPNAMES(vt)        ((vt)->CompNames)
#define VT_COMPNAME(vt,i)       ((vt)->CompNames[i])
#define VT_NID(vt)                      ((vt)->nId)
#define VT_IDENT_PTR(vt)        ((vt)->Ident)
#define VT_IDENT(vt,i)          ((vt)->Ident[i])
#define VT_SUB(vt,i)            ((vt)->SubVec[i])
#define VT_NSUB(vt)                     ((vt)->nsub)
/*@}*/

/** @name Macros for MAT_TEMPLATE */
/*@{*/
#define MT_RCOMPS(mt)           ((mt)->RComp)
#define MT_RCOMP(mt,tp)         ((mt)->RComp[tp])
#define MT_CCOMPS(mt)           ((mt)->CComp)
#define MT_CCOMP(mt,tp)         ((mt)->CComp[tp])
#define MT_COMPS(mt)        ((mt)->Comps)
#define MT_COMP(mt,i)       ((mt)->Comps[i])
#define MT_MCMPPTR(mt)      ((mt)->CmpsInType)
#define MT_MCMPPTR_OF_MTYPE(mt,mtp)   ((mt)->CmpsInType[mtp])
#define MT_MCMP_OF_MTYPE(mt,mtp,i)    ((mt)->CmpsInType[mtp][i])
#define MT_COMPNAMES(mt)        ((mt)->CompNames)
#define MT_COMPNAME(mt,i)       ((mt)->CompNames[i])
#define MT_SUB(mt,i)            ((mt)->SubMat[i])
#define MT_NSUB(mt)                     ((mt)->nsub)
#define MT_SM(mt,i)         ((mt)->sm[i])
#define MT_SMP(mt)          ((mt)->sm)
/*@}*/

/****************************************************************************/
/*                                                                          */
/* data structures exported by the corresponding source file                */
/*                                                                          */
/****************************************************************************/

/** \brief Sub vector of vector template (components form a subset of the template)     */
typedef struct
{

  char Name[NS_PREFIX NAMESIZE];          /*!<  prefix for sub vector name   */
  SHORT Comp[NVECTYPES];        /*!< number of comps per type             */
  SHORT Comps[NVECTYPES][MAX_VEC_COMP];         /*!< subsequent comps rel to tplt */

} SUBVEC;

/** \brief Vector template specifying number of comps per type and comp names */
typedef struct
{

  NS_PREFIX ENVITEM v;                      /*!< environment item */

  SHORT Comp[NVECTYPES];        /*!< number of comps per type             */
  char CompNames[V_COMP_NAMES];         /*!< comp names (one char each)   */

  SHORT nId;                    /*!< number of comps after ident  */
  SHORT Ident[V_COMP_NAMES];    /*!< identification table                 */

  SHORT nsub;                   /*!< number of sub vectors                */
  SUBVEC *SubVec[MAX_SUB];      /*!< pointers to sub vectors              */

} VEC_TEMPLATE;

/** \brief Sub matrix of matrix template (components form a subset of the template)     */
typedef struct
{

  char Name[NS_PREFIX NAMESIZE];          /*!< prefix for sub matrix name   */
  SHORT RComp[NMATTYPES];       /*!< number of row comps per type */
  SHORT CComp[NMATTYPES];       /*!< number of col comps per type */
  SHORT *CmpsInType[NMATTYPES];         /*!< pointers to SHORT vectors    */
  SHORT Comps[MAX_MAT_COMP_TOTAL];      /*!< subsequent comps rel to tplt     */

} SUBMAT;

/** \brief Matrix template specifying number of row/col comps per type and comp names */
typedef struct
{

  NS_PREFIX ENVITEM v;                      /*!< environment item */

  SHORT RComp[NMATTYPES];       /*!< number of comps per type             */
  SHORT CComp[NMATTYPES];       /*!< number of col comps per type */
  SHORT *CmpsInType[NMATTYPES];         /*!< pointers to SHORT vectors    */
  /* the components               */

  char CompNames[M_COMP_NAMES];         /*!< comp names (two chars each)  */

  SHORT nsub;                   /*!< number of sub matrices               */
  SUBMAT *SubMat[MAX_SUB];      /*!< pointers to sub matrices             */
  SHORT Comps[MAX_MAT_COMP_TOTAL];      /*!< comps starting from 0        */

} MAT_TEMPLATE;

/****************************************************************************/
/*                                                                          */
/* definition of exported global variables                                  */
/*                                                                          */
/****************************************************************************/

/****************************************************************************/
/*                                                                          */
/* function declarations                                                    */
/*                                                                          */
/****************************************************************************/

INT DisplayPrintingFormat (void);
INT SetPrintingFormatCmd (const MULTIGRID * mg, INT argc, char **argv);
INT ResetPrintingFormat (void);

VEC_TEMPLATE *GetVectorTemplate (const FORMAT * theFmt, const char *tmplt);
MAT_TEMPLATE *GetMatrixTemplate (const FORMAT * theFmt, const char *tmplt);

VECDATA_DESC *CreateVecDescOfTemplate (MULTIGRID * theMG,
                                       const char *name, const char *tmplt);
MATDATA_DESC *CreateMatDescOfTemplate (MULTIGRID * theMG,
                                       const char *name, const char *tmplt);

INT VDmatchesVT (const VECDATA_DESC * vd, const VEC_TEMPLATE * vt);
INT CompMDwithMT (const MATDATA_DESC * md, const MAT_TEMPLATE * mt);
INT MDmatchesVT (const MATDATA_DESC * md, const VEC_TEMPLATE * vt);
INT MDmatchesVTxVT (const MATDATA_DESC * md, const VEC_TEMPLATE * rvt,
                    const VEC_TEMPLATE * cvt);

INT VDsubDescFromVT (const VECDATA_DESC * vd, const VEC_TEMPLATE * vt,
                     INT sub, VECDATA_DESC ** subvd);
INT VDsubDescFromVS (const VECDATA_DESC * vd, const SUBVEC * subv,
                     VECDATA_DESC ** subvd);
INT MDsubDescFromVT (const MATDATA_DESC * md, const VEC_TEMPLATE * vt,
                     INT sub, MATDATA_DESC ** submd);
INT MDsubDescFromVTxVT (const MATDATA_DESC * md, const VEC_TEMPLATE * rvt,
                        INT rsub, const VEC_TEMPLATE * cvt, INT csub,
                        MATDATA_DESC ** submd);
INT MDsubDescFromMT (const MATDATA_DESC * md, const MAT_TEMPLATE * mt,
                     INT sub, MATDATA_DESC ** submd);

INT CreateFormatCmd (INT argc, char **argv);
INT RemoveFormatWithSubs (const char *name);

INT CreateVecDescCmd (MULTIGRID * theMG, INT argc, char **argv);
INT CreateMatDescCmd (MULTIGRID * theMG, INT argc, char **argv);
INT FreeMatDescCmd (MULTIGRID * theMG, INT argc, char **argv);

INT InitFormats (void);

END_UGDIM_NAMESPACE

#endif