24#ifndef DUMUX_VECTOR_COMM_DATA_HANDLE_HH
25#define DUMUX_VECTOR_COMM_DATA_HANDLE_HH
29#include <dune/grid/common/datahandleif.hh>
37 template<
class A,
class B>
38 static void apply(A& a,
const B& b)
44 template<
class A,
class B>
45 static void apply(A& a,
const B& b)
51 template<
class A,
class B>
52 static void apply(A& a,
const B& b)
61 template<
class A,
class B>
62 static void apply(A& a,
const B& b)
74template<
class Mapper,
class Vector,
int entityCodim,
75 class ScatterOperator,
class DataT =
typename Vector::value_type>
77 :
public Dune::CommDataHandleIF<VectorCommDataHandle<Mapper, Vector, entityCodim, ScatterOperator, DataT>, DataT>
89 {
return (codim == entityCodim); }
99 template<
class Entity>
100 std::size_t
size(Entity& entity)
const
104 template<
class MessageBuffer,
class Entity>
105 void gather(MessageBuffer& buff,
const Entity& entity)
const
112 template<
class MessageBuffer,
class Entity>
113 void scatter(MessageBuffer& buff,
const Entity& entity, std::size_t n)
125template<
class Mapper,
class Vector,
int codim,
class DataType =
typename Vector::value_type>
128template<
class Mapper,
class Vector,
int codim,
class DataType =
typename Vector::value_type>
131template<
class Mapper,
class Vector,
int codim,
class DataType =
typename Vector::value_type>
134template<
class Mapper,
class Vector,
int codim,
class DataType =
typename Vector::value_type>
Definition: vectorcommdatahandle.hh:36
static void apply(A &a, const B &b)
Definition: vectorcommdatahandle.hh:38
Definition: vectorcommdatahandle.hh:43
static void apply(A &a, const B &b)
Definition: vectorcommdatahandle.hh:45
Definition: vectorcommdatahandle.hh:50
static void apply(A &a, const B &b)
Definition: vectorcommdatahandle.hh:52
Definition: vectorcommdatahandle.hh:60
static void apply(A &a, const B &b)
Definition: vectorcommdatahandle.hh:62
A data handle class to exchange entries of a vector.
Definition: vectorcommdatahandle.hh:78
bool contains(int dim, int codim) const
returns true if data for this codim should be communicated
Definition: vectorcommdatahandle.hh:88
Vector & vector_
Definition: vectorcommdatahandle.hh:122
std::size_t size(Entity &entity) const
how many objects of type DataType have to be sent for a given entity
Definition: vectorcommdatahandle.hh:100
void gather(MessageBuffer &buff, const Entity &entity) const
pack data from user to message buffer
Definition: vectorcommdatahandle.hh:105
const Mapper & mapper_
Definition: vectorcommdatahandle.hh:121
bool fixedSize(int dim, int codim) const
returns true if size per entity of given dim and codim is a constant
Definition: vectorcommdatahandle.hh:92
DataT DataType
export type of data for message buffer
Definition: vectorcommdatahandle.hh:81
void scatter(MessageBuffer &buff, const Entity &entity, std::size_t n)
unpack data from message buffer to user
Definition: vectorcommdatahandle.hh:113
VectorCommDataHandle(const Mapper &mapper, Vector &vector)
Definition: vectorcommdatahandle.hh:83