本文整理汇总了C++中polyPatch::size方法的典型用法代码示例。如果您正苦于以下问题:C++ polyPatch::size方法的具体用法?C++ polyPatch::size怎么用?C++ polyPatch::size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类polyPatch
的用法示例。
在下文中一共展示了polyPatch::size方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: newToOld
//- Calculate map from new patch faces to old patch faces. -1 where
// could not map.
Foam::labelList Foam::fvMeshAdder::calcPatchMap
(
const label oldStart,
const label oldSize,
const labelList& oldToNew,
const polyPatch& newPatch,
const label unmappedValue
)
{
labelList newToOld(newPatch.size(), unmappedValue);
label newStart = newPatch.start();
label newSize = newPatch.size();
for (label i = 0; i < oldSize; i++)
{
label newFaceI = oldToNew[oldStart+i];
if (newFaceI >= newStart && newFaceI < newStart+newSize)
{
newToOld[newFaceI-newStart] = i;
}
}
return newToOld;
}
示例2: patchIdentifier
Foam::polyPatch::polyPatch
(
const polyPatch& pp,
const polyBoundaryMesh& bm
)
:
patchIdentifier(pp),
primitivePatch
(
faceSubList
(
bm.mesh().faces(),
pp.size(),
pp.start()
),
bm.mesh().points()
),
start_(pp.start()),
boundaryMesh_(bm),
faceCellsPtr_(NULL),
mePtr_(NULL)
{}
示例3: if
Foam::ensightPartFaces::ensightPartFaces
(
label partNumber,
const polyMesh& pMesh,
const polyPatch& pPatch
)
:
ensightPart(partNumber, pPatch.name(), pMesh)
{
isCellData_ = false;
offset_ = pPatch.start();
size_ = pPatch.size();
// count the shapes
label nTri = 0;
label nQuad = 0;
label nPoly = 0;
forAll (pPatch, patchfaceI)
{
const face& f = pMesh.faces()[patchfaceI + offset_];
if (f.size() == 3)
{
nTri++;
}
else if (f.size() == 4)
{
nQuad++;
}
else
{
nPoly++;
}
}
// we can avoid double looping, but at the cost of allocation
labelList triCells(nTri);
labelList quadCells(nQuad);
labelList polygonCells(nPoly);
nTri = 0;
nQuad = 0;
nPoly = 0;
// classify the shapes
forAll(pPatch, patchfaceI)
{
const face& f = pMesh.faces()[patchfaceI + offset_];
if (f.size() == 3)
{
triCells[nTri++] = patchfaceI;
}
else if (f.size() == 4)
{
quadCells[nQuad++] = patchfaceI;
}
else
{
polygonCells[nPoly++] = patchfaceI;
}
}
// MUST match with elementTypes
elemLists_.setSize(elementTypes().size());
elemLists_[tria3Elements].transfer( triCells );
elemLists_[quad4Elements].transfer( quadCells );
elemLists_[nsidedElements].transfer( polygonCells );
}