3 #ifndef DUNE_PDELAB_GRIDFUNCTIONSPACE_GENERICDATAHANDLE_HH
4 #define DUNE_PDELAB_GRIDFUNCTIONSPACE_GENERICDATAHANDLE_HH
10 #include<dune/common/exceptions.hh>
11 #include <dune/common/parallel/mpihelper.hh>
13 #include <dune/grid/common/datahandleif.hh>
14 #include <dune/grid/common/gridenums.hh>
23 template<
typename E,
bool transmit_rank = false>
44 template<
typename GFS>
47 return gfs.dataHandleContains(codim);
50 template<
typename GFS>
53 return gfs.dataHandleFixedSize(codim);
56 template<
typename GFS,
typename Entity>
57 std::size_t
size(
const GFS& gfs,
const Entity&
e)
const
60 return gfs.dataHandleSize(
e) *
sizeof(E)
61 + (gfs.sendLeafSizes() ? TypeTree::TreeInfo<typename GFS::Ordering>::leafCount *
sizeof(
size_type) : 0)
68 template<
typename E,
bool transmit_rank = false>
88 using DataType = std::conditional_t<wrap_buffer,char,E>;
90 template<
typename GFS>
93 return gfs.dataHandleContains(codim);
96 template<
typename GFS>
102 template<
typename GFS,
typename Entity>
103 std::size_t
size(
const GFS& gfs,
const Entity&
e)
const
106 return (gfs.dataHandleContains(Entity::codimension) and gfs.entitySet().contains(
e) ? _count *
sizeof(E) : 0)
109 return gfs.dataHandleContains(Entity::codimension) && gfs.entitySet().contains(
e) ? _count : 0;
118 const std::size_t _count;
129 template<
typename GFS,
typename V,
typename GatherScatter,
typename CommunicationDescriptor = DOFDataCommunicationDescriptor<
typename V::ElementType> >
131 :
public Dune::CommDataHandleIF<GFSDataHandle<GFS,V,GatherScatter,CommunicationDescriptor>,typename CommunicationDescriptor::DataType>
136 typedef typename CommunicationDescriptor::DataType
DataType;
141 GFSDataHandle(
const GFS& gfs, V& v, GatherScatter gather_scatter = GatherScatter(), CommunicationDescriptor communication_descriptor = CommunicationDescriptor())
145 , _gather_scatter(gather_scatter)
146 , _communication_descriptor(communication_descriptor)
147 , _rank(gfs.gridView().comm().rank())
153 return _communication_descriptor.contains(_gfs,
dim,codim);
159 return _communication_descriptor.fixedSize(_gfs,
dim,codim);
166 template<
typename Entity>
169 return _communication_descriptor.size(_gfs,
e);
173 template<
typename MessageBuffer,
typename Entity>
174 typename std::enable_if<
177 gather(MessageBuffer& buff,
const Entity&
e)
const
183 _communication_descriptor.transmitRank()
186 _local_view.bind(_index_cache);
187 if (_gfs.sendLeafSizes())
190 for (
auto it = _index_cache.
offsets().begin() + 1,
191 end_it = _index_cache.
offsets().end();
195 buf_wrapper.
write(
static_cast<typename CommunicationDescriptor::size_type
>(*it));
199 if (_gather_scatter.gather(buf_wrapper,
e,_local_view))
200 _local_view.commit();
201 _local_view.unbind();
205 template<
typename MessageBuffer,
typename Entity>
206 typename std::enable_if<
209 gather(MessageBuffer& buff,
const Entity&
e)
const
212 _local_view.bind(_index_cache);
213 if (_gather_scatter.gather(buff,
e,_local_view))
214 _local_view.commit();
215 _local_view.unbind();
224 template<
typename MessageBuffer,
typename Entity>
225 typename std::enable_if<
234 _communication_descriptor.transmitRank()
237 _local_view.bind(_index_cache);
238 bool needs_commit =
false;
239 if (_gfs.sendLeafSizes())
243 for (
auto it = remote_offsets.begin() + 1,
244 end_it = remote_offsets.end();
248 typename CommunicationDescriptor::size_type data = 0;
249 buf_wrapper.
read(data);
253 needs_commit = _gather_scatter.scatter(buf_wrapper,remote_offsets,_index_cache.
offsets(),
e,_local_view);
259 if (_communication_descriptor.transmitRank())
264 size /=
sizeof(
typename CommunicationDescriptor::OriginalDataType);
265 needs_commit = _gather_scatter.scatter(buf_wrapper,
size,
e,_local_view);
269 _local_view.commit();
271 _local_view.unbind();
280 template<
typename MessageBuffer,
typename Entity>
281 typename std::enable_if<
287 _local_view.bind(_index_cache);
289 if (_gather_scatter.scatter(buff,n,
e,_local_view))
290 _local_view.commit();
292 _local_view.unbind();
299 typedef typename V::template LocalView<IndexCache> LocalView;
302 mutable IndexCache _index_cache;
303 mutable LocalView _local_view;
304 mutable GatherScatter _gather_scatter;
305 CommunicationDescriptor _communication_descriptor;
311 template<
typename GatherScatter>
319 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
320 bool gather(MessageBuffer& buff,
const Entity&
e,
const LocalView& local_view)
const
322 for (std::size_t i = 0; i < local_view.size(); ++i)
323 _gather_scatter.gather(buff,local_view[i]);
328 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
331 if (local_view.cache().gridFunctionSpace().entitySet().partitions().contains(
e.partitionType()))
333 if (local_view.size() != n)
334 DUNE_THROW(
Exception,
"size mismatch in GridFunctionSpace data handle, have " << local_view.size() <<
"DOFs, but received " << n);
336 for (std::size_t i = 0; i < local_view.size(); ++i)
337 _gather_scatter.scatter(buff,local_view[i]);
342 if (local_view.size() != 0)
343 DUNE_THROW(
Exception,
"expected no DOFs in partition '" <<
e.partitionType() <<
"', but have " << local_view.size());
345 for (std::size_t i = 0; i < local_view.size(); ++i)
347 typename LocalView::ElementType dummy;
355 template<
typename MessageBuffer,
typename Offsets,
typename Entity,
typename LocalView>
356 bool scatter(MessageBuffer& buff,
const Offsets& remote_offsets,
const Offsets& local_offsets,
const Entity&
e, LocalView& local_view)
const
358 if (local_view.cache().gridFunctionSpace().entitySet().partitions().contains(
e.partitionType()))
369 bool needs_commit =
false;
370 for (
size_type block = 1; block < local_offsets.size(); ++block)
373 if (remote_offsets[block] == remote_i)
375 local_i = local_offsets[block];
380 if (local_offsets[block] == local_i)
382 for (; remote_i < remote_offsets[block]; ++remote_i)
384 typename LocalView::ElementType dummy;
390 if (remote_offsets[block] - remote_i != local_offsets[block] - local_i)
391 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);
393 for (; local_i < local_offsets[block]; ++local_i)
394 _gather_scatter.scatter(buff,local_view[local_i]);
396 remote_i = remote_offsets[block];
403 if (local_view.size() != 0)
404 DUNE_THROW(
Exception,
"expected no DOFs in partition '" <<
e.partitionType() <<
"', but have " << local_view.size());
406 for (std::size_t i = 0; i < remote_offsets.back(); ++i)
408 typename LocalView::ElementType dummy;
416 : _gather_scatter(gather_scatter)
421 GatherScatter _gather_scatter;
426 template<
typename GatherScatter>
434 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
435 bool gather(MessageBuffer& buff,
const Entity&
e,
const LocalView& local_view)
const
437 for (std::size_t i = 0; i < local_view.size(); ++i)
438 _gather_scatter.gather(buff,
e,local_view[i]);
443 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
446 if (local_view.cache().gridFunctionSpace().entitySet().partitions().contains(
e.partitionType()))
448 if (local_view.size() != n)
449 DUNE_THROW(
Exception,
"size mismatch in GridFunctionSpace data handle, have " << local_view.size() <<
"DOFs, but received " << n);
451 for (std::size_t i = 0; i < local_view.size(); ++i)
452 _gather_scatter.scatter(buff,
e,local_view[i]);
457 if (local_view.size() != 0)
458 DUNE_THROW(
Exception,
"expected no DOFs in partition '" <<
e.partitionType() <<
"', but have " << local_view.size());
460 for (std::size_t i = 0; i < local_view.size(); ++i)
462 typename LocalView::ElementType dummy;
470 template<
typename MessageBuffer,
typename Offsets,
typename Entity,
typename LocalView>
471 bool scatter(MessageBuffer& buff,
const Offsets& remote_offsets,
const Offsets& local_offsets,
const Entity&
e, LocalView& local_view)
const
473 if (local_view.cache().gridFunctionSpace().entitySet().partitions().contains(
e.partitionType()))
477 bool needs_commit =
false;
478 for (
size_type block = 1; block < local_offsets.size(); ++block)
482 if (remote_offsets[block] == remote_i)
484 local_i = local_offsets[block];
489 if (local_offsets[block] == local_i)
491 for (; remote_i < remote_offsets[block]; ++remote_i)
493 typename LocalView::ElementType dummy;
499 if (remote_offsets[block] - remote_i != local_offsets[block] - local_i)
500 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);
502 for (; local_i < local_offsets[block]; ++local_i)
503 _gather_scatter.scatter(buff,
e,local_view[local_i]);
505 remote_i = remote_offsets[block];
512 if (local_view.size() != 0)
513 DUNE_THROW(
Exception,
"expected no DOFs in partition '" <<
e.partitionType() <<
"', but have " << local_view.size());
515 for (std::size_t i = 0; i < remote_offsets.back(); ++i)
517 typename LocalView::ElementType dummy;
525 : _gather_scatter(gather_scatter)
530 GatherScatter _gather_scatter;
535 template<
typename GatherScatter>
543 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
544 bool gather(MessageBuffer& buff,
const Entity&
e,
const LocalView& local_view)
const
546 for (std::size_t i = 0; i < local_view.size(); ++i)
547 _gather_scatter.gather(buff,local_view.cache().containerIndex(i),local_view[i]);
552 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
555 if (local_view.cache().gridFunctionSpace().entitySet().partitions().contains(
e.partitionType()))
557 if (local_view.size() != n)
558 DUNE_THROW(
Exception,
"size mismatch in GridFunctionSpace data handle, have " << local_view.size() <<
"DOFs, but received " << n);
560 for (std::size_t i = 0; i < local_view.size(); ++i)
561 _gather_scatter.scatter(buff,local_view.cache().containerIndex(i),local_view[i]);
567 if (local_view.size() != 0)
568 DUNE_THROW(
Exception,
"expected no DOFs in partition '" <<
e.partitionType() <<
"', but have " << local_view.size());
570 for (std::size_t i = 0; i < local_view.size(); ++i)
572 typename LocalView::ElementType dummy;
580 template<
typename MessageBuffer,
typename Offsets,
typename Entity,
typename LocalView>
581 bool scatter(MessageBuffer& buff,
const Offsets& remote_offsets,
const Offsets& local_offsets,
const Entity&
e, LocalView& local_view)
const
583 if (local_view.cache().gridFunctionSpace().entitySet().partitions().contains(
e.partitionType()))
587 bool needs_commit =
false;
588 for (
size_type block = 1; block < local_offsets.size(); ++block)
592 if (remote_offsets[block] == remote_i)
594 local_i = local_offsets[block];
599 if (local_offsets[block] == local_i)
601 for (; remote_i < remote_offsets[block]; ++remote_i)
603 typename LocalView::ElementType dummy;
609 if (remote_offsets[block] - remote_i != local_offsets[block] - local_i)
610 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);
612 for (; local_i < local_offsets[block]; ++local_i)
613 _gather_scatter.scatter(buff,local_view.cache().containerIndex(local_i),local_view[local_i]);
615 remote_i = remote_offsets[block];
622 if (local_view.size() != 0)
623 DUNE_THROW(
Exception,
"expected no DOFs in partition '" <<
e.partitionType() <<
"', but have " << local_view.size());
625 for (std::size_t i = 0; i < remote_offsets.back(); ++i)
627 typename LocalView::ElementType dummy;
636 : _gather_scatter(gather_scatter)
641 GatherScatter _gather_scatter;
649 template<
class MessageBuffer,
class DataType>
650 void gather (MessageBuffer& buff, DataType& data)
const
655 template<
class MessageBuffer,
class DataType>
656 void scatter (MessageBuffer& buff, DataType& data)
const
664 template<
class GFS,
class V>
666 :
public GFSDataHandle<GFS,V,DataGatherScatter<AddGatherScatter> >
680 template<
class MessageBuffer,
class DataType>
681 void gather (MessageBuffer& buff, DataType& data)
const
687 template<
class MessageBuffer,
class DataType>
688 void scatter (MessageBuffer& buff, DataType& data)
const
696 template<
class GFS,
class V>
698 :
public GFSDataHandle<GFS,V,DataGatherScatter<AddClearGatherScatter> >
712 template<
class MessageBuffer,
class DataType>
713 void gather (MessageBuffer& buff, DataType& data)
const
718 template<
class MessageBuffer,
class DataType>
719 void scatter (MessageBuffer& buff, DataType& data)
const
727 template<
class GFS,
class V>
729 :
public GFSDataHandle<GFS,V,DataGatherScatter<CopyGatherScatter> >
743 template<
class MessageBuffer,
class DataType>
744 void gather (MessageBuffer& buff, DataType& data)
const
749 template<
class MessageBuffer,
class DataType>
750 void scatter (MessageBuffer& buff, DataType& data)
const
754 data = std::min(data,x);
758 template<
class GFS,
class V>
760 :
public GFSDataHandle<GFS,V,DataGatherScatter<MinGatherScatter> >
774 template<
class MessageBuffer,
class DataType>
775 void gather (MessageBuffer& buff, DataType& data)
const
780 template<
class MessageBuffer,
class DataType>
781 void scatter (MessageBuffer& buff, DataType& data)
const
785 data = std::max(data,x);
789 template<
class GFS,
class V>
791 :
public GFSDataHandle<GFS,V,DataGatherScatter<MaxGatherScatter> >
815 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
816 bool gather(MessageBuffer& buff,
const Entity&
e, LocalView& local_view)
const
819 const bool ghost =
e.partitionType()!=Dune::InteriorEntity &&
e.partitionType()!=Dune::BorderEntity;
827 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
828 bool scatter(MessageBuffer& buff, std::size_t n,
const Entity&
e, LocalView& local_view)
const
832 const bool ghost =
e.partitionType()!=Dune::InteriorEntity &&
e.partitionType()!=Dune::BorderEntity;
838 for (std::size_t i = 0; i < local_view.size(); ++i)
839 local_view[i] = ghost;
854 template<
class GFS,
class V>
859 EntityDataCommunicationDescriptor<bool> >
869 "GhostDataHandle expects a vector of bool values");
901 template<
typename RankIndex>
907 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
908 bool gather(MessageBuffer& buff,
const Entity&
e, LocalView& local_view)
const
917 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
918 bool scatter(MessageBuffer& buff, std::size_t n,
const Entity&
e, LocalView& local_view)
const
921 const RankIndex unknown_rank = std::numeric_limits<RankIndex>::max();
924 const bool is_interior_or_border = (
e.partitionType()==Dune::InteriorEntity ||
e.partitionType()==Dune::BorderEntity);
927 RankIndex received_rank;
928 buff.read(received_rank);
930 for (std::size_t i = 0; i < local_view.size(); ++i)
933 RankIndex current_rank = local_view[i];
940 if (!is_interior_or_border && current_rank == _rank)
941 current_rank = unknown_rank;
944 local_view[i] = std::min(current_rank,received_rank);
959 const RankIndex _rank;
972 template<
class GFS,
class V>
976 DisjointPartitioningGatherScatter<
977 typename V::ElementType
979 EntityDataCommunicationDescriptor<
980 typename V::ElementType
988 typename V::ElementType
991 typename V::ElementType
1011 v_ = gfs_.gridView().comm().rank();
1026 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
1027 bool gather(MessageBuffer& buff,
const Entity&
e, LocalView& local_view)
const
1029 buff.write(local_view.size() > 0);
1033 template<
typename MessageBuffer,
typename Entity,
typename LocalView>
1034 bool scatter(MessageBuffer& buff, std::size_t n,
const Entity&
e, LocalView& local_view)
const
1036 bool remote_entity_has_dofs;
1037 buff.read(remote_entity_has_dofs);
1039 for (std::size_t i = 0; i < local_view.size(); ++i)
1041 local_view[i] |= remote_entity_has_dofs;
1056 template<
class GFS,
class V>
1060 SharedDOFGatherScatter,
1061 EntityDataCommunicationDescriptor<bool> >
1071 "SharedDOFDataHandle expects a vector of bool values");
1102 template<
typename GFS,
typename RankIndex>
1104 :
public Dune::CommDataHandleIF<GFSNeighborDataHandle<GFS,RankIndex>,RankIndex>
1118 , _neighbors(neighbors)
1124 return _gfs.dataHandleContains(codim);
1133 template<
typename Entity>
1139 template<
typename MessageBuffer,
typename Entity>
1140 void gather(MessageBuffer& buff,
const Entity&
e)
const
1145 template<
typename MessageBuffer,
typename Entity>
1150 _neighbors.insert(rank);
1156 const RankIndex _rank;
1157 std::set<RankIndex>& _neighbors;
static const int dim
Definition: adaptivity.hh:84
const Entity & e
Definition: localfunctionspace.hh:121
For backward compatibility – Do not use this!
Definition: adaptivity.hh:28
Base class for all PDELab exceptions.
Definition: exceptions.hh:19
Wrapper for message buffers of grid DataHandles that allows for sending different types of data.
Definition: polymorphicbufferwrapper.hh:32
void read(T &data)
Definition: polymorphicbufferwrapper.hh:52
void write(const T &data)
Definition: polymorphicbufferwrapper.hh:43
Definition: entityindexcache.hh:18
const Offsets & offsets() const
Definition: entityindexcache.hh:80
std::array< size_type, leaf_count+1 > Offsets
Definition: entityindexcache.hh:39
void update(const Entity &e)
Definition: entityindexcache.hh:50
Communication descriptor for sending one item of type E per DOF.
Definition: genericdatahandle.hh:25
static constexpr bool transmitRank()
Definition: genericdatahandle.hh:36
static const bool wrap_buffer
Definition: genericdatahandle.hh:33
bool contains(const GFS &gfs, int dim, int codim) const
Definition: genericdatahandle.hh:45
char DataType
Definition: genericdatahandle.hh:27
E OriginalDataType
Definition: genericdatahandle.hh:42
std::size_t size(const GFS &gfs, const Entity &e) const
Definition: genericdatahandle.hh:57
std::size_t size_type
size type to use if communicating leaf ordering sizes
Definition: genericdatahandle.hh:30
bool fixedSize(const GFS &gfs, int dim, int codim) const
Definition: genericdatahandle.hh:51
Communication descriptor for sending count items of type E per entity with attached DOFs.
Definition: genericdatahandle.hh:70
std::size_t size(const GFS &gfs, const Entity &e) const
Definition: genericdatahandle.hh:103
static const bool wrap_buffer
Definition: genericdatahandle.hh:77
bool contains(const GFS &gfs, int dim, int codim) const
Definition: genericdatahandle.hh:91
E OriginalDataType
Definition: genericdatahandle.hh:86
EntityDataCommunicationDescriptor(std::size_t count=1)
Definition: genericdatahandle.hh:112
static constexpr bool transmitRank()
Definition: genericdatahandle.hh:80
std::conditional_t< wrap_buffer, char, E > DataType
Definition: genericdatahandle.hh:88
std::size_t size_type
size type to use if communicating leaf ordering sizes
Definition: genericdatahandle.hh:73
bool fixedSize(const GFS &gfs, int dim, int codim) const
Definition: genericdatahandle.hh:97
Implement a data handle with a grid function space.
Definition: genericdatahandle.hh:132
std::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:228
CommunicationDescriptor::DataType DataType
Definition: genericdatahandle.hh:136
bool contains(int dim, int codim) const
returns true if data for this codim should be communicated
Definition: genericdatahandle.hh:151
GFS::Traits::SizeType size_type
Definition: genericdatahandle.hh:137
std::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:284
size_type size(const Entity &e) const
how many objects of type DataType have to be sent for a given entity
Definition: genericdatahandle.hh:167
std::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:209
bool fixedSize(int dim, int codim) const
returns true if size per entity of given dim and codim is a constant
Definition: genericdatahandle.hh:157
std::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:177
static const size_type leaf_count
Definition: genericdatahandle.hh:139
GFSDataHandle(const GFS &gfs, V &v, GatherScatter gather_scatter=GatherScatter(), CommunicationDescriptor communication_descriptor=CommunicationDescriptor())
Definition: genericdatahandle.hh:141
Definition: genericdatahandle.hh:313
bool scatter(MessageBuffer &buff, const Offsets &remote_offsets, const Offsets &local_offsets, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:356
std::size_t size_type
Definition: genericdatahandle.hh:317
bool scatter(MessageBuffer &buff, size_type n, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:329
bool gather(MessageBuffer &buff, const Entity &e, const LocalView &local_view) const
Definition: genericdatahandle.hh:320
DataGatherScatter(GatherScatter gather_scatter=GatherScatter())
Definition: genericdatahandle.hh:415
Definition: genericdatahandle.hh:428
bool gather(MessageBuffer &buff, const Entity &e, const LocalView &local_view) const
Definition: genericdatahandle.hh:435
bool scatter(MessageBuffer &buff, const Offsets &remote_offsets, const Offsets &local_offsets, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:471
bool scatter(MessageBuffer &buff, size_type n, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:444
DataEntityGatherScatter(GatherScatter gather_scatter=GatherScatter())
Definition: genericdatahandle.hh:524
std::size_t size_type
Definition: genericdatahandle.hh:432
Definition: genericdatahandle.hh:537
bool scatter(MessageBuffer &buff, size_type n, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:553
DataContainerIndexGatherScatter(GatherScatter gather_scatter=GatherScatter())
Definition: genericdatahandle.hh:635
bool scatter(MessageBuffer &buff, const Offsets &remote_offsets, const Offsets &local_offsets, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:581
bool gather(MessageBuffer &buff, const Entity &e, const LocalView &local_view) const
Definition: genericdatahandle.hh:544
std::size_t size_type
Definition: genericdatahandle.hh:541
Definition: genericdatahandle.hh:647
void gather(MessageBuffer &buff, DataType &data) const
Definition: genericdatahandle.hh:650
void scatter(MessageBuffer &buff, DataType &data) const
Definition: genericdatahandle.hh:656
Definition: genericdatahandle.hh:667
AddDataHandle(const GFS &gfs_, V &v_)
Definition: genericdatahandle.hh:672
Definition: genericdatahandle.hh:678
void scatter(MessageBuffer &buff, DataType &data) const
Definition: genericdatahandle.hh:688
void gather(MessageBuffer &buff, DataType &data) const
Definition: genericdatahandle.hh:681
Definition: genericdatahandle.hh:699
AddClearDataHandle(const GFS &gfs_, V &v_)
Definition: genericdatahandle.hh:704
Definition: genericdatahandle.hh:710
void gather(MessageBuffer &buff, DataType &data) const
Definition: genericdatahandle.hh:713
void scatter(MessageBuffer &buff, DataType &data) const
Definition: genericdatahandle.hh:719
Definition: genericdatahandle.hh:730
CopyDataHandle(const GFS &gfs_, V &v_)
Definition: genericdatahandle.hh:735
Definition: genericdatahandle.hh:741
void gather(MessageBuffer &buff, DataType &data) const
Definition: genericdatahandle.hh:744
void scatter(MessageBuffer &buff, DataType &data) const
Definition: genericdatahandle.hh:750
Definition: genericdatahandle.hh:761
MinDataHandle(const GFS &gfs_, V &v_)
Definition: genericdatahandle.hh:766
Definition: genericdatahandle.hh:772
void scatter(MessageBuffer &buff, DataType &data) const
Definition: genericdatahandle.hh:781
void gather(MessageBuffer &buff, DataType &data) const
Definition: genericdatahandle.hh:775
Definition: genericdatahandle.hh:792
MaxDataHandle(const GFS &gfs_, V &v_)
Definition: genericdatahandle.hh:797
GatherScatter functor for marking ghost DOFs.
Definition: genericdatahandle.hh:812
bool scatter(MessageBuffer &buff, std::size_t n, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:828
bool gather(MessageBuffer &buff, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:816
Data handle for marking ghost DOFs.
Definition: genericdatahandle.hh:860
GhostDataHandle(const GFS &gfs_, V &v_, bool init_vector=true)
Creates a new GhostDataHandle.
Definition: genericdatahandle.hh:883
GatherScatter functor for creating a disjoint DOF partitioning.
Definition: genericdatahandle.hh:903
bool gather(MessageBuffer &buff, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:908
DisjointPartitioningGatherScatter(RankIndex rank)
Create a DisjointPartitioningGatherScatter object.
Definition: genericdatahandle.hh:953
bool scatter(MessageBuffer &buff, std::size_t n, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:918
GatherScatter data handle for creating a disjoint DOF partitioning.
Definition: genericdatahandle.hh:983
DisjointPartitioningDataHandle(const GFS &gfs_, V &v_, bool init_vector=true)
Creates a new DisjointPartitioningDataHandle.
Definition: genericdatahandle.hh:1007
GatherScatter functor for marking shared DOFs.
Definition: genericdatahandle.hh:1024
bool scatter(MessageBuffer &buff, std::size_t n, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:1034
bool gather(MessageBuffer &buff, const Entity &e, LocalView &local_view) const
Definition: genericdatahandle.hh:1027
Data handle for marking shared DOFs.
Definition: genericdatahandle.hh:1062
SharedDOFDataHandle(const GFS &gfs_, V &v_, bool init_vector=true)
Creates a new SharedDOFDataHandle.
Definition: genericdatahandle.hh:1085
Data handle for collecting set of neighboring MPI ranks.
Definition: genericdatahandle.hh:1105
GFS::Traits::SizeType size_type
Definition: genericdatahandle.hh:1113
void scatter(MessageBuffer &buff, const Entity &e, size_type n)
Definition: genericdatahandle.hh:1146
size_type size(Entity &e) const
Definition: genericdatahandle.hh:1134
void gather(MessageBuffer &buff, const Entity &e) const
Definition: genericdatahandle.hh:1140
bool fixedSize(int dim, int codim) const
Definition: genericdatahandle.hh:1127
GFSNeighborDataHandle(const GFS &gfs, RankIndex rank, std::set< RankIndex > &neighbors)
Definition: genericdatahandle.hh:1115
bool contains(int dim, int codim) const
Definition: genericdatahandle.hh:1121
RankIndex DataType
Definition: genericdatahandle.hh:1112
static const unsigned int value
Definition: gridfunctionspace/tags.hh:139