Functions | |
bool | checkGeometry (const polyMeshGen &, const bool report=false) |
Check mesh geometry (& implicitly topology) for correctness. More... | |
bool | checkTopology (const polyMeshGen &, const bool report=false) |
Check mesh topology for correctness. Returns false for no error. More... | |
bool | checkMesh (const polyMeshGen &, const bool report=false) |
Check mesh for correctness. Returns false for no error. More... | |
bool | checkClosedBoundary (const polyMeshGen &, const bool report=false) |
Check boundary closedness. More... | |
bool | checkClosedCells (const polyMeshGen &, const bool report=false, const scalar aspectWarn=1000, labelHashSet *setPtr=NULL) |
Check cells for closedness. More... | |
bool | checkCellVolumes (const polyMeshGen &, const bool report=false, labelHashSet *setPtr=NULL) |
Check for negative cell volumes. More... | |
bool | checkFaceAreas (const polyMeshGen &, const bool report=false, const scalar minFaceArea=VSMALL, labelHashSet *setPtr=NULL, const boolList *changedFacePtr=NULL) |
Check for negative face areas. More... | |
bool | checkCellPartTetrahedra (const polyMeshGen &, const bool report=false, const scalar minPartTet=VSMALL, labelHashSet *setPtr=NULL, const boolList *changedFacePtr=NULL) |
void | checkFaceDotProduct (const polyMeshGen &, scalarField &, const boolList *changedFacePtr=NULL) |
Check for non-orthogonality. More... | |
bool | checkFaceDotProduct (const polyMeshGen &, const bool report=false, const scalar nonOrthWarn=70.0, labelHashSet *setPtr=NULL, const boolList *changedFacePtr=NULL) |
bool | checkFacePyramids (const polyMeshGen &, const bool report=false, const scalar minPyrVol=-SMALL, labelHashSet *setPtr=NULL, const boolList *changedFacePtr=NULL) |
Check face pyramid volume. More... | |
void | checkFaceSkewness (const polyMeshGen &, scalarField &, const boolList *changedFacePtr=NULL) |
Check face skewness. More... | |
bool | checkFaceSkewness (const polyMeshGen &, const bool report=false, const scalar warnSkew=4.0, labelHashSet *setPtr=NULL, const boolList *changedFacePtr=NULL) |
void | checkFaceUniformity (const polyMeshGen &, scalarField &, const boolList *changedFacePtr=NULL) |
Check face uniformity. More... | |
bool | checkFaceUniformity (const polyMeshGen &, const bool report=false, const scalar warnUniform=0.1, labelHashSet *setPtr=NULL, const boolList *changedFacePtr=NULL) |
void | checkVolumeUniformity (const polyMeshGen &, scalarField &, const boolList *changedFacePtr=NULL) |
check volume difference of neighbouring cells More... | |
bool | checkVolumeUniformity (const polyMeshGen &, const bool report=false, const scalar warnUniform=0.1, labelHashSet *setPtr=NULL, const boolList *changedFacePtr=NULL) |
bool | checkFaceAngles (const polyMeshGen &, const bool report=false, const scalar maxDeg=10, labelHashSet *setPtr=NULL, const boolList *changedFacePtr=NULL) |
Check face angles. More... | |
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. More... | |
bool | checkPoints (const polyMeshGen &, const bool report=false, labelHashSet *setPtr=NULL) |
Check for unused points. More... | |
bool | checkUpperTriangular (const polyMeshGen &, const bool report=false, labelHashSet *setPtr=NULL) |
Check face ordering. More... | |
bool | checkCellsZipUp (const polyMeshGen &, const bool report=false, labelHashSet *setPtr=NULL) |
Check cell zip-up. More... | |
bool | checkFaceVertices (const polyMeshGen &, const bool report=false, labelHashSet *setPtr=NULL) |
Check uniqueness of face vertices. More... | |
label | findBadFacesRelaxed (const polyMeshGen &, labelHashSet &badFaces, const bool report=false, const boolList *activeFacePtr=NULL) |
label | findBadFaces (const polyMeshGen &, labelHashSet &badFaces, const bool report=false, const boolList *activeFacePtr=NULL) |
label | findLowQualityFaces (const polyMeshGen &mesh, labelHashSet &badFaces, const bool report=false, const boolList *activeFacePtr=NULL) |
label | findWorstQualityFaces (const polyMeshGen &mesh, labelHashSet &badFaces, const bool report=false, const boolList *activeFacePtr=NULL, const scalar relativeThreshold=0.1) |
checks the mesh and selects the faces with worst quality More... | |
bool checkGeometry | ( | const polyMeshGen & | , |
const bool | report = false |
||
) |
Check mesh geometry (& implicitly topology) for correctness.
Returns false for no error.
Definition at line 51 of file polyMeshGenChecks.C.
References checkCellPartTetrahedra(), checkCellVolumes(), checkClosedBoundary(), checkClosedCells(), checkFaceAreas(), checkFaceDotProduct(), checkFacePyramids(), checkFaceSkewness(), checkFaceUniformity(), Foam::endl(), Foam::Info, and mesh.
Referenced by checkMesh().
bool checkTopology | ( | const polyMeshGen & | mesh, |
const bool | report | ||
) |
Check mesh topology for correctness. Returns false for no error.
Definition at line 80 of file polyMeshGenChecks.C.
References checkCellsZipUp(), checkFaceVertices(), checkPoints(), checkUpperTriangular(), Foam::endl(), Foam::Info, and mesh.
Referenced by checkMesh().
bool checkMesh | ( | const polyMeshGen & | mesh, |
const bool | report | ||
) |
Check mesh for correctness. Returns false for no error.
Definition at line 104 of file polyMeshGenChecks.C.
References checkGeometry(), checkTopology(), Foam::endl(), Foam::Info, and mesh.
Referenced by edgeCollapser::checkBadFaces(), motionSmootherAlgo::checkMesh(), Foam::checkMeshQuality(), extrudeLayer::extrudeLayer(), hexRef8::hexRef8(), meshRefinement::markFacesOnProblemCellsGeometric(), meshRefinement::mergeEdgesUndo(), meshRefinement::mergePatchFacesUndo(), polyMesh::polyMesh(), motionSmootherAlgo::scaleMesh(), hexRef8::setRefinement(), and hexRef8::setUnrefinement().
bool checkClosedBoundary | ( | const polyMeshGen & | mesh, |
const bool | report = false |
||
) |
Check boundary closedness.
Definition at line 45 of file polyMeshGenChecksGeometry.C.
References VectorSpace::component(), Foam::endl(), Foam::Info, Foam::mag(), Foam::max(), mesh, Foam::reduce(), SeriousErrorIn, Vector< scalar >::X, Vector< scalar >::Y, Vector< scalar >::Z, and Vector< scalar >::zero.
Referenced by checkGeometry(), and primitiveMesh::checkGeometry().
bool checkClosedCells | ( | const polyMeshGen & | mesh, |
const bool | report = false , |
||
const scalar | aspectWarn = 1000 , |
||
labelHashSet * | setPtr = NULL |
||
) |
Check cells for closedness.
Definition at line 113 of file polyMeshGenChecksGeometry.C.
References cells, Foam::component(), Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), Foam::max(), mesh, Foam::min(), Foam::Pout, Foam::pow(), Foam::reduce(), SeriousErrorIn, WarningIn, Vector< scalar >::X, Vector< scalar >::Y, Vector< scalar >::Z, and Vector< scalar >::zero.
Referenced by primitiveMesh::checkClosedCells(), checkGeometry(), and primitiveMesh::checkGeometry().
bool checkCellVolumes | ( | const polyMeshGen & | mesh, |
const bool | report = false , |
||
labelHashSet * | setPtr = NULL |
||
) |
Check for negative cell volumes.
Definition at line 294 of file polyMeshGenChecksGeometry.C.
References Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::max(), mesh, Foam::min(), Foam::reduce(), SeriousErrorIn, and Foam::sum().
Referenced by checkGeometry(), primitiveMesh::checkGeometry(), and polyMesh::checkMeshMotion().
bool checkFaceAreas | ( | const polyMeshGen & | mesh, |
const bool | report = false , |
||
const scalar | minFaceArea = VSMALL , |
||
labelHashSet * | setPtr = NULL , |
||
const boolList * | changedFacePtr = NULL |
||
) |
Check for negative face areas.
Definition at line 362 of file polyMeshGenChecksGeometry.C.
References Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), Foam::max(), mesh, Foam::min(), Foam::Pout, Foam::reduce(), and SeriousErrorIn.
Referenced by checkGeometry(), primitiveMesh::checkGeometry(), polyMesh::checkMeshMotion(), meshOptimizer::findBadFaces(), findBadFaces(), and findBadFacesRelaxed().
bool checkCellPartTetrahedra | ( | const polyMeshGen & | mesh, |
const bool | report = false , |
||
const scalar | minPartTet = VSMALL , |
||
labelHashSet * | setPtr = NULL , |
||
const boolList * | changedFacePtr = NULL |
||
) |
Check for negative part tetrahedra Cells are decomposed into tetrahedra formed by the cell centre, face centre and the edge vertices
ensure that faces are selected at both sides
ensure that faces are selected at both sides
Definition at line 467 of file polyMeshGenChecksGeometry.C.
References LongList< T, Offset >::append(), UPstream::blocking, LongList< T, Offset >::byteSize(), Foam::endl(), f(), forAll, HashTable::found(), Foam::Info, HashSet< Key, Hash >::insert(), tetrahedron::mag(), mesh, points, Foam::Pout, Foam::reduce(), and WarningIn.
Referenced by checkGeometry(), meshOptimizer::findBadFaces(), and findBadFaces().
void checkFaceDotProduct | ( | const polyMeshGen & | mesh, |
scalarField & | faceDotProduct, | ||
const boolList * | changedFacePtr = NULL |
||
) |
Check for non-orthogonality.
for all internal faces check theat the d dot S product is positive
calculate skewness at processor faces
for all internal faces check theat the d dot S product is positive
calculate skewness at processor faces
Definition at line 630 of file polyMeshGenChecksGeometry.C.
References UPstream::blocking, forAll, Foam::mag(), mesh, UPstream::parRun(), s(), and List::size().
Referenced by primitiveMeshGeometry::checkFaceDotProduct(), polyMeshGeometry::checkFaceDotProduct(), checkFaceDotProduct(), checkGeometry(), motionSmootherAlgo::checkMesh(), meshOptimizer::findLowQualityFaces(), findLowQualityFaces(), and findWorstQualityFaces().
bool checkFaceDotProduct | ( | const polyMeshGen & | mesh, |
const bool | report = false , |
||
const scalar | nonOrthWarn = 70.0 , |
||
labelHashSet * | setPtr = NULL , |
||
const boolList * | changedFacePtr = NULL |
||
) |
for all internal faces check theat the d dot S product is positive
for all internal faces check theat the d dot S product is positive
Definition at line 729 of file polyMeshGenChecksGeometry.C.
References Foam::acos(), checkFaceDotProduct(), Foam::cos(), Foam::endl(), Foam::Info, HashSet< Key, Hash >::insert(), mesh, Foam::min(), UPstream::parRun(), Foam::Pout, Foam::reduce(), List::size(), and WarningIn.
bool checkFacePyramids | ( | const polyMeshGen & | mesh, |
const bool | report = false , |
||
const scalar | minPyrVol = -SMALL , |
||
labelHashSet * | setPtr = NULL , |
||
const boolList * | changedFacePtr = NULL |
||
) |
Check face pyramid volume.
make sure that processor faces are marked on both sides
send and receive data where needed
make sure that processor faces are marked on both sides
send and receive data where needed
Definition at line 962 of file polyMeshGenChecksGeometry.C.
References LongList< T, Offset >::append(), UPstream::blocking, LongList< T, Offset >::byteSize(), Foam::endl(), forAll, HashTable::found(), Foam::Info, HashSet< Key, Hash >::insert(), UPstream::master(), mesh, points, Foam::Pout, Foam::reduce(), and WarningIn.
Referenced by primitiveMeshGeometry::checkFacePyramids(), polyMeshGeometry::checkFacePyramids(), checkGeometry(), primitiveMesh::checkGeometry(), motionSmootherAlgo::checkMesh(), polyMesh::checkMeshMotion(), meshOptimizer::findBadFaces(), findBadFaces(), findBadFacesRelaxed(), symmetryPlaneOptimisation::optimizeSymmetryPlanes(), and meshOptimizer::untangleBoundaryLayer().
void checkFaceSkewness | ( | const polyMeshGen & | mesh, |
scalarField & | faceSkewness, | ||
const boolList * | changedFacePtr = NULL |
||
) |
Check face skewness.
Warn if the skew correction vector is more than skewWarning times larger than the face area vector
check internal faces
check parallel boundaries
calculate skewness at processor faces
boundary faces
Warn if the skew correction vector is more than skewWarning times larger than the face area vector
check internal faces
check parallel boundaries
calculate skewness at processor faces
boundary faces
Definition at line 1138 of file polyMeshGenChecksGeometry.C.
References UPstream::blocking, forAll, Foam::mag(), mesh, n, UPstream::parRun(), points, and List::size().
Referenced by primitiveMeshGeometry::checkFaceSkewness(), polyMesh::checkFaceSkewness(), checkFaceSkewness(), checkGeometry(), primitiveMesh::checkGeometry(), motionSmootherAlgo::checkMesh(), meshOptimizer::findLowQualityFaces(), findLowQualityFaces(), and findWorstQualityFaces().
bool checkFaceSkewness | ( | const polyMeshGen & | mesh, |
const bool | report = false , |
||
const scalar | warnSkew = 4.0 , |
||
labelHashSet * | setPtr = NULL , |
||
const boolList * | changedFacePtr = NULL |
||
) |
Warn if the skew correction vector is more than skewWarning times larger than the face area vector
check faces
Warn if the skew correction vector is more than skewWarning times larger than the face area vector
check faces
Definition at line 1281 of file polyMeshGenChecksGeometry.C.
References checkFaceSkewness(), Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::max(), mesh, Foam::nl, Foam::Pout, Foam::reduce(), and WarningIn.
void checkFaceUniformity | ( | const polyMeshGen & | mesh, |
scalarField & | faceUniformity, | ||
const boolList * | changedFacePtr = NULL |
||
) |
Check face uniformity.
for all internal faces check the uniformity of the mesh at faces
for all internal faces check the uniformity of the mesh at faces
Definition at line 1381 of file polyMeshGenChecksGeometry.C.
References UPstream::blocking, forAll, Foam::mag(), mesh, Foam::min(), UPstream::parRun(), and List::size().
Referenced by checkFaceUniformity(), and checkGeometry().
bool checkFaceUniformity | ( | const polyMeshGen & | mesh, |
const bool | report = false , |
||
const scalar | warnUniform = 0.1 , |
||
labelHashSet * | setPtr = NULL , |
||
const boolList * | changedFacePtr = NULL |
||
) |
for all internal faces check the uniformity of the mesh at faces
for all internal faces check the uniformity of the mesh at faces
Definition at line 1470 of file polyMeshGenChecksGeometry.C.
References checkFaceUniformity(), Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::max(), mesh, Foam::min(), UPstream::parRun(), and Foam::reduce().
void checkVolumeUniformity | ( | const polyMeshGen & | , |
scalarField & | , | ||
const boolList * | changedFacePtr = NULL |
||
) |
check volume difference of neighbouring cells
bool checkVolumeUniformity | ( | const polyMeshGen & | , |
const bool | report = false , |
||
const scalar | warnUniform = 0.1 , |
||
labelHashSet * | setPtr = NULL , |
||
const boolList * | changedFacePtr = NULL |
||
) |
Definition at line 1607 of file polyMeshGenChecksGeometry.C.
bool checkFaceAngles | ( | const polyMeshGen & | mesh, |
const bool | report = false , |
||
const scalar | maxDeg = 10 , |
||
labelHashSet * | setPtr = NULL , |
||
const boolList * | changedFacePtr = NULL |
||
) |
Check face angles.
Definition at line 1620 of file polyMeshGenChecksGeometry.C.
References Foam::abort(), Foam::asin(), Foam::endl(), f(), Foam::FatalError, FatalErrorIn, forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), Foam::max(), mesh, Foam::min(), points, Foam::reduce(), Foam::sin(), Foam::Warning, and WarningIn.
Referenced by primitiveMeshGeometry::checkFaceAngles(), polyMeshGeometry::checkFaceAngles(), primitiveMesh::checkFaceAngles(), and motionSmootherAlgo::checkMesh().
bool checkFaceFlatness | ( | const polyMeshGen & | mesh, |
const bool | report, | ||
const scalar | warnFlatness, | ||
labelHashSet * | setPtr = NULL , |
||
const boolList * | changedFacePtr = NULL |
||
) |
Check face warpage: decompose face and check ratio between.
magnitude of sum of triangle areas and sum of magnitude of triangle areas.
Calculate the sum of magnitude of areas and compare the magnitude of sum of areas.
make sure that processor faces are marked on both sides
exchange list sizes
exchange data
Calculate the sum of magnitude of areas and compare the magnitude of sum of areas.
make sure that processor faces are marked on both sides
exchange list sizes
exchange data
Definition at line 1777 of file polyMeshGenChecksGeometry.C.
References Foam::abort(), List::append(), UPstream::blocking, Foam::endl(), f(), Foam::FatalError, FatalErrorIn, forAll, HashTable::found(), Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), mesh, Foam::min(), n, Foam::nl, UPstream::parRun(), points, Foam::reduce(), List::size(), PtrList::size(), and WarningIn.
Referenced by polyMeshGeometry::checkFaceFlatness(), primitiveMesh::checkFaceFlatness(), motionSmootherAlgo::checkMesh(), meshOptimizer::findBadFaces(), and findBadFaces().
bool checkPoints | ( | const polyMeshGen & | mesh, |
const bool | report = false , |
||
labelHashSet * | setPtr = NULL |
||
) |
Check for unused points.
Definition at line 46 of file polyMeshGenChecksTopology.C.
References Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), mesh, Foam::reduce(), VRWGraph::sizeOfRow(), and WarningIn.
Referenced by edgeExtractor::checkCorners(), checkTopology(), and primitiveMesh::checkTopology().
bool checkUpperTriangular | ( | const polyMeshGen & | mesh, |
const bool | report = false , |
||
labelHashSet * | setPtr = NULL |
||
) |
Check face ordering.
Definition at line 118 of file polyMeshGenChecksTopology.C.
References cells, Foam::endl(), forAll, forAllRow, Foam::Info, HashSet< Key, Hash >::insert(), mesh, Foam::Pout, Foam::reduce(), List::size(), VRWGraph::sizeOfRow(), Foam::tab, and WarningIn.
Referenced by checkTopology(), primitiveMesh::checkTopology(), and lduPrimitiveMesh::lduPrimitiveMesh().
bool checkCellsZipUp | ( | const polyMeshGen & | mesh, |
const bool | report = false , |
||
labelHashSet * | setPtr = NULL |
||
) |
Check cell zip-up.
Definition at line 254 of file polyMeshGenChecksTopology.C.
References DynList< T, staticSize >::append(), Foam::constant::universal::c, cells, DynList< T, staticSize >::containsAtPosition(), Foam::e, Foam::endl(), f(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), mesh, Foam::pos(), Foam::Pout, Foam::reduce(), DynList< T, staticSize >::size(), and WarningIn.
Referenced by checkTopology(), and primitiveMesh::checkTopology().
bool checkFaceVertices | ( | const polyMeshGen & | mesh, |
const bool | report = false , |
||
labelHashSet * | setPtr = NULL |
||
) |
Check uniqueness of face vertices.
Definition at line 373 of file polyMeshGenChecksTopology.C.
References Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::max(), mesh, Foam::min(), nPoints, Foam::reduce(), SeriousErrorIn, List::size(), and WarningIn.
Referenced by checkTopology(), and primitiveMesh::checkTopology().
label findBadFacesRelaxed | ( | const polyMeshGen & | mesh, |
labelHashSet & | badFaces, | ||
const bool | report = false , |
||
const boolList * | activeFacePtr = NULL |
||
) |
checks for bad faces making the mesh unusable checks for negative pyramids and zero area faces
Definition at line 2005 of file polyMeshGenChecksGeometry.C.
References checkFaceAreas(), checkFacePyramids(), HashTable::clear(), mesh, Foam::returnReduce(), and HashTable::size().
Referenced by meshOptimizer::untangleMeshFV().
label findBadFaces | ( | const polyMeshGen & | mesh, |
labelHashSet & | badFaces, | ||
const bool | report = false , |
||
const boolList * | activeFacePtr = NULL |
||
) |
check mesh for bad faces which make the mesh invalid checks for negative pyramids, face flatness, zero area faces and negative tetrahedra
Definition at line 2038 of file polyMeshGenChecksGeometry.C.
References checkCellPartTetrahedra(), checkFaceAreas(), checkFaceFlatness(), checkFacePyramids(), HashTable::clear(), mesh, Foam::returnReduce(), and HashTable::size().
Referenced by meshOptimizer::untangleMeshFV(), and meshSurfaceOptimizer::untangleSurface2D().
label findLowQualityFaces | ( | const polyMeshGen & | mesh, |
labelHashSet & | badFaces, | ||
const bool | report = false , |
||
const boolList * | activeFacePtr = NULL |
||
) |
check mesh for faces that may cause problems to the solver checks for non-orthogonality and skewness
Definition at line 2089 of file polyMeshGenChecksGeometry.C.
References checkFaceDotProduct(), checkFaceSkewness(), HashTable::clear(), mesh, Foam::returnReduce(), and HashTable::size().
Referenced by meshOptimizer::optimizeLowQualityFaces().
label findWorstQualityFaces | ( | const polyMeshGen & | mesh, |
labelHashSet & | badFaces, | ||
const bool | report = false , |
||
const boolList * | activeFacePtr = NULL , |
||
const scalar | relativeThreshold = 0.1 |
||
) |
checks the mesh and selects the faces with worst quality
Definition at line 2122 of file polyMeshGenChecksGeometry.C.
References Foam::acos(), checkFaceDotProduct(), checkFaceSkewness(), HashTable::clear(), Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::max(), mesh, Foam::min(), Foam::returnReduce(), and HashTable::size().
Referenced by meshOptimizer::optimizeMeshFVBestQuality().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.