63 const scalar maxNonOrtho
71 const scalar minTetQuality
75 const scalar maxConcave
79 const scalar maxIntSkew
81 dict.
lookup<scalar>(
"maxInternalSkewness",
true)
83 const scalar maxBounSkew
85 dict.
lookup<scalar>(
"maxBoundarySkewness",
true)
87 const scalar minWeight
91 const scalar minVolRatio
99 scalar minFaceFlatness = -1.0;
105 label nWrongFaces = 0;
107 Info<<
"Checking faces in error :" <<
endl;
110 if (maxNonOrtho < 180.0-small)
126 Info<<
" non-orthogonality > "
127 <<
setw(3) << maxNonOrtho
129 << nNewWrongFaces-nWrongFaces <<
endl;
131 nWrongFaces = nNewWrongFaces;
152 Info<<
" faces with face pyramid volume < "
153 <<
setw(5) << minVol <<
" : "
154 << nNewWrongFaces-nWrongFaces <<
endl;
156 nWrongFaces = nNewWrongFaces;
159 if (minTetQuality > -great)
176 Info<<
" faces with face-decomposition tet quality < "
177 <<
setw(5) << minTetQuality <<
" : "
178 << nNewWrongFaces-nWrongFaces <<
endl;
180 nWrongFaces = nNewWrongFaces;
183 if (maxConcave < 180.0-small)
198 Info<<
" faces with concavity > "
199 <<
setw(3) << maxConcave
201 << nNewWrongFaces-nWrongFaces <<
endl;
203 nWrongFaces = nNewWrongFaces;
206 if (maxIntSkew > 0 || maxBounSkew > 0)
225 Info<<
" faces with skewness > "
226 <<
setw(3) << maxIntSkew
227 <<
" (internal) or " <<
setw(3) << maxBounSkew
228 <<
" (boundary) : " << nNewWrongFaces-nWrongFaces <<
endl;
230 nWrongFaces = nNewWrongFaces;
233 if (minWeight >= 0 && minWeight < 1)
250 Info<<
" faces with interpolation weights (0..1) < "
251 <<
setw(5) << minWeight
253 << nNewWrongFaces-nWrongFaces <<
endl;
255 nWrongFaces = nNewWrongFaces;
258 if (minVolRatio >= 0)
273 Info<<
" faces with volume ratio of neighbour cells < "
274 <<
setw(5) << minVolRatio
276 << nNewWrongFaces-nWrongFaces <<
endl;
278 nWrongFaces = nNewWrongFaces;
300 Info<<
" faces with face twist < "
301 <<
setw(5) << minTwist
303 << nNewWrongFaces-nWrongFaces <<
endl;
305 nWrongFaces = nNewWrongFaces;
308 if (minFaceFlatness > -small)
324 Info<<
" faces with flatness < "
325 <<
setw(5) << minFaceFlatness
327 << nNewWrongFaces-nWrongFaces <<
endl;
329 nWrongFaces = nNewWrongFaces;
346 Info<<
" faces on cells with determinant < "
347 <<
setw(5) << minDet <<
" : "
348 << nNewWrongFaces-nWrongFaces <<
endl;
350 nWrongFaces = nNewWrongFaces;
355 return nWrongFaces > 0;
Istream and Ostream manipulators taking arguments.
label size() const
Return number of elements in table.
scalar minDim() const
Smallest length/height/width dimension.
A list of keyword definitions, which are a keyword followed by any number of values (e....
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
const polyMesh & mesh() const
Reference to mesh.
static bool checkMesh(const bool report, const polyMesh &mesh, const dictionary &dict, labelHashSet &wrongFaces)
Check mesh with mesh settings in dict. Collects incorrect faces.
Mesh consisting of general polyhedral cells.
virtual const pointField & points() const
Return raw points.
const boundBox & bounds() const
Return mesh bounding box.
const vectorField & faceCentres() const
const scalarField & cellVolumes() const
const vectorField & cellCentres() const
const vectorField & faceAreas() const
bool checkFacePyramids(const bool report, const scalar minPyrVol, const polyMesh &, const vectorField &cellCentres, const pointField &p, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet *)
Check face pyramid volumes.
bool checkFaceTwist(const bool report, const scalar minTwist, const polyMesh &, const vectorField &cellCentres, const vectorField &faceAreas, const vectorField &faceCentres, const pointField &p, const labelList &checkFaces, labelHashSet *setPtr)
bool checkFaceSkewness(const bool report, const scalar internalSkew, const scalar boundarySkew, const polyMesh &mesh, const pointField &points, const vectorField &cellCentres, const vectorField &faceCentres, const vectorField &faceAreas, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet *setPtr)
Check face skewness.
bool checkFaceDotProduct(const bool report, const scalar orthWarn, const polyMesh &, const vectorField &cellCentres, const vectorField &faceAreas, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet *setPtr)
Check face non-orthogonality.
bool checkFaceAngles(const bool report, const scalar maxDeg, const polyMesh &mesh, const vectorField &faceAreas, const pointField &p, const labelList &checkFaces, labelHashSet *setPtr)
Check convexity of angles in a face. See primitiveMesh for explanation.
bool checkFaceWeights(const bool report, const scalar warnWeight, const polyMesh &mesh, const vectorField &cellCentres, const vectorField &faceCentres, const vectorField &faceAreas, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet *setPtr)
Check interpolation weights (0.5 for regular mesh)
bool checkCellDeterminant(const bool report, const scalar minDet, const polyMesh &, const vectorField &faceAreas, const labelList &checkFaces, labelHashSet *setPtr)
Check the area of internal faces v.s. boundary faces.
bool checkVolRatio(const bool report, const scalar warnRatio, const polyMesh &mesh, const scalarField &cellVolumes, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet *setPtr)
Cell volume ratio of neighbouring cells (1 for regular mesh)
bool checkFaceTets(const bool report, const scalar minPyrVol, const polyMesh &, const vectorField &cellCentres, const vectorField &faceCentres, const pointField &p, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet *)
Check face tetrahedra volumes.
bool checkFaceFlatness(const bool report, const scalar minFlatness, const polyMesh &, const vectorField &faceAreas, const vectorField &faceCentres, const pointField &p, const labelList &checkFaces, labelHashSet *setPtr)
Check for face areas v.s. sum of face-triangle (from face-centre.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensionedScalar pow3(const dimensionedScalar &ds)
Omanip< int > setw(const int i)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
labelList identityMap(const label len)
Create identity map (map[i] == i) of given length.
PolyMesh checking routines. Checks various criteria for a mesh and supplied geometry,...