30 void Foam::blockMesh::check(
const polyMesh& bm,
const dictionary& dict)
const 32 Info<< nl <<
"Check topology" <<
endl;
39 for (
label cej=cei+1; cej<edges_.
size(); cej++)
41 if (edges_[cei].compare(edges_[cej]) != 0)
43 Info<<
" Curved edge ";
44 edges_[cej].write(
Info, dict);
45 Info<<
" is a duplicate of curved edge " << edges_[cei]
66 edgeList edges = blocks[blocki].blockShape().edges();
70 found = edges_[cei].compare(edges[ei][0], edges[ei][1]) != 0;
78 Info<<
" Curved edge ";
79 edges_[cei].write(
Info, dict);
80 Info<<
" does not correspond to a block edge." 91 for (
label cfj=cfi+1; cfj<faces_.
size(); cfj++)
93 if (faces_[cfi].compare(faces_[cfj]) != 0)
95 Info<<
" Curved face ";
96 faces_[cfj].write(
Info, dict);
97 Info<<
" is a duplicate of curved face ";
98 faces_[cfi].write(
Info, dict);
113 found = faces_[cfi].compare(faces[fi]) != 0;
119 Info<<
" Curved face ";
120 faces_[cfi].write(
Info, dict);
121 Info<<
" does not correspond to a block face." <<
endl;
130 label nBoundaryFaces = 0;
133 nBoundaryFaces += cells[celli].nFaces();
136 nBoundaryFaces -= 2*bm.nInternalFaces();
138 label nDefinedBoundaryFaces = 0;
141 nDefinedBoundaryFaces += patches[
patchi].size();
147 Info<< nl <<
tab <<
"Basic statistics" << nl
148 <<
tab <<
tab <<
"Number of internal faces : " 149 << bm.nInternalFaces() << nl
150 <<
tab <<
tab <<
"Number of boundary faces : " 151 << nBoundaryFaces << nl
152 <<
tab <<
tab <<
"Number of defined boundary faces : " 153 << nDefinedBoundaryFaces << nl
154 <<
tab <<
tab <<
"Number of undefined boundary faces : " 155 << nBoundaryFaces - nDefinedBoundaryFaces <<
nl;
157 if ((nBoundaryFaces - nDefinedBoundaryFaces) > 0)
160 <<
"(Warning : only leave undefined the front and back planes " 161 <<
"of 2D planar geometries!)" <<
endl;
164 Info<<
tab <<
"Checking patch -> block consistency" <<
endl;
174 const face& patchFace = Patch[patchFacei];
175 bool patchFaceOK =
false;
179 const labelList& cellFaces = cells[celli];
181 forAll(cellFaces, cellFacei)
183 if (patchFace == faces[cellFaces[cellFacei]])
190 patchFace.area(points)
191 & faces[cellFaces[cellFacei]].area(points)
196 <<
"Face " << patchFacei
198 <<
" (" << patches[
patchi].name() <<
")" 211 <<
"Face " << patchFacei
213 <<
" (" << patches[
patchi].name() <<
")" 214 <<
" does not match any block faces" <<
endl;
229 <<
"Block mesh topology incorrect, stopping mesh generation!" PtrList< polyPatch > polyPatchList
container classes for polyPatch
#define forAll(list, i)
Loop across all elements in 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.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
PtrList< block > blockList
A PtrList of blocks.
Ostream & endl(Ostream &os)
Add newline and flush stream.
vectorField pointField
pointField is a vectorField.
List< label > labelList
A List of labels.
label size() const
Return the number of elements in the UPtrList.
List< cell > cellList
list of cells