DUNE PDELab (2.7)

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
34 };
35
44 inline std::string PartitionName(PartitionType type)
45 {
46 switch(type) {
47 case InteriorEntity :
48 return "interior";
49 case BorderEntity :
50 return "border";
51 case OverlapEntity :
52 return "overlap";
53 case FrontEntity :
54 return "front";
55 case GhostEntity :
56 return "ghost";
57 default :
58 DUNE_THROW(NotImplemented, "name of unknown partition type requested");
59 }
60 }
61
63
70 inline std::ostream &operator<< ( std::ostream &out, const PartitionType &type )
71 {
72 return out << PartitionName( type );
73 }
74
75
90 };
91
92
94
101 inline std::ostream &operator<< ( std::ostream &out, const InterfaceType &type )
102 {
103 switch( type )
104 {
106 return out << "interior-border / interior-border interface";
107
109 return out << "interior-border / all interface";
110
112 return out << "overlap / overlap-front interface";
113
115 return out << "overlap / all interface";
116
117 case All_All_Interface :
118 return out << "all / all interface";
119
120 default :
121 return out << "unknown interface";
122 }
123 }
124
125
141 };
142
143
145
152 inline std::ostream &operator<< ( std::ostream &out, const PartitionIteratorType &type )
153 {
154 static std::string name[ 6 ] = { "interior partition", "interior-border partition", "overlap partition",
155 "overlap-front partition", "all partition", "ghost partition" };
156 return out << name[ type ];
157 }
158
159
171 };
172
178}
179#endif
Default exception for dummy implementations.
Definition: exceptions.hh:261
A few common exception classes.
#define DUNE_THROW(E, m)
Definition: exceptions.hh:216
std::string PartitionName(PartitionType type)
Provide names for the partition types.
Definition: gridenums.hh:44
PartitionIteratorType
Parameter to be used for the parallel level- and leaf iterators.
Definition: gridenums.hh:134
PartitionType
Attributes used in the generic overlap model.
Definition: gridenums.hh:28
CommunicationDirection
Define a type for communication direction parameter.
Definition: gridenums.hh:168
InterfaceType
Parameter to be used for the communication functions.
Definition: gridenums.hh:84
@ All_Partition
all entities
Definition: gridenums.hh:139
@ OverlapFront_Partition
interior, border, overlap and front entities
Definition: gridenums.hh:138
@ Interior_Partition
only interior entities
Definition: gridenums.hh:135
@ InteriorBorder_Partition
interior and border entities
Definition: gridenums.hh:136
@ Overlap_Partition
interior, border, and overlap entities
Definition: gridenums.hh:137
@ Ghost_Partition
only ghost entities
Definition: gridenums.hh:140
@ FrontEntity
on boundary between overlap and ghost
Definition: gridenums.hh:32
@ InteriorEntity
all interior entities
Definition: gridenums.hh:29
@ GhostEntity
ghost entities
Definition: gridenums.hh:33
@ BorderEntity
on boundary between interior and overlap
Definition: gridenums.hh:30
@ OverlapEntity
all entities lying in the overlap zone
Definition: gridenums.hh:31
@ BackwardCommunication
reverse communication direction
Definition: gridenums.hh:170
@ ForwardCommunication
communicate as given in InterfaceType
Definition: gridenums.hh:169
@ InteriorBorder_All_Interface
send interior and border, receive all entities
Definition: gridenums.hh:86
@ All_All_Interface
send all and receive all entities
Definition: gridenums.hh:89
@ Overlap_All_Interface
send overlap, receive all entities
Definition: gridenums.hh:88
@ Overlap_OverlapFront_Interface
send overlap, receive overlap and front entities
Definition: gridenums.hh:87
@ InteriorBorder_InteriorBorder_Interface
send/receive interior and border entities
Definition: gridenums.hh:85
Dune namespace.
Definition: alignedallocator.hh:14
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)