DUNE PDELab (2.8)

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
39 {}
40
47 IdentityGridEntitySeed(const HostEntity& hostEntity) :
48 hostEntitySeed_(hostEntity.seed())
49 {}
50
54 const HostEntitySeed& hostEntitySeed() const
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
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
IdentityGridEntitySeed(const HostEntity &hostEntity)
Create EntitySeed from hostgrid Entity.
Definition: identitygridentityseed.hh:47
const HostEntitySeed & hostEntitySeed() const
Get stored HostEntitySeed.
Definition: identitygridentityseed.hh:54
Dune namespace.
Definition: alignedallocator.hh:11
Static tag representing a codimension.
Definition: dimension.hh:22
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 21, 23:30, 2024)