This file is indexed.

/usr/include/XdmfTopologyType.hpp is in libxdmf-dev 3.0+git20160803-4.

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
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
/*****************************************************************************/
/*                                    XDMF                                   */
/*                       eXtensible Data Model and Format                    */
/*                                                                           */
/*  Id : XdmfTopologyType.hpp                                                */
/*                                                                           */
/*  Author:                                                                  */
/*     Kenneth Leiter                                                        */
/*     kenneth.leiter@arl.army.mil                                           */
/*     US Army Research Laboratory                                           */
/*     Aberdeen Proving Ground, MD                                           */
/*                                                                           */
/*     Copyright @ 2011 US Army Research Laboratory                          */
/*     All Rights Reserved                                                   */
/*     See Copyright.txt for details                                         */
/*                                                                           */
/*     This software is distributed WITHOUT ANY WARRANTY; without            */
/*     even the implied warranty of MERCHANTABILITY or FITNESS               */
/*     FOR A PARTICULAR PURPOSE.  See the above copyright notice             */
/*     for more information.                                                 */
/*                                                                           */
/*****************************************************************************/

#ifndef XDMFTOPOLOGYTYPE_HPP_
#define XDMFTOPOLOGYTYPE_HPP_

// C Compatible Includes
#include "Xdmf.hpp"

#ifdef __cplusplus

// Includes
#include "XdmfItemProperty.hpp"
#include <map>
#include <vector>

/**
 * @brief Property describing the types of elements stored in an
 * XdmfTopology.
 *
 * XdmfTopologyType is a property used by XdmfTopology to specify the
 * element types stored. A specific XdmfTopologyType can be created by
 * calling one of the static methods in the class,
 * i.e. XdmfTopologyType::Tetrahedron().
 *
 * Example of use:
 *
 * C++
 *
 * @dontinclude ExampleXdmfTopologyType.cpp
 * @skipline //#getType
 * @until //#getType
 *
 * Python
 *
 * @dontinclude XdmfExampleTopologyType.py
 * @skipline #//getType
 * @until #//getType
 *
 * Xdmf supports the following topology types:
 *   NoTopologyType
 *   Polyvertex - Unconnected Points
 *   Polyline - Line Segments
 *   Polygon - N Edge Polygon
 *   Triangle - 3 Edge Polygon
 *   Quadrilateral - 4 Edge Polygon
 *   Tetrahedron - 4 Triangular Faces
 *   Wedge - 4 Triangular Faces, Quadrilateral Base
 *   Hexahedron - 6 Quadrilateral Faces
 *   Polyhedron - N Face Cell, where each Face is a M Edge Polygon
 *   Edge_3 - 3 Node Quadratic Line
 *   Triangle_6 - 6 Node Quadratic Triangle
 *   Quadrilateral_8 - 8 Node Quadratic Quadrilateral
 *   Quadrilateral_9 - 9 Node Bi-Quadratic Quadrilateral
 *   Tetrahedron_10 - 10 Node Quadratic Tetrahedron
 *   Pyramid_13 - 13 Node Quadratic Pyramid
 *   Wedge_15 - 15 Node Quadratic Wedge
 *   Wedge_18 - 18 Node Bi-Quadratic Wedge
 *   Hexahedron_20 - 20 Node Quadratic Hexahedron
 *   Hexahedron_24 - 24 Node Bi-Quadratic Hexahedron
 *   Hexahedron_27 - 27 Node Tri-Quadratic Hexahedron
 *   Hexahedron_64 - 64 Node Tri-Cubic Hexahedron
 *   Hexahedron_125 - 125 Node Tri-Quartic Hexahedron
 *   Hexahedron_216 - 216 Node Tri-Quintic Hexahedron
 *   Hexahedron_343 - 343 Node Tri-Hexic Hexahedron
 *   Hexahedron_512 - 512 Node Tri-Septic Hexahedron
 *   Hexahedron_729 - 729 Node Tri-Octic Hexahedron
 *   Hexahedron_1000 - 1000 Node Tri-Nonic Hexahedron
 *   Hexahedron_1331 - 1331 Node Tri-Decic Hexahedron
 *   Hexahedron_Spectral_64 - 64 Node Spectral Tri-Cubic Hexahedron
 *   Hexahedron_Spectral_125 - 125 Node Spectral Tri-Quartic Hexahedron
 *   Hexahedron_Spectral_216 - 216 Node Spectral Tri-Quintic Hexahedron
 *   Hexahedron_Spectral_343 - 343 Node Spectral Tri-Hexic Hexahedron
 *   Hexahedron_Spectral_512 - 512 Node Spectral Tri-Septic Hexahedron
 *   Hexahedron_Spectral_729 - 729 Node Spectral Tri-Octic Hexahedron
 *   Hexahedron_Spectral_1000 - 1000 Node Spectral Tri-Nonic Hexahedron
 *   Hexahedron_Spectral_1331 - 1331 Node Spectral Tri-Decic Hexahedron
 *   Mixed - Mixture of Unstructured Topologies
 */
