Foam::polyPatch::polyPatch ( const word& name, const label size, const label start, const label index, const polyBoundaryMesh& bm, const word& patchType ) : patchIdentifier(name, index), primitivePatch ( faceSubList(bm.mesh().faces(), size, start), bm.mesh().points() ), start_(start), boundaryMesh_(bm), faceCellsPtr_(NULL), gpuFaceCells(), mePtr_(NULL) { if ( patchType != word::null && constraintType(patchType) && findIndex(inGroups(), patchType) == -1 ) { inGroups().append(patchType); } }
Foam::polyPatch::polyPatch ( const word& name, const dictionary& dict, const label index, const polyBoundaryMesh& bm, const word& patchType ) : patchIdentifier(name, dict, index), primitivePatch ( faceSubList ( bm.mesh().faces(), readLabel(dict.lookup("nFaces")), readLabel(dict.lookup("startFace")) ), bm.mesh().points() ), start_(readLabel(dict.lookup("startFace"))), boundaryMesh_(bm), faceCellsPtr_(NULL), mePtr_(NULL) { if ( patchType != word::null && constraintType(patchType) && findIndex(inGroups(), patchType) == -1 ) { inGroups().append(patchType); } }
Foam::wallPolyPatch::wallPolyPatch ( const word& name, const dictionary& dict, const label index, const polyBoundaryMesh& bm, const word& patchType ) : polyPatch(name, dict, index, bm, patchType) { // wall is not constraint type so add wall group explicitly if (findIndex(inGroups(), typeName) == -1) { inGroups().append(typeName); } }
Foam::mappedWallPolyPatch::mappedWallPolyPatch ( const word& name, const dictionary& dict, const label index, const polyBoundaryMesh& bm, const word& patchType ) : wallPolyPatch(name, dict, index, bm, patchType), mappedPatchBase(*this, dict) { // mapped is not constraint type so add mapped group explicitly if (findIndex(inGroups(), mappedPolyPatch::typeName) == -1) { inGroups().append(mappedPolyPatch::typeName); } }
Foam::mappedWallPolyPatch::mappedWallPolyPatch ( const word& name, const label size, const label start, const label index, const polyBoundaryMesh& bm, const word& patchType ) : wallPolyPatch(name, size, start, index, bm, patchType), mappedPatchBase(static_cast<const polyPatch&>(*this)) { // mapped is not constraint type so add mapped group explicitly if (findIndex(inGroups(), mappedPolyPatch::typeName) == -1) { inGroups().append(mappedPolyPatch::typeName); } }
void thermalBaffleFvPatchScalarField::createPatchMesh() { const fvMesh& thisMesh = patch().boundaryMesh().mesh(); word regionName = dict_.lookup("regionName"); List<polyPatch*> regionPatches(3); List<word> patchNames(regionPatches.size()); List<word> patchTypes(regionPatches.size()); List<dictionary> dicts(regionPatches.size()); patchNames[bottomPatchID] = word("bottom"); patchNames[sidePatchID] = word("side"); patchNames[topPatchID] = word("top"); patchTypes[bottomPatchID] = mappedWallPolyPatch::typeName; patchTypes[topPatchID] = mappedWallPolyPatch::typeName; if (readBool(dict_.lookup("columnCells"))) { patchTypes[sidePatchID] = emptyPolyPatch::typeName; } else { patchTypes[sidePatchID] = polyPatch::typeName; } const mappedPatchBase& mpp = refCast<const mappedPatchBase>(patch().patch()); const word coupleGroup(mpp.coupleGroup()); wordList inGroups(1); inGroups[0] = coupleGroup; dicts[bottomPatchID].add("coupleGroup", coupleGroup); dicts[bottomPatchID].add("inGroups", inGroups); dicts[bottomPatchID].add("sampleMode", mpp.sampleModeNames_[mpp.mode()]); const label sepPos = coupleGroup.find('_'); const word coupleGroupSlave = coupleGroup(0, sepPos) + "_slave"; inGroups[0] = coupleGroupSlave; dicts[topPatchID].add("coupleGroup", coupleGroupSlave); dicts[topPatchID].add("inGroups", inGroups); dicts[topPatchID].add("sampleMode", mpp.sampleModeNames_[mpp.mode()]); forAll (regionPatches, patchI) { dictionary& patchDict = dicts[patchI]; patchDict.set("nFaces", 0); patchDict.set("startFace", 0); regionPatches[patchI] = polyPatch::New ( patchTypes[patchI], patchNames[patchI], dicts[patchI], patchI, thisMesh.boundaryMesh() ).ptr(); }