41 template<
class Gr
idView,
class Vector>
43 :
public Dune::CommDataHandleIF<VectorVectorDataHandle<GridView,Vector>,
44 std::decay_t<decltype(Vector()[0][0])>>
49 using DataType = std::decay_t<decltype(Vector()[0][0])>;
55 : data_(data), gridView_(gridView)
58 bool contains(
int ,
int codim)
const
63 bool fixedsize(
int ,
int )
const
67 bool fixedSize(
int ,
int )
const
72 template<
class EntityType>
73 std::size_t size(
const EntityType )
const
79 template<
class BufferType,
class EntityType>
80 void gather(BufferType& buffer,
const EntityType& e)
const
82 for(
const auto& vec: data_)
84 buffer.write(vec[gridView_.indexSet().index(e)]);
88 template<
class BufferType,
class EntityType>
89 void scatter(BufferType& buffer,
const EntityType& e, std::size_t n)
91 assert(n == data_.size());
94 buffer.read(vec[gridView_.indexSet().index(e)]);
99 const GridView& gridView_;
A data handle sending multiple data store in vectors attached to cells.
Definition: VectorVectorDataHandle.hpp:45
std::decay_t< decltype(Vector()[0][0])> DataType
the data type we send
Definition: VectorVectorDataHandle.hpp:49
VectorVectorDataHandle(Vector &data, const GridView &gridView)
Constructor.
Definition: VectorVectorDataHandle.hpp:54
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: BlackoilPhases.hpp:27