This file is indexed.

/usr/include/dune/grid/alugrid/common/persistentcontainer.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
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
#ifndef DUNE_ALU_PERSISTENTCONTAINER_HH
#define DUNE_ALU_PERSISTENTCONTAINER_HH

#if HAVE_ALUGRID
#include <dune/grid/utility/persistentcontainer.hh>
#include <dune/grid/alugrid.hh>

namespace Dune
{
  // PersistentContainer for ALUGrid
  // -------------------------------

  template< int dim, int dimworld, class Data, class Allocator >
  class PersistentContainer< ALUConformGrid< dim, dimworld >, Data, Allocator >
  : public PersistentContainerVector< ALUConformGrid< dim, dimworld >, 
                                      typename ALUConformGrid< dim, dimworld >::HierarchicIndexSet,
                                      std::vector<Data,Allocator> >
  {
  public:
    typedef ALUConformGrid< dim, dimworld > GridType;
  private:
    typedef PersistentContainerVector< GridType, typename GridType::HierarchicIndexSet, std::vector<Data,Allocator> > BaseType;

  public:
    //! Constructor filling the container with values using the default constructor 
    //! Depending on the implementation this could be achieved without allocating memory
    PersistentContainer ( const GridType &grid, const int codim, const Allocator &allocator = Allocator() )
    : BaseType( grid, codim, grid.hierarchicIndexSet(), 1.1, allocator )
    {}
  };

  template< int dim, int dimworld, class Data, class Allocator >
  class PersistentContainer< ALUCubeGrid< dim, dimworld >, Data, Allocator >
  : public PersistentContainerVector< ALUCubeGrid< dim, dimworld >,
                                      typename ALUCubeGrid< dim, dimworld >::HierarchicIndexSet,
                                      std::vector<Data,Allocator> >
  {
  public:
    typedef ALUCubeGrid< dim, dimworld > GridType;
  private:
    typedef PersistentContainerVector< GridType, typename GridType::HierarchicIndexSet, std::vector<Data,Allocator> > BaseType;

  public:
    //! Constructor filling the container with values using the default constructor 
    //! Depending on the implementation this could be achieved without allocating memory
    PersistentContainer ( const GridType &grid, const int codim, const Allocator &allocator = Allocator() )
    : BaseType( grid, codim, grid.hierarchicIndexSet(), 1.1, allocator )
    {}
  };

  template< int dim, int dimworld, class Data, class Allocator >
  class PersistentContainer< ALUSimplexGrid< dim, dimworld >, Data, Allocator >
  : public PersistentContainerVector< ALUSimplexGrid< dim, dimworld >, 
                                      typename ALUSimplexGrid< dim, dimworld >::HierarchicIndexSet,
                                      std::vector<Data,Allocator> >
  {
  public:
    typedef ALUSimplexGrid< dim, dimworld > GridType;
  private:
    typedef PersistentContainerVector< GridType, typename GridType::HierarchicIndexSet, std::vector<Data,Allocator> > BaseType;

  public:
    //! Constructor filling the container with values using the default constructor 
    //! Depending on the implementation this could be achieved without allocating memory
    PersistentContainer ( const GridType &grid, const int codim, const Allocator &allocator = Allocator() )
    : BaseType( grid, codim, grid.hierarchicIndexSet(), 1.1, allocator )
    {}
  };

  template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm,
            class Data, class Allocator >
  class PersistentContainer< ALUGrid< dim, dimworld, eltype, refinementtype, Comm >, Data, Allocator >
  : public PersistentContainerVector< ALUGrid< dim, dimworld, eltype, refinementtype, Comm >, 
                                      typename ALUGrid< dim, dimworld, eltype, refinementtype, Comm >::HierarchicIndexSet,
                                      std::vector<Data,Allocator> >
  {
  public:
    typedef ALUGrid< dim, dimworld, eltype, refinementtype, Comm > GridType;
  private:
    typedef PersistentContainerVector< GridType, typename GridType::HierarchicIndexSet, std::vector<Data,Allocator> > BaseType;

  public:
    //! Constructor filling the container with values using the default constructor 
    //! Depending on the implementation this could be achieved without allocating memory
    PersistentContainer ( const GridType &grid, const int codim, const Allocator &allocator = Allocator() )
    : BaseType( grid, codim, grid.hierarchicIndexSet(), 1.1, allocator )
    {}
  };

  template< int dim, int dimworld, ALU2DSPACE ElementType elType>
  class ALU2dGrid;


  template< int dim, int dimworld, ALU2DSPACE ElementType elType, class Data, class Allocator >
  class PersistentContainer< ALU2dGrid< dim, dimworld, elType >, Data, Allocator >
  : public PersistentContainerVector< ALU2dGrid< dim, dimworld, elType >, 
                                      typename ALU2dGrid< dim, dimworld, elType >::HierarchicIndexSet,
                                      std::vector<Data,Allocator> >
  {
  public:
    typedef ALU2dGrid< dim, dimworld, elType >  GridType;
  private:
    typedef PersistentContainerVector< GridType, typename GridType::HierarchicIndexSet, std::vector<Data,Allocator> > BaseType;

  public:
    //! Constructor filling the container with values using the default constructor 
    //! Depending on the implementation this could be achieved without allocating memory
    PersistentContainer ( const GridType &grid, const int codim, const Allocator &allocator = Allocator() )
    : BaseType( grid, codim, grid.hierarchicIndexSet(), 1.1, allocator )
    {}
  };

  template< ALU3dGridElementType elType, class Comm, class Data, class Allocator >
  class PersistentContainer< ALU3dGrid< elType, Comm >, Data, Allocator >
  : public PersistentContainerVector< ALU3dGrid< elType, Comm >, 
                                      typename ALU3dGrid< elType, Comm >::HierarchicIndexSet,
                                      std::vector<Data,Allocator> >
  {
  public:
    typedef ALU3dGrid< elType, Comm >  GridType;
  private:
    typedef PersistentContainerVector< GridType, typename GridType::HierarchicIndexSet, std::vector<Data,Allocator> > BaseType;

  protected:
    using BaseType :: index_; 
    using BaseType :: data_; 

  public:
    //! Constructor filling the container with values using the default constructor 
    //! Depending on the implementation this could be achieved without allocating memory
    PersistentContainer ( const GridType &grid, const int codim, const Allocator &allocator = Allocator() )
    : BaseType( grid, codim, grid.hierarchicIndexSet(), 1.1, allocator )
    {}

    //! this method is needed for the level communication 
    //! of ALU3dGrid, see datahandle.hh 
    const Data& getData ( const size_t idx ) const 
    {
      assert( idx < data_.size() );
      return data_[ idx ];
    }
  };

} // end namespace Dune
#endif // ENABLE_ALU

#endif // end DUNE_ALU_PERSISTENTCONTAINER_HH