本文整理汇总了C++中polyMesh::faceEdges方法的典型用法代码示例。如果您正苦于以下问题:C++ polyMesh::faceEdges方法的具体用法?C++ polyMesh::faceEdges怎么用?C++ polyMesh::faceEdges使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类polyMesh
的用法示例。
在下文中一共展示了polyMesh::faceEdges方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: featureFaceSet
//.........这里部分代码省略.........
// Check if convex or concave by looking at angle
// between face centres and normal
vector c1c0
(
allBoundary[f1].centre(allBoundary.points())
- allBoundary[f0].centre(allBoundary.points())
);
if (concaveMultiCells && (c1c0 & n0) > SMALL)
{
// Found concave edge. Make into multiCell features
Info<< "Detected concave feature edge:" << edgeI
<< " cos:" << (c1c0 & n0)
<< " coords:"
<< allBoundary.points()[v0]
<< allBoundary.points()[v1]
<< endl;
singleCellFeaturePointSet.erase(v0);
multiCellFeaturePointSet.insert(v0);
singleCellFeaturePointSet.erase(v1);
multiCellFeaturePointSet.insert(v1);
}
else
{
// Convex. singleCell feature.
if (!multiCellFeaturePointSet.found(v0))
{
singleCellFeaturePointSet.insert(v0);
}
if (!multiCellFeaturePointSet.found(v1))
{
singleCellFeaturePointSet.insert(v1);
}
}
}
}
}
// 3. Mark all feature faces
// ~~~~~~~~~~~~~~~~~~~~~~~~~
// Face centres that need inclusion in the dual mesh
labelHashSet featureFaceSet(mesh.nFaces()-mesh.nInternalFaces());
// A. boundary faces.
for (label faceI = mesh.nInternalFaces(); faceI < mesh.nFaces(); faceI++)
{
featureFaceSet.insert(faceI);
}
// B. face zones.
const faceZoneMesh& faceZones = mesh.faceZones();
if (doNotPreserveFaceZones)
{
if (faceZones.size() > 0)
{
WarningIn("simpleMarkFeatures(..)")
<< "Detected " << faceZones.size()
<< " faceZones. These will not be preserved."
<< endl;
}
}
else
{
if (faceZones.size() > 0)
{
Info<< "Detected " << faceZones.size()
<< " faceZones. Preserving these by marking their"
<< " points, edges and faces as features." << endl;
}
forAll(faceZones, zoneI)
{
const faceZone& fz = faceZones[zoneI];
Info<< "Inserting all faces in faceZone " << fz.name()
<< " as features." << endl;
forAll(fz, i)
{
label faceI = fz[i];
const face& f = mesh.faces()[faceI];
const labelList& fEdges = mesh.faceEdges()[faceI];
featureFaceSet.insert(faceI);
forAll(f, fp)
{
// Mark point as multi cell point (since both sides of
// face should have different cells)
singleCellFeaturePointSet.erase(f[fp]);
multiCellFeaturePointSet.insert(f[fp]);
// Make sure there are points on the edges.
featureEdgeSet.insert(fEdges[fp]);
}
}
}