motionSmootherAlgoCheck.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "motionSmootherAlgo.H"
27 #include "polyMeshGeometry.H"
28 #include "IOmanip.H"
29 
30 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
31 
33 (
34  const bool report,
35  const polyMesh& mesh,
36  const dictionary& dict,
37  const labelList& checkFaces,
38  labelHashSet& wrongFaces
39 )
40 {
41  List<labelPair> emptyBaffles;
42  return checkMesh
43  (
44  report,
45  mesh,
46  dict,
47  checkFaces,
48  emptyBaffles,
49  wrongFaces
50  );
51 }
52 
54 (
55  const bool report,
56  const polyMesh& mesh,
57  const dictionary& dict,
58  const labelList& checkFaces,
59  const List<labelPair>& baffles,
60  labelHashSet& wrongFaces
61 )
62 {
63  const scalar maxNonOrtho
64  (
65  readScalar(dict.lookup("maxNonOrtho", true))
66  );
67  const scalar minVol
68  (
69  readScalar(dict.lookup("minVol", true))
70  );
71  const scalar minTetQuality
72  (
73  readScalar(dict.lookup("minTetQuality", true))
74  );
75  const scalar maxConcave
76  (
77  readScalar(dict.lookup("maxConcave", true))
78  );
79  const scalar minArea
80  (
81  readScalar(dict.lookup("minArea", true))
82  );
83  const scalar maxIntSkew
84  (
85  readScalar(dict.lookup("maxInternalSkewness", true))
86  );
87  const scalar maxBounSkew
88  (
89  readScalar(dict.lookup("maxBoundarySkewness", true))
90  );
91  const scalar minWeight
92  (
93  readScalar(dict.lookup("minFaceWeight", true))
94  );
95  const scalar minVolRatio
96  (
97  readScalar(dict.lookup("minVolRatio", true))
98  );
99  const scalar minTwist
100  (
101  readScalar(dict.lookup("minTwist", true))
102  );
103  const scalar minTriangleTwist
104  (
105  readScalar(dict.lookup("minTriangleTwist", true))
106  );
107  scalar minFaceFlatness = -1.0;
108  dict.readIfPresent("minFaceFlatness", minFaceFlatness, true);
109  const scalar minDet
110  (
111  readScalar(dict.lookup("minDeterminant", true))
112  );
113  label nWrongFaces = 0;
114 
115  Info<< "Checking faces in error :" << endl;
116  // Pout.setf(ios_base::left);
117 
118  if (maxNonOrtho < 180.0-small)
119  {
120  polyMeshGeometry::checkFaceDotProduct
121  (
122  report,
123  maxNonOrtho,
124  mesh,
125  mesh.cellCentres(),
126  mesh.faceAreas(),
127  checkFaces,
128  baffles,
129  &wrongFaces
130  );
131 
132  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
133 
134  Info<< " non-orthogonality > "
135  << setw(3) << maxNonOrtho
136  << " degrees : "
137  << nNewWrongFaces-nWrongFaces << endl;
138 
139  nWrongFaces = nNewWrongFaces;
140  }
141 
142  if (minVol > -great)
143  {
144  polyMeshGeometry::checkFacePyramids
145  (
146  report,
147  minVol,
148  mesh,
149  mesh.cellCentres(),
150  mesh.points(),
151  checkFaces,
152  baffles,
153  &wrongFaces
154  );
155 
156  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
157 
158  Info<< " faces with face pyramid volume < "
159  << setw(5) << minVol << " : "
160  << nNewWrongFaces-nWrongFaces << endl;
161 
162  nWrongFaces = nNewWrongFaces;
163  }
164 
165  if (minTetQuality > -great)
166  {
167  polyMeshGeometry::checkFaceTets
168  (
169  report,
170  minTetQuality,
171  mesh,
172  mesh.cellCentres(),
173  mesh.faceCentres(),
174  mesh.points(),
175  checkFaces,
176  baffles,
177  &wrongFaces
178  );
179 
180  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
181 
182  Info<< " faces with face-decomposition tet quality < "
183  << setw(5) << minTetQuality << " : "
184  << nNewWrongFaces-nWrongFaces << endl;
185 
186  nWrongFaces = nNewWrongFaces;
187  }
188 
189  if (maxConcave < 180.0-small)
190  {
191  polyMeshGeometry::checkFaceAngles
192  (
193  report,
194  maxConcave,
195  mesh,
196  mesh.faceAreas(),
197  mesh.points(),
198  checkFaces,
199  &wrongFaces
200  );
201 
202  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
203 
204  Info<< " faces with concavity > "
205  << setw(3) << maxConcave
206  << " degrees : "
207  << nNewWrongFaces-nWrongFaces << endl;
208 
209  nWrongFaces = nNewWrongFaces;
210  }
211 
212  if (minArea > -small)
213  {
214  polyMeshGeometry::checkFaceArea
215  (
216  report,
217  minArea,
218  mesh,
219  mesh.faceAreas(),
220  checkFaces,
221  &wrongFaces
222  );
223 
224  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
225 
226  Info<< " faces with area < "
227  << setw(5) << minArea
228  << " m^2 : "
229  << nNewWrongFaces-nWrongFaces << endl;
230 
231  nWrongFaces = nNewWrongFaces;
232  }
233 
234  if (maxIntSkew > 0 || maxBounSkew > 0)
235  {
236  polyMeshGeometry::checkFaceSkewness
237  (
238  report,
239  maxIntSkew,
240  maxBounSkew,
241  mesh,
242  mesh.points(),
243  mesh.cellCentres(),
244  mesh.faceCentres(),
245  mesh.faceAreas(),
246  checkFaces,
247  baffles,
248  &wrongFaces
249  );
250 
251  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
252 
253  Info<< " faces with skewness > "
254  << setw(3) << maxIntSkew
255  << " (internal) or " << setw(3) << maxBounSkew
256  << " (boundary) : " << nNewWrongFaces-nWrongFaces << endl;
257 
258  nWrongFaces = nNewWrongFaces;
259  }
260 
261  if (minWeight >= 0 && minWeight < 1)
262  {
263  polyMeshGeometry::checkFaceWeights
264  (
265  report,
266  minWeight,
267  mesh,
268  mesh.cellCentres(),
269  mesh.faceCentres(),
270  mesh.faceAreas(),
271  checkFaces,
272  baffles,
273  &wrongFaces
274  );
275 
276  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
277 
278  Info<< " faces with interpolation weights (0..1) < "
279  << setw(5) << minWeight
280  << " : "
281  << nNewWrongFaces-nWrongFaces << endl;
282 
283  nWrongFaces = nNewWrongFaces;
284  }
285 
286  if (minVolRatio >= 0)
287  {
288  polyMeshGeometry::checkVolRatio
289  (
290  report,
291  minVolRatio,
292  mesh,
293  mesh.cellVolumes(),
294  checkFaces,
295  baffles,
296  &wrongFaces
297  );
298 
299  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
300 
301  Info<< " faces with volume ratio of neighbour cells < "
302  << setw(5) << minVolRatio
303  << " : "
304  << nNewWrongFaces-nWrongFaces << endl;
305 
306  nWrongFaces = nNewWrongFaces;
307  }
308 
309  if (minTwist > -1)
310  {
311  // Pout<< "Checking face twist: dot product of face normal "
312  // << "with face triangle normals" << endl;
313  polyMeshGeometry::checkFaceTwist
314  (
315  report,
316  minTwist,
317  mesh,
318  mesh.cellCentres(),
319  mesh.faceAreas(),
320  mesh.faceCentres(),
321  mesh.points(),
322  checkFaces,
323  &wrongFaces
324  );
325 
326  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
327 
328  Info<< " faces with face twist < "
329  << setw(5) << minTwist
330  << " : "
331  << nNewWrongFaces-nWrongFaces << endl;
332 
333  nWrongFaces = nNewWrongFaces;
334  }
335 
336  if (minTriangleTwist > -1)
337  {
338  // Pout<< "Checking triangle twist: dot product of consecutive triangle"
339  // << " normals resulting from face-centre decomposition" << endl;
340  polyMeshGeometry::checkTriangleTwist
341  (
342  report,
343  minTriangleTwist,
344  mesh,
345  mesh.faceAreas(),
346  mesh.faceCentres(),
347  mesh.points(),
348  checkFaces,
349  &wrongFaces
350  );
351 
352  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
353 
354  Info<< " faces with triangle twist < "
355  << setw(5) << minTriangleTwist
356  << " : "
357  << nNewWrongFaces-nWrongFaces << endl;
358 
359  nWrongFaces = nNewWrongFaces;
360  }
361 
362  if (minFaceFlatness > -small)
363  {
364  polyMeshGeometry::checkFaceFlatness
365  (
366  report,
367  minFaceFlatness,
368  mesh,
369  mesh.faceAreas(),
370  mesh.faceCentres(),
371  mesh.points(),
372  checkFaces,
373  &wrongFaces
374  );
375 
376  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
377 
378  Info<< " faces with flatness < "
379  << setw(5) << minFaceFlatness
380  << " : "
381  << nNewWrongFaces-nWrongFaces << endl;
382 
383  nWrongFaces = nNewWrongFaces;
384  }
385 
386  if (minDet > -1)
387  {
388  polyMeshGeometry::checkCellDeterminant
389  (
390  report,
391  minDet,
392  mesh,
393  mesh.faceAreas(),
394  checkFaces,
395  polyMeshGeometry::affectedCells(mesh, checkFaces),
396  &wrongFaces
397  );
398 
399  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
400 
401  Info<< " faces on cells with determinant < "
402  << setw(5) << minDet << " : "
403  << nNewWrongFaces-nWrongFaces << endl;
404 
405  nWrongFaces = nNewWrongFaces;
406  }
407 
408  // Pout.setf(ios_base::right);
409 
410  return nWrongFaces > 0;
411 }
412 
413 
415 (
416  const bool report,
417  const polyMesh& mesh,
418  const dictionary& dict,
419  labelHashSet& wrongFaces
420 )
421 {
422  return checkMesh
423  (
424  report,
425  mesh,
426  dict,
427  identity(mesh.nFaces()),
428  wrongFaces
429  );
430 }
431 
433 (
434  const bool report,
435  const dictionary& dict,
436  const polyMeshGeometry& meshGeom,
437  const labelList& checkFaces,
438  labelHashSet& wrongFaces
439 )
440 {
441  List<labelPair> emptyBaffles;
442 
443  return checkMesh
444  (
445  report,
446  dict,
447  meshGeom,
448  checkFaces,
449  emptyBaffles,
450  wrongFaces
451  );
452 }
453 
454 
456 (
457  const bool report,
458  const dictionary& dict,
459  const polyMeshGeometry& meshGeom,
460  const labelList& checkFaces,
461  const List<labelPair>& baffles,
462  labelHashSet& wrongFaces
463 )
464 {
465  const scalar maxNonOrtho
466  (
467  readScalar(dict.lookup("maxNonOrtho", true))
468  );
469  const scalar minVol
470  (
471  readScalar(dict.lookup("minVol", true))
472  );
473  const scalar minTetQuality
474  (
475  readScalar(dict.lookup("minTetQuality", true))
476  );
477  const scalar maxConcave
478  (
479  readScalar(dict.lookup("maxConcave", true))
480  );
481  const scalar minArea
482  (
483  readScalar(dict.lookup("minArea", true))
484  );
485  // const scalar maxIntSkew
486  //(
487  // readScalar(dict.lookup("maxInternalSkewness", true))
488  //);
489  // const scalar maxBounSkew
490  //(
491  // readScalar(dict.lookup("maxBoundarySkewness", true))
492  //);
493  const scalar minWeight
494  (
495  readScalar(dict.lookup("minFaceWeight", true))
496  );
497  const scalar minVolRatio
498  (
499  readScalar(dict.lookup("minVolRatio", true))
500  );
501  const scalar minTwist
502  (
503  readScalar(dict.lookup("minTwist", true))
504  );
505  const scalar minTriangleTwist
506  (
507  readScalar(dict.lookup("minTriangleTwist", true))
508  );
509  scalar minFaceFlatness = -1.0;
510  dict.readIfPresent("minFaceFlatness", minFaceFlatness, true);
511  const scalar minDet
512  (
513  readScalar(dict.lookup("minDeterminant", true))
514  );
515 
516  label nWrongFaces = 0;
517 
518  Info<< "Checking faces in error :" << endl;
519  // Pout.setf(ios_base::left);
520 
521  if (maxNonOrtho < 180.0-small)
522  {
523  meshGeom.checkFaceDotProduct
524  (
525  report,
526  maxNonOrtho,
527  checkFaces,
528  baffles,
529  &wrongFaces
530  );
531 
532  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
533 
534  Info<< " non-orthogonality > "
535  << setw(3) << maxNonOrtho
536  << " degrees : "
537  << nNewWrongFaces-nWrongFaces << endl;
538 
539  nWrongFaces = nNewWrongFaces;
540  }
541 
542  if (minVol > -great)
543  {
544  meshGeom.checkFacePyramids
545  (
546  report,
547  minVol,
548  meshGeom.mesh().points(),
549  checkFaces,
550  baffles,
551  &wrongFaces
552  );
553 
554  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
555 
556  Info<< " faces with face pyramid volume < "
557  << setw(5) << minVol << " : "
558  << nNewWrongFaces-nWrongFaces << endl;
559 
560  nWrongFaces = nNewWrongFaces;
561  }
562 
563  if (minTetQuality > -great)
564  {
565  meshGeom.checkFaceTets
566  (
567  report,
568  minTetQuality,
569  meshGeom.mesh().points(),
570  checkFaces,
571  baffles,
572  &wrongFaces
573  );
574 
575  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
576 
577  Info<< " faces with face-decomposition tet quality < "
578  << setw(5) << minTetQuality << " : "
579  << nNewWrongFaces-nWrongFaces << endl;
580 
581  nWrongFaces = nNewWrongFaces;
582  }
583 
584  if (maxConcave < 180.0-small)
585  {
586  meshGeom.checkFaceAngles
587  (
588  report,
589  maxConcave,
590  meshGeom.mesh().points(),
591  checkFaces,
592  &wrongFaces
593  );
594 
595  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
596 
597  Info<< " faces with concavity > "
598  << setw(3) << maxConcave
599  << " degrees : "
600  << nNewWrongFaces-nWrongFaces << endl;
601 
602  nWrongFaces = nNewWrongFaces;
603  }
604 
605  if (minArea > -small)
606  {
607  meshGeom.checkFaceArea(report, minArea, checkFaces, &wrongFaces);
608 
609  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
610 
611  Info<< " faces with area < "
612  << setw(5) << minArea
613  << " m^2 : "
614  << nNewWrongFaces-nWrongFaces << endl;
615 
616  nWrongFaces = nNewWrongFaces;
617  }
618 
619 
620  //- Note: cannot check the skewness without the points and don't want
621  // to store them on polyMeshGeometry.
622  // if (maxIntSkew > 0 || maxBounSkew > 0)
623  //{
624  // meshGeom.checkFaceSkewness
625  // (
626  // report,
627  // maxIntSkew,
628  // maxBounSkew,
629  // checkFaces,
630  // baffles,
631  // &wrongFaces
632  // );
633  //
634  // label nNewWrongFaces = returnReduce(wrongFaces.size(),sumOp<label>());
635  //
636  // Info<< " faces with skewness > "
637  // << setw(3) << maxIntSkew
638  // << " (internal) or " << setw(3) << maxBounSkew
639  // << " (boundary) : " << nNewWrongFaces-nWrongFaces << endl;
640  //
641  // nWrongFaces = nNewWrongFaces;
642  //}
643 
644  if (minWeight >= 0 && minWeight < 1)
645  {
646  meshGeom.checkFaceWeights
647  (
648  report,
649  minWeight,
650  checkFaces,
651  baffles,
652  &wrongFaces
653  );
654 
655  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
656 
657  Info<< " faces with interpolation weights (0..1) < "
658  << setw(5) << minWeight
659  << " : "
660  << nNewWrongFaces-nWrongFaces << endl;
661 
662  nWrongFaces = nNewWrongFaces;
663  }
664 
665  if (minVolRatio >= 0)
666  {
667  meshGeom.checkVolRatio
668  (
669  report,
670  minVolRatio,
671  checkFaces,
672  baffles,
673  &wrongFaces
674  );
675 
676  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
677 
678  Info<< " faces with volume ratio of neighbour cells < "
679  << setw(5) << minVolRatio
680  << " : "
681  << nNewWrongFaces-nWrongFaces << endl;
682 
683  nWrongFaces = nNewWrongFaces;
684  }
685 
686  if (minTwist > -1)
687  {
688  // Pout<< "Checking face twist: dot product of face normal "
689  // << "with face triangle normals" << endl;
690  meshGeom.checkFaceTwist
691  (
692  report,
693  minTwist,
694  meshGeom.mesh().points(),
695  checkFaces,
696  &wrongFaces
697  );
698 
699  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
700 
701  Info<< " faces with face twist < "
702  << setw(5) << minTwist
703  << " : "
704  << nNewWrongFaces-nWrongFaces << endl;
705 
706  nWrongFaces = nNewWrongFaces;
707  }
708 
709  if (minTriangleTwist > -1)
710  {
711  // Pout<< "Checking triangle twist: dot product of consecutive triangle"
712  // << " normals resulting from face-centre decomposition" << endl;
713  meshGeom.checkTriangleTwist
714  (
715  report,
716  minTriangleTwist,
717  meshGeom.mesh().points(),
718  checkFaces,
719  &wrongFaces
720  );
721 
722  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
723 
724  Info<< " faces with triangle twist < "
725  << setw(5) << minTriangleTwist
726  << " : "
727  << nNewWrongFaces-nWrongFaces << endl;
728 
729  nWrongFaces = nNewWrongFaces;
730  }
731 
732  if (minFaceFlatness > -1)
733  {
734  meshGeom.checkFaceFlatness
735  (
736  report,
737  minFaceFlatness,
738  meshGeom.mesh().points(),
739  checkFaces,
740  &wrongFaces
741  );
742 
743  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
744 
745  Info<< " faces with flatness < "
746  << setw(5) << minFaceFlatness
747  << " : "
748  << nNewWrongFaces-nWrongFaces << endl;
749 
750  nWrongFaces = nNewWrongFaces;
751  }
752 
753  if (minDet > -1)
754  {
755  meshGeom.checkCellDeterminant
756  (
757  report,
758  minDet,
759  checkFaces,
760  meshGeom.affectedCells(meshGeom.mesh(), checkFaces),
761  &wrongFaces
762  );
763 
764  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
765 
766  Info<< " faces on cells with determinant < "
767  << setw(5) << minDet << " : "
768  << nNewWrongFaces-nWrongFaces << endl;
769 
770  nWrongFaces = nNewWrongFaces;
771  }
772 
773  // Pout.setf(ios_base::right);
774 
775  return nWrongFaces > 0;
776 }
777 
778 
779 // ************************************************************************* //
static bool checkFacePyramids(const bool report, const scalar minPyrVol, const polyMesh &, const vectorField &cellCentres, const pointField &p, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet *)
See primitiveMesh.
static bool checkMesh(const bool report, const polyMesh &mesh, const dictionary &dict, labelHashSet &wrongFaces)
Check mesh with mesh settings in dict. Collects incorrect faces.
#define readScalar
Definition: doubleScalar.C:38
static 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 *)
See primitiveMesh.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
static bool checkTriangleTwist(const bool report, const scalar minTwist, const polyMesh &, const vectorField &faceAreas, const vectorField &faceCentres, const pointField &p, const labelList &checkFaces, labelHashSet *setPtr)
Consecutive triangle (from face-centre decomposition) normals.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
label nFaces() const
static 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)
Triangle (from face-centre decomposition) normal v.s.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:256
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
Definition: ListOps.C:104
static 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)
static bool checkFaceFlatness(const bool report, const scalar minFlatness, const polyMesh &, const vectorField &faceAreas, const vectorField &faceCentres, const pointField &p, const labelList &checkFaces, labelHashSet *setPtr)
Area of faces v.s. sum of triangle areas.
label size() const
Return number of elements in table.
Definition: HashTableI.H:65
virtual const pointField & points() const
Return raw points.
Definition: polyMesh.C:1131
bool readIfPresent(const word &, T &, bool recursive=false, bool patternMatch=true) const
Find an entry if present, and assign to T.
Updateable mesh geometry and checking routines.
const vectorField & cellCentres() const
Istream and Ostream manipulators taking arguments.
static bool checkFaceArea(const bool report, const scalar minArea, const polyMesh &, const vectorField &faceAreas, const labelList &checkFaces, labelHashSet *setPtr)
Small faces.
const vectorField & faceCentres() const
static bool checkFaceAngles(const bool report, const scalar maxDeg, const polyMesh &mesh, const vectorField &faceAreas, const pointField &p, const labelList &checkFaces, labelHashSet *setPtr)
See primitiveMesh.
static 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)
See primitiveMesh.
const vectorField & faceAreas() const
static labelList affectedCells(const polyMesh &, const labelList &changedFaces)
Helper function: get affected cells from faces.
messageStream Info
static 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)
Interpolation weights (0.5 for regular mesh)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Omanip< int > setw(const int i)
Definition: IOmanip.H:199
static bool checkCellDeterminant(const bool report, const scalar minDet, const polyMesh &, const vectorField &faceAreas, const labelList &checkFaces, const labelList &affectedCells, labelHashSet *setPtr)
Area of internal faces v.s. boundary faces.
const polyMesh & mesh() const
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Definition: dictionary.C:583
const scalarField & cellVolumes() const