diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index 476f477373..26ee3e062a 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -94,11 +94,12 @@ int main(int argc, char *argv[]) # include "setRootCase.H" word regionName = fvMesh::defaultRegion; + word regionDir = word::null; if (args.options().found("region")) { regionName = args.options()["region"]; - + regionDir = regionName; Info<< "Decomposing mesh " << regionName << nl << endl; } @@ -116,7 +117,17 @@ int main(int argc, char *argv[]) // determine the existing processor count directly label nProcs = 0; - while (isDir(runTime.path()/(word("processor") + name(nProcs)))) + while + ( + isDir + ( + runTime.path() + /(word("processor") + name(nProcs)) + /runTime.constant() + /regionDir + /polyMesh::meshSubDir + ) + ) { ++nProcs; } @@ -130,7 +141,7 @@ int main(int argc, char *argv[]) ( "decomposeParDict", runTime.time().system(), - regionName, + regionDir, // use region if non-standard runTime, IOobject::MUST_READ, IOobject::NO_WRITE, diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposeParDict b/applications/utilities/parallelProcessing/decomposePar/decomposeParDict index 288797ed1e..98ec9b7087 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposeParDict +++ b/applications/utilities/parallelProcessing/decomposePar/decomposeParDict @@ -19,7 +19,7 @@ FoamFile numberOfSubdomains 4; -// preservePatches (inlet); +//- Keep owner and neighbour on same processor for faces in zones: // preserveFaceZones (heater solid1 solid3); method simple; diff --git a/applications/utilities/parallelProcessing/decomposePar/distributeCells.C b/applications/utilities/parallelProcessing/decomposePar/distributeCells.C index ad78b2a914..af47af244f 100644 --- a/applications/utilities/parallelProcessing/decomposePar/distributeCells.C +++ b/applications/utilities/parallelProcessing/decomposePar/distributeCells.C @@ -45,35 +45,6 @@ void domainDecomposition::distributeCells() labelHashSet sameProcFaces; - if (decompositionDict_.found("preservePatches")) - { - wordList pNames(decompositionDict_.lookup("preservePatches")); - - Info<< "Keeping owner and neighbour of faces in patches " << pNames - << " on same processor" << endl; - - const polyBoundaryMesh& patches = boundaryMesh(); - - forAll(pNames, i) - { - label patchI = patches.findPatchID(pNames[i]); - - if (patchI == -1) - { - FatalErrorIn("domainDecomposition::distributeCells()") - << "Unknown preservePatch " << pNames[i] - << endl << "Valid patches are " << patches.names() - << exit(FatalError); - } - - const polyPatch& pp = patches[patchI]; - - forAll(pp, i) - { - sameProcFaces.insert(pp.start() + i); - } - } - } if (decompositionDict_.found("preserveFaceZones")) { wordList zNames(decompositionDict_.lookup("preserveFaceZones")); @@ -104,14 +75,6 @@ void domainDecomposition::distributeCells() } } - if (sameProcFaces.size()) - { - Info<< "Selected " << sameProcFaces.size() - << " faces whose owner and neighbour cell should be kept on the" - << " same processor" << endl; - } - - // Construct decomposition method and either do decomposition on // cell centres or on agglomeration @@ -129,6 +92,10 @@ void domainDecomposition::distributeCells() } else { + Info<< "Selected " << sameProcFaces.size() + << " faces whose owner and neighbour cell should be kept on the" + << " same processor" << endl; + // Faces where owner and neighbour are not 'connected' (= all except // sameProcFaces) boolList blockedFace(nFaces(), true);