3 #ifndef DUNE_PDELAB_GENERICDATAHANDLE_HH
4 #define DUNE_PDELAB_GENERICDATAHANDLE_HH
10 #include<dune/common/exceptions.hh>
11 #include <dune/common/parallel/mpihelper.hh>
12 #include <dune/common/static_assert.hh>
14 #include <dune/grid/common/datahandleif.hh>
15 #include <dune/grid/common/gridenums.hh>
39 template<
typename GFS>
42 return gfs.dataHandleContains(codim);
45 template<
typename GFS>
48 return gfs.dataHandleFixedSize(codim);
51 template<
typename GFS,
typename Entity>
52 std::size_t
size(
const GFS& gfs,
const Entity&
e)
const
55 return gfs.dataHandleSize(e) *
sizeof(E) + (gfs.sendLeafSizes() ? TypeTree::TreeInfo<typename GFS::Ordering>::leafCount *
sizeof(
size_type) : 0);
71 template<
typename GFS>
74 return gfs.dataHandleContains(codim);
77 template<
typename GFS>
83 template<
typename GFS,
typename Entity>
84 std::size_t
size(
const GFS& gfs,
const Entity&
e)
const
86 return gfs.dataHandleContains(Entity::codimension) ? _count : 0;
95 const std::size_t _count;
106 template<
typename GFS,
typename V,
typename GatherScatter,
typename CommunicationDescriptor = DOFDataCommunicationDescriptor<
typename V::ElementType> >
108 :
public Dune::CommDataHandleIF<GFSDataHandle<GFS,V,GatherScatter,CommunicationDescriptor>,typename CommunicationDescriptor::DataType>
113 typedef typename CommunicationDescriptor::DataType
DataType;
118 GFSDataHandle(
const GFS& gfs, V& v, GatherScatter gather_scatter = GatherScatter(), CommunicationDescriptor communication_descriptor = CommunicationDescriptor())
122 , _gather_scatter(gather_scatter)
123 , _communication_descriptor(communication_descriptor)
129 return _communication_descriptor.contains(_gfs,dim,codim);
135 return _communication_descriptor.fixedSize(_gfs,dim,codim);
142 template<
typename Entity>
145 return _communication_descriptor.size(_gfs,e);
149 template<
typename MessageBuffer,
typename Entity>
153 gather(MessageBuffer& buff,
const Entity&
e)
const
157 _local_view.bind(_index_cache);
158 if (_gfs.sendLeafSizes())
161 for (
auto it = _index_cache.
offsets().begin() + 1,
162 end_it = _index_cache.
offsets().end();
166 buf_wrapper.
write(static_cast<typename CommunicationDescriptor::size_type>(*it));
170 if (_gather_scatter.gather(buf_wrapper,e,_local_view))
171 _local_view.commit();
172 _local_view.unbind();
176 template<
typename MessageBuffer,
typename Entity>
180 gather(MessageBuffer& buff,
const Entity&
e)
const
183 _local_view.bind(_index_cache);
184 if (_gather_scatter.gather(buff,e,_local_view))
185 _local_view.commit();
186 _local_view.unbind();
195 template<
typename MessageBuffer,
typename Entity>
203 _local_view.bind(_index_cache);
204 bool needs_commit =
false;
205 if (_gfs.sendLeafSizes())
209 for (
auto it = remote_offsets.begin() + 1,
210 end_it = remote_offsets.end();
214 typename CommunicationDescriptor::size_type data = 0;
215 buf_wrapper.
read(data);
219 needs_commit = _gather_scatter.scatter(buf_wrapper,remote_offsets,_index_cache.
offsets(),
e,_local_view);
224 needs_commit = _gather_scatter.scatter(buf_wrapper,n /
sizeof(
typename CommunicationDescriptor::OriginalDataType),e,_local_view);
228 _local_view.commit();
230 _local_view.unbind();
239 template<
typename MessageBuffer,
typename Entity>
246 _local_view.bind(_index_cache);
248 if (_gather_scatter.scatter(buff,n,e,_local_view))
249 _local_view.commit();
251 _local_view.unbind();
258 typedef typename V::template LocalView<IndexCache> LocalView;
261 mutable IndexCache _index_cache;
262 mutable LocalView _local_view;
263 mutable GatherScatter _gather_scatter;
264 CommunicationDescriptor _communication_descriptor;
269 template<
typename GatherScatter>
277 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
278 bool gather(MessageBuffer& buff,
const Entity&
e,
const LocalView& local_view)
const
280 for (std::size_t i = 0; i < local_view.size(); ++i)
281 _gather_scatter.gather(buff,local_view[i]);
286 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
289 if (local_view.cache().gridFunctionSpace().containsPartition(e.partitionType()))
291 if (local_view.size() != n)
292 DUNE_THROW(
Exception,
"size mismatch in GridFunctionSpace data handle, have " << local_view.size() <<
"DOFs, but received " << n);
294 for (std::size_t i = 0; i < local_view.size(); ++i)
295 _gather_scatter.scatter(buff,local_view[i]);
300 if (local_view.size() != 0)
301 DUNE_THROW(
Exception,
"expected no DOFs in partition '" << e.partitionType() <<
"', but have " << local_view.size());
303 for (std::size_t i = 0; i < local_view.size(); ++i)
305 typename LocalView::ElementType dummy;
313 template<
typename MessageBuffer,
typename Offsets,
typename Entity,
typename LocalView>
314 bool scatter(MessageBuffer& buff,
const Offsets& remote_offsets,
const Offsets& local_offsets,
const Entity&
e, LocalView& local_view)
const
316 if (local_view.cache().gridFunctionSpace().containsPartition(e.partitionType()))
327 bool needs_commit =
false;
328 for (
size_type block = 1; block < local_offsets.size(); ++block)
331 if (remote_offsets[block] == remote_i)
333 local_i = local_offsets[block];
338 if (local_offsets[block] == local_i)
340 for (; remote_i < remote_offsets[block]; ++remote_i)
342 typename LocalView::ElementType dummy;
348 if (remote_offsets[block] - remote_i != local_offsets[block] - local_i)
349 DUNE_THROW(
Exception,
"size mismatch in GridFunctionSpace data handle block " << block <<
", have " << local_offsets[block] - local_i <<
"DOFs, but received " << remote_offsets[block] - remote_i);
351 for (; local_i < local_offsets[block]; ++local_i)
352 _gather_scatter.scatter(buff,local_view[local_i]);
354 remote_i = remote_offsets[block];
361 if (local_view.size() != 0)
362 DUNE_THROW(
Exception,
"expected no DOFs in partition '" << e.partitionType() <<
"', but have " << local_view.size());
364 for (std::size_t i = 0; i < remote_offsets.back(); ++i)
366 typename LocalView::ElementType dummy;
374 : _gather_scatter(gather_scatter)
379 GatherScatter _gather_scatter;
384 template<
typename GatherScatter>
392 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
393 bool gather(MessageBuffer& buff,
const Entity&
e,
const LocalView& local_view)
const
395 for (std::size_t i = 0; i < local_view.size(); ++i)
396 _gather_scatter.gather(buff,e,local_view[i]);
401 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
404 if (local_view.cache().gridFunctionSpace().containsPartition(e.partitionType()))
406 if (local_view.size() != n)
407 DUNE_THROW(
Exception,
"size mismatch in GridFunctionSpace data handle, have " << local_view.size() <<
"DOFs, but received " << n);
409 for (std::size_t i = 0; i < local_view.size(); ++i)
410 _gather_scatter.scatter(buff,e,local_view[i]);
415 if (local_view.size() != 0)
416 DUNE_THROW(
Exception,
"expected no DOFs in partition '" << e.partitionType() <<
"', but have " << local_view.size());
418 for (std::size_t i = 0; i < local_view.size(); ++i)
420 typename LocalView::ElementType dummy;
428 template<
typename MessageBuffer,
typename Offsets,
typename Entity,
typename LocalView>
429 bool scatter(MessageBuffer& buff,
const Offsets& remote_offsets,
const Offsets& local_offsets,
const Entity&
e, LocalView& local_view)
const
431 if (local_view.cache().gridFunctionSpace().containsPartition(e.partitionType()))
435 bool needs_commit =
false;
436 for (
size_type block = 1; block < local_offsets.size(); ++block)
440 if (remote_offsets[block] == remote_i)
442 local_i = local_offsets[block];
447 if (local_offsets[block] == local_i)
449 for (; remote_i < remote_offsets[block]; ++remote_i)
451 typename LocalView::ElementType dummy;
457 if (remote_offsets[block] - remote_i != local_offsets[block] - local_i)
458 DUNE_THROW(
Exception,
"size mismatch in GridFunctionSpace data handle block " << block <<
", have " << local_offsets[block] - local_i <<
"DOFs, but received " << remote_offsets[block] - remote_i);
460 for (; local_i < local_offsets[block]; ++local_i)
461 _gather_scatter.scatter(buff,e,local_view[local_i]);
463 remote_i = remote_offsets[block];
470 if (local_view.size() != 0)
471 DUNE_THROW(
Exception,
"expected no DOFs in partition '" << e.partitionType() <<
"', but have " << local_view.size());
473 for (std::size_t i = 0; i < remote_offsets.back(); ++i)
475 typename LocalView::ElementType dummy;
483 : _gather_scatter(gather_scatter)
488 GatherScatter _gather_scatter;
493 template<
typename GatherScatter>
501 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
502 bool gather(MessageBuffer& buff,
const Entity&
e,
const LocalView& local_view)
const
504 for (std::size_t i = 0; i < local_view.size(); ++i)
505 _gather_scatter.gather(buff,local_view.cache().containerIndex(i),local_view[i]);
510 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
513 if (local_view.cache().gridFunctionSpace().containsPartition(e.partitionType()))
515 if (local_view.size() != n)
516 DUNE_THROW(
Exception,
"size mismatch in GridFunctionSpace data handle, have " << local_view.size() <<
"DOFs, but received " << n);
518 for (std::size_t i = 0; i < local_view.size(); ++i)
519 _gather_scatter.scatter(buff,local_view.cache().containerIndex(i),local_view[i]);
525 if (local_view.size() != 0)
526 DUNE_THROW(
Exception,
"expected no DOFs in partition '" << e.partitionType() <<
"', but have " << local_view.size());
528 for (std::size_t i = 0; i < local_view.size(); ++i)
530 typename LocalView::ElementType dummy;
538 template<
typename MessageBuffer,
typename Offsets,
typename Entity,
typename LocalView>
539 bool scatter(MessageBuffer& buff,
const Offsets& remote_offsets,
const Offsets& local_offsets,
const Entity&
e, LocalView& local_view)
const
541 if (local_view.cache().gridFunctionSpace().containsPartition(e.partitionType()))
545 bool needs_commit =
false;
546 for (
size_type block = 1; block < local_offsets.size(); ++block)
550 if (remote_offsets[block] == remote_i)
552 local_i = local_offsets[block];
557 if (local_offsets[block] == local_i)
559 for (; remote_i < remote_offsets[block]; ++remote_i)
561 typename LocalView::ElementType dummy;
567 if (remote_offsets[block] - remote_i != local_offsets[block] - local_i)
568 DUNE_THROW(
Exception,
"size mismatch in GridFunctionSpace data handle block " << block <<
", have " << local_offsets[block] - local_i <<
"DOFs, but received " << remote_offsets[block] - remote_i);
570 for (; local_i < local_offsets[block]; ++local_i)
571 _gather_scatter.scatter(buff,local_view.cache().containerIndex(local_i),local_view[local_i]);
573 remote_i = remote_offsets[block];
580 if (local_view.size() != 0)
581 DUNE_THROW(
Exception,
"expected no DOFs in partition '" << e.partitionType() <<
"', but have " << local_view.size());
583 for (std::size_t i = 0; i < remote_offsets.back(); ++i)
585 typename LocalView::ElementType dummy;
594 : _gather_scatter(gather_scatter)
599 GatherScatter _gather_scatter;
607 template<
class MessageBuffer,
class DataType>
608 void gather (MessageBuffer& buff, DataType& data)
const
613 template<
class MessageBuffer,
class DataType>
614 void scatter (MessageBuffer& buff, DataType& data)
const
622 template<
class GFS,
class V>
624 :
public GFSDataHandle<GFS,V,DataGatherScatter<AddGatherScatter> >
638 template<
class MessageBuffer,
class DataType>
639 void gather (MessageBuffer& buff, DataType& data)
const
645 template<
class MessageBuffer,
class DataType>
646 void scatter (MessageBuffer& buff, DataType& data)
const
654 template<
class GFS,
class V>
656 :
public GFSDataHandle<GFS,V,DataGatherScatter<AddClearGatherScatter> >
670 template<
class MessageBuffer,
class DataType>
671 void gather (MessageBuffer& buff, DataType& data)
const
676 template<
class MessageBuffer,
class DataType>
677 void scatter (MessageBuffer& buff, DataType& data)
const
685 template<
class GFS,
class V>
687 :
public GFSDataHandle<GFS,V,DataGatherScatter<CopyGatherScatter> >
701 template<
class MessageBuffer,
class DataType>
702 void gather (MessageBuffer& buff, DataType& data)
const
707 template<
class MessageBuffer,
class DataType>
708 void scatter (MessageBuffer& buff, DataType& data)
const
712 data = std::min(data,x);
716 template<
class GFS,
class V>
718 :
public GFSDataHandle<GFS,V,DataGatherScatter<MinGatherScatter> >
732 template<
class MessageBuffer,
class DataType>
733 void gather (MessageBuffer& buff, DataType& data)
const
738 template<
class MessageBuffer,
class DataType>
739 void scatter (MessageBuffer& buff, DataType& data)
const
743 data = std::max(data,x);
747 template<
class GFS,
class V>
749 :
public GFSDataHandle<GFS,V,DataGatherScatter<MaxGatherScatter> >
773 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
774 bool gather(MessageBuffer& buff,
const Entity&
e, LocalView& local_view)
const
777 const bool ghost = e.partitionType()!=Dune::InteriorEntity && e.partitionType()!=Dune::BorderEntity;
785 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
786 bool scatter(MessageBuffer& buff, std::size_t n,
const Entity&
e, LocalView& local_view)
const
790 const bool ghost = e.partitionType()!=Dune::InteriorEntity && e.partitionType()!=Dune::BorderEntity;
796 for (std::size_t i = 0; i < local_view.size(); ++i)
797 local_view[i] = ghost;
812 template<
class GFS,
class V>
817 EntityDataCommunicationDescriptor<bool> >
827 "GhostDataHandle expects a vector of bool values");
859 template<
typename RankIndex>
865 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
866 bool gather(MessageBuffer& buff,
const Entity&
e, LocalView& local_view)
const
875 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
876 bool scatter(MessageBuffer& buff, std::size_t n,
const Entity&
e, LocalView& local_view)
const
879 const RankIndex unknown_rank = std::numeric_limits<RankIndex>::max();
882 const bool is_interior_or_border = (e.partitionType()==Dune::InteriorEntity || e.partitionType()==Dune::BorderEntity);
885 RankIndex received_rank;
886 buff.read(received_rank);
888 for (std::size_t i = 0; i < local_view.size(); ++i)
891 RankIndex current_rank = local_view[i];
898 if (!is_interior_or_border && current_rank == _rank)
899 current_rank = unknown_rank;
902 local_view[i] = std::min(current_rank,received_rank);
917 const RankIndex _rank;
930 template<
class GFS,
class V>
934 DisjointPartitioningGatherScatter<
935 typename V::ElementType
937 EntityDataCommunicationDescriptor<
938 typename V::ElementType
946 typename V::ElementType
949 typename V::ElementType
969 v_ = gfs_.gridView().comm().rank();
984 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
985 bool gather(MessageBuffer& buff,
const Entity&
e, LocalView& local_view)
const
987 buff.write(local_view.size() > 0);
991 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
992 bool scatter(MessageBuffer& buff, std::size_t n,
const Entity&
e, LocalView& local_view)
const
994 bool remote_entity_has_dofs;
995 buff.read(remote_entity_has_dofs);
997 for (std::size_t i = 0; i < local_view.size(); ++i)
999 local_view[i] |= remote_entity_has_dofs;
1014 template<
class GFS,
class V>
1018 SharedDOFGatherScatter,
1019 EntityDataCommunicationDescriptor<bool> >
1029 "SharedDOFDataHandle expects a vector of bool values");
1060 template<
typename GFS,
typename RankIndex>
1062 :
public Dune::CommDataHandleIF<GFSNeighborDataHandle<GFS,RankIndex>,RankIndex>
1076 , _neighbors(neighbors)
1082 return _gfs.dataHandleContains(codim);
1091 template<
typename Entity>
1097 template<
typename MessageBuffer,
typename Entity>
1098 void gather(MessageBuffer& buff,
const Entity&
e)
const
1103 template<
typename MessageBuffer,
typename Entity>
1108 _neighbors.insert(rank);
1114 const RankIndex _rank;
1115 std::set<RankIndex>& _neighbors;
1123 #endif // DUNE_PDELAB_GENERICDATAHANDLE_HH
void update(const Entity &e)
Definition: entityindexcache.hh:49
bool scatter(MessageBuffer &buff, std::size_t n, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:786
AddClearDataHandle(const GFS &gfs_, V &v_)
Definition: genericdatahandle.hh:662
std::size_t size_type
size type to use if communicating leaf ordering sizes
Definition: genericdatahandle.hh:31
std::size_t size(const GFS &gfs, const Entity &e) const
Definition: genericdatahandle.hh:84
void gather(MessageBuffer &buff, DataType &data) const
Definition: genericdatahandle.hh:671
bool scatter(MessageBuffer &buff, std::size_t n, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:992
SharedDOFDataHandle(const GFS &gfs_, V &v_, bool init_vector=true)
Creates a new SharedDOFDataHandle.
Definition: genericdatahandle.hh:1043
void scatter(MessageBuffer &buff, const Entity &e, size_type n)
Definition: genericdatahandle.hh:1104
MinDataHandle(const GFS &gfs_, V &v_)
Definition: genericdatahandle.hh:724
GFS::Traits::SizeType size_type
Definition: genericdatahandle.hh:1071
AddDataHandle(const GFS &gfs_, V &v_)
Definition: genericdatahandle.hh:630
enable_if< !CommunicationDescriptor::wrap_buffer &&AlwaysTrue< Entity >::value >::type gather(MessageBuffer &buff, const Entity &e) const
pack data from user to message buffer - version without support for sending leaf ordering sizes ...
Definition: genericdatahandle.hh:180
Definition: genericdatahandle.hh:686
bool scatter(MessageBuffer &buff, size_type n, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:287
bool fixedSize(const GFS &gfs, int dim, int codim) const
Definition: genericdatahandle.hh:46
void gather(MessageBuffer &buff, DataType &data) const
Definition: genericdatahandle.hh:639
static const bool wrap_buffer
Definition: genericdatahandle.hh:34
bool contains(const GFS &gfs, int dim, int codim) const
Definition: genericdatahandle.hh:72
void read(T &data)
Definition: polymorphicbufferwrapper.hh:38
Data handle for marking shared DOFs.
Definition: genericdatahandle.hh:1015
void gather(MessageBuffer &buff, DataType &data) const
Definition: genericdatahandle.hh:702
Communication descriptor for sending count items of type E per entity with attached DOFs...
Definition: genericdatahandle.hh:62
E OriginalDataType
Definition: genericdatahandle.hh:37
bool gather(MessageBuffer &buff, const Entity &e, const LocalView &local_view) const
Definition: genericdatahandle.hh:502
Definition: genericdatahandle.hh:604
enable_if< CommunicationDescriptor::wrap_buffer &&AlwaysTrue< Entity >::value >::type gather(MessageBuffer &buff, const Entity &e) const
pack data from user to message buffer - version with support for sending leaf ordering sizes ...
Definition: genericdatahandle.hh:153
size_type size(const Entity &e) const
how many objects of type DataType have to be sent for a given entity
Definition: genericdatahandle.hh:143
bool scatter(MessageBuffer &buff, const Offsets &remote_offsets, const Offsets &local_offsets, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:314
GFSNeighborDataHandle(const GFS &gfs, RankIndex rank, std::set< RankIndex > &neighbors)
Definition: genericdatahandle.hh:1073
bool scatter(MessageBuffer &buff, std::size_t n, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:876
Definition: genericdatahandle.hh:748
DataEntityGatherScatter(GatherScatter gather_scatter=GatherScatter())
Definition: genericdatahandle.hh:482
void gather(MessageBuffer &buff, DataType &data) const
Definition: genericdatahandle.hh:733
static const size_type leaf_count
Definition: genericdatahandle.hh:116
bool fixedsize(int dim, int codim) const
Definition: genericdatahandle.hh:1085
Definition: genericdatahandle.hh:655
Definition: genericdatahandle.hh:667
static const int dim
Definition: adaptivity.hh:82
bool contains(int dim, int codim) const
returns true if data for this codim should be communicated
Definition: genericdatahandle.hh:127
GatherScatter data handle for creating a disjoint DOF partitioning.
Definition: genericdatahandle.hh:931
Wrapper for message buffers of grid DataHandles that allows for sending different types of data...
Definition: polymorphicbufferwrapper.hh:24
Definition: genericdatahandle.hh:698
std::size_t size_type
Definition: genericdatahandle.hh:275
bool gather(MessageBuffer &buff, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:866
DataGatherScatter(GatherScatter gather_scatter=GatherScatter())
Definition: genericdatahandle.hh:373
GatherScatter functor for marking ghost DOFs.
Definition: genericdatahandle.hh:769
Communication descriptor for sending one item of type E per DOF.
Definition: genericdatahandle.hh:25
EntityDataCommunicationDescriptor(std::size_t count=1)
Definition: genericdatahandle.hh:89
DisjointPartitioningGatherScatter(RankIndex rank)
Create a DisjointPartitioningGatherScatter object.
Definition: genericdatahandle.hh:911
RankIndex DataType
Definition: genericdatahandle.hh:1070
GFSDataHandle(const GFS &gfs, V &v, GatherScatter gather_scatter=GatherScatter(), CommunicationDescriptor communication_descriptor=CommunicationDescriptor())
Definition: genericdatahandle.hh:118
bool gather(MessageBuffer &buff, const Entity &e, const LocalView &local_view) const
Definition: genericdatahandle.hh:393
void scatter(MessageBuffer &buff, DataType &data) const
Definition: genericdatahandle.hh:646
std::size_t size_type
Definition: genericdatahandle.hh:390
bool contains(int dim, int codim) const
Definition: genericdatahandle.hh:1079
bool gather(MessageBuffer &buff, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:774
bool fixedsize(int dim, int codim) const
returns true if size per entity of given dim and codim is a constant
Definition: genericdatahandle.hh:133
std::size_t size_type
Definition: genericdatahandle.hh:499
bool scatter(MessageBuffer &buff, const Offsets &remote_offsets, const Offsets &local_offsets, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:539
GhostDataHandle(const GFS &gfs_, V &v_, bool init_vector=true)
Creates a new GhostDataHandle.
Definition: genericdatahandle.hh:841
enable_if< CommunicationDescriptor::wrap_buffer &&AlwaysTrue< Entity >::value >::type scatter(MessageBuffer &buff, const Entity &e, size_type n)
unpack data from message buffer to user
Definition: genericdatahandle.hh:199
std::size_t size(const GFS &gfs, const Entity &e) const
Definition: genericdatahandle.hh:52
void write(const T &data)
Definition: polymorphicbufferwrapper.hh:30
Definition: genericdatahandle.hh:623
bool gather(MessageBuffer &buff, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:985
void gather(MessageBuffer &buff, DataType &data) const
Definition: genericdatahandle.hh:608
CommunicationDescriptor::DataType DataType
Definition: genericdatahandle.hh:113
static const unsigned int value
Definition: gridfunctionspace/tags.hh:175
GFS::Traits::SizeType size_type
Definition: genericdatahandle.hh:114
DisjointPartitioningDataHandle(const GFS &gfs_, V &v_, bool init_vector=true)
Creates a new DisjointPartitioningDataHandle.
Definition: genericdatahandle.hh:965
bool contains(const GFS &gfs, int dim, int codim) const
Definition: genericdatahandle.hh:40
size_type size(Entity &e) const
Definition: genericdatahandle.hh:1092
Definition: genericdatahandle.hh:385
bool scatter(MessageBuffer &buff, const Offsets &remote_offsets, const Offsets &local_offsets, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:429
void scatter(MessageBuffer &buff, DataType &data) const
Definition: genericdatahandle.hh:677
DataContainerIndexGatherScatter(GatherScatter gather_scatter=GatherScatter())
Definition: genericdatahandle.hh:593
Definition: genericdatahandle.hh:717
bool scatter(MessageBuffer &buff, size_type n, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:511
void scatter(MessageBuffer &buff, DataType &data) const
Definition: genericdatahandle.hh:708
Data handle for marking ghost DOFs.
Definition: genericdatahandle.hh:813
char DataType
Definition: genericdatahandle.hh:28
CopyDataHandle(const GFS &gfs_, V &v_)
Definition: genericdatahandle.hh:693
Implement a data handle with a grid function space.
Definition: genericdatahandle.hh:107
void scatter(MessageBuffer &buff, DataType &data) const
Definition: genericdatahandle.hh:614
bool fixedSize(const GFS &gfs, int dim, int codim) const
Definition: genericdatahandle.hh:78
array< size_type, leaf_count+1 > Offsets
Definition: entityindexcache.hh:38
bool gather(MessageBuffer &buff, const Entity &e, const LocalView &local_view) const
Definition: genericdatahandle.hh:278
MaxDataHandle(const GFS &gfs_, V &v_)
Definition: genericdatahandle.hh:755
void gather(MessageBuffer &buff, const Entity &e) const
Definition: genericdatahandle.hh:1098
Definition: genericdatahandle.hh:270
enable_if< !CommunicationDescriptor::wrap_buffer &&AlwaysTrue< Entity >::value >::type scatter(MessageBuffer &buff, const Entity &e, size_type n)
unpack data from message buffer to user
Definition: genericdatahandle.hh:243
Base class for all PDELab exceptions.
Definition: exceptions.hh:17
const Offsets & offsets() const
Definition: entityindexcache.hh:79
Definition: genericdatahandle.hh:494
const E & e
Definition: interpolate.hh:172
void scatter(MessageBuffer &buff, DataType &data) const
Definition: genericdatahandle.hh:739
bool scatter(MessageBuffer &buff, size_type n, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:402
Definition: genericdatahandle.hh:729
static const bool wrap_buffer
Definition: genericdatahandle.hh:69
E DataType
Definition: genericdatahandle.hh:65
Definition: genericdatahandle.hh:635
Data handle for collecting set of neighboring MPI ranks.
Definition: genericdatahandle.hh:1061
GatherScatter functor for marking shared DOFs.
Definition: genericdatahandle.hh:981
GatherScatter functor for creating a disjoint DOF partitioning.
Definition: genericdatahandle.hh:860