Implementing MapDistribute in the class
For the send/receive operations the gather-scatter operation must be changed.
OpenFoam has a mapDistribute class that is meant to handle parallel communication between processes without passing from a master node.
the class can be found at
src/foam/lnInclude/mapDistribute.H
an example of its usage can be found at
src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C
line 60
I do am quite lost :)