STYLE: avoid global findIndex() in favour of UList::find()

This commit is contained in:
Mark Olesen
2018-02-21 11:50:34 +01:00
parent c126464d1c
commit 3ee2f3293e
8 changed files with 25 additions and 46 deletions

View File

@ -269,8 +269,7 @@ void Foam::processorFaPatch::initUpdateMesh()
const edge& e = patchEdges[edgeI];
indexInEdge[patchPointI] =
findIndex(e, pointLabels()[patchPointI]);
indexInEdge[patchPointI] = e.find(pointLabels()[patchPointI]);
}
OPstream toNeighbProc
@ -326,9 +325,9 @@ void Foam::processorFaPatch::updateMesh()
// Find edge and index in edge on this side.
const edge& e = patchEdges[nbrPatchEdge[nbrPointI]];
label index = 1 - nbrIndexInEdge[nbrPointI];
const label index = 1 - nbrIndexInEdge[nbrPointI];
label patchPointI = findIndex(pointLabels(), e[index]);
const label patchPointI = pointLabels().find(e[index]);
neighbPoints[patchPointI] = nbrPointI;
}