motionSmootherAlgoCheck.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2014 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  {
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  {
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  {
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  {
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  {
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 pointField& points,
438  const labelList& checkFaces,
439  labelHashSet& wrongFaces
440 )
441 {
442  List<labelPair> emptyBaffles;
443 
444  return checkMesh
445  (
446  report,
447  dict,
448  meshGeom,
449  points,
450  checkFaces,
451  emptyBaffles,
452  wrongFaces
453  );
454 }
455 
456 
458 (
459  const bool report,
460  const dictionary& dict,
461  const polyMeshGeometry& meshGeom,
462  const pointField& points,
463  const labelList& checkFaces,
464  const List<labelPair>& baffles,
465  labelHashSet& wrongFaces
466 )
467 {
468  const scalar maxNonOrtho
469  (
470  readScalar(dict.lookup("maxNonOrtho", true))
471  );
472  const scalar minVol
473  (
474  readScalar(dict.lookup("minVol", true))
475  );
476  const scalar minTetQuality
477  (
478  readScalar(dict.lookup("minTetQuality", true))
479  );
480  const scalar maxConcave
481  (
482  readScalar(dict.lookup("maxConcave", true))
483  );
484  const scalar minArea
485  (
486  readScalar(dict.lookup("minArea", true))
487  );
488  const scalar maxIntSkew
489  (
490  readScalar(dict.lookup("maxInternalSkewness", true))
491  );
492  const scalar maxBounSkew
493  (
494  readScalar(dict.lookup("maxBoundarySkewness", true))
495  );
496  const scalar minWeight
497  (
498  readScalar(dict.lookup("minFaceWeight", true))
499  );
500  const scalar minVolRatio
501  (
502  readScalar(dict.lookup("minVolRatio", true))
503  );
504  const scalar minTwist
505  (
506  readScalar(dict.lookup("minTwist", true))
507  );
508  const scalar minTriangleTwist
509  (
510  readScalar(dict.lookup("minTriangleTwist", true))
511  );
512  scalar minFaceFlatness = -1.0;
513  dict.readIfPresent("minFaceFlatness", minFaceFlatness, true);
514  const scalar minDet
515  (
516  readScalar(dict.lookup("minDeterminant", true))
517  );
518  label nWrongFaces = 0;
519 
520  Info<< "Checking faces in error :" << endl;
521  //Pout.setf(ios_base::left);
522 
523  if (maxNonOrtho < 180.0-SMALL)
524  {
525  meshGeom.checkFaceDotProduct
526  (
527  report,
528  maxNonOrtho,
529  checkFaces,
530  baffles,
531  &wrongFaces
532  );
533 
534  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
535 
536  Info<< " non-orthogonality > "
537  << setw(3) << maxNonOrtho
538  << " degrees : "
539  << nNewWrongFaces-nWrongFaces << endl;
540 
541  nWrongFaces = nNewWrongFaces;
542  }
543 
544  if (minVol > -GREAT)
545  {
546  meshGeom.checkFacePyramids
547  (
548  report,
549  minTetQuality,
550  points,
551  checkFaces,
552  baffles,
553  &wrongFaces
554  );
555 
556  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
557 
558  Info<< " faces with face pyramid volume < "
559  << setw(5) << minVol << " : "
560  << nNewWrongFaces-nWrongFaces << endl;
561 
562  nWrongFaces = nNewWrongFaces;
563  }
564 
565  if (minTetQuality > -GREAT)
566  {
567  meshGeom.checkFaceTets
568  (
569  report,
570  minTetQuality,
571  points,
572  checkFaces,
573  baffles,
574  &wrongFaces
575  );
576 
577  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
578 
579  Info<< " faces with face-decomposition tet quality < "
580  << setw(5) << minTetQuality << " : "
581  << nNewWrongFaces-nWrongFaces << endl;
582 
583  nWrongFaces = nNewWrongFaces;
584  }
585 
586  if (maxConcave < 180.0-SMALL)
587  {
588  meshGeom.checkFaceAngles
589  (
590  report,
591  maxConcave,
592  points,
593  checkFaces,
594  &wrongFaces
595  );
596 
597  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
598 
599  Info<< " faces with concavity > "
600  << setw(3) << maxConcave
601  << " degrees : "
602  << nNewWrongFaces-nWrongFaces << endl;
603 
604  nWrongFaces = nNewWrongFaces;
605  }
606 
607  if (minArea > -SMALL)
608  {
609  meshGeom.checkFaceArea
610  (
611  report,
612  minArea,
613  checkFaces,
614  &wrongFaces
615  );
616 
617  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
618 
619  Info<< " faces with area < "
620  << setw(5) << minArea
621  << " m^2 : "
622  << nNewWrongFaces-nWrongFaces << endl;
623 
624  nWrongFaces = nNewWrongFaces;
625  }
626 
627  if (maxIntSkew > 0 || maxBounSkew > 0)
628  {
630  (
631  report,
632  maxIntSkew,
633  maxBounSkew,
634  meshGeom.mesh(),
635  points,
636  meshGeom.cellCentres(),
637  meshGeom.faceCentres(),
638  meshGeom.faceAreas(),
639  checkFaces,
640  baffles,
641  &wrongFaces
642  );
643 
644  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
645 
646  Info<< " faces with skewness > "
647  << setw(3) << maxIntSkew
648  << " (internal) or " << setw(3) << maxBounSkew
649  << " (boundary) : " << nNewWrongFaces-nWrongFaces << endl;
650 
651  nWrongFaces = nNewWrongFaces;
652  }
653 
654  if (minWeight >= 0 && minWeight < 1)
655  {
656  meshGeom.checkFaceWeights
657  (
658  report,
659  minWeight,
660  checkFaces,
661  baffles,
662  &wrongFaces
663  );
664 
665  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
666 
667  Info<< " faces with interpolation weights (0..1) < "
668  << setw(5) << minWeight
669  << " : "
670  << nNewWrongFaces-nWrongFaces << endl;
671 
672  nWrongFaces = nNewWrongFaces;
673  }
674 
675  if (minVolRatio >= 0)
676  {
677  meshGeom.checkVolRatio
678  (
679  report,
680  minVolRatio,
681  checkFaces,
682  baffles,
683  &wrongFaces
684  );
685 
686  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
687 
688  Info<< " faces with volume ratio of neighbour cells < "
689  << setw(5) << minVolRatio
690  << " : "
691  << nNewWrongFaces-nWrongFaces << endl;
692 
693  nWrongFaces = nNewWrongFaces;
694  }
695 
696  if (minTwist > -1)
697  {
698  //Pout<< "Checking face twist: dot product of face normal "
699  // << "with face triangle normals" << endl;
700  meshGeom.checkFaceTwist
701  (
702  report,
703  minTwist,
704  points,
705  checkFaces,
706  &wrongFaces
707  );
708 
709  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
710 
711  Info<< " faces with face twist < "
712  << setw(5) << minTwist
713  << " : "
714  << nNewWrongFaces-nWrongFaces << endl;
715 
716  nWrongFaces = nNewWrongFaces;
717  }
718 
719  if (minTriangleTwist > -1)
720  {
721  //Pout<< "Checking triangle twist: dot product of consecutive triangle"
722  // << " normals resulting from face-centre decomposition" << endl;
723  meshGeom.checkTriangleTwist
724  (
725  report,
726  minTriangleTwist,
727  points,
728  checkFaces,
729  &wrongFaces
730  );
731 
732  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
733 
734  Info<< " faces with triangle twist < "
735  << setw(5) << minTriangleTwist
736  << " : "
737  << nNewWrongFaces-nWrongFaces << endl;
738 
739  nWrongFaces = nNewWrongFaces;
740  }
741 
742  if (minFaceFlatness > -SMALL)
743  {
744  meshGeom.checkFaceFlatness
745  (
746  report,
747  minFaceFlatness,
748  points,
749  checkFaces,
750  &wrongFaces
751  );
752 
753  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
754 
755  Info<< " faces with flatness < "
756  << setw(5) << minFaceFlatness
757  << " : "
758  << nNewWrongFaces-nWrongFaces << endl;
759 
760  nWrongFaces = nNewWrongFaces;
761  }
762 
763  if (minDet > -1)
764  {
765  meshGeom.checkCellDeterminant
766  (
767  report,
768  minDet,
769  checkFaces,
770  polyMeshGeometry::affectedCells(meshGeom.mesh(), checkFaces),
771  &wrongFaces
772  );
773 
774  label nNewWrongFaces = returnReduce(wrongFaces.size(), sumOp<label>());
775 
776  Info<< " faces on cells with determinant < "
777  << setw(5) << minDet << " : "
778  << nNewWrongFaces-nWrongFaces << endl;
779 
780  nWrongFaces = nNewWrongFaces;
781  }
782 
783  //Pout.setf(ios_base::right);
784 
785  return nWrongFaces > 0;
786 }
787 
788 
789 // ************************************************************************* //
Foam::polyMeshGeometry::checkFaceDotProduct
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.
Definition: polyMeshGeometry.C:371
Foam::polyMeshGeometry::faceAreas
const vectorField & faceAreas() const
Definition: polyMeshGeometry.H:143
Foam::polyMeshGenChecks::checkMesh
bool checkMesh(const polyMeshGen &mesh, const bool report)
Check mesh for correctness. Returns false for no error.
Definition: polyMeshGenChecks.C:104
Foam::polyMeshGenChecks::checkFaceSkewness
void checkFaceSkewness(const polyMeshGen &, scalarField &, const boolList *changedFacePtr=NULL)
Check face skewness.
Definition: polyMeshGenChecksGeometry.C:1138
Foam::returnReduce
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
Definition: PstreamReduceOps.H:86
polyMeshGeometry.H
Foam::polyMeshGeometry::checkFaceWeights
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)
Definition: polyMeshGeometry.C:1176
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::polyMeshGeometry::checkFaceTets
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.
Definition: polyMeshGeometry.C:734
Foam::HashSet< label, Hash< label > >
Foam::polyMeshGenChecks::checkFaceFlatness
bool checkFaceFlatness(const polyMeshGen &, const bool report, const scalar warnFlatness, labelHashSet *setPtr=NULL, const boolList *changedFacePtr=NULL)
Check face warpage: decompose face and check ratio between.
Definition: polyMeshGenChecksGeometry.C:1777
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
Foam::polyMeshGeometry::faceCentres
const vectorField & faceCentres() const
Definition: polyMeshGeometry.H:147
Foam::polyMeshGenChecks::checkFaceAngles
bool checkFaceAngles(const polyMeshGen &, const bool report=false, const scalar maxDeg=10, labelHashSet *setPtr=NULL, const boolList *changedFacePtr=NULL)
Check face angles.
Definition: polyMeshGenChecksGeometry.C:1620
Foam::label
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
Foam::polyMeshGeometry::checkFaceArea
static bool checkFaceArea(const bool report, const scalar minArea, const polyMesh &, const vectorField &faceAreas, const labelList &checkFaces, labelHashSet *setPtr)
Small faces.
Definition: polyMeshGeometry.C:2039
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::polyMeshGeometry::mesh
const polyMesh & mesh() const
Definition: polyMeshGeometry.H:138
Foam::Info
messageStream Info
IOmanip.H
Istream and Ostream manipulators taking arguments.
Foam::polyMeshGenChecks::checkFaceDotProduct
void checkFaceDotProduct(const polyMeshGen &, scalarField &, const boolList *changedFacePtr=NULL)
Check for non-orthogonality.
Definition: polyMeshGenChecksGeometry.C:630
Foam::identity
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
Definition: ListOps.C:104
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::HashTable::size
label size() const
Return number of elements in table.
Definition: HashTableI.H:65
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam::setw
Omanip< int > setw(const int i)
Definition: IOmanip.H:199
Foam::polyMeshGeometry::checkFaceTwist
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.
Definition: polyMeshGeometry.C:1606
readScalar
#define readScalar
Definition: doubleScalar.C:38
Foam::polyMeshGenChecks::checkFacePyramids
bool checkFacePyramids(const polyMeshGen &, const bool report=false, const scalar minPyrVol=-SMALL, labelHashSet *setPtr=NULL, const boolList *changedFacePtr=NULL)
Check face pyramid volume.
Definition: polyMeshGenChecksGeometry.C:962
Foam::polyMeshGeometry::checkFaceFlatness
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.
Definition: polyMeshGeometry.C:1941
Foam::sumOp
Definition: ops.H:162
Foam::motionSmootherAlgo::checkMesh
static bool checkMesh(const bool report, const polyMesh &mesh, const dictionary &dict, labelHashSet &wrongFaces)
Check mesh with mesh settings in dict. Collects incorrect faces.
Definition: motionSmootherAlgoCheck.C:415
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
motionSmootherAlgo.H
points
const pointField & points
Definition: gmvOutputHeader.H:1
Foam::polyMeshGeometry
Updateable mesh geometry and checking routines.
Definition: polyMeshGeometry.H:52
Foam::polyMeshGeometry::checkFacePyramids
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.
Definition: polyMeshGeometry.C:553
Foam::polyMeshGeometry::checkCellDeterminant
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.
Definition: polyMeshGeometry.C:2100
Foam::polyMeshGeometry::checkTriangleTwist
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.
Definition: polyMeshGeometry.C:1791
Foam::polyMeshGeometry::cellCentres
const vectorField & cellCentres() const
Definition: polyMeshGeometry.H:151
Foam::polyMeshGeometry::checkVolRatio
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)
Definition: polyMeshGeometry.C:1331
Foam::polyMeshGeometry::checkFaceAngles
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.
Definition: polyMeshGeometry.C:1473