90 const bool flipFaceFlux,
91 const label newPatchI,
98 if (!modifiedFace[faceI])
116 modifiedFace[faceI] = 1;
147 FatalErrorIn(
"findPatchID(const polyMesh&, const word&)")
148 <<
"Cannot find patch " << name <<
endl
158 int main(
int argc,
char *argv[])
169 runTime.functionObjects().off();
179 Info<<
"Converting faces on zone " << zoneID.name()
180 <<
" into baffles." <<
nl <<
endl;
182 if (zoneID.index() == -1)
185 << zoneID.name() << endl
186 <<
"Valid zones are " << faceZones.
names()
190 const faceZone& fZone = faceZones[zoneID.index()];
193 <<
" faces on zone " << zoneID.name() <<
nl <<
endl;
203 newPatches.append(findPatchID(mesh, patchName));
204 Info<<
"Using patch " << patchName
205 <<
" at index " << newPatches[0] <<
endl;
219 newPatches.append(findPatchID(mesh,
patchNames[i]));
221 <<
" at index " << newPatches[newPatches.size()-1] <<
endl;
230 if (internalFacesOnly)
232 Info<<
"Not converting faces on non-coupled patches." <<
nl <<
endl;
295 modifiedFace[pp.
start()+i] = 1;
303 label newPatchI = newPatches[i];
310 label zoneFaceI = fZone.
whichFace(faceI);
314 if (!fZone.
flipMap()[zoneFaceI])
336 mesh.
faces()[faceI].reverseFace(),
357 label zoneFaceI = fZone.
whichFace(faceI);
361 if (!fZone.
flipMap()[zoneFaceI])
367 mesh.
faces()[faceI].reverseFace(),
415 if (pp.
coupled() && patches[newPatchI].coupled())
420 else if (pp.
coupled() || !internalFacesOnly)
424 label faceI = pp.
start()+i;
426 label zoneFaceI = fZone.
whichFace(faceI);
430 if (patchWarned.
insert(patchI))
433 <<
"Found boundary face (in patch " << pp.
name()
434 <<
") in faceZone " << fZone.
name()
435 <<
" to convert to baffle patch "
436 << patches[newPatchI].
name()
438 <<
" Run with -internalFacesOnly option"
439 <<
" if you don't wish to convert"
440 <<
" boundary faces." <<
endl;
464 <<
" faces into boundary faces on patch " << patchName <<
nl <<
endl;
478 if (map().hasMotionPoints())
487 Info<<
"Writing mesh to " << runTime.timeName() <<
endl;