BUG: globalMeshData::mergePoints was assuming patch was on master processor.

Each collocated set of coupled points has a single master assigned to it.
However when doing mergePoints on a patch the master does not have to be
on the patch. So now it returns mesh point labels, not patch point labels.
This commit is contained in:
mattijs
2010-02-12 12:45:00 +00:00
parent 8cf3f429a5
commit bd58fa5322
3 changed files with 155 additions and 94 deletions

View File

@ -30,13 +30,10 @@ License
#include "fvMesh.H"
#include "globalMeshData.H"
#include "PstreamCombineReduceOps.H"
#include "processorPolyPatch.H"
#include "cellModeller.H"
#include "IOmanip.H"
#include "itoa.H"
#include "ensightWriteBinary.H"
#include "globalIndex.H"
#include "PackedBoolList.H"
#include "mapDistribute.H"
#include <fstream>
@ -1345,17 +1342,18 @@ void Foam::ensightMesh::writeAscii
// Renumber the patch points/faces into unique points
labelList pointToGlobal;
labelList uniquePointLabels;
labelList uniqueMeshPointLabels;
autoPtr<globalIndex> globalPointsPtr =
mesh_.globalData().mergePoints
(
p.meshPoints(),
p.meshPointMap(),
pointToGlobal,
uniquePointLabels
uniqueMeshPointLabels
);
pointField uniquePoints(p.localPoints(), uniquePointLabels);
pointField uniquePoints(mesh_.points(), uniqueMeshPointLabels);
// Renumber the patch faces
faceList patchFaces(p.localFaces());
forAll(patchFaces, i)
@ -1598,16 +1596,17 @@ void Foam::ensightMesh::writeBinary
// Renumber the patch points/faces into unique points
labelList pointToGlobal;
labelList uniquePointLabels;
labelList uniqueMeshPointLabels;
autoPtr<globalIndex> globalPointsPtr =
mesh_.globalData().mergePoints
(
p.meshPoints(),
p.meshPointMap(),
pointToGlobal,
uniquePointLabels
uniqueMeshPointLabels
);
pointField uniquePoints(p.localPoints(), uniquePointLabels);
pointField uniquePoints(mesh_.points(), uniqueMeshPointLabels);
// Renumber the patch faces
faceList patchFaces(p.localFaces());
forAll(patchFaces, i)