class XDMF_EXPORT XdmfTopologyType : public XdmfItemProperty {

public:

  virtual ~XdmfTopologyType();

  friend class XdmfTopology;

  enum CellType {
    NoCellType = 0,
    Linear = 1,
    Quadratic = 2,
    Cubic = 3,
    Quartic = 4,
    Quintic = 5,
    Sextic = 6,
    Septic = 7,
    Octic = 8,
    Nonic = 9,
    Decic = 10,
    Arbitrary = 100,
    Structured = 101
  };

  /**
   * Supported Xdmf Topology Types
   */
  static shared_ptr<const XdmfTopologyType> NoTopologyType();
  static shared_ptr<const XdmfTopologyType> Polyvertex();
  static shared_ptr<const XdmfTopologyType>
  Polyline(const unsigned int nodesPerElement);
  static shared_ptr<const XdmfTopologyType>
  Polygon(const unsigned int nodesPerElement);
  static shared_ptr<const XdmfTopologyType> Triangle();
  static shared_ptr<const XdmfTopologyType> Quadrilateral();
  static shared_ptr<const XdmfTopologyType> Tetrahedron();
  static shared_ptr<const XdmfTopologyType> Pyramid();
  static shared_ptr<const XdmfTopologyType> Wedge();
  static shared_ptr<const XdmfTopologyType> Hexahedron();
  static shared_ptr<const XdmfTopologyType> Polyhedron();
  static shared_ptr<const XdmfTopologyType> Edge_3();
  static shared_ptr<const XdmfTopologyType> Triangle_6();
  static shared_ptr<const XdmfTopologyType> Quadrilateral_8();
  static shared_ptr<const XdmfTopologyType> Quadrilateral_9();
  static shared_ptr<const XdmfTopologyType> Tetrahedron_10();
  static shared_ptr<const XdmfTopologyType> Pyramid_13();
  static shared_ptr<const XdmfTopologyType> Wedge_15();
  static shared_ptr<const XdmfTopologyType> Wedge_18();
  static shared_ptr<const XdmfTopologyType> Hexahedron_20();
  static shared_ptr<const XdmfTopologyType> Hexahedron_24();
  static shared_ptr<const XdmfTopologyType> Hexahedron_27();
  static shared_ptr<const XdmfTopologyType> Hexahedron_64();
  static shared_ptr<const XdmfTopologyType> Hexahedron_125();
  static shared_ptr<const XdmfTopologyType> Hexahedron_216();
  static shared_ptr<const XdmfTopologyType> Hexahedron_343();
  static shared_ptr<const XdmfTopologyType> Hexahedron_512();
  static shared_ptr<const XdmfTopologyType> Hexahedron_729();
  static shared_ptr<const XdmfTopologyType> Hexahedron_1000();
  static shared_ptr<const XdmfTopologyType> Hexahedron_1331();
  static shared_ptr<const XdmfTopologyType> Hexahedron_Spectral_64();
  static shared_ptr<const XdmfTopologyType> Hexahedron_Spectral_125();
  static shared_ptr<const XdmfTopologyType> Hexahedron_Spectral_216();
  static shared_ptr<const XdmfTopologyType> Hexahedron_Spectral_343();
  static shared_ptr<const XdmfTopologyType> Hexahedron_Spectral_512();
  static shared_ptr<const XdmfTopologyType> Hexahedron_Spectral_729();
  static shared_ptr<const XdmfTopologyType> Hexahedron_Spectral_1000();
  static shared_ptr<const XdmfTopologyType> Hexahedron_Spectral_1331();
  static shared_ptr<const XdmfTopologyType> Mixed();

  /**
   * Get a topology type from id.
   *
   * Example of use:
   *
   * C++
   *
   * @dontinclude ExampleXdmfTopologyType.cpp
   * @skipline //#initialization
   * @until //#initialization
   *
   * Python
   *
   * @dontinclude XdmfExampleTopologyType.py
   * @skipline #//initialization
   * @until #//initialization
   *
   * @param id of the topology type.
   *
   * @return	Topology type corresponding to id - if no topology type is found
   * 		an NULL pointer is returned.
   */
  static shared_ptr<const XdmfTopologyType> New(const unsigned int id);

