diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H index 65888ea79e..748834ca4d 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H @@ -168,19 +168,50 @@ public: List& ); - //- Distribute data using scheduling. + //- Distribute data using default commsType. template void distribute(List& fld) const { - distribute + if ( - Pstream::scheduled, - schedule(), - constructSize_, - subMap_, - constructMap_, - fld - ); + Pstream::defaultCommsType == Pstream::nonBlocking + && contiguous() + ) + { + distribute + ( + Pstream::nonBlocking, + List(), + constructSize_, + subMap_, + constructMap_, + fld + ); + } + else if (Pstream::defaultCommsType == Pstream::scheduled) + { + distribute + ( + Pstream::scheduled, + schedule(), + constructSize_, + subMap_, + constructMap_, + fld + ); + } + else + { + distribute + ( + Pstream::blocking, + List(), + constructSize_, + subMap_, + constructMap_, + fld + ); + } } //- Correct for topo change.