本文整理汇总了C++中primitiveMesh::faces方法的典型用法代码示例。如果您正苦于以下问题:C++ primitiveMesh::faces方法的具体用法?C++ primitiveMesh::faces怎么用?C++ primitiveMesh::faces使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类primitiveMesh
的用法示例。
在下文中一共展示了primitiveMesh::faces方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: forAll
Foam::scalar Foam::primitiveMeshTools::faceSkewness
(
const primitiveMesh& mesh,
const pointField& p,
const vectorField& fCtrs,
const vectorField& fAreas,
const label faceI,
const point& ownCc,
const point& neiCc
)
{
vector Cpf = fCtrs[faceI] - ownCc;
vector d = neiCc - ownCc;
// Skewness vector
vector sv =
Cpf
- ((fAreas[faceI] & Cpf)/((fAreas[faceI] & d) + ROOTVSMALL))*d;
vector svHat = sv/(mag(sv) + ROOTVSMALL);
// Normalisation distance calculated as the approximate distance
// from the face centre to the edge of the face in the direction
// of the skewness
scalar fd = 0.2*mag(d) + ROOTVSMALL;
const face& f = mesh.faces()[faceI];
forAll(f, pi)
{
fd = max(fd, mag(svHat & (p[f[pi]] - fCtrs[faceI])));
}
示例2: findFace
// Find label of face.
label findFace(const primitiveMesh& mesh, const face& f)
{
const labelList& pFaces = mesh.pointFaces()[f[0]];
forAll(pFaces, i)
{
label faceI = pFaces[i];
if (mesh.faces()[faceI] == f)
{
return faceI;
}
}
示例3: forAll
// Step across point to other edge on face
Foam::label Foam::regionSide::otherEdge
(
const primitiveMesh& mesh,
const label faceI,
const label edgeI,
const label pointI
)
{
const edge& e = mesh.edges()[edgeI];
// Get other point on edge.
label freePointI = e.otherVertex(pointI);
const labelList& fEdges = mesh.faceEdges()[faceI];
forAll(fEdges, fEdgeI)
{
const label otherEdgeI = fEdges[fEdgeI];
const edge& otherE = mesh.edges()[otherEdgeI];
if
(
(
otherE.start() == pointI
&& otherE.end() != freePointI
)
|| (
otherE.end() == pointI
&& otherE.start() != freePointI
)
)
{
// otherE shares one (but not two) points with e.
return otherEdgeI;
}
}
FatalErrorIn
(
"regionSide::otherEdge(const primitiveMesh&, const label, const label"
", const label)"
) << "Cannot find other edge on face " << faceI << " that uses point "
<< pointI << " but not point " << freePointI << endl
<< "Edges on face:" << fEdges
<< " verts:" << UIndirectList<edge>(mesh.edges(), fEdges)()
<< " Vertices on face:"
<< mesh.faces()[faceI]
<< " Vertices on original edge:" << e << abort(FatalError);
return -1;
}
示例4:
Foam::cellShape Foam::degenerateMatcher::match
(
const primitiveMesh& mesh,
const label cellI
)
{
return match
(
mesh.faces(),
mesh.faceOwner(),
cellI,
mesh.cells()[cellI]
);
}