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

@ -45,7 +45,7 @@ License
namespace Foam
{
defineTypeNameAndDebug(fvMeshDistribute, 0);
defineTypeNameAndDebug(fvMeshDistribute, 0);
}
@ -929,16 +929,8 @@ void Foam::fvMeshDistribute::addProcPatches
if (referPatchID[bFaceI] == -1)
{
// Ordinary processor boundary
const word patchName =
"procBoundary"
+ name(Pstream::myProcNo())
+ "to"
+ name(procI);
processorPolyPatch pp
(
patchName,
0, // size
mesh_.nFaces(),
mesh_.boundaryMesh().size(),
@ -968,27 +960,15 @@ void Foam::fvMeshDistribute::addProcPatches
mesh_.boundaryMesh()[referPatchID[bFaceI]]
);
// Processor boundary originating from cyclic
const word& cycName = pcPatch.name();
const word patchName =
"procBoundary"
+ name(Pstream::myProcNo())
+ "to"
+ name(procI)
+ "through"
+ cycName;
processorCyclicPolyPatch pp
(
patchName,
0, // size
mesh_.nFaces(),
mesh_.boundaryMesh().size(),
mesh_.boundaryMesh(),
Pstream::myProcNo(),
nbrProc[bFaceI],
cycName,
pcPatch.name(),
pcPatch.transform()
);