dune-foamgrid  2.8-git
foamgridentitypointer.hh
Go to the documentation of this file.
1 #ifndef DUNE_FOAMGRID_ENTITY_POINTER_HH
2 #define DUNE_FOAMGRID_ENTITY_POINTER_HH
3 #warning "This header is deprecated and will be removed after release 2.7"
4 
9 #include <list>
10 #include <dune/common/deprecated.hh>
12 
13 namespace Dune {
14 
15 
18 template<int codim, class GridImp>
19 class DUNE_DEPRECATED_MSG("FoamGridEntityPointer is deprecated and will be removed after release 2.7") FoamGridEntityPointer
20 {
21  private:
22 
23  enum { dimgrid = GridImp::dimension };
24  enum { dimworld = GridImp::dimensionworld };
25 
26  typedef typename GridImp::ctype ctype;
27 
28  public:
29 
33 
35  enum { codimension = codim };
36 
37  typedef typename GridImp::template Codim<codim>::Entity Entity;
38 
40  : virtualEntity_(FoamGridEntity<codim, dimgrid, GridImp>())
41  {}
42 
45  : virtualEntity_(entity)
46  {}
47 
49  : virtualEntity_(FoamGridEntity<codim, dimgrid, GridImp>())
50  {
51  virtualEntity_.impl().setToTarget(&*it);
52  }
53 
55  : virtualEntity_(FoamGridEntity<codim, dimgrid, GridImp>())
56  {
57  virtualEntity_.impl().setToTarget(it);
58  }
59 
61  bool equals(const FoamGridEntityPointer<codim,GridImp>& other) const {
62  return virtualEntity_ == other.virtualEntity_;
63  }
64 
66  const Entity& dereference() const {
67  return virtualEntity_;
68  }
69 
71  int level () const {
72  return virtualEntity_.level();
73  }
74 
75 protected:
78 };
79 
80 
81 } // end namespace Dune
82 
83 #endif
The FoamGridEntity class.
Definition: dgffoam.cc:6
The implementation of entities in a FoamGrid.
Definition: foamgridentity.hh:54
Definition: foamgridentitypointer.hh:20
GridImp::template Codim< codim >::Entity Entity
Definition: foamgridentitypointer.hh:37
FoamGridEntityPointer(const FoamGridEntityImp< dimgrid-codim, dimgrid, dimworld, ctype > *it)
Definition: foamgridentitypointer.hh:54
FoamGridEntityPointer EntityPointerImp
Definition: foamgridentitypointer.hh:32
FoamGridEntityPointer(const FoamGridEntity< codim, dimgrid, GridImp > &entity)
Constructor from a FoamGrid entity.
Definition: foamgridentitypointer.hh:44
FoamGridEntityPointer(const typename std::list< FoamGridEntityImp< dimgrid-codim, dimgrid, dimworld, ctype > >::const_iterator &it)
Definition: foamgridentitypointer.hh:48
bool equals(const FoamGridEntityPointer< codim, GridImp > &other) const
equality
Definition: foamgridentitypointer.hh:61
int level() const
ask for level of entity
Definition: foamgridentitypointer.hh:71
FoamGridEntityPointer()
Definition: foamgridentitypointer.hh:39
const Entity & dereference() const
dereferencing
Definition: foamgridentitypointer.hh:66
Entity virtualEntity_
virtual entity
Definition: foamgridentitypointer.hh:77