  /**
   * Get the cell type associated with this topology type.
   *
   * Example of use:
   *
   * C++
   *
   * @dontinclude ExampleXdmfTopologyType.cpp
   * @skipline //#getCellType
   * @until //#getCellType
   *
   * Python
   *
   * @dontinclude XdmfExampleTopologyType.py
   * @skipline #//getCellType
   * @until #//getCellType
   *
   * @return 	A CellType containing the cell type.
   */
  CellType getCellType() const;

  /**
   * Get the number of edges per element associated with this topology type.
   *
   * Example of use:
   *
   * C++
   *
   * @dontinclude ExampleXdmfTopologyType.cpp
   * @skipline //#getEdgesPerElement
   * @until //#getEdgesPerElement
   *
   * Python
   *
   * @dontinclude XdmfExampleTopologyType.py
   * @skipline #//getEdgesPerElement
   * @until #//getEdgesPerElement
   *
   * @return	An unsigned int containing the number of edges per element.
   */
  virtual unsigned int getEdgesPerElement() const;

  /**
   * Get the number of faces per element associated with this topology type.
   *
   * Example of use:
   *
   * C++
   *
   * @dontinclude ExampleXdmfTopologyType.cpp
   * @skipline //#getFacesPerElement
   * @until //#getFacesPerElement
   *
   * Python
   *
   * @dontinclude XdmfExampleTopologyType.py
   * @skipline #//getFacesPerElement
   * @until #//getFacesPerElement
   *
   * @return	An unsigned int containing the number of faces per element.
   */
  virtual unsigned int getFacesPerElement() const;

  /**
   * Gets the type of the faces of the topology.
   *
   * Example of use:
   *
   * C++
   *
   * @dontinclude ExampleXdmfTopologyType.cpp
   * @skipline //#getFaceType
   * @until //#getFaceType
   *
   * Python
   *
   * @dontinclude XdmfExampleTopologyType.py
   * @skipline #//getFaceType
   * @until #//getFaceType
   *
   * @return	The face's topology type
   */
  shared_ptr<const XdmfTopologyType>  getFaceType() const;

  /**
   * Get the id of this cell type, necessary in order to create grids
   * containing mixed cells.
   *
   * Example of use:
   *
   * C++
   *
   * @dontinclude ExampleXdmfTopologyType.cpp
   * @skipline //#getID
   * @until //#getID
   *
   * Python
   *
   * @dontinclude XdmfExampleTopologyType.py
   * @skipline //#getID
   * @until //#getID
   *
   * @return	The ID of the topology type.
   */
  virtual unsigned int getID() const;

  /**
   * Get the name of this topology type.
   *
   * Example of use:
   *
   * C++
   *
   * @dontinclude ExampleXdmfTopologyType.cpp
   * @skipline //#getName
   * @until //#getName
   *
   * Python
   *
   * @dontinclude XdmfExampleTopologyType.py
   * @skipline #//getName
   * @until #//getName
   *
   * @return	The name of this topology type.
   */
  virtual std::string getName() const;

  /**
   * Get the number of nodes per element associated with this topology
   * type.
   *
   * Example of use:
   *
   * C++
   *
   * @dontinclude ExampleXdmfTopologyType.cpp
   * @skipline //#getNodesPerElement
   * @until //#getNodesPerElement
   *
   * Python
   *
   * @dontinclude XdmfExampleTopologyType.py
   * @skipline #//getNodesPerElement
   * @until #//getNodesPerElement
   *
   * @return	An unsigned int containing number of nodes per element.
   */
  virtual unsigned int getNodesPerElement() const;

  void
  getProperties(std::map<std::string, std::string> & collectedProperties) const;

protected:

  /**
   * Protected constructor for XdmfTopologyType. The constructor is
   * protected because all topology types supported by Xdmf should be
   * accessed through more specific static methods that construct
   * XdmfTopologyType - i.e. XdmfTopologyType::Tetrahedron()
   */
  XdmfTopologyType(const unsigned int nodesPerElement,
                   const unsigned int facesPerElement,
                   const std::vector<shared_ptr<const XdmfTopologyType> > & faces,
                   const unsigned int edgesPerElement,
                   const std::string & name,
                   const CellType cellType,
                   const unsigned int id);

  unsigned int calculateHypercubeNumElements(unsigned int numDims, unsigned int elementNumDims) const;

  static std::map<std::string, shared_ptr<const XdmfTopologyType>(*)()> mTopologyDefinitions;

