processorPolyPatch, processorCyclicPolyPatch: Rationalized the construction of the patch name

This change ensures that these patches are named consistently so that
they can be looked-up as required in e.g. patchMeanVelocityForce
This commit is contained in:
Henry Weller
2016-02-02 20:07:16 +00:00
parent 923f39a9f8
commit 8b9698ad43
13 changed files with 139 additions and 121 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -540,24 +540,15 @@ int main(int argc, char *argv[])
{
label nbrProcI = patchToNbrProc[patchI];
word name =
"procBoundary"
+ Foam::name(Pstream::myProcNo())
+ "to"
+ Foam::name(nbrProcI);
Pout<< "Adding patch " << patchI
<< " name:" << name
<< " between " << Pstream::myProcNo()
<< " and " << nbrProcI
<< endl;
newPatches.append
(
new processorPolyPatch
(
name,
0, // size
mesh.nFaces(), // start
patchI, // index

View File

@ -955,13 +955,11 @@ void addCoupledPatches
}
else
{
// Rrocessor patch
word name =
"procBoundary"
+ Foam::name(Pstream::myProcNo())
+ "to"
+ Foam::name(nbrProcI);
// Processor patch
word name
(
processorPolyPatch::newName(Pstream::myProcNo(), nbrProcI)
);
sidePatchID[edgeI] = findPatchID(newPatches, name);

View File

@ -1631,10 +1631,7 @@ Foam::label Foam::conformalVoronoiMesh::createPatchInfo
if (procUsed[pUI])
{
patchNames[nNonProcPatches + procAddI] =
"procBoundary"
+ name(Pstream::myProcNo())
+ "to"
+ name(pUI);
processorPolyPatch::newName(Pstream::myProcNo(), pUI);
patchDicts[nNonProcPatches + procAddI].set
(

View File

@ -432,7 +432,6 @@ Foam::autoPtr<Foam::fvMesh> Foam::conformalVoronoiMesh::createDummyMesh
{
patches[patchI] = new processorPolyPatch
(
patchNames[patchI],
0, //patchSizes[p],
0, //patchStarts[p],
patchI,