dune-grid
2.2.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
dune
grid
common
gridenums.hh
Go to the documentation of this file.
1
// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2
// vi: set et ts=8 sw=2 sts=2:
3
#ifndef DUNE_GRIDENUMS_HH
4
#define DUNE_GRIDENUMS_HH
5
6
#include <iostream>
7
8
#include <dune/common/exceptions.hh>
9
10
namespace
Dune {
11
12
24
enum
PartitionType
{
25
InteriorEntity
=0,
26
BorderEntity
=1 ,
27
OverlapEntity
=2 ,
28
FrontEntity
=3 ,
29
GhostEntity
=4
30
};
31
40
inline
std::string
PartitionName
(
PartitionType
type)
41
{
42
switch
(type) {
43
case
InteriorEntity
:
44
return
"interior"
;
45
case
BorderEntity
:
46
return
"border"
;
47
case
OverlapEntity
:
48
return
"overlap"
;
49
case
FrontEntity
:
50
return
"front"
;
51
case
GhostEntity
:
52
return
"ghost"
;
53
default
:
54
DUNE_THROW(NotImplemented,
"name of unknown partition type requested"
);
55
}
56
}
57
59
66
inline
std::ostream &
operator<<
( std::ostream &out,
const
PartitionType
&type )
67
{
68
return
out <<
PartitionName
( type );
69
}
70
71
80
enum
InterfaceType
{
81
InteriorBorder_InteriorBorder_Interface
=0,
82
InteriorBorder_All_Interface
=1,
83
Overlap_OverlapFront_Interface
=2,
84
Overlap_All_Interface
=3,
85
All_All_Interface
=4
86
};
87
88
90
97
inline
std::ostream &
operator<<
( std::ostream &out,
const
InterfaceType
&type )
98
{
99
switch
( type )
100
{
101
case
InteriorBorder_InteriorBorder_Interface
:
102
return
out <<
"interior-border / interior-border interface"
;
103
104
case
InteriorBorder_All_Interface
:
105
return
out <<
"interior-border / all interface"
;
106
107
case
Overlap_OverlapFront_Interface
:
108
return
out <<
"overlap / overlap-front interface"
;
109
110
case
Overlap_All_Interface
:
111
return
out <<
"overlap / all interface"
;
112
113
case
All_All_Interface
:
114
return
out <<
"all / all interface"
;
115
116
default
:
117
return
out <<
"unknown interface"
;
118
}
119
}
120
121
130
enum
PartitionIteratorType
{
131
Interior_Partition
=0,
132
InteriorBorder_Partition
=1,
133
Overlap_Partition
=2,
134
OverlapFront_Partition
=3,
135
All_Partition
=4,
136
Ghost_Partition
=5
137
};
138
139
141
148
inline
std::ostream &
operator<<
( std::ostream &out,
const
PartitionIteratorType
&type )
149
{
150
static
std::string name[ 6 ] = {
"interior partition"
,
"interior-border partition"
,
"overlap partition"
,
151
"overlap-front partition"
,
"all partition"
,
"ghost partition"
};
152
return
out << name[ type ];
153
}
154
155
164
enum
CommunicationDirection
{
165
ForwardCommunication
,
166
BackwardCommunication
167
};
168
169
}
170
#endif
Generated on Mon Jun 4 2012 12:01:11 for dune-grid by
1.8.1