48 :
public Dune::CommDataHandleIF<VectorVectorDataHandle<GridView,Vector>,
49 std::decay_t<decltype(std::declval<Vector>()[0][0])>>
54 using DataType = std::decay_t<decltype(std::declval<Vector>()[0][0])>;
60 : data_(data), gridView_(gridView)
63 bool contains(
int ,
int codim)
const
68 bool fixedSize(
int ,
int )
const
73 template<
class EntityType>
74 std::size_t size(
const EntityType )
const
80 template<
class BufferType,
class EntityType>
81 void gather(BufferType& buffer,
const EntityType& e)
const
83 for(
const auto& vec: data_)
85 buffer.write(vec[gridView_.indexSet().index(e)]);
89 template<
class BufferType,
class EntityType>
90 void scatter(BufferType& buffer,
const EntityType& e,
91 [[maybe_unused]] std::size_t n)
93 assert(n == data_.size());
96 buffer.read(vec[gridView_.indexSet().index(e)]);
101 const GridView& gridView_;