52 Foam::polyBoundaryMesh::polyBoundaryMesh
61 neighbourEdgesPtr_(NULL)
68 Istream& is = readStream(typeName);
80 patchEntries[patchI].keyword(),
81 patchEntries[patchI].dict(),
91 "polyBoundaryMesh::polyBoundaryMesh"
92 "(const IOobject&, const polyMesh&)"
100 Foam::polyBoundaryMesh::polyBoundaryMesh
110 neighbourEdgesPtr_(NULL)
126 operator[](
patchi).clearGeom();
137 operator[](
patchi).clearAddressing();
144 void Foam::polyBoundaryMesh::calcGeometry()
148 operator[](
patchi).initGeometry();
153 operator[](
patchi).calcGeometry();
163 WarningIn(
"polyBoundaryMesh::neighbourEdges() const")
164 <<
"Neighbour edge addressing not correct across parallel"
165 <<
" boundaries." <<
endl;
168 if (!neighbourEdgesPtr_)
174 label nEdgePairs = 0;
205 edgei < edges.
size();
210 const edge&
e = edges[edgei];
216 pointsToEdge.
find(meshEdge);
218 if (fnd == pointsToEdge.
end())
240 neighbourEdges[edgeInfo[0]][edgeInfo[1]]
246 pointsToEdge.
erase(meshEdge);
251 if (pointsToEdge.
size())
253 FatalErrorIn(
"polyBoundaryMesh::neighbourEdges() const")
254 <<
"Not all boundary edges of patches match up." <<
nl
255 <<
"Is the outside of your mesh multiply connected?"
269 if (edgeInfo[0] == -1 || edgeInfo[1] == -1)
274 FatalErrorIn(
"polyBoundaryMesh::neighbourEdges() const")
275 <<
"Not all boundary edges of patches match up." <<
nl
276 <<
"Edge " << edgeI <<
" on patch " << pp.
name()
278 << pp.
localPoints()[e[1]] <<
" is not matched to an"
279 <<
" edge on any other patch." <<
nl
280 <<
"Is the outside of your mesh multiply connected?"
287 return *neighbourEdgesPtr_;
299 t[patchI] = patches[patchI].name();
314 t[patchI] = patches[patchI].type();
329 t[patchI] = patches[patchI].physicalType();
342 if (patches[patchI].
name() == patchName)
351 Pout<<
"label polyBoundaryMesh::findPatchID(const word& "
352 <<
"patchName) const"
353 <<
"Patch named " << patchName <<
" not found. "
354 <<
"List of available patch names: " << names() <<
endl;
368 if (faceIndex >=
mesh().nFaces())
372 "polyBoundaryMesh::whichPatch(const label faceIndex) const"
373 ) <<
"given label greater than the number of geometric faces"
377 if (faceIndex <
mesh().nInternalFaces())
384 const polyPatch& bp = operator[](patchI);
388 faceIndex >= bp.
start()
389 && faceIndex < bp.
start() + bp.size()
399 "label polyBoundaryMesh::whichPatch(const label faceIndex) const"
400 ) <<
"Cannot find face " << faceIndex <<
" in any of the patches "
402 <<
"It seems your patches are not consistent with the mesh :"
404 <<
" total number of faces:" <<
mesh().
nFaces()
425 if (patchIDs.
empty())
427 WarningIn(
"polyBoundaryMesh::patchSet(const wordList&)")
428 <<
"Cannot find any patch names matching " << patchNames[i]
452 bool boundaryError =
false;
462 if (!isA<processorPolyPatch>(bm[patchI]))
464 if (nonProcI != patchI)
467 boundaryError =
true;
471 Pout<<
" ***Problem with boundary patch " << patchI
472 <<
" named " << bm[patchI].
name()
473 <<
" of type " << bm[patchI].type()
474 <<
". The patch seems to be preceded by processor"
475 <<
" patches. This is can give problems."
481 names[nonProcI] = bm[patchI].
name();
482 types[nonProcI] = bm[patchI].type();
488 types.setSize(nonProcI);
502 for (label procI = 1; procI < allNames.
size(); procI++)
506 (allNames[procI] != allNames[0])
507 || (allTypes[procI] != allTypes[0])
510 boundaryError =
true;
514 Info<<
" ***Inconsistent patches across processors, "
515 "processor 0 has patch names:" << allNames[0]
516 <<
" patch types:" << allTypes[0]
517 <<
" processor " << procI <<
" has patch names:"
519 <<
" patch types:" << allTypes[procI]
525 return boundaryError;
534 bool boundaryError =
false;
538 if (bm[patchI].start() != nextPatchStart && !boundaryError)
540 boundaryError =
true;
542 Info<<
" ****Problem with boundary patch " << patchI
543 <<
" named " << bm[patchI].
name()
544 <<
" of type " << bm[patchI].type()
545 <<
". The patch should start on face no " << nextPatchStart
546 <<
" and the patch specifies " << bm[patchI].start()
548 <<
"Possibly consecutive patches have this same problem."
549 <<
" Suppressing future warnings." <<
endl;
552 nextPatchStart += bm[patchI].
size();
561 Pout <<
" ***Boundary definition is in error." <<
endl;
570 Info <<
" Boundary definition OK." <<
endl;
584 patches[
patchi].initMovePoints(p);
589 patches[
patchi].movePoints(p);
602 patches[
patchi].initUpdateMesh();
607 patches[
patchi].updateMesh();
646 os.
check(
"polyBoundaryMesh::writeData(Ostream& os) const");