33 void Foam::blockMesh::checkBlockMesh(
const polyMesh& bm)
35 Info<<
nl <<
"Check block mesh topology" <<
endl;
37 bool blockMeshOK =
true;
44 label nBoundaryFaces=0;
47 nBoundaryFaces += cells[celli].nFaces();
50 nBoundaryFaces -= 2*bm.nInternalFaces();
52 label nDefinedBoundaryFaces=0;
55 nDefinedBoundaryFaces += patches[
patchi].size();
61 Info<<
tab <<
tab <<
"Number of internal faces : "
62 << bm.nInternalFaces() <<
endl;
64 Info<<
tab <<
tab <<
"Number of boundary faces : "
65 << nBoundaryFaces <<
endl;
67 Info<<
tab <<
tab <<
"Number of defined boundary faces : "
68 << nDefinedBoundaryFaces <<
endl;
70 Info<<
tab <<
tab <<
"Number of undefined boundary faces : "
71 << nBoundaryFaces - nDefinedBoundaryFaces <<
endl;
73 if ((nBoundaryFaces - nDefinedBoundaryFaces) > 0)
76 <<
"(Warning : only leave undefined the front and back planes "
77 <<
"of 2D planar geometries!)" <<
endl;
80 Info<<
nl <<
tab <<
"Checking patch -> block consistency" <<
endl;
89 const face& patchFace = Patch[patchFacei];
90 bool patchFaceOK =
false;
94 const labelList& cellFaces = cells[celli];
96 forAll(cellFaces, cellFacei)
98 if (patchFace == faces[cellFaces[cellFacei]])
105 patchFace.normal(points)
106 & faces[cellFaces[cellFacei]].normal(points)
111 <<
"Face " << patchFacei
113 <<
" (" << patches[
patchi].name() <<
")"
126 <<
"Face " << patchFacei
128 <<
" (" << patches[
patchi].name() <<
")"
129 <<
" does not match any block faces" <<
endl;
138 FatalErrorIn(
"blockMesh::checkBlockMesh(const polyMesh& bm)")
139 <<
"Block mesh topology incorrect, stopping mesh generation!"