Dune Core Modules (2.8.0)

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>
7
8namespace Dune
9{
10
11 template< InterfaceType iftype >
12 struct EntityCommHelper;
13
14
15 template<>
16 struct EntityCommHelper< InteriorBorder_InteriorBorder_Interface >
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<>
33 struct EntityCommHelper< InteriorBorder_All_Interface >
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<>
49 struct EntityCommHelper< Overlap_OverlapFront_Interface >
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<>
66 struct EntityCommHelper< Overlap_All_Interface >
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<>
82 struct EntityCommHelper< All_All_Interface >
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
Dune namespace.
Definition: alignedallocator.hh:11
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 21, 23:30, 2024)