This file is indexed.

/usr/include/dune/grid/onedgrid/onedgridintersectioniterators.hh is in libdune-grid-dev 2.2.1-2.

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

/** \file
 * \brief The OneDGridLevelIntersectionIterator and OneDGridLeafIntersectionIterator classes
 */

#include <dune/grid/onedgrid/onedgridintersections.hh>

namespace Dune {

    /** \brief The iterator over level intersections */
template<class GridImp>
class OneDGridLevelIntersectionIterator
{
  enum { dim=GridImp::dimension };
  enum { dimworld=GridImp::dimensionworld };

    friend class OneDGridEntity<0,dim,GridImp>;

    //! Constructor for a given grid entity and a given neighbor
    OneDGridLevelIntersectionIterator(OneDEntityImp<1>* center, int nb) 
        : intersection_(OneDGridLevelIntersection<GridImp>(center,nb))
    {}

    /** \brief Constructor creating the 'one-after-last'-iterator */
    OneDGridLevelIntersectionIterator(OneDEntityImp<1>* center) 
        : intersection_(OneDGridLevelIntersection<GridImp>(center))
    {}

public:

    typedef Dune::Intersection<const GridImp, Dune::OneDGridLevelIntersection> Intersection;

  //! equality
  bool equals(const OneDGridLevelIntersectionIterator<GridImp>& other) const {
      return GridImp::getRealImplementation(intersection_).equals(GridImp::getRealImplementation(other.intersection_));
  }

    //! prefix increment
    void increment() {
        GridImp::getRealImplementation(intersection_).neighbor_++;
    }

    //! \brief dereferencing
    const Intersection & dereference() const
    {
        return intersection_;
    }

private:

    mutable MakeableInterfaceObject<Intersection> intersection_;
};


    /** \brief Iterator over OneDGrid leaf intersections */
template<class GridImp>
class OneDGridLeafIntersectionIterator
{
  enum { dim=GridImp::dimension };
  enum { dimworld=GridImp::dimensionworld };

    friend class OneDGridEntity<0,dim,GridImp>;

    //! Constructor for a given grid entity and a given neighbor
    OneDGridLeafIntersectionIterator(OneDEntityImp<1>* center, int nb) 
        : intersection_(OneDGridLeafIntersection<GridImp>(center,nb))
    {}

    /** \brief Constructor creating the 'one-after-last'-iterator */
    OneDGridLeafIntersectionIterator(OneDEntityImp<1>* center) 
        : intersection_(OneDGridLeafIntersection<GridImp>(center))
    {}

public:

    typedef Dune::Intersection<const GridImp, Dune::OneDGridLeafIntersection> Intersection;

    //! equality
    bool equals(const OneDGridLeafIntersectionIterator<GridImp>& other) const {
        return GridImp::getRealImplementation(intersection_).equals(GridImp::getRealImplementation(other.intersection_));
    }
    
    //! prefix increment
    void increment() {
        GridImp::getRealImplementation(intersection_).neighbor_++;
    }

    //! \brief dereferencing
    const Intersection & dereference() const
    {
        return intersection_;
    }

private:

    mutable MakeableInterfaceObject<Intersection> intersection_;

};

}  // namespace Dune

#endif