29#ifndef EWOMS_GRID_COMM_HANDLES_HH
30#define EWOMS_GRID_COMM_HANDLES_HH
32#include <dune/common/version.hh>
34#include <dune/grid/common/datahandleif.hh>
45template <
class FieldType,
class Container,
class EntityMapper,
int commCodim>
47 :
public Dune::CommDataHandleIF<GridCommHandleSum<FieldType, Container,
48 EntityMapper, commCodim>,
56 bool contains(
int,
int codim)
const
63 bool fixedSize(
int,
int)
const
70 template <
class EntityType>
77 template <
class MessageBufferImp,
class EntityType>
80 const unsigned dofIdx =
static_cast<unsigned>(mapper_.index(
e));
81 buff.write(container_[dofIdx]);
84 template <
class MessageBufferImp,
class EntityType>
87 const unsigned dofIdx =
static_cast<unsigned>(mapper_.index(
e));
91 container_[dofIdx] += tmp;
104template <
class FieldType,
class Container,
class EntityMapper,
unsigned commCodim>
106 :
public Dune::CommDataHandleIF<GridCommHandleGhostSync<FieldType, Container,
107 EntityMapper, commCodim>,
116 bool contains(
int,
int codim)
const
123 bool fixedSize(
int,
int)
const
130 template <
class EntityType>
137 template <
class MessageBufferImp,
class EntityType>
140 const unsigned dofIdx =
static_cast<unsigned>(mapper_.index(
e));
141 buff.write(container_[dofIdx]);
144 template <
class MessageBufferImp,
class EntityType>
147 const unsigned dofIdx =
static_cast<unsigned>(mapper_.index(
e));
148 buff.read(container_[dofIdx]);
160template <
class FieldType,
class Container,
class EntityMapper,
unsigned commCodim>
162 :
public Dune::CommDataHandleIF<GridCommHandleMax<FieldType, Container,
163 EntityMapper, commCodim>,
171 bool contains(
int,
int codim)
const
178 bool fixedSize(
int,
int)
const
185 template <
class EntityType>
192 template <
class MessageBufferImp,
class EntityType>
195 const unsigned dofIdx =
static_cast<unsigned>(mapper_.index(
e));
196 buff.write(container_[dofIdx]);
199 template <
class MessageBufferImp,
class EntityType>
202 const unsigned dofIdx =
static_cast<unsigned>(mapper_.index(
e));
205 container_[dofIdx] = std::max(container_[dofIdx], tmp);
217template <
class FieldType,
class Container,
class EntityMapper,
unsigned commCodim>
219 :
public Dune::CommDataHandleIF<GridCommHandleMin<FieldType, Container,
220 EntityMapper, commCodim>,
228 bool contains(
int,
int codim)
const
235 bool fixedSize(
int,
int)
const
242 template <
class EntityType>
249 template <
class MessageBufferImp,
class EntityType>
252 const unsigned dofIdx =
static_cast<unsigned>(mapper_.index(
e));
253 buff.write(container_[dofIdx]);
256 template <
class MessageBufferImp,
class EntityType>
259 const unsigned dofIdx =
static_cast<unsigned>(mapper_.index(
e));
262 container_[dofIdx] = std::min(container_[dofIdx], tmp);
Data handle for parallel communication which can be used to set the values values of ghost and overla...
Definition gridcommhandles.hh:109
Data handle for parallel communication which takes the maximum of all values that are attached to DOF...
Definition gridcommhandles.hh:165
Provides data handle for parallel communication which takes the minimum of all values that are attach...
Definition gridcommhandles.hh:222
Data handle for parallel communication which sums up all values are attached to DOFs.
Definition gridcommhandles.hh:50
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:43
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:240