dune-grid-dev-howto  2.2.1
identitygridentityseed.hh
Go to the documentation of this file.
1 #ifndef DUNE_IDENTITY_GRID_ENTITY_SEED_HH
2 #define DUNE_IDENTITY_GRID_ENTITY_SEED_HH
3 
10 namespace Dune {
11 
12 
18 template<int codim, class GridImp>
20 {
21  protected:
22 
23  // Entity type of the hostgrid
24  typedef typename GridImp::HostGridType::Traits::template Codim<codim>::Entity HostEntity;
25 
26  // EntitySeed type of the hostgrid
27  typedef typename GridImp::HostGridType::Traits::template Codim<codim>::EntitySeed HostEntitySeed;
28 
29  public:
30 
31  enum {codimension = codim};
32 
39  IdentityGridEntitySeed(const HostEntity& hostEntity) :
40  hostEntitySeed_(hostEntity.seed())
41  {}
42 
47  {
48  return hostEntitySeed_;
49  }
50 
51  private:
52 
53  HostEntitySeed hostEntitySeed_;
54 };
55 
56 } // namespace Dune
57 
58 #endif // #define DUNE_IDENTITY_GRID_ENTITY_SEED_HH