Go to the documentation of this file.
47 const label cellFaceId,
48 const label nCreatedFaces
53 <<
" add bnd for cell " <<
cellId
54 <<
" face " << cellFaceId
55 <<
" (original cell " << origCellId_[
cellId] <<
")"
60 const face& thisFace = cellFaces_[
cellId][cellFaceId];
63 if (cellPolys_[
cellId][cellFaceId] > nInternalFaces_)
65 Info<<
"meshReader::createPolyBoundary(): "
66 <<
"Problem with face: " << thisFace <<
endl
67 <<
"Probably multiple definitions "
68 <<
"of a single boundary face." <<
endl
71 else if (cellPolys_[
cellId][cellFaceId] >= 0)
73 Info<<
"meshReader::createPolyBoundary(): "
74 <<
"Problem with face: " << thisFace <<
endl
75 <<
"Probably trying to define a boundary face "
76 <<
"on a previously matched internal face." <<
endl
78 << meshFaces_[cellPolys_[
cellId][cellFaceId]]
82 meshFaces_[nCreatedFaces] = thisFace;
83 cellPolys_[
cellId][cellFaceId] = nCreatedFaces;
90 const label nCreatedFaces
93 addPolyBoundaryFace(identifier.
cell, identifier.
face, nCreatedFaces);
101 label nBoundaryFaces = 0;
102 label nMissingFaces = 0;
103 label nInterfaces = 0;
127 <<
"There are " << nMissingFaces
128 <<
" faces to be patched and " << nBoundaryFaces
129 <<
" specified - collect missed boundaries to final patch" <<
endl;
150 for (
label side = 0; side < 2; ++side)
152 label position = nInterfaces;
156 label baffleI = idList[bndI].cell - baffleOffset;
187 nInterfaces += (count - (count % 2)) / 2;
201 if (
cellId < baffleOffset)
206 monitoring[monitorI++] = faceNr;
218 if (idList[bndI].
cell < baffleOffset)
236 Info<<
"Missing faces added to patch after face "
237 << nCreatedFaces <<
":" <<
endl;
241 for (
label side = 0; side < 2; ++side)
243 label position = nInterfaces;
271 nInterfaces += (nMissingFaces - (nMissingFaces % 2)) / 2;
278 forAll(curFaces, cellFaceI)
280 if (curFaces[cellFaceI] < 0)
283 if (nMissingFaces < 4)
285 const face& thisFace = cFaces[cellI][cellFaceI];
287 Info<<
" cell " << cellI <<
" face " << cellFaceI
289 <<
" face: " << thisFace
292 else if (nMissingFaces == 5)
304 Info<<
"Added " << nMissingFaces <<
" unmatched faces" <<
endl;
307 if (nMissingFaces > 0)
326 markupFaces[curFaces[faceI]]++;
335 label nProblemFaces = 0;
337 forAll(markupFaces, faceI)
339 if (markupFaces[faceI] != 2)
343 Info<<
"meshReader::createPolyBoundary() : "
344 <<
"problem with face " << faceI <<
": addressed "
345 << markupFaces[faceI] <<
" times (should be 2!). Face: "
346 << problemFace <<
endl;
352 if (nProblemFaces > 0)
354 Info<<
"Number of incorrectly matched faces: "
355 << nProblemFaces <<
endl;
364 Info<<
"Number of boundary faces: " << nBoundaryFaces <<
nl
365 <<
"Total number of faces: " << nCreatedFaces <<
nl
366 <<
"Number of interfaces: " << nInterfaces <<
endl;
375 label nUsed = 0, nEmpty = 0;
381 forAll(patchStarts_, patchI)
383 if (patchSizes_[patchI] > 0)
385 oldToNew[patchI] = nUsed++;
390 oldToNew[patchI] =
nPatches - nEmpty;
398 Info<<
"Removing " << nEmpty <<
" empty patches" <<
endl;
439 patchDict.
add(
"type", patchTypes_[patchI],
false);
440 if (patchPhysicalTypes_.size() && patchPhysicalTypes_[patchI].size())
442 patchDict.
add(
"startFace", patchPhysicalTypes_[patchI],
false);
446 patchDict.
add(
"nFaces", patchSizes_[patchI],
true);
447 patchDict.
add(
"startFace", patchStarts_[patchI],
true);
451 forAll(patchStarts_, patchI)
void addPolyBoundaryFace(const label cellId, const label cellFaceId, const label nCreatedFaces)
Add in boundary face.
A class for handling words, derived from string.
cellList cellPolys_
Cells as polyhedra for polyMesh.
HashTable< List< label >, word, string::hash > monitoringSets_
Face sets for monitoring.
#define forAll(list, i)
Loop across all elements in list.
void createPolyBoundary()
Make polyhedral boundary from shape boundary.
wordList patchNames_
Boundary patch names.
void preservePatchTypes(const objectRegistry &obr, const word &meshInstance, const fileName &meshDir, const wordList &patchNames, PtrList< dictionary > &patchDicts, const word &defaultFacesName, word &defaultFacesType)
Preserve patch types.
labelList patchStarts_
Polyhedral mesh boundary patch start indices and dimensions.
Identify cell faces in terms of cell Id and face Id.
wordList patchPhysicalTypes_
Boundary patch physical types.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
List< List< cellFaceIdentifier > > baffleIds_
List of cells/faces id pairs for each baffle.
List< List< cellFaceIdentifier > > boundaryIds_
Identify boundary faces by cells and their faces.
const fileName & instance() const
faceList baffleFaces_
List of each baffle face.
Mesh consisting of general polyhedral cells.
PtrList< dictionary > patchDicts
labelList origCellId_
Lookup original Cell number for a given cell.
void inplaceReorder(const labelUList &oldToNew, ListType &)
Inplace reorder the elements of a list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
List< labelPair > interfaces_
Association between two faces.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
A list of keyword definitions, which are a keyword followed by any number of values (e....
static autoPtr< polyPatch > New(const word &patchType, const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm)
Return a pointer to a new patch created on freestore from.
fileName meshDir() const
Return the local mesh directory (dbDir()/meshSubDir)
void setSize(const label)
Reset size of List.
faceList meshFaces_
Global face list for polyMesh.
A face is a list of labels corresponding to mesh vertices.
void size(const label)
Override size to be inconsistent with allocated storage.
faceListList & cellFaces() const
Return list of faces for every cell.
A cell is defined as a list of faces with extra functionality.
label nInternalFaces_
Number of internal faces for polyMesh.
bool add(entry *, bool mergeEntry=false)
Add a new entry.
List< polyPatch * > polyBoundaryPatches(const polyMesh &)
Add polyhedral boundary.