Dune Core Modules (2.3.1)

gridenums.hh
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_GRIDENUMS_HH
4#define DUNE_GRIDENUMS_HH
5
6#include <iostream>
7
9
10namespace Dune {
11
12
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
86 };
87
88
90
97 inline std::ostream &operator<< ( std::ostream &out, const InterfaceType &type )
98 {
99 switch( type )
100 {
102 return out << "interior-border / interior-border interface";
103
105 return out << "interior-border / all interface";
106
108 return out << "overlap / overlap-front interface";
109
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
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
167 };
168
169}
170#endif
Default exception for dummy implementations.
Definition: exceptions.hh:289
A few common exception classes.
std::ostream & operator<<(std::ostream &s, const array< T, N > &e)
Output operator for array.
Definition: array.hh:159
#define DUNE_THROW(E, m)
Definition: exceptions.hh:244
Dune namespace.
Definition: alignment.hh:14
std::string PartitionName(PartitionType type)
Provide names for the partition types.
Definition: gridenums.hh:40
PartitionIteratorType
Parameter to be used for the parallel level- and leaf iterators.
Definition: gridenums.hh:130
@ All_Partition
all entities
Definition: gridenums.hh:135
@ OverlapFront_Partition
interior, border, overlap and front entities
Definition: gridenums.hh:134
@ Interior_Partition
only interior entities
Definition: gridenums.hh:131
@ InteriorBorder_Partition
interior and border entities
Definition: gridenums.hh:132
@ Overlap_Partition
interior, border, and overlap entities
Definition: gridenums.hh:133
@ Ghost_Partition
only ghost entities
Definition: gridenums.hh:136
PartitionType
Attributes used in the generic overlap model.
Definition: gridenums.hh:24
@ FrontEntity
on boundary between overlap and ghost
Definition: gridenums.hh:28
@ InteriorEntity
all interior entities
Definition: gridenums.hh:25
@ GhostEntity
ghost entities
Definition: gridenums.hh:29
@ BorderEntity
on boundary between interior and overlap
Definition: gridenums.hh:26
@ OverlapEntity
all entities lying in the overlap zone
Definition: gridenums.hh:27
CommunicationDirection
Define a type for communication direction parameter.
Definition: gridenums.hh:164
@ BackwardCommunication
reverse communication direction
Definition: gridenums.hh:166
@ ForwardCommunication
communicate as given in InterfaceType
Definition: gridenums.hh:165
InterfaceType
Parameter to be used for the communication functions.
Definition: gridenums.hh:80
@ InteriorBorder_All_Interface
send interior and border, receive all entities
Definition: gridenums.hh:82
@ All_All_Interface
send all and receive all entities
Definition: gridenums.hh:85
@ Overlap_All_Interface
send overlap, receive all entities
Definition: gridenums.hh:84
@ Overlap_OverlapFront_Interface
send overlap, receive overlap and front entities
Definition: gridenums.hh:83
@ InteriorBorder_InteriorBorder_Interface
send/receive interior and border entities
Definition: gridenums.hh:81
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)