From 057eff0e5937cbeefa0bc44aa9cf2355b7582c35 Mon Sep 17 00:00:00 2001 From: laurence Date: Tue, 11 Dec 2012 17:07:12 +0000 Subject: [PATCH] ENH: update fvMeshDistribute and domainDecomposition to use new coupledPolyPatch constructor --- .../decomposePar/domainDecomposition.C | 24 ++++++++++++------- .../fvMeshDistribute/fvMeshDistribute.C | 14 +++++++---- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C index 1dd38329e7..c682da6701 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C @@ -428,12 +428,12 @@ bool Foam::domainDecomposition::writeDecomposition() : curProcessorPatchSizes[procPatchI] - subStarts[i] ); - //Info<< "From processor:" << procI << endl - // << " to processor:" << curNeighbourProcessors[procPatchI] - // << endl - // << " via patch:" << subPatchID[i] << endl - // << " start :" << curStart << endl - // << " size :" << size << endl; +// Info<< "From processor:" << procI << endl +// << " to processor:" << curNeighbourProcessors[procPatchI] +// << endl +// << " via patch:" << subPatchID[i] << endl +// << " start :" << curStart << endl +// << " size :" << size << endl; if (subPatchID[i] == -1) { @@ -454,9 +454,14 @@ bool Foam::domainDecomposition::writeDecomposition() } else { + const coupledPolyPatch& pcPatch + = refCast + ( + boundaryMesh()[subPatchID[i]] + ); + // From cyclic - const word& referPatch = - boundaryMesh()[subPatchID[i]].name(); + const word& referPatch = pcPatch.name(); procPatches[nPatches] = new processorCyclicPolyPatch @@ -472,7 +477,8 @@ bool Foam::domainDecomposition::writeDecomposition() procMesh.boundaryMesh(), procI, curNeighbourProcessors[procPatchI], - referPatch + referPatch, + pcPatch.transform() ); } diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C index e4794b634b..54aebc17e1 100644 --- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C +++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C @@ -961,11 +961,14 @@ void Foam::fvMeshDistribute::addProcPatches } else { + const coupledPolyPatch& pcPatch + = refCast + ( + mesh_.boundaryMesh()[referPatchID[bFaceI]] + ); + // Processor boundary originating from cyclic - const word& cycName = mesh_.boundaryMesh() - [ - referPatchID[bFaceI] - ].name(); + const word& cycName = pcPatch.name(); const word patchName = "procBoundary" @@ -984,7 +987,8 @@ void Foam::fvMeshDistribute::addProcPatches mesh_.boundaryMesh(), Pstream::myProcNo(), nbrProc[bFaceI], - cycName + cycName, + pcPatch.transform() ); procPatchID[procI].insert