dune-grid  2.7.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
Dune::EntityCommHelper< InteriorBorder_All_Interface >::send
static bool send(const PartitionType p)
Definition: entitycommhelper.hh:36
Dune::EntityCommHelper< InteriorBorder_InteriorBorder_Interface >::send
static bool send(const PartitionType p)
Definition: entitycommhelper.hh:19
Dune::GhostEntity
@ GhostEntity
ghost entities
Definition: gridenums.hh:33
Dune::EntityCommHelper
Definition: entitycommhelper.hh:13
Dune::BorderEntity
@ BorderEntity
on boundary between interior and overlap
Definition: gridenums.hh:30
Dune::EntityCommHelper< Overlap_All_Interface >::receive
static bool receive(const PartitionType p)
Definition: entitycommhelper.hh:75
Dune::InteriorBorder_InteriorBorder_Interface
@ InteriorBorder_InteriorBorder_Interface
send/receive interior and border entities
Definition: gridenums.hh:85
Dune::EntityCommHelper< InteriorBorder_InteriorBorder_Interface >::receive
static bool receive(const PartitionType p)
Definition: entitycommhelper.hh:25
Dune::All_All_Interface
@ All_All_Interface
send all and receive all entities
Definition: gridenums.hh:89
Dune::FrontEntity
@ FrontEntity
on boundary between overlap and ghost
Definition: gridenums.hh:32
Dune::EntityCommHelper< All_All_Interface >::send
static bool send(const PartitionType p)
Definition: entitycommhelper.hh:86
Dune::EntityCommHelper< All_All_Interface >::receive
static bool receive(const PartitionType p)
Definition: entitycommhelper.hh:92
Dune::EntityCommHelper< Overlap_All_Interface >::send
static bool send(const PartitionType p)
Definition: entitycommhelper.hh:69
Dune::EntityCommHelper< Overlap_OverlapFront_Interface >::send
static bool send(const PartitionType p)
Definition: entitycommhelper.hh:52
Dune::Overlap_OverlapFront_Interface
@ Overlap_OverlapFront_Interface
send overlap, receive overlap and front entities
Definition: gridenums.hh:87
Dune::InteriorBorder_All_Interface
@ InteriorBorder_All_Interface
send interior and border, receive all entities
Definition: gridenums.hh:86
Dune::EntityCommHelper< Overlap_OverlapFront_Interface >::receive
static bool receive(const PartitionType p)
Definition: entitycommhelper.hh:58
Dune::PartitionType
PartitionType
Attributes used in the generic overlap model.
Definition: gridenums.hh:28
Dune::Overlap_All_Interface
@ Overlap_All_Interface
send overlap, receive all entities
Definition: gridenums.hh:88
Dune::EntityCommHelper< InteriorBorder_All_Interface >::receive
static bool receive(const PartitionType p)
Definition: entitycommhelper.hh:41
Dune
Include standard header files.
Definition: agrid.hh:58
Dune::InteriorEntity
@ InteriorEntity
all interior entities
Definition: gridenums.hh:29
gridenums.hh