dune-grid 2.8.0
Loading...
Searching...
No Matches
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
8namespace Dune
9{
10
11 template< InterfaceType iftype >
13
14
15 template<>
17 {
18 static bool send ( const PartitionType p )
19 {
20 //return (p == InteriorEntity) || (p == BorderEntity);
21 return (p == BorderEntity);
22 }
23
24 static bool receive ( const PartitionType p )
25 {
26 //return (p == InteriorEntity) || (p == BorderEntity);
27 return (p == BorderEntity);
28 }
29 };
30
31
32 template<>
34 {
35 static bool send ( const PartitionType p )
36 {
37 return (p == InteriorEntity) || (p == BorderEntity);
38 }
39
40 static bool receive ( const PartitionType p )
41 {
42 //return true;
43 return (p != InteriorEntity);
44 }
45 };
46
47
48 template<>
50 {
51 static bool send ( const PartitionType p )
52 {
53 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity);
54 return (p != FrontEntity) && (p != GhostEntity);
55 }
56
57 static bool receive ( const PartitionType p )
58 {
59 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity) || (p == FrontEntity);
60 return (p != GhostEntity);
61 }
62 };
63
64
65 template<>
67 {
68 static bool send ( const PartitionType p )
69 {
70 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity);
71 return (p != FrontEntity) && (p != GhostEntity);
72 }
73
74 static bool receive ([[maybe_unused]] const PartitionType p)
75 {
76 return true;
77 }
78 };
79
80
81 template<>
83 {
84 static bool send ([[maybe_unused]] const PartitionType p)
85 {
86 return true;
87 }
88
89 static bool receive ([[maybe_unused]] const PartitionType p)
90 {
91 return true;
92 }
93 };
94
95} // namespace Dune
96
97#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:58
Definition: entitycommhelper.hh:12
static bool receive(const PartitionType p)
Definition: entitycommhelper.hh:24
static bool send(const PartitionType p)
Definition: entitycommhelper.hh:18
static bool receive(const PartitionType p)
Definition: entitycommhelper.hh:40
static bool send(const PartitionType p)
Definition: entitycommhelper.hh:35
static bool send(const PartitionType p)
Definition: entitycommhelper.hh:51
static bool receive(const PartitionType p)
Definition: entitycommhelper.hh:57
static bool receive(const PartitionType p)
Definition: entitycommhelper.hh:74
static bool send(const PartitionType p)
Definition: entitycommhelper.hh:68
static bool send(const PartitionType p)
Definition: entitycommhelper.hh:84
static bool receive(const PartitionType p)
Definition: entitycommhelper.hh:89