entityseed.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=2 sw=2 sts=2:
3#ifndef DUNE_POLYHEDRALGRID_ENTITYSEED_HH
4#define DUNE_POLYHEDRALGRID_ENTITYSEED_HH
5
6#include <dune/common/version.hh>
7#include <dune/common/typetraits.hh>
8
9#include <dune/grid/common/entityseed.hh>
10
11namespace Dune
12{
13
14 template< int codim, class Grd >
16 {
17 typedef typename std::remove_const< Grd >::type::Traits Traits;
18
19 public:
20 static const int codimension = codim;
21 static const int dimension = Traits::dimension;
22 static const int mydimension = dimension - codimension;
23 static const int dimensionworld = Traits::dimensionworld;
24
25
26 typedef typename Traits::Grid Grid;
27 typedef typename Traits::template Codim< codim >::Entity Entity;
28 typedef typename Traits :: Index Index ;
29
30 static const Index defaultIndex = -1;
31
33 : index_( index )
34 {}
35
38 {}
39
40 int index () const { return index_ ; }
41
42 // check that index is valid, which means >= 0
43 // boundary faces can be arbitrary number < 0
44 bool isValid() const { return index_ > defaultIndex; }
45
46 bool equals(const PolyhedralGridEntitySeed& other) const
47 { return index_ == other.index_; }
48
49 protected:
51 };
52
53} // namespace Dune
54
55#endif // #ifndef DUNE_POLYHEDRALGRID_ENTITYSEED_HH
Definition: entityseed.hh:16
Traits::Index Index
Definition: entityseed.hh:28
Index index_
Definition: entityseed.hh:50
static const int codimension
Definition: entityseed.hh:20
bool isValid() const
Definition: entityseed.hh:44
bool equals(const PolyhedralGridEntitySeed &other) const
Definition: entityseed.hh:46
static const int dimensionworld
Definition: entityseed.hh:23
PolyhedralGridEntitySeed(const Index &index)
Definition: entityseed.hh:32
static const int mydimension
Definition: entityseed.hh:22
Traits::Grid Grid
Definition: entityseed.hh:26
Traits::template Codim< codim >::Entity Entity
Definition: entityseed.hh:27
static const Index defaultIndex
Definition: entityseed.hh:30
PolyhedralGridEntitySeed()
Definition: entityseed.hh:36
int index() const
Definition: entityseed.hh:40
static const int dimension
Definition: entityseed.hh:21
The namespace Dune is the main namespace for all Dune code.
Definition: common/CartesianIndexMapper.hpp:10