diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H index 633a07d840..5c17f0547f 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -554,6 +554,15 @@ public: const int tag = UPstream::msgType() ); + //- Distribute data using default commsType. + template + void distribute + ( + DynamicList& fld, + const bool dummyTransform = true, + const int tag = UPstream::msgType() + ) const; + //- Distribute data using default commsType. template void distribute diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C index 037075c96e..577af21ed1 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -887,6 +887,25 @@ void Foam::mapDistribute::applyInverseTransforms } +//- Distribute data using default commsType. +template +void Foam::mapDistribute::distribute +( + DynamicList& fld, + const bool dummyTransform, + const int tag +) const +{ + fld.shrink(); + + List& fldList = static_cast& >(fld); + + distribute(fldList, dummyTransform, tag); + + fld.setCapacity(fldList.size()); +} + + //- Distribute data using default commsType. template void Foam::mapDistribute::distribute