12#ifndef DUMUX_VECTOR_COMM_DATA_HANDLE_HH
13#define DUMUX_VECTOR_COMM_DATA_HANDLE_HH
17#include <dune/grid/common/datahandleif.hh>
25 template<
class A,
class B>
26 static void apply(A& a,
const B& b)
32 template<
class A,
class B>
33 static void apply(A& a,
const B& b)
39 template<
class A,
class B>
40 static void apply(A& a,
const B& b)
49 template<
class A,
class B>
50 static void apply(A& a,
const B& b)
62template<
class Mapper,
class Vector,
int entityCodim,
63 class ScatterOperator,
class DataT =
typename Vector::value_type>
65 :
public Dune::CommDataHandleIF<VectorCommDataHandle<Mapper, Vector, entityCodim, ScatterOperator, DataT>, DataT>
77 {
return (codim == entityCodim); }
87 template<
class Entity>
88 std::size_t
size(Entity& entity)
const
92 template<
class MessageBuffer,
class Entity>
93 void gather(MessageBuffer& buff,
const Entity& entity)
const
100 template<
class MessageBuffer,
class Entity>
101 void scatter(MessageBuffer& buff,
const Entity& entity, std::size_t n)
113template<
class Mapper,
class Vector,
int codim,
class DataType =
typename Vector::value_type>
116template<
class Mapper,
class Vector,
int codim,
class DataType =
typename Vector::value_type>
119template<
class Mapper,
class Vector,
int codim,
class DataType =
typename Vector::value_type>
122template<
class Mapper,
class Vector,
int codim,
class DataType =
typename Vector::value_type>
A data handle class to exchange entries of a vector.
Definition: vectorcommdatahandle.hh:66
bool contains(int dim, int codim) const
returns true if data for this codim should be communicated
Definition: vectorcommdatahandle.hh:76
Vector & vector_
Definition: vectorcommdatahandle.hh:110
std::size_t size(Entity &entity) const
how many objects of type DataType have to be sent for a given entity
Definition: vectorcommdatahandle.hh:88
void gather(MessageBuffer &buff, const Entity &entity) const
pack data from user to message buffer
Definition: vectorcommdatahandle.hh:93
const Mapper & mapper_
Definition: vectorcommdatahandle.hh:109
bool fixedSize(int dim, int codim) const
returns true if size per entity of given dim and codim is a constant
Definition: vectorcommdatahandle.hh:80
DataT DataType
export type of data for message buffer
Definition: vectorcommdatahandle.hh:69
void scatter(MessageBuffer &buff, const Entity &entity, std::size_t n)
unpack data from message buffer to user
Definition: vectorcommdatahandle.hh:101
VectorCommDataHandle(const Mapper &mapper, Vector &vector)
Definition: vectorcommdatahandle.hh:71
Definition: vectorcommdatahandle.hh:38
static void apply(A &a, const B &b)
Definition: vectorcommdatahandle.hh:40
Definition: vectorcommdatahandle.hh:48
static void apply(A &a, const B &b)
Definition: vectorcommdatahandle.hh:50
Definition: vectorcommdatahandle.hh:24
static void apply(A &a, const B &b)
Definition: vectorcommdatahandle.hh:26
Definition: vectorcommdatahandle.hh:31
static void apply(A &a, const B &b)
Definition: vectorcommdatahandle.hh:33