From dbd773a8aaa948c9c35c2145cfffeb561145d61d Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 6 Oct 2008 11:28:55 +0100 Subject: [PATCH] using default comms type --- .../mapPolyMesh/mapDistribute/mapDistribute.H | 49 +++++++++++++++---- 1 file changed, 40 insertions(+), 9 deletions(-) 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.