本文整理汇总了C++中polyPatch::start方法的典型用法代码示例。如果您正苦于以下问题:C++ polyPatch::start方法的具体用法?C++ polyPatch::start怎么用?C++ polyPatch::start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类polyPatch
的用法示例。
在下文中一共展示了polyPatch::start方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: forAll
void Foam::FaceCellWave<Type, TrackingData>::checkCyclic
(
const polyPatch& patch
) const
{
const cyclicPolyPatch& nbrPatch =
refCast<const cyclicPolyPatch>(patch).neighbPatch();
forAll(patch, patchFaceI)
{
label i1 = patch.start() + patchFaceI;
label i2 = nbrPatch.start() + patchFaceI;
if
(
!allFaceInfo_[i1].sameGeometry
(
mesh_,
allFaceInfo_[i2],
geomTol_,
td_
)
)
{
FatalErrorIn
(
"FaceCellWave<Type, TrackingData>"
"::checkCyclic(const polyPatch&)"
) << "problem: i:" << i1 << " otheri:" << i2
<< " faceInfo:" << allFaceInfo_[i1]
<< " otherfaceInfo:" << allFaceInfo_[i2]
<< abort(FatalError);
}
if (changedFace_[i1] != changedFace_[i2])
{
FatalErrorIn
(
"FaceCellWave<Type, TrackingData>"
"::checkCyclic(const polyPatch&)"
) << " problem: i:" << i1 << " otheri:" << i2
<< " faceInfo:" << allFaceInfo_[i1]
<< " otherfaceInfo:" << allFaceInfo_[i2]
<< " changedFace:" << changedFace_[i1]
<< " otherchangedFace:" << changedFace_[i2]
<< abort(FatalError);
}
}
示例4: forAll
void Foam::FaceCellWave<Type, TrackingData>::checkCyclic
(
const polyPatch& patch
) const
{
// For debugging: check status on both sides of cyclic
const cyclicPolyPatch& nbrPatch =
refCast<const cyclicPolyPatch>(patch).neighbPatch();
forAll(patch, patchFacei)
{
label i1 = patch.start() + patchFacei;
label i2 = nbrPatch.start() + patchFacei;
if
(
!allFaceInfo_[i1].sameGeometry
(
mesh_,
allFaceInfo_[i2],
geomTol_,
td_
)
)
{
FatalErrorInFunction
<< " faceInfo:" << allFaceInfo_[i1]
<< " otherfaceInfo:" << allFaceInfo_[i2]
<< abort(FatalError);
}
if (changedFace_[i1] != changedFace_[i2])
{
FatalErrorInFunction
<< " faceInfo:" << allFaceInfo_[i1]
<< " otherfaceInfo:" << allFaceInfo_[i2]
<< " changedFace:" << changedFace_[i1]
<< " otherchangedFace:" << changedFace_[i2]
<< abort(FatalError);
}
}
示例5: 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 );
}