opm-grid
Toggle main menu visibility
Loading...
Searching...
No Matches
entityseed.hh
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
11
namespace
Dune
12
{
13
14
template
<
int
codim,
class
Grd >
15
class
PolyhedralGridEntitySeed
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
32
explicit
PolyhedralGridEntitySeed (
const
Index& index )
33
: index_( index )
34
{}
35
36
PolyhedralGridEntitySeed ()
37
: index_( defaultIndex )
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
:
50
Index index_;
51
};
52
53
}
// namespace Dune
54
55
#endif
// #ifndef DUNE_POLYHEDRALGRID_ENTITYSEED_HH
Dune
The namespace Dune is the main namespace for all Dune code.
Definition
CartesianIndexMapper.hpp:10
opm
grid
polyhedralgrid
entityseed.hh
Generated by
1.17.0