This file is indexed.

/usr/include/dune/geometry/mockgeometry.hh is in libdune-geometry-dev 2.2.1-2ubuntu2.

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
// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=8 sw=2 sts=2:

#ifndef DUNE_GEOMETRY_MOCKGEOMETRY_HH
#define DUNE_GEOMETRY_MOCKGEOMETRY_HH

#include <cstddef>

#include <dune/common/fmatrix.hh>
#include <dune/geometry/type.hh>
#include <dune/geometry/genericgeometry/geometry.hh>
#include <dune/geometry/genericgeometry/geometrytraits.hh>

namespace Dune {

  //! Grid-independent geometry
  /**
   * This geometry can be used when somewhing mostly like a Dune::Geometry is
   * required, but a full grid is a little bit too much.  It provides the full
   * interface of Dune::Geometry, except for the grid-specific member
   * constants \c dimension and \c dimensionworld.
   *
   * One further difference is that the jacobian methods return by value
   * instead of by reference.  The Jacobian depends on the local coordinate;
   * returning it by reference is asking for trouble.
   *
   * \tparam ctype    Field type for coordinates.
   * \tparam mydim    Dimension of the local coordinates.
   * \tparam coorddim Dimension of the global coordinates.
   */
  template<class ctype, std::size_t mydim, std::size_t coorddim>
  class MockGeometry :
    public GenericGeometry::BasicGeometry<
      mydim, GenericGeometry::DefaultGeometryTraits<ctype, coorddim, coorddim>
      >
  {
    typedef GenericGeometry::DefaultGeometryTraits<ctype, coorddim, coorddim>
      Traits;
    typedef GenericGeometry::BasicGeometry<mydim, Traits> Base;

    // Hide members of BasicGeometry that are not part of Dune::Geometry
    using typename Base::JacobianInverseTransposed;

  public:
    //! type of jacobian (also of jacobian inverse transposed)
    typedef FieldMatrix<ctype, coorddim, mydim> Jacobian;
    //! type of jacobian transposed
    typedef FieldMatrix<ctype, mydim, coorddim> JacobianTransposed;

    //! Default constructor.
    MockGeometry() {}
    //! Constructor using a GeometryType and a list of corner coordinates.
    template<class CoordVector>
    MockGeometry(const GeometryType &type, const CoordVector &coords) :
      Base(type, coords)
    { }
    //! obtain a geometry for a subentity
    template<int fatherdim>
    MockGeometry(const MockGeometry<ctype, fatherdim, coorddim> &father,
                 int i) :
      Base(static_cast<const GenericGeometry::BasicGeometry<
             fatherdim,
             GenericGeometry::DefaultGeometryTraits<ctype, coorddim, coorddim>
             > &>(father),
           i)
    { }

    //! Return the transposed of the Jacobian.
    JacobianTransposed jacobianTransposed
    (const typename Base::LocalCoordinate &local) const
    { return Base::jacobianTransposed(local); }
    //! Return inverse of transposed of Jacobian.
    Jacobian jacobianInverseTransposed
    (const typename Base::LocalCoordinate &local) const
    { return Base::jacobianInverseTransposed(local); }
  };

}  // namespace Dune

#endif // DUNE_GEOMETRY_MOCKGEOMETRY_HH