34 #ifndef primitiveMeshCheck_H
35 #define primitiveMeshCheck_H
55 const primitiveMesh& mesh,
56 const bool report =
false,
63 const primitiveMesh& mesh,
64 const bool report =
false,
71 const primitiveMesh& mesh,
72 const bool report =
false,
79 const primitiveMesh& mesh,
80 const bool report =
false,
87 const primitiveMesh& mesh,
97 const primitiveMesh& mesh,
106 const primitiveMesh& mesh,
107 const bool report =
false,
117 const primitiveMesh& mesh,
125 const primitiveMesh& mesh,
135 const primitiveMesh& mesh,
145 const primitiveMesh& mesh,
146 const Vector<label>& meshD,
158 const primitiveMesh& mesh,
168 const primitiveMesh& mesh,
232 const scalar closedThreshold,
233 const bool report =
false
240 const scalar closedThreshold,
241 const scalar aspectThreshold,
242 const bool report =
false,
252 const bool report =
false,
260 const bool report =
false,
268 const bool report =
false,
269 const scalar minPyrVol = -small,
277 const bool report =
false,
278 const scalar maxSin = 10,
289 const scalar warnFlatness,
299 const scalar reportDistSqr,
308 const scalar minLenSqr,
316 const scalar planarCosAngle,
317 const bool report =
false,
Set of directions for each cell in the mesh. Either uniform and size=1 or one set of directions per c...
Cell-face mesh analysis engine.
A class for managing temporary objects.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
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)
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.
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.
tmp< scalarField > faceOrthogonality(const polyMesh &mesh, const vectorField &fAreas, const vectorField &cellCtrs)
Generate orthogonality field. (1 for fully orthogonal, < 1 for.
tmp< scalarField > faceSkewness(const polyMesh &mesh, const pointField &points, const vectorField &fCtrs, const vectorField &fAreas, const vectorField &cellCtrs)
Generate skewness field.
bool checkFaceFaces(const primitiveMesh &mesh, const bool report=false, labelHashSet *setPtr=nullptr)
Check face-face connectivity.
bool checkUpperTriangular(const primitiveMesh &mesh, const bool report=false, labelHashSet *setPtr=nullptr)
Check face ordering.
bool checkEdgeLength(const primitiveMesh &mesh, const bool report, const scalar minLenSqr, labelHashSet *setPtr=nullptr)
Check edge length.
bool checkConcaveCells(const primitiveMesh &mesh, const scalar planarCosAngle, const bool report=false, labelHashSet *setPtr=nullptr)
Check for concave cells by the planes of faces.
bool checkPointNearness(const primitiveMesh &mesh, const bool report, const scalar reportDistSqr, labelHashSet *setPtr=nullptr)
Check for point-point-nearness,.
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.
bool checkDuplicateFaces(const primitiveMesh &mesh, const label, const Map< label > &, label &nBaffleFaces, labelHashSet *)
Check if all points on face are shared with another face.
bool checkFaceVertices(const primitiveMesh &mesh, const bool report=false, labelHashSet *setPtr=nullptr)
Check uniqueness of face vertices.
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.
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.
bool checkCommonOrder(const primitiveMesh &mesh, const label, const Map< label > &, labelHashSet *)
Check that shared points are in consecutive order.
void facePyramidVolume(const primitiveMesh &mesh, const pointField &points, const vectorField &cellCtrs, scalarField &ownPyrVol, scalarField &neiPyrVol)
Generate face pyramid volume fields.
tmp< scalarField > cellDeterminant(const primitiveMesh &mesh, const Vector< label > &directions, const vectorField &faceAreas, const PackedBoolList &internalOrCoupledFace)
Generate cell determinant field.
tmp< scalarField > faceFlatness(const primitiveMesh &mesh, const pointField &p, const vectorField &fCtrs, const vectorField &faceAreas)
Generate face flatness field. Compares the individual triangles'.
bool checkClosedBoundary(const primitiveMesh &mesh, const scalar closedThreshold, const bool report=false)
Check boundary for closedness.
tmp< scalarField > edgeAlignment(const primitiveMesh &mesh, const Vector< label > &directions, const pointField &p)
Generate edge alignment field. Is per face the minimum aligned edge.
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.
bool checkCellVolumes(const primitiveMesh &mesh, const bool report=false, labelHashSet *setPtr=nullptr)
Check for negative cell volumes.
bool checkFaceAreas(const primitiveMesh &mesh, const bool report=false, labelHashSet *setPtr=nullptr)
Check for negative face areas.
bool checkPoints(const primitiveMesh &mesh, const bool report=false, labelHashSet *setPtr=nullptr)
Check for unused points.
bool checkCellsZipUp(const primitiveMesh &mesh, const bool report=false, labelHashSet *setPtr=nullptr)
Check cell zip-up.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
vectorField pointField
pointField is a vectorField.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Field< vector > vectorField
Specialisation of Field<T> for vector.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.