mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use list methods find/found instead of findIndex function
This commit is contained in:
@ -1120,7 +1120,7 @@ void Foam::ccm::reader::juggleSolids()
|
||||
|
||||
|
||||
// The corresponding Foam patch
|
||||
const label patchIndex = findIndex(origBndId_, defaultBoundaryRegion);
|
||||
const label patchIndex = origBndId_.find(defaultBoundaryRegion);
|
||||
const label nPatchFaces = patchSizes_[patchIndex];
|
||||
|
||||
labelList patchStarts(patchStartList(nInternalFaces_));
|
||||
@ -1828,8 +1828,8 @@ void Foam::ccm::reader::mergeInplaceInterfaces()
|
||||
|
||||
labelPair patchPair
|
||||
(
|
||||
findIndex(origBndId_, ifentry.bnd0),
|
||||
findIndex(origBndId_, ifentry.bnd1)
|
||||
origBndId_.find(ifentry.bnd0),
|
||||
origBndId_.find(ifentry.bnd1)
|
||||
);
|
||||
|
||||
if
|
||||
|
||||
@ -39,7 +39,7 @@ Foam::label Foam::ccm::writer::prostarCellFaceId
|
||||
const cellShape& shape = mesh_.cellShapes()[cellId];
|
||||
const labelList& cFaces = mesh_.cells()[cellId];
|
||||
|
||||
label cellFaceId = findIndex(cFaces, faceI);
|
||||
label cellFaceId = cFaces.find(faceI);
|
||||
label mapIndex = shape.model().index();
|
||||
|
||||
if (ccm::debug > 1)
|
||||
|
||||
@ -165,7 +165,7 @@ void Foam::polyDualMesh::getPointEdges
|
||||
if (e[0] == pointi)
|
||||
{
|
||||
// One of the edges using pointi. Check which one.
|
||||
label index = findIndex(f, pointi);
|
||||
label index = f.find(pointi);
|
||||
|
||||
if (f.nextLabel(index) == e[1])
|
||||
{
|
||||
@ -184,7 +184,7 @@ void Foam::polyDualMesh::getPointEdges
|
||||
else if (e[1] == pointi)
|
||||
{
|
||||
// One of the edges using pointi. Check which one.
|
||||
label index = findIndex(f, pointi);
|
||||
label index = f.find(pointi);
|
||||
|
||||
if (f.nextLabel(index) == e[0])
|
||||
{
|
||||
@ -929,7 +929,7 @@ void Foam::polyDualMesh::calcDual
|
||||
label startFacei = -1;
|
||||
label endFacei = -1;
|
||||
|
||||
label index = findIndex(f0, neighbour);
|
||||
label index = f0.find(neighbour);
|
||||
|
||||
if (f0.nextLabel(index) == owner)
|
||||
{
|
||||
@ -1062,7 +1062,7 @@ void Foam::polyDualMesh::calcDual
|
||||
// the face uses the owner, neighbour
|
||||
const face& f0 = mesh.faces()[face0];
|
||||
|
||||
label index = findIndex(f0, neighbour);
|
||||
label index = f0.find(neighbour);
|
||||
|
||||
bool f0OrderOk = (f0.nextLabel(index) == owner);
|
||||
|
||||
|
||||
@ -380,7 +380,7 @@ void Foam::fileFormats::STARCDMeshWriter::writeBoundary
|
||||
label cellId = owner[facei];
|
||||
const labelList& cFaces = cells[cellId];
|
||||
const cellShape& shape = shapes[cellId];
|
||||
label cellFaceId = findIndex(cFaces, facei);
|
||||
label cellFaceId = cFaces.find(facei);
|
||||
|
||||
// Info<< "cell " << cellId + 1 << " face " << facei
|
||||
// << " == " << faces[facei]
|
||||
|
||||
Reference in New Issue
Block a user