This file is indexed.

/usr/include/dolfin/mesh/MeshEntity.h is in libdolfin1.0-dev 1.0.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
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
// Copyright (C) 2006-2011 Anders Logg
//
// This file is part of DOLFIN.
//
// DOLFIN is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// DOLFIN 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 Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with DOLFIN. If not, see <http://www.gnu.org/licenses/>.
//
// Modified by Andre Massing, 2009.
//
// First added:  2006-05-11
// Last changed: 2011-11-15

#ifndef __MESH_ENTITY_H
#define __MESH_ENTITY_H

#include <iostream>

#ifdef HAS_CGAL
#include <CGAL/Bbox_3.h>
#endif

#include <dolfin/common/types.h>
#include <dolfin/intersection/PrimitiveIntersector.h>
#include "Point.h"

namespace dolfin
{

  class Mesh;
  class Point;

  /// A MeshEntity represents a mesh entity associated with
  /// a specific topological dimension of some _Mesh_.

  class MeshEntity
  {
  public:

    /// Default Constructor
    MeshEntity() : _mesh(0), _dim(0), _index(0) {}

    /// Constructor
    ///
    /// *Arguments*
    ///     mesh (_Mesh_)
    ///         The mesh.
    ///     dim (uint)
    ///         The topological dimension.
    ///     index (uint)
    ///         The index.
    MeshEntity(const Mesh& mesh, uint dim, uint index);

    /// Destructor
    virtual ~MeshEntity();

    /// Initialize mesh entity with given data
    ///
    /// *Arguments*
    ///     mesh (_Mesh_)
    ///         The mesh.
    ///     dim (uint)
    ///         The topological dimension.
    ///     index (uint)
    ///         The index.
    void init(const Mesh& mesh, uint dim, uint index);

    /// Comparision Operator
    ///
    /// *Arguments*
    ///     another (_MeshEntity_)
    ///         Another mesh entity
    ///
    /// *Returns*
    ///     bool
    ///         True if the two mesh entities are equal.
    bool operator==(const MeshEntity& another) const
    { return (_mesh == another._mesh && _dim == another._dim && _index == another._index); }

    /// Comparision Operator
    ///
    /// *Arguments*
    ///     another (MeshEntity)
    ///         Another mesh entity.
    ///
    /// *Returns*
    ///     bool
    ///         True if the two mesh entities are NOT equal.
    bool operator!=(const MeshEntity& another) const
    { return !operator==(another); }

    /// Return mesh associated with mesh entity
    ///
    /// *Returns*
    ///     _Mesh_
    ///         The mesh.
    const Mesh& mesh() const
    { return *_mesh; }

    /// Return topological dimension
    ///
    /// *Returns*
    ///     uint
    ///         The dimension.
    uint dim() const
    { return _dim; }

    /// Return index of mesh entity
    ///
    /// *Returns*
    ///     uint
    ///         The index.
    uint index() const
    { return _index; }

    /// Return number of incident mesh entities of given topological dimension
    ///
    /// *Arguments*
    ///     dim (uint)
    ///         The topological dimension.
    ///
    /// *Returns*
    ///     uint
    ///         The number of incident MeshEntity objects of given dimension.
    uint num_entities(uint dim) const;

    /// Return array of indices for incident mesh entitites of given
    /// topological dimension
    ///
    /// *Arguments*
    ///     dim (uint)
    ///         The topological dimension.
    ///
    /// *Returns*
    ///     uint
    ///         The index for incident mesh entities of given dimension.
    const uint* entities(uint dim) const;

    /// Return unique mesh ID
    ///
    /// *Returns*
    ///     uint
    ///         The unique mesh ID.
    uint mesh_id() const;

    /// Check if given entity is incident
    ///
    /// *Arguments*
    ///     entity (_MeshEntity_)
    ///         The entity.
    ///
    /// *Returns*
    ///     bool
    ///         True if the given entity is incident
    bool incident(const MeshEntity& entity) const;

    /// Check if given point intersects (using inexact but fast
    /// numerics)
    ///
    /// *Arguments*
    ///     point (_Point_)
    ///         The point.
    ///
    /// *Returns*
    ///     bool
    ///         True if the given point intersects.
    bool intersects(const Point& point) const
    { return PrimitiveIntersector::do_intersect(*this, point); }

    /// Check if given entity intersects (using inexact but fast
    /// numerics)
    ///
    /// *Arguments*
    ///     entity (_MeshEntity_)
    ///         The mesh entity.
    ///
    /// *Returns*
    ///     bool
    ///         True if the given entity intersects.
    bool intersects(const MeshEntity& entity) const
    { return PrimitiveIntersector::do_intersect(*this,entity); }

    /// Check if given point intersects (using exact numerics)
    ///
    /// *Arguments*
    ///     point (_Point_)
    ///         The point.
    ///
    /// *Returns*
    ///     bool
    ///         True if the given point intersects.
    bool intersects_exactly(const Point& point) const
    { return PrimitiveIntersector::do_intersect_exact(*this,point); }

    /// Check if given entity intersects (using exact numerics)
    ///
    /// *Arguments*
    ///     entity (_MeshEntity_)
    ///         The mesh entity.
    ///
    /// *Returns*
    ///     bool
    ///         True if the given entity intersects.
    bool intersects_exactly(const MeshEntity& entity) const
    { return PrimitiveIntersector::do_intersect_exact(*this,entity); }

    /// Compute local index of given incident entity (error if not
    /// found)
    ///
    /// *Arguments*
    ///     entity (_MeshEntity_)
    ///         The mesh entity.
    ///
    /// *Returns*
    ///     uint
    ///         The local index of given entity.
    uint index(const MeshEntity& entity) const;

    /// Compute midpoint of cell
    ///
    /// *Returns*
    ///     _Point_
    ///         The midpoint of the cell.
    Point midpoint() const;

    #ifdef HAS_CGAL
    /// Returns a 3D bounding box of the mesh entity. For lower
    /// dimension it may be a degenerated box.
    template <typename K>
    CGAL::Bbox_3 bbox() const;
    #endif

    // Note: Not a subclass of Variable for efficiency!
    /// Return informal string representation (pretty-print)
    ///
    /// *Arguments*
    ///     verbose (bool)
    ///         Flag to turn on additional output.
    ///
    /// *Returns*
    ///     std::string
    ///         An informal representation of the function space.
    std::string str(bool verbose) const;

  protected:

    // Friends
    friend class MeshEntityIterator;
    friend class SubsetIterator;

    // The mesh
    Mesh const * _mesh;

    // Topological dimension
    uint _dim;

    // Index of entity within topological dimension
    uint _index;

  };

}

#endif