24#ifndef DUMUX_VECTOR_COMM_DATA_HANDLE_HH
25#define DUMUX_VECTOR_COMM_DATA_HANDLE_HH
29#include <dune/common/version.hh>
30#include <dune/grid/common/datahandleif.hh>
38 template<
class A,
class B>
39 static void apply(A& a,
const B& b)
45 template<
class A,
class B>
46 static void apply(A& a,
const B& b)
52 template<
class A,
class B>
53 static void apply(A& a,
const B& b)
62 template<
class A,
class B>
63 static void apply(A& a,
const B& b)
75template<
class Mapper,
class Vector,
int entityCodim,
class ScatterOperator>
77 :
public Dune::CommDataHandleIF<VectorCommDataHandle<Mapper,Vector, entityCodim, ScatterOperator>,
78 typename Vector::value_type>
90 {
return (codim == entityCodim); }
92#if DUNE_VERSION_GTE(DUNE_GRID,2,7)
94 bool fixedSize(
int dim,
int codim)
const
106 template<
class Entity>
107 std::size_t
size(Entity& entity)
const
111 template<
class MessageBuffer,
class Entity>
112 void gather(MessageBuffer& buff,
const Entity& entity)
const
119 template<
class MessageBuffer,
class Entity>
120 void scatter(MessageBuffer& buff,
const Entity& entity, std::size_t n)
132template<
class Mapper,
class Vector,
int codim>
135template<
class Mapper,
class Vector,
int codim>
138template<
class Mapper,
class Vector,
int codim>
141template<
class Mapper,
class Vector,
int codim>
Definition: vectorcommdatahandle.hh:37
static void apply(A &a, const B &b)
Definition: vectorcommdatahandle.hh:39
Definition: vectorcommdatahandle.hh:44
static void apply(A &a, const B &b)
Definition: vectorcommdatahandle.hh:46
Definition: vectorcommdatahandle.hh:51
static void apply(A &a, const B &b)
Definition: vectorcommdatahandle.hh:53
Definition: vectorcommdatahandle.hh:61
static void apply(A &a, const B &b)
Definition: vectorcommdatahandle.hh:63
A data handle class to exchange entries of a vector.
Definition: vectorcommdatahandle.hh:79
VectorCommDataHandle(const Mapper &mapper, Vector &vector)
Definition: vectorcommdatahandle.hh:84
std::size_t size(Entity &entity) const
how many objects of type DataType have to be sent for a given entity
Definition: vectorcommdatahandle.hh:107
void gather(MessageBuffer &buff, const Entity &entity) const
pack data from user to message buffer
Definition: vectorcommdatahandle.hh:112
Vector & vector_
Definition: vectorcommdatahandle.hh:129
void scatter(MessageBuffer &buff, const Entity &entity, std::size_t n)
unpack data from message buffer to user
Definition: vectorcommdatahandle.hh:120
typename Vector::value_type DataType
export type of data for message buffer
Definition: vectorcommdatahandle.hh:82
bool contains(int dim, int codim) const
returns true if data for this codim should be communicated
Definition: vectorcommdatahandle.hh:89
const Mapper & mapper_
Definition: vectorcommdatahandle.hh:128
bool fixedsize(int dim, int codim) const
returns true if size per entity of given dim and codim is a constant
Definition: vectorcommdatahandle.hh:98