  static void InitTypes();

private:

  XdmfTopologyType(const XdmfTopologyType &); // Not implemented.
  void operator=(const XdmfTopologyType &); // Not implemented.

  static shared_ptr<const XdmfTopologyType>
  New(const std::map<std::string, std::string> & itemProperties);

  const CellType mCellType;
  const unsigned int mEdgesPerElement;
  const unsigned int mFacesPerElement;
  std::vector<shared_ptr<const XdmfTopologyType> > mFaces;
  const unsigned int mID;
  const std::string mName;
  const unsigned int mNodesPerElement;

};

#endif

#ifdef __cplusplus
extern "C" {
#endif

// C wrappers go here

#ifndef XDMF_C_TOPOLOGY_TYPES
#define XDMF_C_TOPOLOGY_TYPES
#define XDMF_TOPOLOGY_TYPE_POLYVERTEX                    500
#define XDMF_TOPOLOGY_TYPE_POLYLINE                      501
#define XDMF_TOPOLOGY_TYPE_POLYGON                       502
#define XDMF_TOPOLOGY_TYPE_POLYHEDRON                    503
#define XDMF_TOPOLOGY_TYPE_TRIANGLE                      504
#define XDMF_TOPOLOGY_TYPE_QUADRILATERAL                 505
#define XDMF_TOPOLOGY_TYPE_TETRAHEDRON                   506
#define XDMF_TOPOLOGY_TYPE_PYRAMID                       507
#define XDMF_TOPOLOGY_TYPE_WEDGE                         508
#define XDMF_TOPOLOGY_TYPE_HEXAHEDRON                    509
#define XDMF_TOPOLOGY_TYPE_EDGE_3                        510
#define XDMF_TOPOLOGY_TYPE_TRIANGLE_6                    511
#define XDMF_TOPOLOGY_TYPE_QUADRILATERAL_8               512
#define XDMF_TOPOLOGY_TYPE_QUADRILATERAL_9               513
#define XDMF_TOPOLOGY_TYPE_TETRAHEDRON_10                514
#define XDMF_TOPOLOGY_TYPE_PYRAMID_13                    515
#define XDMF_TOPOLOGY_TYPE_WEDGE_15                      516
#define XDMF_TOPOLOGY_TYPE_WEDGE_18                      517
#define XDMF_TOPOLOGY_TYPE_HEXAHEDRON_20                 518
#define XDMF_TOPOLOGY_TYPE_HEXAHEDRON_24                 519
#define XDMF_TOPOLOGY_TYPE_HEXAHEDRON_27                 520
#define XDMF_TOPOLOGY_TYPE_HEXAHEDRON_64                 521
#define XDMF_TOPOLOGY_TYPE_HEXAHEDRON_125                522
#define XDMF_TOPOLOGY_TYPE_HEXAHEDRON_216                523
#define XDMF_TOPOLOGY_TYPE_HEXAHEDRON_343                524
#define XDMF_TOPOLOGY_TYPE_HEXAHEDRON_512                525
#define XDMF_TOPOLOGY_TYPE_HEXAHEDRON_729                526
#define XDMF_TOPOLOGY_TYPE_HEXAHEDRON_1000               527
#define XDMF_TOPOLOGY_TYPE_HEXAHEDRON_1331               528
#define XDMF_TOPOLOGY_TYPE_HEXAHEDRON_SPECTRAL_64        529
#define XDMF_TOPOLOGY_TYPE_HEXAHEDRON_SPECTRAL_125       530
#define XDMF_TOPOLOGY_TYPE_HEXAHEDRON_SPECTRAL_216       531
#define XDMF_TOPOLOGY_TYPE_HEXAHEDRON_SPECTRAL_343       532
#define XDMF_TOPOLOGY_TYPE_HEXAHEDRON_SPECTRAL_512       533
#define XDMF_TOPOLOGY_TYPE_HEXAHEDRON_SPECTRAL_729       534
#define XDMF_TOPOLOGY_TYPE_HEXAHEDRON_SPECTRAL_1000      535
#define XDMF_TOPOLOGY_TYPE_HEXAHEDRON_SPECTRAL_1331      536
#define XDMF_TOPOLOGY_TYPE_MIXED                         537
#endif

#define XDMF_TOPOLOGY_CELL_TYPE_NO_CELL_TYPE             0
#define XDMF_TOPOLOGY_CELL_TYPE_LINEAR                   1
#define XDMF_TOPOLOGY_CELL_TYPE_QUADRATIC                2
#define XDMF_TOPOLOGY_CELL_TYPE_CUBIC                    3
#define XDMF_TOPOLOGY_CELL_TYPE_QUARTIC                  4
#define XDMF_TOPOLOGY_CELL_TYPE_QUINTIC                  5
#define XDMF_TOPOLOGY_CELL_TYPE_SEXTIC                   6
#define XDMF_TOPOLOGY_CELL_TYPE_SEPTIC                   7
#define XDMF_TOPOLOGY_CELL_TYPE_OCTIC                    8
#define XDMF_TOPOLOGY_CELL_TYPE_NONIC                    9
#define XDMF_TOPOLOGY_CELL_TYPE_DECIC                    10
#define XDMF_TOPOLOGY_CELL_TYPE_ARBITRARY                100
#define XDMF_TOPOLOGY_CELL_TYPE_STRUCTURED               101

XDMF_EXPORT int XdmfTopologyTypePolyvertex();
XDMF_EXPORT int XdmfTopologyTypePolyline();
XDMF_EXPORT int XdmfTopologyTypePolygon();
XDMF_EXPORT int XdmfTopologyTypeTriangle();
XDMF_EXPORT int XdmfTopologyTypeQuadrilateral();
XDMF_EXPORT int XdmfTopologyTypeTetrahedron();
XDMF_EXPORT int XdmfTopologyTypePyramid();
XDMF_EXPORT int XdmfTopologyTypeWedge();
XDMF_EXPORT int XdmfTopologyTypeHexahedron();
XDMF_EXPORT int XdmfTopologyTypeEdge_3();
XDMF_EXPORT int XdmfTopologyTypeTriangle_6();
XDMF_EXPORT int XdmfTopologyTypeQuadrilateral_8();
XDMF_EXPORT int XdmfTopologyTypeQuadrilateral_9();
XDMF_EXPORT int XdmfTopologyTypeTetrahedron_10();
XDMF_EXPORT int XdmfTopologyTypePyramid_13();
XDMF_EXPORT int XdmfTopologyTypeWedge_15();
XDMF_EXPORT int XdmfTopologyTypeWedge_18();
XDMF_EXPORT int XdmfTopologyTypeHexahedron_20();
XDMF_EXPORT int XdmfTopologyTypeHexahedron_24();
XDMF_EXPORT int XdmfTopologyTypeHexahedron_27();
XDMF_EXPORT int XdmfTopologyTypeHexahedron_64();
XDMF_EXPORT int XdmfTopologyTypeHexahedron_125();
XDMF_EXPORT int XdmfTopologyTypeHexahedron_216();
XDMF_EXPORT int XdmfTopologyTypeHexahedron_343();
XDMF_EXPORT int XdmfTopologyTypeHexahedron_512();
XDMF_EXPORT int XdmfTopologyTypeHexahedron_729();
XDMF_EXPORT int XdmfTopologyTypeHexahedron_1000();
XDMF_EXPORT int XdmfTopologyTypeHexahedron_1331();
XDMF_EXPORT int XdmfTopologyTypeHexahedron_Spectral_64();
XDMF_EXPORT int XdmfTopologyTypeHexahedron_Spectral_125();
XDMF_EXPORT int XdmfTopologyTypeHexahedron_Spectral_216();
XDMF_EXPORT int XdmfTopologyTypeHexahedron_Spectral_343();
XDMF_EXPORT int XdmfTopologyTypeHexahedron_Spectral_512();
XDMF_EXPORT int XdmfTopologyTypeHexahedron_Spectral_729();
XDMF_EXPORT int XdmfTopologyTypeHexahedron_Spectral_1000();
XDMF_EXPORT int XdmfTopologyTypeHexahedron_Spectral_1331();
XDMF_EXPORT int XdmfTopologyTypeMixed();


XDMF_EXPORT int XdmfTopologyTypeGetCellType(int type);

XDMF_EXPORT unsigned int XdmfTopologyTypeGetEdgesPerElement(int type, int * status);

XDMF_EXPORT unsigned int XdmfTopologyTypeGetFacesPerElement(int type, int * status);

XDMF_EXPORT int XdmfTopologyTypeGetFaceType(int type);

XDMF_EXPORT unsigned int XdmfTopologyTypeGetID(int type);

XDMF_EXPORT char * XdmfTopologyTypeGetName(int type);

XDMF_EXPORT unsigned int XdmfTopologyTypeGetNodesPerElement(int type);

#ifdef __cplusplus
}
#endif

#endif /* XDMFTOPOLOGYTYPE_HPP_ */