dune-foamgrid  2.8-git
foamgridentityseed.hh
Go to the documentation of this file.
1 #ifndef DUNE_FOAMGRID_ENTITY_SEED_HH
2 #define DUNE_FOAMGRID_ENTITY_SEED_HH
3 
9 #include "foamgridentity.hh"
10 
11 namespace Dune {
12 
13 
19 template<int codim, class GridImp>
21 {
22  enum { dimgrid = GridImp::dimension };
23  enum { dimworld = GridImp::dimensionworld };
24  enum { mydim = dimgrid-codim };
25 
26  // Entity type of the underlying implementation
28 
29 public:
30 
31  enum {codimension = codim};
32 
35  : target_(nullptr)
36  {}
37 
40  : target_(entity.target_)
41  {}
42 
44  : target_(target)
45  {}
46 
48  bool isValid() const
49  {
50  return target_ != nullptr;
51  }
52 
54  const EntityImplType* target() const
55  {
56  return target_;
57  }
58 
59 private:
60  const EntityImplType* target_;
61 };
62 
63 } // namespace Dune
64 
65 
66 #endif
The FoamGridEntity class.
Definition: dgffoam.cc:6
The implementation of entities in a FoamGrid.
Definition: foamgridentity.hh:54
The EntitySeed class provides the minmal information needed to restore an Entity using the grid.
Definition: foamgridentityseed.hh:21
bool isValid() const
check whether it is safe to create an Entity from this Seed
Definition: foamgridentityseed.hh:48
FoamGridEntitySeed(const FoamGridEntity< codim, dimgrid, GridImp > *target)
Definition: foamgridentityseed.hh:43
FoamGridEntitySeed()
default construct an invalid entity seed
Definition: foamgridentityseed.hh:34
const EntityImplType * target() const
Access to the underlying FoamGrid data structure.
Definition: foamgridentityseed.hh:54
@ codimension
Definition: foamgridentityseed.hh:31
FoamGridEntitySeed(const FoamGridEntity< codim, dimgrid, GridImp > &entity)
construct entity seed from entity
Definition: foamgridentityseed.hh:39
The actual entity implementation.
Definition: foamgridvertex.hh:47