29#ifndef EWOMS_GRID_COMM_HANDLES_HH
30#define EWOMS_GRID_COMM_HANDLES_HH
32#include <dune/grid/common/datahandleif.hh>
33#include <dune/common/version.hh>
41template <
class FieldType,
class Container,
class EntityMapper,
int commCodim>
43 :
public Dune::CommDataHandleIF<GridCommHandleSum<FieldType, Container,
44 EntityMapper, commCodim>,
52 bool contains(
int,
int codim)
const
59 bool fixedSize(
int,
int)
const
66 template <
class EntityType>
73 template <
class MessageBufferImp,
class EntityType>
76 unsigned dofIdx =
static_cast<unsigned>(mapper_.index(
e));
77 buff.write(container_[dofIdx]);
80 template <
class MessageBufferImp,
class EntityType>
83 unsigned dofIdx =
static_cast<unsigned>(mapper_.index(
e));
87 container_[dofIdx] += tmp;
100template <
class FieldType,
class Container,
class EntityMapper,
unsigned commCodim>
102 :
public Dune::CommDataHandleIF<GridCommHandleGhostSync<FieldType, Container,
103 EntityMapper, commCodim>,
112 bool contains(
int,
int codim)
const
119 bool fixedSize(
int,
int)
const
126 template <
class EntityType>
133 template <
class MessageBufferImp,
class EntityType>
136 unsigned dofIdx =
static_cast<unsigned>(mapper_.index(
e));
137 buff.write(container_[dofIdx]);
140 template <
class MessageBufferImp,
class EntityType>
143 unsigned dofIdx =
static_cast<unsigned>(mapper_.index(
e));
144 buff.read(container_[dofIdx]);
156template <
class FieldType,
class Container,
class EntityMapper,
unsigned commCodim>
158 :
public Dune::CommDataHandleIF<GridCommHandleMax<FieldType, Container,
159 EntityMapper, commCodim>,
167 bool contains(
int,
int codim)
const
174 bool fixedSize(
int,
int)
const
181 template <
class EntityType>
188 template <
class MessageBufferImp,
class EntityType>
191 unsigned dofIdx =
static_cast<unsigned>(mapper_.index(
e));
192 buff.write(container_[dofIdx]);
195 template <
class MessageBufferImp,
class EntityType>
198 unsigned dofIdx =
static_cast<unsigned>(mapper_.index(
e));
201 container_[dofIdx] = std::max(container_[dofIdx], tmp);
213template <
class FieldType,
class Container,
class EntityMapper,
unsigned commCodim>
215 :
public Dune::CommDataHandleIF<GridCommHandleMin<FieldType, Container,
216 EntityMapper, commCodim>,
224 bool contains(
int,
int codim)
const
231 bool fixedSize(
int,
int)
const
238 template <
class EntityType>
245 template <
class MessageBufferImp,
class EntityType>
248 unsigned dofIdx =
static_cast<unsigned>(mapper_.index(
e));
249 buff.write(container_[dofIdx]);
252 template <
class MessageBufferImp,
class EntityType>
255 unsigned dofIdx =
static_cast<unsigned>(mapper_.index(
e));
258 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:105
Data handle for parallel communication which takes the maximum of all values that are attached to DOF...
Definition gridcommhandles.hh:161
Provides data handle for parallel communication which takes the minimum of all values that are attach...
Definition gridcommhandles.hh:218
Data handle for parallel communication which sums up all values are attached to DOFs.
Definition gridcommhandles.hh:46
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilboundaryratevector.hh:37
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242