mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -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
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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
|
||||
(
|
||||
|
||||
@ -432,7 +432,6 @@ Foam::autoPtr<Foam::fvMesh> Foam::conformalVoronoiMesh::createDummyMesh
|
||||
{
|
||||
patches[patchI] = new processorPolyPatch
|
||||
(
|
||||
patchNames[patchI],
|
||||
0, //patchSizes[p],
|
||||
0, //patchStarts[p],
|
||||
patchI,
|
||||
|
||||
@ -444,29 +444,12 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
|
||||
label nInterProcPatches = 0;
|
||||
forAll(curSubPatchIDs, procPatchI)
|
||||
{
|
||||
//Info<< "For processor " << procI
|
||||
// << " have to destination processor "
|
||||
// << curNeighbourProcessors[procPatchI] << endl;
|
||||
//
|
||||
//forAll(curSubPatchIDs[procPatchI], i)
|
||||
//{
|
||||
// Info<< " from patch:" << curSubPatchIDs[procPatchI][i]
|
||||
// << " starting at:" << curSubStarts[procPatchI][i]
|
||||
// << endl;
|
||||
//}
|
||||
|
||||
nInterProcPatches += curSubPatchIDs[procPatchI].size();
|
||||
}
|
||||
|
||||
//Info<< "For processor " << procI
|
||||
// << " have " << nInterProcPatches
|
||||
// << " patches to neighbouring processors" << endl;
|
||||
|
||||
|
||||
List<polyPatch*> procPatches
|
||||
(
|
||||
curPatchSizes.size()
|
||||
+ nInterProcPatches, //curProcessorPatchSizes.size(),
|
||||
curPatchSizes.size() + nInterProcPatches,
|
||||
reinterpret_cast<polyPatch*>(0)
|
||||
);
|
||||
|
||||
@ -517,22 +500,12 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
|
||||
: 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;
|
||||
|
||||
if (subPatchID[i] == -1)
|
||||
{
|
||||
// From internal faces
|
||||
procPatches[nPatches] =
|
||||
new processorPolyPatch
|
||||
(
|
||||
word("procBoundary") + Foam::name(procI)
|
||||
+ "to"
|
||||
+ Foam::name(curNeighbourProcessors[procPatchI]),
|
||||
size,
|
||||
curStart,
|
||||
nPatches,
|
||||
@ -549,24 +522,16 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
|
||||
boundaryMesh()[subPatchID[i]]
|
||||
);
|
||||
|
||||
// From cyclic
|
||||
const word& referPatch = pcPatch.name();
|
||||
|
||||
procPatches[nPatches] =
|
||||
new processorCyclicPolyPatch
|
||||
(
|
||||
word("procBoundary") + Foam::name(procI)
|
||||
+ "to"
|
||||
+ Foam::name(curNeighbourProcessors[procPatchI])
|
||||
+ "through"
|
||||
+ referPatch,
|
||||
size,
|
||||
curStart,
|
||||
nPatches,
|
||||
procMesh.boundaryMesh(),
|
||||
procI,
|
||||
curNeighbourProcessors[procPatchI],
|
||||
referPatch,
|
||||
pcPatch.name(),
|
||||
pcPatch.transform()
|
||||
);
|
||||
}
|
||||
@ -577,16 +542,6 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//forAll(procPatches, patchI)
|
||||
//{
|
||||
// Pout<< " " << patchI
|
||||
// << '\t' << "name:" << procPatches[patchI]->name()
|
||||
// << '\t' << "type:" << procPatches[patchI]->type()
|
||||
// << '\t' << "size:" << procPatches[patchI]->size()
|
||||
// << endl;
|
||||
//}
|
||||
|
||||
// Add boundary patches
|
||||
procMesh.addPatches(procPatches);
|
||||
|
||||
|
||||
@ -161,12 +161,9 @@ autoPtr<faceCoupleInfo> determineCoupledFaces
|
||||
|
||||
for (label mergedProcI = 0; mergedProcI < procI; mergedProcI++)
|
||||
{
|
||||
const string fromProcString
|
||||
const word fromProcString
|
||||
(
|
||||
"procBoundary"
|
||||
+ name(procI)
|
||||
+ "to"
|
||||
+ name(mergedProcI)
|
||||
processorPolyPatch::newName(procI, mergedProcI)
|
||||
);
|
||||
|
||||
if (pp.name() == fromProcString)
|
||||
|
||||
Reference in New Issue
Block a user