This file is indexed.

/usr/include/dune/grid-glue/common/simplexgeometry.hh is in libdune-grid-glue-dev 2.4.0-1build1.

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
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
/**
 * @file
 * @author Christian Engwer
 * @author Oliver Sander
 * @author Gerrit Buse
 * @brief contains customized geometry implementations for simplices
 * \deprecated For use with Dune 2.2 and older.
 */

#ifndef DUNE_GRIDGLUE_COMMON_SIMPLEXGEOMETRY_HH
#define DUNE_GRIDGLUE_COMMON_SIMPLEXGEOMETRY_HH

#include <memory>

#include <dune/geometry/genericgeometry/geometry.hh>
#include <dune/geometry/genericgeometry/geometrytraits.hh>
#include <dune/geometry/genericgeometry/cornermapping.hh>
#include <dune/geometry/genericgeometry/topologytypes.hh>

namespace Dune {
  namespace GridGlue {

    /**
     * @brief Geometry traits for simplices passed to GenericGeometry::BasicGeometry
     *
     * This geometry traits class configures BasicGeometry to use only affine mappings
     * for simplicial (i.e. especially non-hybrid) grid structures.
     */
    template<class ctype, int dim, int dimworld>
    struct SimplexGeometryTraits
      : public Dune::GenericGeometry::DefaultGeometryTraits<ctype, dim, dimworld, true>
    {
      typedef typename Dune::GenericGeometry::DefaultGeometryTraits<ctype, dim, dimworld, true> Base;

      // This traits class represents a single type only ...
      static const bool hybrid = false;
      // ... and this type is 'simplex'.
      static const unsigned int topologyId = Dune::GenericGeometry::SimplexTopology< dim >::type::id;

      template<class Topology>
      struct Mapping
      {
        typedef Dune::GenericGeometry::CoordStorage<typename Base::CoordTraits, Topology, Base::dimWorld>                        CornerStorage;
        typedef Dune::GenericGeometry::CornerMapping<typename Base::CoordTraits, Topology, Base::dimWorld, CornerStorage, true>  type;
      };

    };


    /**
     * @class SimplexGeometry
     * @brief This class is derived from BasicGeometry using tuned geometry traits.
     *
     * The used geometry traits allow for a more efficient compilation of the default
     * implementation of CornerMapping. Using only affine mappings it is specialized
     * for the case of exclusively simplicial geometries.
     */
    template<class ctype, int mydim, int coorddim>
    class SimplexGeometry : public Dune::GenericGeometry::BasicGeometry<mydim, SimplexGeometryTraits<ctype, mydim, coorddim> >
    {
      typedef Dune::GenericGeometry::BasicGeometry<mydim, SimplexGeometryTraits<ctype, mydim, coorddim> > Base;

      enum { simplex_corners = mydim+1 };

    public:

      typedef typename Base::Mapping Mapping;

      template< class CoordVector>
      SimplexGeometry(const Dune::GeometryType &type, const CoordVector &coords) : Base(type, coords)
      {}


      SimplexGeometry()
      {}

      /**
       * @brief Setup method with a geometry type and a set of corners
       * @param type the geometry type of this subface, i.e. most likely a simplex in 1D or 2D
       * @param coordinates The corner coordinates in DUNE numbering
       */
      void setup(const Dune::GeometryType& type, const std::array<Dune::FieldVector<ctype, coorddim>, simplex_corners>& coordinates)
      {
        // Yes, a strange way, but the only way, as BasicGeometry doesn't have a setup method
        Base::operator=(Base(type, coordinates));
      }

    };

  } // end namespace GridGlue
} // end namespace Dune

#endif // DUNE_GRIDGLUE_COMMON_SIMPLEXGEOMETRY_HH