diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C index 25e7727c8e..95c2d1d232 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C @@ -29,6 +29,7 @@ License #include "globalIndex.H" #include "globalIndexAndTransform.H" #include "transformField.H" +#include "ListOps.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -1104,6 +1105,12 @@ Foam::mapDistribute::mapDistribute(const Xfer& map) // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // +Foam::label Foam::mapDistribute::whichTransform(const label index) const +{ + return findLower(transformStart_, index+1); +} + + void Foam::mapDistribute::transfer(mapDistribute& rhs) { constructSize_ = rhs.constructSize_; diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H index 6e1a26468c..99a31d3d7d 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H @@ -385,6 +385,9 @@ public: return transformStart_; } + //- Find transform from transformElements + label whichTransform(const label index) const; + //- Calculate a schedule. See above. static List schedule (