Collection of functions checking primitiveMesh. More...
Functions | |
fileName | checkMeshOutputDir (const polyMesh &mesh) |
Output directory for sets and surfaces. More... | |
void | printMeshStats (const polyMesh &mesh, const bool allTopology) |
Print mesh statistics. More... | |
void | mergeAndWrite (const polyMesh &mesh, const surfaceWriter &setWriter, const word &name, const indirectPrimitivePatch setPatch, const fileName &outputDir) |
Generate merged surface on master and write. Needs input patch. More... | |
void | mergeAndWrite (const surfaceWriter &, const faceSet &) |
Write representation of (assembled) faceSet to surface file in. More... | |
void | mergeAndWrite (const surfaceWriter &, const cellSet &) |
Write representation of (assembled) cellSet to surface file in. More... | |
void | mergeAndWrite (const setWriter &, const pointSet &) |
Write representation of (assembled) pointSet to 'set' file in. More... | |
label | findOppositeWedge (const polyMesh &, const wedgePolyPatch &) |
Find wedge with opposite orientation. Note: does not actually check. More... | |
bool | checkWedges (const polyMesh &, const bool report, const Vector< label > &, labelHashSet *) |
Check wedge orientation. More... | |
bool | checkCoupledPoints (const polyMesh &, const bool report, labelHashSet *) |
Check 0th vertex on coupled faces. More... | |
label | checkTopology (const polyMesh &mesh, const bool allTopology, const autoPtr< surfaceWriter > &surfWriter, const autoPtr< setWriter > &setWriter) |
Check the topology. More... | |
label | checkGeometry (const polyMesh &mesh, const bool allGeometry, const scalar nonOrthThreshold, const scalar skewThreshold, const autoPtr< surfaceWriter > &, const autoPtr< setWriter > &) |
Check the geometry. More... | |
bool | checkMesh (const bool report, const polyMesh &mesh, const dictionary &dict, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet &wrongFaces) |
Check (subset of mesh including baffles) with mesh settings in dict. More... | |
bool | checkMesh (const bool report, const polyMesh &mesh, const dictionary &dict, const labelList &checkFaces, labelHashSet &wrongFaces) |
Check (subset of mesh) with mesh settings in dict. More... | |
bool | checkMesh (const bool report, const polyMesh &mesh, const dictionary &dict, labelHashSet &wrongFaces) |
Check mesh with mesh settings in dict. More... | |
tmp< scalarField > | faceOrthogonality (const polyMesh &mesh, const vectorField &fAreas, const vectorField &cellCtrs) |
Generate orthogonality field. (1 for fully orthogonal, < 1 for. More... | |
tmp< scalarField > | faceSkewness (const polyMesh &mesh, const pointField &points, const vectorField &fCtrs, const vectorField &fAreas, const vectorField &cellCtrs) |
Generate skewness field. More... | |
tmp< scalarField > | faceWeights (const polyMesh &mesh, const vectorField &fCtrs, const vectorField &fAreas, const vectorField &cellCtrs) |
Generate interpolation factors field. More... | |
tmp< scalarField > | volRatio (const polyMesh &mesh, const scalarField &vol) |
Generate volume ratio field. More... | |
bool | checkFaceOrthogonality (const polyMesh &mesh, const scalar nonOrthThreshold, const bool report=false, labelHashSet *setPtr=nullptr) |
Check face orthogonality. More... | |
bool | checkFaceSkewness (const polyMesh &mesh, const scalar skewThreshold, const bool report=false, labelHashSet *setPtr=nullptr) |
Check face skewness. More... | |
bool | checkEdgeAlignment (const polyMesh &mesh, const bool report, const Vector< label > &directions, labelHashSet *setPtr) |
Check edge alignment for 1D/2D cases. More... | |
bool | checkCellDeterminant (const polyMesh &mesh, const bool report, labelHashSet *setPtr) |
bool | checkFaceWeight (const polyMesh &mesh, const bool report, const scalar minWeight=0.05, labelHashSet *setPtr=nullptr) |
Check for face weights. More... | |
bool | checkVolRatio (const polyMesh &mesh, const bool report, const scalar minRatio=0.01, labelHashSet *setPtr=nullptr) |
Check for neighbouring cell volumes. More... | |
bool | checkFaceOrthogonality (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 orthogonality. More... | |
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. More... | |
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. More... | |
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. More... | |
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) More... | |
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) More... | |
bool | checkFaceAngles (const bool report, const scalar maxConcave, 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. More... | |
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) |
Check the difference between normals of individual face-triangles (from. More... | |
bool | checkTriangleTwist (const bool report, const scalar minTwist, const polyMesh &, const vectorField &faceAreas, const vectorField &faceCentres, const pointField &p, const labelList &checkFaces, labelHashSet *setPtr) |
Check consecutive face-triangle (from face-centre decomposition) normals. More... | |
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. More... | |
bool | checkFaceArea (const bool report, const scalar minArea, const polyMesh &, const vectorField &faceAreas, const labelList &checkFaces, labelHashSet *setPtr) |
Check for small faces. More... | |
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. More... | |
scalar | checkNonOrtho (const primitiveMesh &mesh, const bool report, const scalar severeNonorthogonalityThreshold, const label facei, const vector &s, const vector &d, label &severeNonOrth, label &errorNonOrth, labelHashSet *setPtr) |
bool | checkFaceTet (const primitiveMesh &mesh, const bool report, const scalar minTetQuality, const pointField &p, const label facei, const point &fc, const point &cc, labelHashSet *setPtr) |
labelList | getAffectedCells (const primitiveMesh &mesh, const labelList &changedFaces) |
bool | checkUpperTriangular (const primitiveMesh &mesh, const bool report=false, labelHashSet *setPtr=nullptr) |
Check face ordering. More... | |
bool | checkCellsZipUp (const primitiveMesh &mesh, const bool report=false, labelHashSet *setPtr=nullptr) |
Check cell zip-up. More... | |
bool | checkFaceVertices (const primitiveMesh &mesh, const bool report=false, labelHashSet *setPtr=nullptr) |
Check uniqueness of face vertices. More... | |
bool | checkPoints (const primitiveMesh &mesh, const bool report=false, labelHashSet *setPtr=nullptr) |
Check for unused points. More... | |
bool | checkDuplicateFaces (const primitiveMesh &mesh, const label, const Map< label > &, label &nBaffleFaces, labelHashSet *) |
Check if all points on face are shared with another face. More... | |
bool | checkCommonOrder (const primitiveMesh &mesh, const label, const Map< label > &, labelHashSet *) |
Check that shared points are in consecutive order. More... | |
bool | checkFaceFaces (const primitiveMesh &mesh, const bool report=false, labelHashSet *setPtr=nullptr) |
Check face-face connectivity. More... | |
tmp< scalarField > | faceOrthogonality (const primitiveMesh &mesh, const vectorField &fAreas, const vectorField &cellCtrs) |
Generate non-orthogonality field (internal faces only) More... | |
void | facePyramidVolume (const primitiveMesh &mesh, const pointField &points, const vectorField &cellCtrs, scalarField &ownPyrVol, scalarField &neiPyrVol) |
Generate face pyramid volume fields. More... | |
tmp< scalarField > | faceSkewness (const primitiveMesh &mesh, const pointField &points, const vectorField &fCtrs, const vectorField &fAreas, const vectorField &cellCtrs) |
Generate skewness field. More... | |
void | cellClosedness (const primitiveMesh &mesh, const Vector< label > &meshD, const vectorField &areas, const scalarField &vols, scalarField &openness, scalarField &aratio) |
Generate cell openness and cell aspect ratio field. More... | |
tmp< scalarField > | faceConcavity (const scalar maxSin, const primitiveMesh &mesh, const pointField &p, const vectorField &faceAreas) |
Generate face concavity field. Returns per face the (sin of the) More... | |
tmp< scalarField > | faceFlatness (const primitiveMesh &mesh, const pointField &p, const vectorField &fCtrs, const vectorField &faceAreas) |
Generate face flatness field. Compares the individual triangles'. More... | |
tmp< scalarField > | edgeAlignment (const primitiveMesh &mesh, const Vector< label > &directions, const pointField &p) |
Generate edge alignment field. Is per face the minimum aligned edge. More... | |
tmp< scalarField > | cellDeterminant (const primitiveMesh &mesh, const Vector< label > &directions, const vectorField &faceAreas, const PackedBoolList &internalOrCoupledFace) |
Generate cell determinant field. More... | |
scalar | faceSkewness (const primitiveMesh &mesh, const pointField &p, const vectorField &fCtrs, const vectorField &fAreas, const label facei, const point &ownCc, const point &neiCc) |
Skewness of single face. More... | |
scalar | boundaryFaceSkewness (const primitiveMesh &mesh, const pointField &p, const vectorField &fCtrs, const vectorField &fAreas, const label facei, const point &ownCc) |
Skewness of single boundary face. More... | |
scalar | faceOrthogonality (const point &ownCc, const point &neiCc, const vector &s) |
Orthogonality of single face. More... | |
bool | checkClosedBoundary (const primitiveMesh &mesh, const scalar closedThreshold, const bool report=false) |
Check boundary for closedness. More... | |
bool | checkClosedCells (const primitiveMesh &mesh, const scalar closedThreshold, const scalar aspectThreshold, const bool report=false, labelHashSet *setPtr=nullptr, labelHashSet *highAspectSetPtr=nullptr, const Vector< label > &solutionD=Vector< label >::one) |
Check cells for closedness. More... | |
bool | checkFaceAreas (const primitiveMesh &mesh, const bool report=false, labelHashSet *setPtr=nullptr) |
Check for negative face areas. More... | |
bool | checkCellVolumes (const primitiveMesh &mesh, const bool report=false, labelHashSet *setPtr=nullptr) |
Check for negative cell volumes. More... | |
bool | checkFacePyramids (const primitiveMesh &mesh, const bool report=false, const scalar minPyrVol=-small, labelHashSet *setPtr=nullptr) |
Check face pyramid volume. More... | |
bool | checkFaceAngles (const primitiveMesh &mesh, const bool report=false, const scalar maxSin=10, labelHashSet *setPtr=nullptr) |
Check face angles. More... | |
bool | checkFaceFlatness (const primitiveMesh &mesh, const bool report, const scalar warnFlatness, labelHashSet *setPtr) |
Check face warpage: decompose face and check ratio between. More... | |
bool | checkPointNearness (const primitiveMesh &mesh, const bool report, const scalar reportDistSqr, labelHashSet *setPtr=nullptr) |
Check for point-point-nearness,. More... | |
bool | checkEdgeLength (const primitiveMesh &mesh, const bool report, const scalar minLenSqr, labelHashSet *setPtr=nullptr) |
Check edge length. More... | |
bool | checkConcaveCells (const primitiveMesh &mesh, const scalar planarCosAngle, const bool report=false, labelHashSet *setPtr=nullptr) |
Check for concave cells by the planes of faces. More... | |
Foam::fileName checkMeshOutputDir | ( | const polyMesh & | mesh | ) |
Output directory for sets and surfaces.
Definition at line 264 of file mergeAndWrite.C.
References TimePaths::globalPath(), IOobject::name(), polyMesh::pointsInstance(), and objectRegistry::time().
Referenced by mergeAndWrite().
void printMeshStats | ( | const polyMesh & | mesh, |
const bool | allTopology | ||
) |
Print mesh statistics.
Definition at line 49 of file mergeAndWrite.C.
References polyMesh::boundaryMesh(), primitiveMesh::cells(), polyMesh::cellZones(), Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faces(), polyMesh::faceZones(), forAll, Foam::hex(), Foam::Info, prismMatcher::isA(), pyrMatcher::isA(), tetMatcher::isA(), tetWedgeMatcher::isA(), wedgeMatcher::isA(), Foam::max(), primitiveMesh::nCells(), primitiveMesh::nEdges(), primitiveMesh::nInternal0Edges(), primitiveMesh::nInternal1Edges(), primitiveMesh::nInternalEdges(), primitiveMesh::nInternalPoints(), Foam::nl, polyMesh::points(), polyMesh::pointZones(), Foam::reduce(), Foam::returnReduce(), Foam::setf(), Foam::setw(), UPtrList< T >::size(), List< T >::size(), HashTable< T, Key, Hash >::sortedToc(), and WarningInFunction.
void mergeAndWrite | ( | const polyMesh & | mesh, |
const surfaceWriter & | setWriter, | ||
const word & | name, | ||
const indirectPrimitivePatch | setPatch, | ||
const fileName & | outputDir | ||
) |
Generate merged surface on master and write. Needs input patch.
to be of mesh faces.
Definition at line 212 of file mergeAndWrite.C.
References PatchTools::gatherAndMerge(), PrimitivePatch< FaceList, PointField >::localFaces(), PrimitivePatch< FaceList, PointField >::localPoints(), PrimitivePatch< FaceList, PointField >::meshPointMap(), PrimitivePatch< FaceList, PointField >::meshPoints(), Foam::name(), and surfaceWriter::write().
Referenced by checkGeometry(), checkTopology(), and mergeAndWrite().
void mergeAndWrite | ( | const surfaceWriter & | writer, |
const faceSet & | set | ||
) |
Write representation of (assembled) faceSet to surface file in.
postProcessing/ directory
Definition at line 279 of file mergeAndWrite.C.
References checkMeshOutputDir(), IOobject::db(), polyMesh::faces(), mergeAndWrite(), IOobject::name(), polyMesh::points(), and HashTable< T, Key, Hash >::sortedToc().
void mergeAndWrite | ( | const surfaceWriter & | writer, |
const cellSet & | set | ||
) |
Write representation of (assembled) cellSet to surface file in.
postProcessing/ directory
Definition at line 297 of file mergeAndWrite.C.
References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), polyMesh::boundaryMesh(), checkMeshOutputDir(), fileName::clean(), polyPatch::coupled(), IOobject::db(), polyPatch::faceCells(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), forAll, forAllConstIter, mergeAndWrite(), IOobject::name(), primitiveMesh::nCells(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), patchi, polyMesh::points(), HashTable< T, Key, Hash >::size(), and polyPatch::start().
Write representation of (assembled) pointSet to 'set' file in.
postProcessing/ directory
Definition at line 384 of file mergeAndWrite.C.
References UList< T >::byteSize(), checkMeshOutputDir(), IOobject::db(), forAll, IOobject::name(), primitiveMesh::nPoints(), polyMesh::points(), Foam::returnReduce(), scalarField(), List< T >::setSize(), HashTable< T, Key, Hash >::size(), List< T >::size(), HashTable< T, Key, Hash >::sortedToc(), globalIndex::toGlobal(), and setWriter::write().
Foam::label findOppositeWedge | ( | const polyMesh & | mesh, |
const wedgePolyPatch & | wpp | ||
) |
Find wedge with opposite orientation. Note: does not actually check.
that it is opposite, only that it has opposite normal and same axis.
Definition at line 46 of file checkGeometry.C.
References wedgePolyPatch::axis(), polyMesh::boundaryMesh(), wedgePolyPatch::centreNormal(), wedgePolyPatch::cosAngle(), Foam::constant::electromagnetic::e, forAll, patchIdentifier::index(), Foam::mag(), wedgePolyPatch::n(), patches, patchi, and UList< T >::size().
Referenced by checkWedges().
bool checkWedges | ( | const polyMesh & | mesh, |
const bool | report, | ||
const Vector< label > & | directions, | ||
labelHashSet * | setPtr | ||
) |
Check wedge orientation.
Definition at line 86 of file checkGeometry.C.
References Foam::acos(), wedgePolyPatch::axis(), polyMesh::boundaryMesh(), wedgePolyPatch::cosAngle(), Foam::constant::electromagnetic::e, Foam::endl(), f(), polyMesh::faces(), findOppositeWedge(), forAll, forAllConstIter, Foam::Info, HashTable< T, Key, Hash >::insert(), HashSet< Key, Hash >::insert(), Foam::mag(), PrimitivePatch< FaceList, PointField >::meshPoints(), wedgePolyPatch::n(), patchIdentifier::name(), p, patches, patchi, polyMesh::points(), Foam::radToDeg(), HashTable< T, Key, Hash >::resize(), and Foam::returnReduce().
Referenced by checkGeometry().
bool checkCoupledPoints | ( | const polyMesh & | mesh, |
const bool | report, | ||
labelHashSet * | setPtr | ||
) |
Check 0th vertex on coupled faces.
Definition at line 359 of file checkGeometry.C.
References Foam::abort(), polyMesh::boundaryMesh(), coupledPolyPatch::calcFaceTol(), Foam::endl(), f(), polyPatch::faceCentres(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), primitiveMesh::nInternalFaces(), coupledPolyPatch::owner(), p, patches, patchi, polyMesh::points(), PrimitivePatch< FaceList, PointField >::points(), Foam::reduce(), List< T >::setSize(), List< T >::size(), and polyPatch::start().
Referenced by checkGeometry().
Foam::label checkTopology | ( | const polyMesh & | mesh, |
const bool | allTopology, | ||
const autoPtr< surfaceWriter > & | surfWriter, | ||
const autoPtr< setWriter > & | setWriter | ||
) |
Check the topology.
Definition at line 41 of file checkTopology.C.
References polyMesh::boundaryMesh(), primitiveMesh::cellCells(), primitiveMesh::cellEdges(), cells, primitiveMesh::cells(), polyMesh::cellZones(), checkCellsZipUp(), polyBoundaryMesh::checkDefinition(), ZoneList< ZoneType, ZonesType, MeshType >::checkDefinition(), checkFaceFaces(), checkFaceVertices(), polyBoundaryMesh::checkParallelSync(), ZoneList< ZoneType, ZonesType, MeshType >::checkParallelSync(), PrimitivePatch< FaceList, PointField >::checkPointManifold(), checkPoints(), PrimitivePatch< FaceList, PointField >::checkTopology(), checkUpperTriangular(), primitiveMesh::edgeCells(), primitiveMesh::edgeFaces(), primitiveMesh::edges(), UList< T >::empty(), Foam::endl(), f(), primitiveMesh::faceEdges(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), polyMesh::faceZones(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), IOobject::instance(), mergeAndWrite(), IOobject::name(), dimensioned< Type >::name(), patchIdentifier::name(), Foam::name(), primitiveMesh::nCells(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), nPoints, primitiveMesh::nPoints(), PrimitivePatch< FaceList, PointField >::nPoints(), regionSplit::nRegions(), patches, patchi, primitiveMesh::pointCells(), primitiveMesh::pointEdges(), primitiveMesh::pointFaces(), points, polyMesh::points(), polyMesh::pointsInstance(), polyMesh::pointZones(), Foam::Pout, Foam::reduce(), Foam::returnReduce(), PtrList< T >::set(), IOstream::setf(), Foam::setw(), HashTable< T, Key, Hash >::size(), UList< T >::size(), UPtrList< T >::size(), List< T >::size(), PrimitivePatch< FaceList, PointField >::surfaceType(), objectRegistry::time(), autoPtr< T >::valid(), and regIOobject::write().
Referenced by MeshedSurface< Face >::cleanup(), and checkMesh::execute().
Foam::label checkGeometry | ( | const polyMesh & | mesh, |
const bool | allGeometry, | ||
const scalar | nonOrthThreshold, | ||
const scalar | skewThreshold, | ||
const autoPtr< surfaceWriter > & | surfWriter, | ||
const autoPtr< setWriter > & | setWriter | ||
) |
Check the geometry.
Definition at line 507 of file checkGeometry.C.
References polyMesh::boundaryMesh(), polyMesh::bounds(), cells, checkCellDeterminant(), checkCellVolumes(), checkClosedBoundary(), checkClosedCells(), checkConcaveCells(), checkCoupledPoints(), checkEdgeAlignment(), checkEdgeLength(), checkFaceAngles(), checkFaceAreas(), checkFaceFlatness(), checkFaceOrthogonality(), checkFacePyramids(), checkFaceSkewness(), checkFaceTets(), checkFaceWeight(), checkPointNearness(), checkVolRatio(), checkWedges(), Foam::degToRad(), Foam::constant::electromagnetic::e, Foam::endl(), forAll, PatchTools::gatherAndMerge(), polyMesh::geometricD(), TimePaths::globalPath(), patchIdentifier::index(), Foam::Info, IOobject::instance(), nonConformalCyclicPolyPatch::intersection(), PrimitivePatch< FaceList, PointField >::localFaces(), Foam::magSqr(), boundBox::max(), Foam::max(), mergeAndWrite(), PrimitivePatch< FaceList, PointField >::meshPointMap(), PrimitivePatch< FaceList, PointField >::meshPoints(), boundBox::min(), Foam::min(), Foam::constant::atomic::mp, IOobject::name(), dimensioned< Type >::name(), patchIdentifier::name(), nonConformalCyclicPolyPatch::nbrPatch(), primitiveMesh::nCells(), primitiveMesh::nFaces(), polyMesh::nGeometricD(), nPoints, primitiveMesh::nPoints(), polyMesh::nSolutionD(), nonConformalPolyPatch::origPatch(), nonConformalCyclicPolyPatch::owner(), patches, patchi, points, PrimitivePatch< FaceList, PointField >::points(), polyMesh::pointsInstance(), Foam::reduce(), Foam::returnReduce(), PtrList< T >::set(), Foam::setw(), HashTable< T, Key, Hash >::size(), UList< T >::size(), polyMesh::solutionD(), boundBox::span(), Foam::sqrt(), objectRegistry::time(), autoPtr< T >::valid(), regIOobject::write(), vtkSurfaceWriter::write(), Time::writeCompression(), and Time::writeFormat().
Referenced by checkMesh::execute().
bool checkMesh | ( | const bool | report, |
const polyMesh & | mesh, | ||
const dictionary & | dict, | ||
const labelList & | checkFaces, | ||
const List< labelPair > & | baffles, | ||
labelHashSet & | wrongFaces | ||
) |
Check (subset of mesh including baffles) with mesh settings in dict.
Collects incorrect faces in set. Returns true if one or more faces in error.
Definition at line 32 of file checkMesh.C.
References polyMesh::bounds(), primitiveMesh::cellCentres(), primitiveMesh::cellVolumes(), checkCellDeterminant(), checkFaceAngles(), checkFaceFlatness(), checkFaceOrthogonality(), checkFacePyramids(), checkFaceSkewness(), checkFaceTets(), checkFaceTwist(), checkFaceWeights(), checkVolRatio(), Foam::degToRad(), dict, Foam::endl(), primitiveMesh::faceAreas(), primitiveMesh::faceCentres(), Foam::Info, boundBox::minDim(), polyMesh::points(), Foam::pow3(), Foam::radToDeg(), Foam::returnReduce(), Foam::setw(), HashTable< T, Key, Hash >::size(), and Foam::unitDegrees.
Referenced by edgeCollapser::checkBadFaces(), checkMesh(), snappyLayerDriver::doLayers(), snappySnapDriver::doSnap(), meshRefinement::mergeEdgesUndo(), meshRefinement::mergePatchFacesUndo(), motionSmootherAlgo::scaleMesh(), hexRef8::setRefinement(), and hexRef8::setUnrefinement().
bool checkMesh | ( | const bool | report, |
const polyMesh & | mesh, | ||
const dictionary & | dict, | ||
const labelList & | checkFaces, | ||
labelHashSet & | wrongFaces | ||
) |
Check (subset of mesh) with mesh settings in dict.
Collects incorrect faces in set. Returns true if one or more faces in error.
Definition at line 347 of file checkMesh.C.
References checkMesh(), and dict.
bool checkMesh | ( | const bool | report, |
const polyMesh & | mesh, | ||
const dictionary & | dict, | ||
labelHashSet & | wrongFaces | ||
) |
Check mesh with mesh settings in dict.
Collects incorrect faces in set. Returns true if one or more faces in error.
Definition at line 370 of file checkMesh.C.
References checkMesh(), dict, Foam::identityMap(), and primitiveMesh::nFaces().
Foam::tmp< Foam::scalarField > faceOrthogonality | ( | const polyMesh & | mesh, |
const vectorField & | fAreas, | ||
const vectorField & | cellCtrs | ||
) |
Generate orthogonality field. (1 for fully orthogonal, < 1 for.
non-orthogonal)
Definition at line 33 of file polyMeshCheck.C.
References polyMesh::boundaryMesh(), polyPatch::coupled(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), forAll, primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), patchi, tmp< T >::ref(), scalarField(), and polyPatch::start().
Referenced by checkFaceOrthogonality(), and faceOrthogonality().
Foam::tmp< Foam::scalarField > faceSkewness | ( | const polyMesh & | mesh, |
const pointField & | points, | ||
const vectorField & | fCtrs, | ||
const vectorField & | fAreas, | ||
const vectorField & | cellCtrs | ||
) |
Generate skewness field.
Definition at line 88 of file polyMeshCheck.C.
References boundaryFaceSkewness(), polyMesh::boundaryMesh(), polyPatch::coupled(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), forAll, primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), p, patchi, tmp< T >::ref(), scalarField(), Foam::skew(), and polyPatch::start().
Referenced by checkFaceSkewness(), and faceSkewness().
Foam::tmp< Foam::scalarField > faceWeights | ( | const polyMesh & | mesh, |
const vectorField & | fCtrs, | ||
const vectorField & | fAreas, | ||
const vectorField & | cellCtrs | ||
) |
Generate interpolation factors field.
Definition at line 173 of file polyMeshCheck.C.
References polyMesh::boundaryMesh(), polyPatch::coupled(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), forAll, Foam::mag(), Foam::min(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), patchi, tmp< T >::ref(), scalarField(), and polyPatch::start().
Referenced by pairGAMGAgglomeration::agglomerate(), and checkFaceWeight().
Foam::tmp< Foam::scalarField > volRatio | ( | const polyMesh & | mesh, |
const scalarField & | vol | ||
) |
Generate volume ratio field.
Definition at line 231 of file polyMeshCheck.C.
References polyMesh::boundaryMesh(), polyPatch::coupled(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), forAll, Foam::max(), Foam::min(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), patchi, tmp< T >::ref(), scalarField(), and polyPatch::start().
Referenced by checkVolRatio().
bool checkFaceOrthogonality | ( | const polyMesh & | mesh, |
const scalar | nonOrthThreshold, | ||
const bool | report = false , |
||
labelHashSet * | setPtr = nullptr |
||
) |
Check face orthogonality.
Definition at line 281 of file polyMeshCheck.C.
References Foam::acos(), primitiveMesh::cellCentres(), Foam::cos(), Foam::endl(), primitiveMesh::faceAreas(), faceOrthogonality(), forAll, Foam::Info, InfoInFunction, HashSet< Key, Hash >::insert(), Foam::max(), Foam::min(), Foam::radToDeg(), Foam::reduce(), and tmp< T >::ref().
Referenced by checkGeometry(), and checkMesh().
bool checkFaceSkewness | ( | const polyMesh & | mesh, |
const scalar | skewThreshold, | ||
const bool | report = false , |
||
labelHashSet * | setPtr = nullptr |
||
) |
Check face skewness.
Definition at line 404 of file polyMeshCheck.C.
References primitiveMesh::cellCentres(), Foam::endl(), primitiveMesh::faceAreas(), primitiveMesh::faceCentres(), faceSkewness(), forAll, Foam::Info, InfoInFunction, HashSet< Key, Hash >::insert(), Foam::max(), points, polyMesh::points(), Foam::reduce(), tmp< T >::ref(), and Foam::skew().
Referenced by checkGeometry(), and checkMesh().
bool checkEdgeAlignment | ( | const polyMesh & | mesh, |
const bool | report, | ||
const Vector< label > & | directions, | ||
labelHashSet * | setPtr | ||
) |
Check edge alignment for 1D/2D cases.
Definition at line 486 of file polyMeshCheck.C.
References Foam::constant::electromagnetic::e, Foam::endl(), Foam::exit(), f(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, forAll, forAllConstIter, Foam::Info, InfoInFunction, HashTable< T, Key, Hash >::insert(), HashSet< Key, Hash >::insert(), Foam::mag(), p, polyMesh::points(), HashTable< T, Key, Hash >::resize(), Foam::returnReduce(), and HashTable< T, Key, Hash >::size().
Referenced by checkGeometry().
bool checkCellDeterminant | ( | const polyMesh & | mesh, |
const bool | report, | ||
labelHashSet * | setPtr | ||
) |
Definition at line 625 of file polyMeshCheck.C.
References cellDeterminant(), Foam::constant::electromagnetic::e, Foam::endl(), primitiveMesh::faceAreas(), forAll, polyMesh::geometricD(), Foam::Info, InfoInFunction, HashSet< Key, Hash >::insert(), Foam::min(), Foam::reduce(), tmp< T >::ref(), Foam::returnReduce(), and Foam::sum().
Referenced by checkGeometry(), and checkMesh().
bool checkFaceWeight | ( | const polyMesh & | mesh, |
const bool | report, | ||
const scalar | minWeight = 0.05 , |
||
labelHashSet * | setPtr = nullptr |
||
) |
Check for face weights.
Definition at line 709 of file polyMeshCheck.C.
References primitiveMesh::cellCentres(), Foam::endl(), primitiveMesh::faceAreas(), primitiveMesh::faceCentres(), faceWeights(), forAll, Foam::Info, InfoInFunction, HashSet< Key, Hash >::insert(), Foam::min(), Foam::reduce(), and tmp< T >::ref().
Referenced by checkGeometry().
bool checkVolRatio | ( | const polyMesh & | mesh, |
const bool | report, | ||
const scalar | minRatio = 0.01 , |
||
labelHashSet * | setPtr = nullptr |
||
) |
Check for neighbouring cell volumes.
Definition at line 806 of file polyMeshCheck.C.
References cellVols, primitiveMesh::cellVolumes(), Foam::endl(), forAll, Foam::Info, InfoInFunction, HashSet< Key, Hash >::insert(), Foam::min(), Foam::reduce(), tmp< T >::ref(), and volRatio().
Referenced by checkGeometry(), and checkMesh().
bool checkFaceOrthogonality | ( | const bool | report, |
const scalar | orthWarn, | ||
const polyMesh & | mesh, | ||
const vectorField & | cellCentres, | ||
const vectorField & | faceAreas, | ||
const labelList & | checkFaces, | ||
const List< labelPair > & | baffles, | ||
labelHashSet * | setPtr | ||
) |
Check face orthogonality.
Definition at line 197 of file polyMeshCheckQuality.C.
References Foam::acos(), polyMesh::boundaryMesh(), checkNonOrtho(), Foam::cos(), Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), UList< T >::first(), forAll, Foam::Info, primitiveMesh::isInternalFace(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), patches, patchi, Foam::radToDeg(), Foam::reduce(), and SeriousErrorInFunction.
bool checkFacePyramids | ( | const bool | report, |
const scalar | minPyrVol, | ||
const polyMesh & | mesh, | ||
const vectorField & | cellCentres, | ||
const pointField & | p, | ||
const labelList & | checkFaces, | ||
const List< labelPair > & | baffles, | ||
labelHashSet * | setPtr | ||
) |
Check face pyramid volumes.
Definition at line 379 of file polyMeshCheckQuality.C.
References primitiveMesh::cells(), Foam::endl(), f(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), UList< T >::first(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), primitiveMesh::isInternalFace(), p, Foam::Pout, Foam::reduce(), and SeriousErrorInFunction.
Referenced by checkGeometry(), and checkMesh().
bool checkFaceTets | ( | const bool | report, |
const scalar | minPyrVol, | ||
const polyMesh & | mesh, | ||
const vectorField & | cellCentres, | ||
const vectorField & | faceCentres, | ||
const pointField & | p, | ||
const labelList & | checkFaces, | ||
const List< labelPair > & | baffles, | ||
labelHashSet * | setPtr | ||
) |
Check face tetrahedra volumes.
Definition at line 560 of file polyMeshCheckQuality.C.
References polyMesh::boundaryMesh(), checkFaceTet(), Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), UList< T >::first(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), primitiveMesh::isInternalFace(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), p, patches, patchi, Foam::reduce(), and SeriousErrorInFunction.
Referenced by checkGeometry(), and checkMesh().
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.
Definition at line 789 of file polyMeshCheckQuality.C.
References boundaryFaceSkewness(), polyMesh::boundaryMesh(), Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), faceSkewness(), UList< T >::first(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), primitiveMesh::isInternalFace(), Foam::max(), primitiveMesh::nInternalFaces(), Foam::nl, patches, points, Foam::Pout, Foam::reduce(), and WarningInFunction.
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)
Definition at line 1002 of file polyMeshCheckQuality.C.
References polyMesh::boundaryMesh(), Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), UList< T >::first(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), primitiveMesh::isInternalFace(), Foam::mag(), Foam::min(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), Foam::nl, patches, patchi, Foam::Pout, Foam::reduce(), and WarningInFunction.
Referenced by checkMesh().
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 at line 1158 of file polyMeshCheckQuality.C.
References polyMesh::boundaryMesh(), Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), UList< T >::first(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), primitiveMesh::isInternalFace(), Foam::mag(), Foam::max(), Foam::min(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), Foam::nl, patches, patchi, Foam::Pout, Foam::reduce(), and WarningInFunction.
bool checkFaceAngles | ( | const bool | report, |
const scalar | maxConcave, | ||
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.
Definition at line 1298 of file polyMeshCheckQuality.C.
References Foam::abort(), Foam::asin(), Foam::degToRad(), Foam::endl(), f(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), Foam::max(), Foam::min(), p, Foam::radToDeg(), Foam::reduce(), Foam::sin(), and WarningInFunction.
Referenced by checkGeometry(), and checkMesh().
bool checkFaceTwist | ( | const bool | report, |
const scalar | minTwist, | ||
const polyMesh & | mesh, | ||
const vectorField & | cellCentres, | ||
const vectorField & | faceAreas, | ||
const vectorField & | faceCentres, | ||
const pointField & | p, | ||
const labelList & | checkFaces, | ||
labelHashSet * | setPtr | ||
) |
Check the difference between normals of individual face-triangles (from.
face-centre decomposition) and the cell-cell centre vector
Definition at line 1429 of file polyMeshCheckQuality.C.
References Foam::abort(), triangle< Point, PointRef >::area(), polyMesh::boundaryMesh(), Foam::endl(), f(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, HashSet< Key, Hash >::insert(), primitiveMesh::isInternalFace(), Foam::mag(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), Foam::nl, p, patches, Foam::reduce(), WarningInFunction, and Foam::Zero.
Referenced by checkMesh().
bool checkTriangleTwist | ( | const bool | report, |
const scalar | minTwist, | ||
const polyMesh & | mesh, | ||
const vectorField & | faceAreas, | ||
const vectorField & | faceCentres, | ||
const pointField & | p, | ||
const labelList & | checkFaces, | ||
labelHashSet * | setPtr | ||
) |
Check consecutive face-triangle (from face-centre decomposition) normals.
Definition at line 1568 of file polyMeshCheckQuality.C.
References Foam::abort(), triangle< Point, PointRef >::area(), Foam::endl(), f(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), Foam::nl, p, Foam::reduce(), and WarningInFunction.
bool checkFaceFlatness | ( | const bool | report, |
const scalar | minFlatness, | ||
const polyMesh & | mesh, | ||
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.
decomposition) areas
Definition at line 1718 of file polyMeshCheckQuality.C.
References Foam::abort(), Foam::endl(), f(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), Foam::nl, p, Foam::reduce(), and WarningInFunction.
Referenced by checkGeometry(), and checkMesh().
bool checkFaceArea | ( | const bool | report, |
const scalar | minArea, | ||
const polyMesh & | mesh, | ||
const vectorField & | faceAreas, | ||
const labelList & | checkFaces, | ||
labelHashSet * | setPtr | ||
) |
Check for small faces.
Definition at line 1816 of file polyMeshCheckQuality.C.
References Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), Foam::nl, Foam::reduce(), and WarningInFunction.
bool checkCellDeterminant | ( | const bool | report, |
const scalar | minDet, | ||
const polyMesh & | mesh, | ||
const vectorField & | faceAreas, | ||
const labelList & | checkFaces, | ||
labelHashSet * | setPtr | ||
) |
Check the area of internal faces v.s. boundary faces.
Definition at line 1877 of file polyMeshCheckQuality.C.
References cells, primitiveMesh::cells(), Foam::det(), Foam::endl(), forAll, getAffectedCells(), Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), Foam::min(), Foam::nl, Foam::reduce(), WarningInFunction, and Foam::Zero.
scalar Foam::meshCheck::checkNonOrtho | ( | const primitiveMesh & | mesh, |
const bool | report, | ||
const scalar | severeNonorthogonalityThreshold, | ||
const label | facei, | ||
const vector & | s, | ||
const vector & | d, | ||
label & | severeNonOrth, | ||
label & | errorNonOrth, | ||
labelHashSet * | setPtr | ||
) |
Definition at line 41 of file polyMeshCheckQuality.C.
References Foam::acos(), Foam::endl(), primitiveMesh::faceNeighbour(), primitiveMesh::faceOwner(), HashSet< Key, Hash >::insert(), primitiveMesh::isInternalFace(), Foam::mag(), Foam::Pout, Foam::radToDeg(), s(), and WarningInFunction.
Referenced by checkFaceOrthogonality().
bool Foam::meshCheck::checkFaceTet | ( | const primitiveMesh & | mesh, |
const bool | report, | ||
const scalar | minTetQuality, | ||
const pointField & | p, | ||
const label | facei, | ||
const point & | fc, | ||
const point & | cc, | ||
labelHashSet * | setPtr | ||
) |
Definition at line 109 of file polyMeshCheckQuality.C.
References Foam::endl(), f(), primitiveMesh::faces(), forAll, HashSet< Key, Hash >::insert(), p, and Foam::Pout.
Referenced by checkFaceTets().
labelList Foam::meshCheck::getAffectedCells | ( | const primitiveMesh & | mesh, |
const labelList & | changedFaces | ||
) |
Definition at line 163 of file polyMeshCheckQuality.C.
References primitiveMesh::faceNeighbour(), primitiveMesh::faceOwner(), forAll, HashSet< Key, Hash >::insert(), primitiveMesh::isInternalFace(), List< T >::size(), and HashTable< T, Key, Hash >::toc().
Referenced by checkCellDeterminant().
bool checkUpperTriangular | ( | const primitiveMesh & | mesh, |
const bool | report = false , |
||
labelHashSet * | setPtr = nullptr |
||
) |
Check face ordering.
Definition at line 1247 of file primitiveMeshCheck.C.
References Foam::constant::universal::c, primitiveMesh::cells(), Foam::endl(), primitiveMesh::faceNeighbour(), primitiveMesh::faceOwner(), forAll, SortableList< T >::indices(), Foam::Info, InfoInFunction, HashSet< Key, Hash >::insert(), Foam::labelMax, primitiveMesh::nInternalFaces(), Foam::reduce(), List< T >::size(), and SortableList< T >::sort().
Referenced by checkTopology().
bool checkCellsZipUp | ( | const primitiveMesh & | mesh, |
const bool | report = false , |
||
labelHashSet * | setPtr = nullptr |
||
) |
Check cell zip-up.
Definition at line 1410 of file primitiveMeshCheck.C.
References Foam::constant::universal::c, primitiveMesh::cells(), Foam::endl(), f(), primitiveMesh::faces(), forAll, Foam::Info, InfoInFunction, HashSet< Key, Hash >::insert(), Foam::reduce(), and List< T >::size().
Referenced by checkTopology().
bool checkFaceVertices | ( | const primitiveMesh & | mesh, |
const bool | report = false , |
||
labelHashSet * | setPtr = nullptr |
||
) |
Check uniqueness of face vertices.
Definition at line 1509 of file primitiveMeshCheck.C.
References Foam::endl(), f(), primitiveMesh::faces(), forAll, Foam::Info, InfoInFunction, HashSet< Key, Hash >::insert(), Foam::max(), Foam::min(), primitiveMesh::nPoints(), Foam::reduce(), and List< T >::size().
Referenced by checkTopology().
bool checkPoints | ( | const primitiveMesh & | mesh, |
const bool | report = false , |
||
labelHashSet * | setPtr = nullptr |
||
) |
Check for unused points.
Definition at line 1583 of file primitiveMeshCheck.C.
References UList< T >::empty(), Foam::endl(), forAll, Foam::Info, InfoInFunction, HashSet< Key, Hash >::insert(), primitiveMesh::pointCells(), primitiveMesh::pointFaces(), and Foam::reduce().
Referenced by checkTopology().
bool checkDuplicateFaces | ( | const primitiveMesh & | mesh, |
const label | facei, | ||
const Map< label > & | nCommonPoints, | ||
label & | nBaffleFaces, | ||
labelHashSet * | setPtr | ||
) |
Check if all points on face are shared with another face.
Definition at line 1656 of file primitiveMeshCheck.C.
References primitiveMesh::faces(), forAllConstIter, HashSet< Key, Hash >::insert(), and List< T >::size().
Referenced by checkFaceFaces().
bool checkCommonOrder | ( | const primitiveMesh & | mesh, |
const label | facei, | ||
const Map< label > & | nCommonPoints, | ||
labelHashSet * | setPtr | ||
) |
Check that shared points are in consecutive order.
Definition at line 1698 of file primitiveMeshCheck.C.
References primitiveMesh::faces(), UList< T >::fcIndex(), Foam::findIndex(), forAll, forAllConstIter, HashSet< Key, Hash >::insert(), Foam::labelMax, UList< T >::rcIndex(), and List< T >::size().
Referenced by checkFaceFaces().
bool checkFaceFaces | ( | const primitiveMesh & | mesh, |
const bool | report = false , |
||
labelHashSet * | setPtr = nullptr |
||
) |
Check face-face connectivity.
Definition at line 1860 of file primitiveMeshCheck.C.
References checkCommonOrder(), checkDuplicateFaces(), HashTable< T, Key, Hash >::clear(), HashTableCore::end(), Foam::endl(), primitiveMesh::faces(), HashTable< T, Key, Hash >::find(), forAll, Foam::Info, InfoInFunction, HashTable< T, Key, Hash >::insert(), primitiveMesh::nFaces(), primitiveMesh::pointFaces(), and Foam::reduce().
Referenced by checkTopology().
Foam::tmp< Foam::scalarField > faceOrthogonality | ( | const primitiveMesh & | mesh, |
const vectorField & | fAreas, | ||
const vectorField & | cellCtrs | ||
) |
Generate non-orthogonality field (internal faces only)
Definition at line 123 of file primitiveMeshCheck.C.
References primitiveMesh::faceNeighbour(), faceOrthogonality(), primitiveMesh::faceOwner(), forAll, primitiveMesh::nInternalFaces(), tmp< T >::ref(), and scalarField().
void facePyramidVolume | ( | const primitiveMesh & | mesh, |
const pointField & | points, | ||
const vectorField & | cellCtrs, | ||
scalarField & | ownPyrVol, | ||
scalarField & | neiPyrVol | ||
) |
Generate face pyramid volume fields.
Definition at line 202 of file primitiveMeshCheck.C.
References f(), primitiveMesh::faceNeighbour(), primitiveMesh::faceOwner(), primitiveMesh::faces(), forAll, primitiveMesh::isInternalFace(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), points, and List< T >::setSize().
Referenced by checkFacePyramids().
Foam::tmp< Foam::scalarField > faceSkewness | ( | const primitiveMesh & | mesh, |
const pointField & | points, | ||
const vectorField & | fCtrs, | ||
const vectorField & | fAreas, | ||
const vectorField & | cellCtrs | ||
) |
Generate skewness field.
Definition at line 151 of file primitiveMeshCheck.C.
References boundaryFaceSkewness(), primitiveMesh::faceNeighbour(), primitiveMesh::faceOwner(), faceSkewness(), forAll, primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), p, tmp< T >::ref(), scalarField(), and Foam::skew().
void cellClosedness | ( | const primitiveMesh & | mesh, |
const Vector< label > & | meshD, | ||
const vectorField & | areas, | ||
const scalarField & | vols, | ||
scalarField & | openness, | ||
scalarField & | aratio | ||
) |
Generate cell openness and cell aspect ratio field.
Definition at line 241 of file primitiveMeshCheck.C.
References Foam::cmptMag(), Foam::cmptSum(), primitiveMesh::faceNeighbour(), primitiveMesh::faceOwner(), forAll, Foam::mag(), Foam::max(), Foam::min(), primitiveMesh::nCells(), Foam::pow(), List< T >::setSize(), and Foam::Zero.
Referenced by checkClosedCells().
Foam::tmp< Foam::scalarField > faceConcavity | ( | const scalar | maxSin, |
const primitiveMesh & | mesh, | ||
const pointField & | p, | ||
const vectorField & | faceAreas | ||
) |
Generate face concavity field. Returns per face the (sin of the)
most concave angle between two consecutive edges
Definition at line 335 of file primitiveMeshCheck.C.
References f(), primitiveMesh::faces(), forAll, Foam::mag(), Foam::max(), primitiveMesh::nFaces(), p, tmp< T >::ref(), and scalarField().
Referenced by checkFaceAngles().
Foam::tmp< Foam::scalarField > faceFlatness | ( | const primitiveMesh & | mesh, |
const pointField & | p, | ||
const vectorField & | fCtrs, | ||
const vectorField & | faceAreas | ||
) |
Generate face flatness field. Compares the individual triangles'.
normals against the face average normal. Between 0 (fully warped) and 1 (fully flat)
Definition at line 405 of file primitiveMeshCheck.C.
References f(), primitiveMesh::faces(), forAll, Foam::mag(), n, primitiveMesh::nFaces(), p, tmp< T >::ref(), and scalarField().
Referenced by checkFaceFlatness().
tmp<scalarField> Foam::meshCheck::edgeAlignment | ( | const primitiveMesh & | mesh, |
const Vector< label > & | directions, | ||
const pointField & | p | ||
) |
Generate edge alignment field. Is per face the minimum aligned edge.
(does not use edge addressing)
Foam::tmp< Foam::scalarField > cellDeterminant | ( | const primitiveMesh & | mesh, |
const Vector< label > & | directions, | ||
const vectorField & | faceAreas, | ||
const PackedBoolList & | internalOrCoupledFace | ||
) |
Generate cell determinant field.
Definition at line 454 of file primitiveMeshCheck.C.
References Foam::constant::universal::c, primitiveMesh::cells(), Foam::det(), forAll, Foam::mag(), primitiveMesh::nCells(), tmp< T >::ref(), scalarField(), Foam::sqr(), SymmTensor< Cmpt >::xx(), SymmTensor< Cmpt >::yy(), Foam::Zero, and SymmTensor< Cmpt >::zz().
Referenced by checkCellDeterminant().
Foam::scalar faceSkewness | ( | const primitiveMesh & | mesh, |
const pointField & | p, | ||
const vectorField & | fCtrs, | ||
const vectorField & | fAreas, | ||
const label | facei, | ||
const point & | ownCc, | ||
const point & | neiCc | ||
) |
Skewness of single face.
Definition at line 34 of file primitiveMeshCheck.C.
References f(), primitiveMesh::faces(), forAll, Foam::mag(), Foam::max(), p, and Foam::constant::mathematical::pi().
Foam::scalar boundaryFaceSkewness | ( | const primitiveMesh & | mesh, |
const pointField & | p, | ||
const vectorField & | fCtrs, | ||
const vectorField & | fAreas, | ||
const label | facei, | ||
const point & | ownCc | ||
) |
Skewness of single boundary face.
Definition at line 70 of file primitiveMeshCheck.C.
References f(), primitiveMesh::faces(), forAll, Foam::mag(), Foam::max(), p, and Foam::constant::mathematical::pi().
Referenced by checkFaceSkewness(), and faceSkewness().
Orthogonality of single face.
Definition at line 109 of file primitiveMeshCheck.C.
References Foam::mag(), and s().
bool checkClosedBoundary | ( | const primitiveMesh & | mesh, |
const scalar | closedThreshold, | ||
const bool | report = false |
||
) |
Check boundary for closedness.
Definition at line 552 of file primitiveMeshCheck.C.
References Foam::cmptMag(), Foam::cmptMax(), Foam::endl(), primitiveMesh::faceAreas(), Foam::Info, InfoInFunction, Foam::mag(), primitiveMesh::nInternalFaces(), Foam::reduce(), List< T >::size(), and Foam::Zero.
Referenced by checkGeometry().
bool checkClosedCells | ( | const primitiveMesh & | mesh, |
const scalar | closedThreshold, | ||
const scalar | aspectThreshold, | ||
const bool | report = false , |
||
labelHashSet * | setPtr = nullptr , |
||
labelHashSet * | highAspectSetPtr = nullptr , |
||
const Vector< label > & | solutionD = Vector<label>::one |
||
) |
Check cells for closedness.
Definition at line 608 of file primitiveMeshCheck.C.
References Foam::constant::universal::c, cellClosedness(), primitiveMesh::cells(), primitiveMesh::cellVolumes(), Foam::endl(), primitiveMesh::faceAreas(), forAll, Foam::Info, InfoInFunction, HashSet< Key, Hash >::insert(), Foam::max(), Foam::min(), primitiveMesh::nFaces(), Foam::nl, and Foam::reduce().
Referenced by checkGeometry().
bool checkFaceAreas | ( | const primitiveMesh & | mesh, |
const bool | report = false , |
||
labelHashSet * | setPtr = nullptr |
||
) |
Check for negative face areas.
Definition at line 744 of file primitiveMeshCheck.C.
References Foam::endl(), primitiveMesh::faceAreas(), forAll, Foam::Info, InfoInFunction, HashSet< Key, Hash >::insert(), Foam::mag(), Foam::max(), Foam::min(), and Foam::reduce().
Referenced by checkGeometry().
bool checkCellVolumes | ( | const primitiveMesh & | mesh, |
const bool | report = false , |
||
labelHashSet * | setPtr = nullptr |
||
) |
Check for negative cell volumes.
Definition at line 803 of file primitiveMeshCheck.C.
References primitiveMesh::cellVolumes(), Foam::endl(), forAll, Foam::gSum(), Foam::Info, InfoInFunction, HashSet< Key, Hash >::insert(), Foam::max(), Foam::min(), and Foam::reduce().
Referenced by checkGeometry().
bool checkFacePyramids | ( | const primitiveMesh & | mesh, |
const bool | report = false , |
||
const scalar | minPyrVol = -small , |
||
labelHashSet * | setPtr = nullptr |
||
) |
Check face pyramid volume.
Definition at line 868 of file primitiveMeshCheck.C.
References primitiveMesh::cellCentres(), Foam::endl(), facePyramidVolume(), forAll, Foam::Info, InfoInFunction, HashSet< Key, Hash >::insert(), primitiveMesh::isInternalFace(), points, primitiveMesh::points(), and Foam::reduce().
bool checkFaceAngles | ( | const primitiveMesh & | mesh, |
const bool | report = false , |
||
const scalar | maxSin = 10 , |
||
labelHashSet * | setPtr = nullptr |
||
) |
Check face angles.
Definition at line 949 of file primitiveMeshCheck.C.
References Foam::abort(), Foam::asin(), Foam::degToRad(), Foam::endl(), primitiveMesh::faceAreas(), faceConcavity(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, InfoInFunction, HashSet< Key, Hash >::insert(), Foam::max(), Foam::min(), points, primitiveMesh::points(), Foam::radToDeg(), Foam::reduce(), and Foam::sin().
bool checkFaceFlatness | ( | const primitiveMesh & | mesh, |
const bool | report, | ||
const scalar | warnFlatness, | ||
labelHashSet * | setPtr | ||
) |
Check face warpage: decompose face and check ratio between.
magnitude of sum of triangle areas and sum of magnitude of triangle areas.
Definition at line 1028 of file primitiveMeshCheck.C.
References Foam::endl(), Foam::exit(), primitiveMesh::faceAreas(), primitiveMesh::faceCentres(), faceFlatness(), primitiveMesh::faces(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, InfoInFunction, HashSet< Key, Hash >::insert(), Foam::mag(), Foam::min(), points, primitiveMesh::points(), and Foam::reduce().
bool checkPointNearness | ( | const primitiveMesh & | mesh, |
const bool | report, | ||
const scalar | reportDistSqr, | ||
labelHashSet * | setPtr = nullptr |
||
) |
Check for point-point-nearness,.
e.g. colocated points which may be part of baffles.
Definition at line 31 of file primitiveMeshCheckPointNearness.C.
References Foam::endl(), SortableList< T >::indices(), Foam::Info, HashSet< Key, Hash >::insert(), Foam::magSqr(), points, primitiveMesh::points(), Foam::reduce(), List< T >::size(), and Foam::sqrt().
Referenced by checkGeometry().
bool checkEdgeLength | ( | const primitiveMesh & | mesh, |
const bool | report, | ||
const scalar | minLenSqr, | ||
labelHashSet * | setPtr = nullptr |
||
) |
Check edge length.
Definition at line 30 of file primitiveMeshCheckEdgeLength.C.
References Foam::endl(), f(), primitiveMesh::faces(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::magSqr(), Foam::max(), Foam::min(), primitiveMesh::nPoints(), points, primitiveMesh::points(), Foam::reduce(), HashTable< T, Key, Hash >::size(), Foam::sqr(), Foam::sqrt(), and HashTable< T, Key, Hash >::transfer().
Referenced by checkGeometry().
bool checkConcaveCells | ( | const primitiveMesh & | mesh, |
const scalar | planarCosAngle, | ||
const bool | report = false , |
||
labelHashSet * | setPtr = nullptr |
||
) |
Check for concave cells by the planes of faces.
Definition at line 1134 of file primitiveMeshCheck.C.
References Foam::constant::universal::c, primitiveMesh::cells(), Foam::endl(), primitiveMesh::faceAreas(), primitiveMesh::faceCentres(), primitiveMesh::faceOwner(), forAll, Foam::Info, InfoInFunction, HashSet< Key, Hash >::insert(), Foam::mag(), Foam::max(), and Foam::reduce().
Referenced by checkGeometry().