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:
@ -297,7 +297,7 @@ Foam::label Foam::mapNearestMethod::findMappedSrcCell
|
||||
// search target tgtCelli neighbours for match with source cell
|
||||
label tgtI = testCells.remove();
|
||||
|
||||
if (findIndex(visitedCells, tgtI) == -1)
|
||||
if (!visitedCells.found(tgtI))
|
||||
{
|
||||
visitedCells.append(tgtI);
|
||||
|
||||
@ -311,7 +311,7 @@ Foam::label Foam::mapNearestMethod::findMappedSrcCell
|
||||
|
||||
forAll(nbrCells, i)
|
||||
{
|
||||
if (findIndex(visitedCells, nbrCells[i]) == -1)
|
||||
if (!visitedCells.found(nbrCells[i]))
|
||||
{
|
||||
testCells.append(nbrCells[i]);
|
||||
}
|
||||
|
||||
@ -168,14 +168,12 @@ void Foam::meshToMeshMethod::appendNbrCells
|
||||
const labelList& nbrCells = mesh.cellCells()[celli];
|
||||
|
||||
// filter out cells already visited from cell neighbours
|
||||
forAll(nbrCells, i)
|
||||
for (const label nbrCelli : nbrCells)
|
||||
{
|
||||
label nbrCelli = nbrCells[i];
|
||||
|
||||
if
|
||||
(
|
||||
(findIndex(visitedCells, nbrCelli) == -1)
|
||||
&& (findIndex(nbrCellIDs, nbrCelli) == -1)
|
||||
!visitedCells.found(nbrCelli)
|
||||
&& !nbrCellIDs.found(nbrCelli)
|
||||
)
|
||||
{
|
||||
nbrCellIDs.append(nbrCelli);
|
||||
|
||||
@ -70,7 +70,7 @@ Foam::label Foam::meshToMesh::calcDistribution
|
||||
}
|
||||
else if (nHaveCells == 1)
|
||||
{
|
||||
proci = findIndex(cellsPresentOnProc, 1);
|
||||
proci = cellsPresentOnProc.find(1);
|
||||
if (debug)
|
||||
{
|
||||
InfoInFunction
|
||||
|
||||
Reference in New Issue
Block a user