This file is indexed.

/usr/include/XdmfTopologyConverter.hpp is in libxdmf-dev 3.0+git20160803-3.

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
/*****************************************************************************/
/*                                    XDMF                                   */
/*                       eXtensible Data Model and Format                    */
/*                                                                           */
/*  Id : XdmfTopologyConverter.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 XDMFTOPOLOGYCONVERTER_HPP_
#define XDMFTOPOLOGYCONVERTER_HPP_

// C Compatible Includes
#include "XdmfUtils.hpp"
#include "XdmfUnstructuredGrid.hpp"
#include "XdmfHeavyDataWriter.hpp"

#ifdef __cplusplus

// Forward Declarations
//class XdmfHeavyDataWriter;
class XdmfTopologyType;
//class XdmfUnstructuredGrid;

// Includes
#include "XdmfSharedPtr.hpp"

/**
 * @brief Converts an unstructured grid to different topology types.
 *
 * Attributes and sets attached to the grid are adjusted to remain
 * valid for the new topology type.
 *
 * When converting from a lower order topology to a higher order
 * topology type (e.g. Hexahedron to Hexahedron_64) additional points
 * are added to the mesh, no additional elements are added. When
 * converting from a higher order topology to a lower order topology
 * type (e.h. Hexahedron_64 to Hexahedron) elements are tesselated to
 * form the new topology, no additional points are added.
 *
 * Currently supported conversions:
 *   Hexahedron to Hexahedron_27
 *   Hexahedron to Hexahedron_64
 *   Hexahedron to Hexahedron_125
 *   Hexahedron to Hexahedron_216
 *   Hexahedron to Hexahedron_343
 *   Hexahedron to Hexahedron_512
 *   Hexahedron to Hexahedron_729
 *   Hexahedron to Hexahedron_1000
 *   Hexahedron to Hexahedron_1331
 *   Hexahedron to Hexahedron_Spectral_64
 *   Hexahedron to Hexahedron_Spectral_125
 *   Hexahedron to Hexahedron_Spectral_216
 *   Hexahedron to Hexahedron_Spectral_343
 *   Hexahedron to Hexahedron_Spectral_512
 *   Hexahedron to Hexahedron_Spectral_729
 *   Hexahedron to Hexahedron_Spectral_1000
 *   Hexahedron to Hexahedron_Spectral_1331
 *   Hexahedron_64 to Hexahedron
 *   Hexahedron_125 to Hexahedron
 *   Hexahedron_216 to Hexahedron
 *   Hexahedron_343 to Hexahedron
 *   Hexahedron_512 to Hexahedron
 *   Hexahedron_729 to Hexahedron
 *   Hexahedron_1000 to Hexahedron
 *   Hexahedron_1331 to Hexahedron
 *   Hexahedron_Spectral_64 to Hexahedron
 *   Hexahedron_Spectral_125 to Hexahedron
 *   Hexahedron_Spectral_216 to Hexahedron
 *   Hexahedron_Spectral_343 to Hexahedron
 *   Hexahedron_Spectral_512 to Hexahedron
 *   Hexahedron_Spectral_729 to Hexahedron
 *   Hexahedron_Spectral_1000 to Hexahedron
 *   Hexahedron_Spectral_1331 to Hexahedron
 */
class XDMFUTILS_EXPORT XdmfTopologyConverter {

public:

  /**
   * Create a new XdmfTopologyConverter.
   *
   * @return constructed XdmfTopologyConverter.
   */
  static shared_ptr<XdmfTopologyConverter> New();

  virtual ~XdmfTopologyConverter();

  /**
   * Converts an unstructured grid to a different topology type
   *
   * @param gridToConvert the unstructured grid to convert to a different
   * topology
   * @param topologyType the topology type to convert to.
   * @param heavyDataWriter an heavy data writer to write the converted mesh
   * to. If no heavyDataWriter is specified, all mesh data will remain in
   * memory.
   *
   * @return the converted unstructured grid.
   */
  shared_ptr<XdmfUnstructuredGrid>
  convert(const shared_ptr<XdmfUnstructuredGrid> gridToConvert,
          const shared_ptr<const XdmfTopologyType> topologyType,
          const shared_ptr<XdmfHeavyDataWriter> heavyDataWriter = shared_ptr<XdmfHeavyDataWriter>()) const;

  /**
   * Gets all faces within the given topology. Removing duplicates.
   *
   * @param     convertedTopology       The topology to be deconstructed
   * @return                            A topology containing the faces from the deconstructed topology
   */
  shared_ptr<XdmfTopology>
  getExternalFaces(const shared_ptr<XdmfTopology> convertedTopology);

  XdmfTopologyConverter(const XdmfTopologyConverter &);

protected:

  XdmfTopologyConverter();

private:

  void insertInHash(std::vector<long> nodes,
                    std::vector<std::vector<std::vector<long> > > & hash,
                    unsigned int numCornerNodes);

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

};

#endif

#ifdef __cplusplus
extern "C" {
#endif

// C wrappers go here

struct XDMFTOPOLOGYCONVERTER; // Simply as a typedef to ensure correct typing
typedef struct XDMFTOPOLOGYCONVERTER XDMFTOPOLOGYCONVERTER;

XDMFUTILS_EXPORT XDMFTOPOLOGYCONVERTER * XdmfTopologyConverterNew();

XDMFUTILS_EXPORT XDMFUNSTRUCTUREDGRID * XdmfTopologyConverterConvert(XDMFTOPOLOGYCONVERTER * converter,
                                                                     XDMFUNSTRUCTUREDGRID * gridToConvert,
                                                                     int topologytype,
                                                                     XDMFHEAVYDATAWRITER * heavyDataWriter);

XDMFUTILS_EXPORT XDMFTOPOLOGY * XdmfTopologyConverterGetExternalFaces(XDMFTOPOLOGYCONVERTER * converter,
                                                                      XDMFTOPOLOGY * convertedTopology);

XDMFUTILS_EXPORT void XdmfTopologyConverterFree(XDMFTOPOLOGYCONVERTER * converter);

#ifdef __cplusplus
}
#endif

#endif /* XDMFTOPOLOGYCONVERTER_HPP_ */