Communication over InteriorBorder_All_Interface for edges
Communicating data living on edges in a parallel UGGrid maybe has a bug, when specifying as communication interface InteriorBorder_All_Interface
, i.e. not all interior edges that have a counterpart in a neighboring partition on a ghost element are visited and communicated.
I've tried to construct a minimal example, see the attached file entity_owner.cpp
There, a structured grid made of 8 triangular elements can be distributed on e.g. two processors. The resulting entitiy-distribution can be found in the picture
where the colored regions correspond to ghost cells overlapping with the other partition, e.g. ghost element 0 in P0 overlaps with interior element 5 in P1.
Communicating over all edges, i.e.
gv.communicate(handle, Dune::InteriorBorder_All_Interface, Dune::ForwardCommunication);
with
bool contains(int dim, int codim) const { return codim == 1; }
in the communication handler, results in the output
[0] send entity 4
[0] send entity 1
[1] send entity 5
[1] send entity 2
[1] receive entity 5
[1] receive entity 2
[0] receive entity 4
[0] receive entity 1
Thus, only border entities are send, or only interior-border entities are received. Both does not correspond to the expected behavior, that is, all entities with codim 1 in interior+border
that have a counterpart in interior+border+ghost
(all) should be communicated.
Changing the communication interface to All_All_Interface
results in a correct behavior.