This file is indexed.

/usr/share/netgen/libsrc/meshing/adfront2.hpp is in netgen-headers 4.9.13.dfsg-8build2.

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
#ifndef FILE_ADFRONT2
#define FILE_ADFRONT2

/**************************************************************************/
/* File:   adfront2.hpp                                                   */
/* Author: Joachim Schoeberl                                              */
/* Date:   01. Okt. 95                                                    */
/**************************************************************************/


/**

    Advancing front class for surfaces

*/
class AdFront2
{

  ///
  class FrontPoint2
  {
    /// coordinates
    Point<3> p;            
    /// global node index
    PointIndex globalindex;   
    /// number of front lines connected to point 
    int nlinetopoint;    
    /// distance to original boundary
    int frontnr;          

    bool onsurface;

  public:
    ///
    MultiPointGeomInfo * mgi;

    ///
    FrontPoint2 ()
    {
      globalindex = -1;
      nlinetopoint = 0;
      frontnr = INT_MAX-10;    // attention: overflow on calculating  INT_MAX + 1
      mgi = NULL;
      onsurface = true;
    }

    ///
    FrontPoint2 (const Point<3> & ap, PointIndex agi,
		 MultiPointGeomInfo * amgi, bool aonsurface = true);
    ///
    ~FrontPoint2 () { ; }

    ///
    const Point<3> & P () const { return p; }
    ///
    operator const Point<3> & () const { return p; }
    ///
    PointIndex GlobalIndex () const { return globalindex; }

    ///
    void AddLine () { nlinetopoint++; }
    ///
    void RemoveLine ()
    {
      nlinetopoint--;
      if (nlinetopoint == 0)
	nlinetopoint = -1;
    }

    ///
    bool Valid () const
    { return nlinetopoint >= 0; }

    ///
    bool OnSurface() const
    { return onsurface; }

    ///
    void DecFrontNr (int afrontnr)
    {
      if (frontnr > afrontnr) frontnr = afrontnr;
    }
    
    ///
    int FrontNr () const { return frontnr; }
  };

  
  ///
  class FrontLine
  {
  private:
    /// Point Indizes
    INDEX_2 l;            
    /// quality class 
    int lineclass;      
    /// geometry specific data
    PointGeomInfo geominfo[2];
  public:

    FrontLine ()
    {
      lineclass = 1;
    }

    ///
    FrontLine (const INDEX_2 & al)
    {
      l = al;
      lineclass = 1;
    }


    ///
    const INDEX_2 & L () const
    {
      return l;
    }

    ///
    int LineClass() const
    {
      return lineclass;
    }

    ///
    void IncrementClass ()
    {
      lineclass++;
    }
    ///
    void ResetClass ()
    {
      lineclass = 1;
    }

    ///
    bool Valid () const
    {
      return l.I1() != -1;
    }
    ///
    void Invalidate ()
    {
      l.I1() = -1;
      l.I2() = -1;
      lineclass = 1000;
    }

    void SetGeomInfo (const PointGeomInfo & gi1, const PointGeomInfo & gi2)
      {
	geominfo[0] = gi1;
	geominfo[1] = gi2;
      }

    const PointGeomInfo * GetGeomInfo () const
    { return geominfo; }
    
    const PointGeomInfo & GetGeomInfo (int endp) const
    { return geominfo[endp-1]; }

    friend class AdFront2;
  };



  ///
  Array<FrontPoint2> points;  /// front points
  Array<FrontLine> lines;     /// front lines

  Box3d boundingbox;
  Box3dTree linesearchtree;       /// search tree for lines
  Point3dTree pointsearchtree;    /// search tree for points
  Point3dTree cpointsearchtree;   /// search tree for cone points (not used ???)

  Array<int> delpointl;     /// list of deleted front points
  Array<int> dellinel;      /// list of deleted front lines

  int nfl;                  /// number of front lines;
  INDEX_2_HASHTABLE<int> * allflines; /// all front lines ever have been


  int minval;
  int starti;

public:
  ///
  //  AdFront2 ();
  AdFront2 (const Box3d & aboundingbox);
  ///
  ~AdFront2 ();

  ///
  // void GetPoints (Array<Point<3> > & apoints) const;
  ///
  void Print (ostream & ost) const;

  ///
  bool Empty () const
  {
    return nfl == 0;
  }
  ///
  int GetNFL () const { return nfl; }
  ///
  int SelectBaseLine (Point<3> & p1, Point<3> & p2, 
		      const PointGeomInfo *& geominfo1,
		      const PointGeomInfo *& geominfo2,
		      int & qualclass);

  ///
  int GetLocals (int baseline, 
		 Array<Point3d> & locpoints,
		 Array<MultiPointGeomInfo> & pgeominfo,
                 Array<INDEX_2> & loclines,   // local index
                 Array<int> & pindex,
                 Array<int> & lindex,
                 double xh);

  ///
  void DeleteLine (int li);
  ///
  int AddPoint (const Point<3> & p, PointIndex globind, 
                MultiPointGeomInfo * mgi = NULL,
                bool pointonsurface = true);
  ///
  int AddLine (int pi1, int pi2, 
               const PointGeomInfo & gi1, const PointGeomInfo & gi2);
  ///
  int ExistsLine (int gpi1, int gpi2);

  ///
  void IncrementClass (int li)
  {
    lines[li].IncrementClass();
  }

  ///
  void ResetClass (int li)
  {
    lines[li].ResetClass();
  }

  ///
  const PointGeomInfo & GetLineGeomInfo (int li, int lend) const
    { return lines[li].GetGeomInfo (lend); }
  ///

  PointIndex GetGlobalIndex (int pi) const
  {
    return points[pi].GlobalIndex();
  }
  ///
  void SetStartFront ();
  ///
  void PrintOpenSegments (ostream & ost) const;
};



#endif