dune-grid  2.3.0
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 
9 namespace 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
static bool send(const PartitionType p)
Definition: entitycommhelper.hh:52
on boundary between overlap and ghost
Definition: gridenums.hh:28
static bool receive(const PartitionType p)
Definition: entitycommhelper.hh:25
static bool receive(const PartitionType p)
Definition: entitycommhelper.hh:41
send interior and border, receive all entities
Definition: gridenums.hh:82
send/receive interior and border entities
Definition: gridenums.hh:81
static bool receive(const PartitionType p)
Definition: entitycommhelper.hh:75
ghost entities
Definition: gridenums.hh:29
on boundary between interior and overlap
Definition: gridenums.hh:26
PartitionType
Attributes used in the generic overlap model.
Definition: gridenums.hh:24
static bool send(const PartitionType p)
Definition: entitycommhelper.hh:19
Definition: entitycommhelper.hh:13
static bool receive(const PartitionType p)
Definition: entitycommhelper.hh:92
static bool send(const PartitionType p)
Definition: entitycommhelper.hh:69
static bool send(const PartitionType p)
Definition: entitycommhelper.hh:86
send overlap, receive overlap and front entities
Definition: gridenums.hh:83
static bool receive(const PartitionType p)
Definition: entitycommhelper.hh:58
static bool send(const PartitionType p)
Definition: entitycommhelper.hh:36
all interior entities
Definition: gridenums.hh:25
send all and receive all entities
Definition: gridenums.hh:85
send overlap, receive all entities
Definition: gridenums.hh:84