dune-grid 3.0-git
entitycommhelper.hh
Go to the documentation of this file.
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_ENTITYCOMMHELPER_HH
4#define DUNE_ENTITYCOMMHELPER_HH
5
7#include <dune/common/unused.hh>
8
9namespace Dune
10{
11
12 template< InterfaceType iftype >
14
15
16 template<>
18 {
19 static bool send ( const PartitionType p )
20 {
21 //return (p == InteriorEntity) || (p == BorderEntity);
22 return (p == BorderEntity);
23 }
24
25 static bool receive ( const PartitionType p )
26 {
27 //return (p == InteriorEntity) || (p == BorderEntity);
28 return (p == BorderEntity);
29 }
30 };
31
32
33 template<>
35 {
36 static bool send ( const PartitionType p )
37 {
38 return (p == InteriorEntity) || (p == BorderEntity);
39 }
40
41 static bool receive ( const PartitionType p )
42 {
43 //return true;
44 return (p != InteriorEntity);
45 }
46 };
47
48
49 template<>
51 {
52 static bool send ( const PartitionType p )
53 {
54 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity);
55 return (p != FrontEntity) && (p != GhostEntity);
56 }
57
58 static bool receive ( const PartitionType p )
59 {
60 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity) || (p == FrontEntity);
61 return (p != GhostEntity);
62 }
63 };
64
65
66 template<>
68 {
69 static bool send ( const PartitionType p )
70 {
71 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity);
72 return (p != FrontEntity) && (p != GhostEntity);
73 }
74
75 static bool receive ( const PartitionType p )
76 {
77 DUNE_UNUSED_PARAMETER(p);
78 return true;
79 }
80 };
81
82
83 template<>
85 {
86 static bool send ( const PartitionType p )
87 {
88 DUNE_UNUSED_PARAMETER(p);
89 return true;
90 }
91
92 static bool receive ( const PartitionType p )
93 {
94 DUNE_UNUSED_PARAMETER(p);
95 return true;
96 }
97 };
98
99} // namespace Dune
100
101#endif // #ifndef DUNE_ENTITYCOMMHELPER_HH
PartitionType
Attributes used in the generic overlap model.
Definition gridenums.hh:28
@ 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
@ 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
Include standard header files.
Definition agrid.hh:60
Definition entitycommhelper.hh:13
static bool receive(const PartitionType p)
Definition entitycommhelper.hh:25
static bool send(const PartitionType p)
Definition entitycommhelper.hh:19
static bool receive(const PartitionType p)
Definition entitycommhelper.hh:41
static bool send(const PartitionType p)
Definition entitycommhelper.hh:36
static bool send(const PartitionType p)
Definition entitycommhelper.hh:52
static bool receive(const PartitionType p)
Definition entitycommhelper.hh:58
static bool receive(const PartitionType p)
Definition entitycommhelper.hh:75
static bool send(const PartitionType p)
Definition entitycommhelper.hh:69
static bool send(const PartitionType p)
Definition entitycommhelper.hh:86
static bool receive(const PartitionType p)
Definition entitycommhelper.hh:92