29 :
public Dune::CommDataHandleIF<UniqueBorderPartition<Grid>, int>
31 using IdSet =
typename Grid::GlobalIdSet;
32 using IdType =
typename IdSet::IdType;
35 using EntitySet = std::set<IdType>;
50 , idSet_(grid.globalIdSet())
54 bool contains(
int ,
int )
const {
return true; }
57 bool fixedSize(
int ,
int )
const {
return true; }
60 template <
class Entity>
61 std::size_t size(Entity
const& )
const {
return 1; }
63 template <
class MessageBuffer,
class Entity>
64 void gather(MessageBuffer& buff, Entity
const& )
const
69 template <
class MessageBuffer,
class Entity>
70 void scatter(MessageBuffer& buff, Entity
const& e, std::size_t n)
72 scatterImpl(buff, e, n, int_t<Entity::codimension>{});
78 return notOwner_.count(
id) == 0;
89 template <
class MessageBuffer,
class Entity,
int cd>
90 void scatterImpl(MessageBuffer& buff, Entity
const& e, [[maybe_unused]] std::size_t n, int_t<cd>)
100 notOwner_.insert(idSet_.id(e));
103 template <
class MessageBuffer,
class Entity>
104 void scatterImpl(MessageBuffer& buff, Entity
const& e, [[maybe_unused]] std::size_t n, int_t<0>)
113 if (rank > myrank_) {
114 for (
int codim = 1; codim <= Grid::dimension; ++codim) {
115 for (
int i = 0; i <
int(e.subEntities(codim)); ++i) {
116 notOwner_.insert(idSet_.subId(e, i, codim));
UniqueBorderPartition(int rank, Grid const &grid)
Construct a UniqueBorderPartition DataHandle to be used in a GridView communicator.
Definition UniqueBorderPartition.hpp:48