Dune Core Modules (2.4.1)

entitycommhelper.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_ENTITYCOMMHELPER_HH
4#define DUNE_ENTITYCOMMHELPER_HH
5
6#include <dune/grid/common/gridenums.hh>
8
9namespace Dune
10{
11
12 template< InterfaceType iftype >
13 struct EntityCommHelper;
14
15
16 template<>
17 struct EntityCommHelper< InteriorBorder_InteriorBorder_Interface >
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<>
34 struct EntityCommHelper< InteriorBorder_All_Interface >
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<>
50 struct EntityCommHelper< Overlap_OverlapFront_Interface >
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<>
67 struct EntityCommHelper< Overlap_All_Interface >
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 {
78 return true;
79 }
80 };
81
82
83 template<>
84 struct EntityCommHelper< All_All_Interface >
85 {
86 static bool send ( const PartitionType p )
87 {
89 return true;
90 }
91
92 static bool receive ( const PartitionType p )
93 {
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
Dune namespace.
Definition: alignment.hh:10
Definition of the DUNE_UNUSED macro for the case that config.h is not available.
#define DUNE_UNUSED_PARAMETER(parm)
A macro to mark intentional unused function parameters with.
Definition: unused.hh:18
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 22, 23:30, 2024)