diff --git a/applications/solvers/lagrangian/DPMFoam/DPMFoam.C b/applications/solvers/lagrangian/DPMFoam/DPMFoam.C index c23d85bfe8..85bba58da3 100644 --- a/applications/solvers/lagrangian/DPMFoam/DPMFoam.C +++ b/applications/solvers/lagrangian/DPMFoam/DPMFoam.C @@ -51,7 +51,7 @@ int main(int argc, char *argv[]) { argList::addOption ( - "cloudName", + "cloud", "name", "specify alternative cloud name. default is 'kinematicCloud'" ); diff --git a/applications/solvers/lagrangian/DPMFoam/createFields.H b/applications/solvers/lagrangian/DPMFoam/createFields.H index 26467976f5..49f280e428 100644 --- a/applications/solvers/lagrangian/DPMFoam/createFields.H +++ b/applications/solvers/lagrangian/DPMFoam/createFields.H @@ -11,7 +11,7 @@ word continuousPhaseName mesh, IOobject::MUST_READ ) - ).lookup("continuousPhaseName") + ).lookup("continuousPhase") ); Info<< "Reading field U\n" << endl; @@ -123,7 +123,7 @@ volScalarField alphac ); word kinematicCloudName("kinematicCloud"); -args.optionReadIfPresent("cloudName", kinematicCloudName); +args.optionReadIfPresent("cloud", kinematicCloudName); Info<< "Constructing kinematicCloud " << kinematicCloudName << endl; basicKinematicTypeCloud kinematicCloud diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/createFields.H b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/createFields.H index 77287eed87..76c70fffd9 100644 --- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/createFields.H @@ -58,7 +58,7 @@ volScalarField mu ); word kinematicCloudName("kinematicCloud"); -args.optionReadIfPresent("cloudName", kinematicCloudName); +args.optionReadIfPresent("cloud", kinematicCloudName); Info<< "Constructing kinematicCloud " << kinematicCloudName << endl; basicKinematicCollidingCloud kinematicCloud diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/icoUncoupledKinematicParcelDyMFoam.C b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/icoUncoupledKinematicParcelDyMFoam.C index d672386e50..be0905796b 100644 --- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/icoUncoupledKinematicParcelDyMFoam.C +++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelDyMFoam/icoUncoupledKinematicParcelDyMFoam.C @@ -47,7 +47,7 @@ int main(int argc, char *argv[]) { argList::addOption ( - "cloudName", + "cloud", "name", "specify alternative cloud name. default is 'kinematicCloud'" ); diff --git a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C index c21100b0be..6b64ce99f3 100644 --- a/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C +++ b/applications/solvers/lagrangian/icoUncoupledKinematicParcelFoam/icoUncoupledKinematicParcelFoam.C @@ -46,7 +46,7 @@ int main(int argc, char *argv[]) { argList::addOption ( - "cloudName", + "cloud", "name", "specify alternative cloud name. default is 'kinematicCloud'" ); diff --git a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/createFields.H b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/createFields.H index 9f728049f9..9aa648ce5f 100644 --- a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/createFields.H @@ -51,7 +51,7 @@ autoPtr turbulence const word kinematicCloudName ( - args.optionLookupOrDefault("cloudName", "kinematicCloud") + args.optionLookupOrDefault("cloud", "kinematicCloud") ); Info<< "Constructing kinematicCloud " << kinematicCloudName << endl; diff --git a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C index d3a1f829fd..006c98b7a8 100644 --- a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C +++ b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C @@ -45,7 +45,7 @@ int main(int argc, char *argv[]) { argList::addOption ( - "cloudName", + "cloud", "name", "specify alternative cloud name. default is 'kinematicCloud'" ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.C index 2f7abc7015..63c85938cf 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.C @@ -49,7 +49,7 @@ Foam::copiedFixedValueFvPatchScalarField::copiedFixedValueFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - sourceFieldName_(dict.lookup("sourceFieldName")) + sourceFieldName_(dict.lookup("sourceField")) {} @@ -109,7 +109,7 @@ void Foam::copiedFixedValueFvPatchScalarField::updateCoeffs() void Foam::copiedFixedValueFvPatchScalarField::write(Ostream& os) const { fvPatchField::write(os); - os.writeKeyword("sourceFieldName") + os.writeKeyword("sourceField") << sourceFieldName_ << token::END_STATEMENT << nl; writeEntry("value", os); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.H index b2af2f1c4a..f0f224d353 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/copiedFixedValue/copiedFixedValueFvPatchScalarField.H @@ -62,6 +62,7 @@ protected: word sourceFieldName_; + public: //- Runtime type information diff --git a/applications/test/dimensionedType/Test-dimensionedType.C b/applications/test/dimensionedType/Test-dimensionedType.C index 965de25ead..892552fa70 100644 --- a/applications/test/dimensionedType/Test-dimensionedType.C +++ b/applications/test/dimensionedType/Test-dimensionedType.C @@ -81,6 +81,10 @@ int main(int argc, char *argv[]) } + Pout<< "zero scalar (time): " << dimensionedScalar(dimTime) << endl; + Pout<< "zero vector: " << dimensionedVector(dimLength) << endl; + Pout<< "zero tensor: " << dimensionedTensor(dimLength) << endl; + Info<< "End\n" << endl; return 0; diff --git a/applications/test/objectRegistry/Make/files b/applications/test/objectRegistry/Make/files new file mode 100644 index 0000000000..b7c477f791 --- /dev/null +++ b/applications/test/objectRegistry/Make/files @@ -0,0 +1,3 @@ +Test-objectRegistry.C + +EXE = $(FOAM_USER_APPBIN)/Test-objectRegistry diff --git a/applications/test/objectRegistry/Make/options b/applications/test/objectRegistry/Make/options new file mode 100644 index 0000000000..6a9e9810b3 --- /dev/null +++ b/applications/test/objectRegistry/Make/options @@ -0,0 +1,2 @@ +/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ +/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/objectRegistry/Test-objectRegistry.C b/applications/test/objectRegistry/Test-objectRegistry.C new file mode 100644 index 0000000000..c807ba9c04 --- /dev/null +++ b/applications/test/objectRegistry/Test-objectRegistry.C @@ -0,0 +1,278 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Application + Test-objectRegistry + +Description + Simple test of objectRegistry functionality. + Particular focus on the behaviour of subRegistry. + +\*---------------------------------------------------------------------------*/ + +#include "argList.H" +#include "Time.H" +#include "polyMesh.H" +#include "IOstreams.H" +#include "objectRegistry.H" +#include "hashedWordList.H" + +using namespace Foam; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// file variable, needed for switching the default in lookupObject etc. +bool recursive = false; + + +template +Foam::Ostream& printList(Foam::Ostream& os, const UList& list) +{ + // list with out any linebreaks + os << '('; + forAll(list, i) + { + if (i) os << ' '; + os << list[i]; + } + os << ')'; + + return os; +} + + +void printRegistry +( + Foam::Ostream& os, + const Foam::objectRegistry& obr, + Foam::label indent = 4 +); + + +void printRegistry +( + Foam::Ostream& os, + const Foam::objectRegistry& obr, + Foam::label indent +) +{ + hashedWordList regs = obr.names(); + regs.sort(); + wordList names = obr.sortedNames(); + + std::string prefix; + for (label i=indent; i; --i) + { + prefix += ' '; + } + + os << '#' << prefix.c_str() << obr.name() + << " parent:" << obr.parent().name() << nl; + + // all names + { + os << ' ' << prefix.c_str() << "objects: "; + printList(os, names) << nl; + } + + // sub-registry names + { + os << ' ' << prefix.c_str() << "registries: "; + printList(os, regs) << nl; + } + + // Print, but skip expansion of sub-registries for now + forAll(names, i) + { + const word& name = names[i]; + + os << (regs.found(name) ? '-' : ' ') + << prefix.c_str() << name << " => " << obr[name]->type() << nl; + } + for (label i=indent; i; --i) + { + os << '-'; // divider + } + os << '\n'; + + // Now descend into the sub-registries + forAll(regs, i) + { + const word& name = regs[i]; + const objectRegistry& next = obr.lookupObject + ( + name + ); + + os << prefix.c_str() + << "current:" << obr.name() << " next:" + << next.name() << " next-parent:" << next.parent().name() << nl; + + os << prefix.c_str() << name << " => " << obr[name]->type(); + + if ("dictionary" == obr[name]->type()) + { + os << " (skip dictionary)" << nl; + } + else + { + os << nl; + printRegistry(os, next, indent + 4); + } + } +} + +// Main program: + +int main(int argc, char *argv[]) +{ + argList::noBanner(); + argList::noParallel(); + argList::addBoolOption + ( + "mesh", + "test with polyMesh objectRegistry instead of runTime" + ); + argList::addBoolOption + ( + "skip", + "skip some parts" + ); + // argList::validArgs.append("recursive (true|false)"); + + #include "setRootCase.H" + #include "createTime.H" + #include "createPolyMesh.H" + + // recursive = Switch(args[1]); + + const bool optMesh = args.optionFound("mesh"); + const bool optSkip = args.optionFound("skip"); + const objectRegistry& db = (optMesh ? mesh.thisDb() : runTime); + + Info<<"## start ##" << nl; + printRegistry(Info, db); + Info<< nl; + + const label nRegs = 3; + + // Add some items + for (label j = 0; j < 3; ++j) + { + word entryName = "entry" + name(j); + db.subRegistry + ( + entryName, + true + ); + } + + Info<<"## initally populated ##" << nl; + printRegistry(Info, db); + Info<< nl; + + + // create a few sub-registries + for (label i = 0; i < nRegs; ++i) + { + word regName = "subreg" + name(i); + + const objectRegistry& subreg = db.subRegistry + ( + regName, + true + ); + + for (label j = 0; j < 3; ++j) + { + word entryName = "entry" + name(j); + + subreg.subRegistry + ( + entryName, + true + ); + subreg.subRegistry + ( + "$" + entryName, // qualified to avoid collisions + true + ); + } + } + + Info<<"## after adding sub-registries" << nl; + printRegistry(Info, db); + Info<< nl; + + // Add further items into top-level + for (label j = 0; j < 6; ++j) + { + word entryName = "entry" + name(j); + db.subRegistry + ( + entryName, + true + ); + } + + Info<< "after adding some entries, top-level now contains: "; + printList(Info, db.names()) << endl; + + Info<<"## Now attempt to add a few more entries ##" << nl; + + // Try adding the same items into sub registry + // create a few sub-registries + for (label i = 0; i < nRegs; ++i) + { + word regName = "subreg" + name(i); + + const objectRegistry& subreg = db.subRegistry + ( + regName, + false + ); + + if (!optSkip) + { + for (label j = 0; j < 6; ++j) + { + word entryName = "entry" + name(j); + + subreg.subRegistry + ( + entryName, + true + ); + } + } + } + + Info<<"## Complete picture ##" << nl; + printRegistry(Info, db); + Info<< nl; + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/test/passiveParticle/Test-passiveParticle.C b/applications/test/passiveParticle/Test-passiveParticle.C index 68bea7b8ef..96fcc35282 100644 --- a/applications/test/passiveParticle/Test-passiveParticle.C +++ b/applications/test/passiveParticle/Test-passiveParticle.C @@ -36,7 +36,7 @@ Description int main(int argc, char *argv[]) { - argList::validArgs.append("cloudName"); + argList::validArgs.append("cloud"); #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" diff --git a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C index 25c536e103..7385fd5029 100644 --- a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C +++ b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C @@ -602,8 +602,8 @@ int main(int argc, char *argv[]) const word& key = iter().keyword(); const dictionary& dict = iter().dict(); - const word cyclicName = dict.lookup("cyclicMasterPatchName"); - const word wallName = dict.lookup("wallPatchName"); + const word cyclicName = dict.lookup("cyclicMasterPatch"); + const word wallName = dict.lookup("wallPatch"); FixedList nameAndType; nameAndType[0] = key; nameAndType[1] = wallName; diff --git a/applications/utilities/mesh/generation/blockMesh/blockMesh.C b/applications/utilities/mesh/generation/blockMesh/blockMesh.C index 4441f15e49..d48980cb8c 100644 --- a/applications/utilities/mesh/generation/blockMesh/blockMesh.C +++ b/applications/utilities/mesh/generation/blockMesh/blockMesh.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -148,6 +148,15 @@ int main(int argc, char *argv[]) dictPath = runTime.constant() /regionPath/polyMesh::meshSubDir/dictName; + + // Warn that constant/polyMesh/blockMesh was selected instead of + // system/blockMesh + WarningIn(args[0]) + << "Using the old blockMeshDict location: " + << dictPath << nl + << " instead of the default location: " + << runTime.system()/regionPath/dictName << nl + << endl; } // Otherwise assume the dictionary is present in the system directory else diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C index 7b998241d6..ed0e635787 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C @@ -901,33 +901,42 @@ int main(int argc, char *argv[]) // Read decomposePar dictionary dictionary decomposeDict; + if (Pstream::parRun()) { - if (Pstream::parRun()) - { - fileName decompDictFile; - args.optionReadIfPresent("decomposeParDict", decompDictFile); + fileName decompDictFile; + args.optionReadIfPresent("decomposeParDict", decompDictFile); - decomposeDict = IOdictionary + // A demand-driven decompositionMethod can have issues finding + // an alternative decomposeParDict location. + + IOdictionary* dictPtr = new IOdictionary + ( + decompositionModel::selectIO ( - decompositionModel::selectIO + IOobject ( - IOobject - ( - "decomposeParDict", - runTime.system(), - mesh, - IOobject::MUST_READ_IF_MODIFIED, - IOobject::NO_WRITE - ), - decompDictFile - ) - ); - } - else - { - decomposeDict.add("method", "none"); - decomposeDict.add("numberOfSubdomains", 1); - } + "decomposeParDict", + runTime.system(), + runTime, + IOobject::MUST_READ, + IOobject::NO_WRITE + ), + decompDictFile + ) + ); + + // Store it on the object registry, but to be found it must also + // have the expected "decomposeParDict" name. + + dictPtr->rename("decomposeParDict"); + runTime.store(dictPtr); + + decomposeDict = *dictPtr; + } + else + { + decomposeDict.add("method", "none"); + decomposeDict.add("numberOfSubdomains", 1); } diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict index 6261216c65..bf257a8ff5 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict @@ -431,7 +431,11 @@ snapControls // (wip) Optional for explicit feature snapping: //- Detect baffle edges. Default is true. //detectBaffles false; - //- Erase attraction close to feature point. Default is false. + //- On any faces where points are on multiple regions (see + // multiRegionFeatureSnap) have the other points follow these points + // instead of having their own independent movement, i.e. have snapping + // to multi-region edges/points take priority. This might aid snapping + // to sharp edges that are also region edges. The default is false. //releasePoints true; //- Walk along feature edges, adding missing ones. Default is true. //stringFeatures false; diff --git a/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C b/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C index ab692d4706..71013769a1 100644 --- a/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C +++ b/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -28,15 +28,31 @@ Group grpMeshManipulationUtilities Description - Detects faces that share points (baffles). Either merge them or + Detects boundary faces that share points (baffles). Either merges them or duplicate the points. - Notes: +Usage + \b mergeOrSplitBaffles [OPTION] + + Options: + - \par -detect + Detect baffles and write to faceSet duplicateFaces. + + - \par -merge + Detect baffles and convert to internal faces. + + - \par -split + Detect baffles and duplicate the points (used so the two sides + can move independently) + + - \par -dict \ + Specify a dictionary to read actions from. + + +Note - can only handle pairwise boundary faces. So three faces using the same points is not handled (is illegal mesh anyway) - - there is no option to only split/merge some baffles. - - surfaces consisting of duplicate faces can be topologically split if the points on the interior of the surface cannot walk to all the cells that use them in one go. @@ -71,6 +87,7 @@ using namespace Foam; void insertDuplicateMerge ( const polyMesh& mesh, + const labelList& boundaryFaces, const labelList& duplicates, polyTopoChange& meshMod ) @@ -87,8 +104,8 @@ void insertDuplicateMerge { // Two duplicate faces. Merge. - label face0 = mesh.nInternalFaces() + bFacei; - label face1 = mesh.nInternalFaces() + otherFacei; + label face0 = boundaryFaces[bFacei]; + label face1 = boundaryFaces[otherFacei]; label own0 = faceOwner[face0]; label own1 = faceOwner[face1]; @@ -156,6 +173,45 @@ void insertDuplicateMerge } +label patchSize(const polyMesh& mesh, const labelList& patchIDs) +{ + const polyBoundaryMesh& patches = mesh.boundaryMesh(); + + label sz = 0; + forAll(patchIDs, i) + { + const polyPatch& pp = patches[patchIDs[i]]; + sz += pp.size(); + } + return sz; +} + + +labelList patchFaces(const polyMesh& mesh, const labelList& patchIDs) +{ + const polyBoundaryMesh& patches = mesh.boundaryMesh(); + + labelList faceIDs(patchSize(mesh, patchIDs)); + label sz = 0; + forAll(patchIDs, i) + { + const polyPatch& pp = patches[patchIDs[i]]; + + forAll(pp, ppi) + { + faceIDs[sz++] = pp.start()+ppi; + } + } + +if (faceIDs.size() != sz) +{ + FatalErrorInFunction << exit(FatalError); +} + + return faceIDs; +} + + labelList findBaffles(const polyMesh& mesh, const labelList& boundaryFaces) { // Get all duplicate face labels (in boundaryFaces indices!). @@ -173,7 +229,7 @@ labelList findBaffles(const polyMesh& mesh, const labelList& boundaryFaces) { if (duplicates[bFacei] != -1) { - label facei = mesh.nInternalFaces() + bFacei; + label facei = boundaryFaces[bFacei]; label patchi = patches.whichPatch(facei); if (isA(patches[patchi])) @@ -205,12 +261,12 @@ labelList findBaffles(const polyMesh& mesh, const labelList& boundaryFaces) if (otherFacei != -1 && otherFacei > bFacei) { - duplicateSet.insert(mesh.nInternalFaces() + bFacei); - duplicateSet.insert(mesh.nInternalFaces() + otherFacei); + duplicateSet.insert(boundaryFaces[bFacei]); + duplicateSet.insert(boundaryFaces[otherFacei]); } } - Pout<< "Writing " << duplicateSet.size() + Info<< "Writing " << returnReduce(duplicateSet.size(), sumOp