dune-grid 2.9.0
entitycommhelper.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4// vi: set et ts=4 sw=2 sts=2:
5#ifndef DUNE_ENTITYCOMMHELPER_HH
6#define DUNE_ENTITYCOMMHELPER_HH
7
9
10namespace Dune
11{
12
13 template< InterfaceType iftype >
15
16
17 template<>
19 {
20 static bool send ( const PartitionType p )
21 {
22 //return (p == InteriorEntity) || (p == BorderEntity);
23 return (p == BorderEntity);
24 }
25
26 static bool receive ( const PartitionType p )
27 {
28 //return (p == InteriorEntity) || (p == BorderEntity);
29 return (p == BorderEntity);
30 }
31 };
32
33
34 template<>
36 {
37 static bool send ( const PartitionType p )
38 {
39 return (p == InteriorEntity) || (p == BorderEntity);
40 }
41
42 static bool receive ( const PartitionType p )
43 {
44 //return true;
45 return (p != InteriorEntity);
46 }
47 };
48
49
50 template<>
52 {
53 static bool send ( const PartitionType p )
54 {
55 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity);
56 return (p != FrontEntity) && (p != GhostEntity);
57 }
58
59 static bool receive ( const PartitionType p )
60 {
61 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity) || (p == FrontEntity);
62 return (p != GhostEntity);
63 }
64 };
65
66
67 template<>
69 {
70 static bool send ( const PartitionType p )
71 {
72 //return (p == InteriorEntity) || (p == BorderEntity) || (p == OverlapEntity);
73 return (p != FrontEntity) && (p != GhostEntity);
74 }
75
76 static bool receive ([[maybe_unused]] const PartitionType p)
77 {
78 return true;
79 }
80 };
81
82
83 template<>
85 {
86 static bool send ([[maybe_unused]] const PartitionType p)
87 {
88 return true;
89 }
90
91 static bool receive ([[maybe_unused]] const PartitionType p)
92 {
93 return true;
94 }
95 };
96
97} // namespace Dune
98
99#endif // #ifndef DUNE_ENTITYCOMMHELPER_HH
PartitionType
Attributes used in the generic overlap model.
Definition: gridenums.hh:30
@ FrontEntity
on boundary between overlap and ghost
Definition: gridenums.hh:34
@ InteriorEntity
all interior entities
Definition: gridenums.hh:31
@ GhostEntity
ghost entities
Definition: gridenums.hh:35
@ BorderEntity
on boundary between interior and overlap
Definition: gridenums.hh:32
@ InteriorBorder_All_Interface
send interior and border, receive all entities
Definition: gridenums.hh:88
@ All_All_Interface
send all and receive all entities
Definition: gridenums.hh:91
@ Overlap_All_Interface
send overlap, receive all entities
Definition: gridenums.hh:90
@ Overlap_OverlapFront_Interface
send overlap, receive overlap and front entities
Definition: gridenums.hh:89
@ InteriorBorder_InteriorBorder_Interface
send/receive interior and border entities
Definition: gridenums.hh:87
Include standard header files.
Definition: agrid.hh:60
Definition: entitycommhelper.hh:14
static bool receive(const PartitionType p)
Definition: entitycommhelper.hh:26
static bool send(const PartitionType p)
Definition: entitycommhelper.hh:20
static bool receive(const PartitionType p)
Definition: entitycommhelper.hh:42
static bool send(const PartitionType p)
Definition: entitycommhelper.hh:37
static bool send(const PartitionType p)
Definition: entitycommhelper.hh:53
static bool receive(const PartitionType p)
Definition: entitycommhelper.hh:59
static bool receive(const PartitionType p)
Definition: entitycommhelper.hh:76
static bool send(const PartitionType p)
Definition: entitycommhelper.hh:70
static bool send(const PartitionType p)
Definition: entitycommhelper.hh:86
static bool receive(const PartitionType p)
Definition: entitycommhelper.hh:91