dune-mmesh 1.4.1-git
Loading...
Searching...
No Matches
grid/entityseed.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_MMESH_GRID_ENTITYSEED_HH
4#define DUNE_MMESH_GRID_ENTITYSEED_HH
5
11namespace Dune {
12
18template <int codim, class GridImp>
20 protected:
21 // Entity type of the hostgrid
22 typedef typename GridImp::template HostGridEntity<codim> HostGridEntity;
23
24 public:
25 enum { codimension = codim };
26
31
36
41 if (this != &seed) hostEntity_ = seed.hostEntity_;
42 return *this;
43 }
44
48 template <int cd = codim>
52
54 template <int cd = codim>
56 return hostEntity_.first != HostGridEntity().first;
57 }
58
62 const HostGridEntity& hostEntity() const { return hostEntity_; }
63
64 private:
66 HostGridEntity hostEntity_;
67};
68
69} // namespace Dune
70
71#endif
void seed(const Vertex &vertex)
The EntitySeed class provides the minimal information needed to restore an Entity using the grid....
Definition grid/entityseed.hh:19
GridImp::template HostGridEntity< codim > HostGridEntity
Definition grid/entityseed.hh:22
std::enable_if_t< cd !=2||GridImp::dimension !=3, bool > isValid() const
Check whether it is safe to create an Entity from this Seed.
Definition grid/entityseed.hh:49
MMeshEntitySeed & operator=(const MMeshEntitySeed< codim, GridImp > &seed)
Construct a seed from another seed.
Definition grid/entityseed.hh:40
@ codimension
Definition grid/entityseed.hh:25
MMeshEntitySeed()
Construct empty seed.
Definition grid/entityseed.hh:30
MMeshEntitySeed(const HostGridEntity &hostEntity)
Construct a seed from a host entity.
Definition grid/entityseed.hh:35
const HostGridEntity & hostEntity() const
Return host entity.
Definition grid/entityseed.hh:62
std::enable_if_t< cd==2 &&GridImp::dimension==3, bool > isValid() const
Special handling for codim 2 entities in 3d.
Definition grid/entityseed.hh:55