STYLE: use list methods find/found instead of findIndex function

This commit is contained in:
Mark Olesen
2017-10-24 19:07:34 +02:00
parent 5b8b689a37
commit 7d7b0bfe84
136 changed files with 369 additions and 441 deletions

View File

@ -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

View File

@ -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)

View File

@ -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);

View File

@ -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]