dune-grid 3.0-git
identitygridentityseed.hh
Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_IDENTITY_GRID_ENTITY_SEED_HH
4#define DUNE_IDENTITY_GRID_ENTITY_SEED_HH
5
12namespace Dune {
13
14
20 template<int codim, class GridImp>
22 {
23 protected:
24
25 // Entity type of the hostgrid
26 typedef typename GridImp::HostGridType::Traits::template Codim<codim>::Entity HostEntity;
27
28 // EntitySeed type of the hostgrid
29 typedef typename GridImp::HostGridType::Traits::template Codim<codim>::EntitySeed HostEntitySeed;
30
31 public:
32
33 enum {codimension = codim};
34
40
48 hostEntitySeed_(hostEntity.seed())
49 {}
50
55 {
56 return hostEntitySeed_;
57 }
58
62 bool isValid() const
63 {
64 return hostEntitySeed_.isValid();
65 }
66 private:
67
68 HostEntitySeed hostEntitySeed_;
69 };
70
71} // namespace Dune
72
73#endif // #define DUNE_IDENTITY_GRID_ENTITY_SEED_HH
Include standard header files.
Definition agrid.hh:60
The EntitySeed class provides the minimal information needed to restore an Entity using the grid.
Definition identitygridentityseed.hh:22
IdentityGridEntitySeed()
Construct an empty (i.e. isValid() == false) seed.
Definition identitygridentityseed.hh:38
bool isValid() const
Check whether it is safe to create an Entity from this Seed.
Definition identitygridentityseed.hh:62
@ codimension
Definition identitygridentityseed.hh:33
GridImp::HostGridType::Traits::template Codim< codim >::Entity HostEntity
Definition identitygridentityseed.hh:26
IdentityGridEntitySeed(const HostEntity &hostEntity)
Create EntitySeed from hostgrid Entity.
Definition identitygridentityseed.hh:47
const HostEntitySeed & hostEntitySeed() const
Get stored HostEntitySeed.
Definition identitygridentityseed.hh:54
GridImp::HostGridType::Traits::template Codim< codim >::EntitySeed HostEntitySeed
Definition identitygridentityseed.hh:29