本文整理汇总了C++中polyMesh::checkFaceOrthogonality方法的典型用法代码示例。如果您正苦于以下问题:C++ polyMesh::checkFaceOrthogonality方法的具体用法?C++ polyMesh::checkFaceOrthogonality怎么用?C++ polyMesh::checkFaceOrthogonality使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类polyMesh
的用法示例。
在下文中一共展示了polyMesh::checkFaceOrthogonality方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: maxNonOrtho
// Same check as snapMesh
void checkSnapMesh
(
const Time& runTime,
const polyMesh& mesh,
labelHashSet& wrongFaces
)
{
IOdictionary snapDict
(
IOobject
(
"snapMeshDict",
runTime.system(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);
// Max nonorthogonality allowed
scalar maxNonOrtho(readScalar(snapDict.lookup("maxNonOrtho")));
primitiveMesh::nonOrthThreshold_ = maxNonOrtho;
// Max concaveness allowed.
scalar maxConcave(readScalar(snapDict.lookup("maxConcave")));
primitiveMesh::faceAngleThreshold_ = maxConcave;
// Min volume allowed (factor of minimum cellVolume)
scalar relMinVol(readScalar(snapDict.lookup("minVol")));
const scalar minCellVol = min(mesh.cellVolumes());
const scalar minPyrVol = relMinVol*minCellVol;
// Min area
scalar minArea(readScalar(snapDict.lookup("minArea")));
if (maxNonOrtho < 180.0 - SMALL)
{
Pout<< "Checking non orthogonality" << endl;
label nOldSize = wrongFaces.size();
mesh.checkFaceOrthogonality(false, &wrongFaces);
Pout<< "Detected " << wrongFaces.size() - nOldSize
<< " faces with non-orthogonality > " << maxNonOrtho << " degrees"
<< endl;
}
if (minPyrVol > -GREAT)
{
Pout<< "Checking face pyramids" << endl;
label nOldSize = wrongFaces.size();
mesh.checkFacePyramids(false, minPyrVol, &wrongFaces);
Pout<< "Detected additional " << wrongFaces.size() - nOldSize
<< " faces with illegal face pyramids" << endl;
}
if (maxConcave < 180.0 - SMALL)
{
Pout<< "Checking face angles" << endl;
label nOldSize = wrongFaces.size();
mesh.checkFaceAngles(false, &wrongFaces);
Pout<< "Detected additional " << wrongFaces.size() - nOldSize
<< " faces with concavity > " << maxConcave << " degrees"
<< endl;
}
if (minArea > -SMALL)
{
Pout<< "Checking face areas" << endl;
label nOldSize = wrongFaces.size();
const scalarField magFaceAreas = mag(mesh.faceAreas());
forAll(magFaceAreas, faceI)
{
if (magFaceAreas[faceI] < minArea)
{
wrongFaces.insert(faceI);
}
}
Pout<< "Detected additional " << wrongFaces.size() - nOldSize
<< " faces with area < " << minArea << " m^2" << endl;
}