From f871f51970850a11f4fdeb01fa95741114314d82 Mon Sep 17 00:00:00 2001 From: Henry Weller <http://cfd.direct> Date: Tue, 17 May 2016 20:33:19 +0100 Subject: [PATCH] Update loop index name probeI -> probei --- src/sampling/probes/patchProbes.C | 6 ++-- src/sampling/probes/patchProbesTemplates.C | 20 +++++------ src/sampling/probes/probes.C | 40 +++++++++++----------- src/sampling/probes/probesTemplates.C | 30 ++++++++-------- 4 files changed, 48 insertions(+), 48 deletions(-) diff --git a/src/sampling/probes/patchProbes.C b/src/sampling/probes/patchProbes.C index b29174b368f..7e7758cc0a0 100644 --- a/src/sampling/probes/patchProbes.C +++ b/src/sampling/probes/patchProbes.C @@ -98,9 +98,9 @@ void Foam::patchProbes::findElements(const fvMesh& mesh) ); - forAll(probeLocations(), probeI) + forAll(probeLocations(), probei) { - const point sample = probeLocations()[probeI]; + const point sample = probeLocations()[probei]; scalar span = boundaryTree.bb().mag(); @@ -148,7 +148,7 @@ void Foam::patchProbes::findElements(const fvMesh& mesh) sampleInfo.second().first() = magSqr(fc-sample); sampleInfo.second().second() = Pstream::myProcNo(); - nearest[probeI]= sampleInfo; + nearest[probei]= sampleInfo; } } } diff --git a/src/sampling/probes/patchProbesTemplates.C b/src/sampling/probes/patchProbesTemplates.C index 935b1bd7904..35d120491a0 100644 --- a/src/sampling/probes/patchProbesTemplates.C +++ b/src/sampling/probes/patchProbesTemplates.C @@ -47,9 +47,9 @@ void Foam::patchProbes::sampleAndWrite << setw(w) << vField.time().timeToUserTime(vField.time().value()); - forAll(values, probeI) + forAll(values, probei) { - probeStream << ' ' << setw(w) << values[probeI]; + probeStream << ' ' << setw(w) << values[probei]; } probeStream << endl; } @@ -73,9 +73,9 @@ void Foam::patchProbes::sampleAndWrite << setw(w) << sField.time().timeToUserTime(sField.time().value()); - forAll(values, probeI) + forAll(values, probei) { - probeStream << ' ' << setw(w) << values[probeI]; + probeStream << ' ' << setw(w) << values[probei]; } probeStream << endl; } @@ -206,15 +206,15 @@ Foam::patchProbes::sample const polyBoundaryMesh& patches = mesh_.boundaryMesh(); - forAll(*this, probeI) + forAll(*this, probei) { - label facei = elementList_[probeI]; + label facei = elementList_[probei]; if (facei >= 0) { label patchi = patches.whichPatch(facei); label localFacei = patches[patchi].whichFace(facei); - values[probeI] = vField.boundaryField()[patchi][localFacei]; + values[probei] = vField.boundaryField()[patchi][localFacei]; } } @@ -257,15 +257,15 @@ Foam::patchProbes::sample const polyBoundaryMesh& patches = mesh_.boundaryMesh(); - forAll(*this, probeI) + forAll(*this, probei) { - label facei = elementList_[probeI]; + label facei = elementList_[probei]; if (facei >= 0) { label patchi = patches.whichPatch(facei); label localFacei = patches[patchi].whichFace(facei); - values[probeI] = sField.boundaryField()[patchi][localFacei]; + values[probei] = sField.boundaryField()[patchi][localFacei]; } } diff --git a/src/sampling/probes/probes.C b/src/sampling/probes/probes.C index 0b7ed5d8d25..e6e812196d6 100644 --- a/src/sampling/probes/probes.C +++ b/src/sampling/probes/probes.C @@ -61,13 +61,13 @@ void Foam::probes::findElements(const fvMesh& mesh) faceList_.clear(); faceList_.setSize(size()); - forAll(*this, probeI) + forAll(*this, probei) { - const vector& location = operator[](probeI); + const vector& location = operator[](probei); const label celli = mesh.findCell(location); - elementList_[probeI] = celli; + elementList_[probei] = celli; if (celli != -1) { @@ -85,28 +85,28 @@ void Foam::probes::findElements(const fvMesh& mesh) minFaceID = facei; } } - faceList_[probeI] = minFaceID; + faceList_[probei] = minFaceID; } else { - faceList_[probeI] = -1; + faceList_[probei] = -1; } - if (debug && (elementList_[probeI] != -1 || faceList_[probeI] != -1)) + if (debug && (elementList_[probei] != -1 || faceList_[probei] != -1)) { Pout<< "probes : found point " << location - << " in cell " << elementList_[probeI] - << " and face " << faceList_[probeI] << endl; + << " in cell " << elementList_[probei] + << " and face " << faceList_[probei] << endl; } } // Check if all probes have been found. - forAll(elementList_, probeI) + forAll(elementList_, probei) { - const vector& location = operator[](probeI); - label celli = elementList_[probeI]; - label facei = faceList_[probeI]; + const vector& location = operator[](probei); + label celli = elementList_[probei]; + label facei = faceList_[probei]; // Check at least one processor with cell. reduce(celli, maxOp<label>()); @@ -133,12 +133,12 @@ void Foam::probes::findElements(const fvMesh& mesh) else { // Make sure location not on two domains. - if (elementList_[probeI] != -1 && elementList_[probeI] != celli) + if (elementList_[probei] != -1 && elementList_[probei] != celli) { WarningInFunction << "Location " << location << " seems to be on multiple domains:" - << " cell " << elementList_[probeI] + << " cell " << elementList_[probei] << " on my domain " << Pstream::myProcNo() << " and cell " << celli << " on some other domain." << endl @@ -147,12 +147,12 @@ void Foam::probes::findElements(const fvMesh& mesh) << " to prevent this." << endl; } - if (faceList_[probeI] != -1 && faceList_[probeI] != facei) + if (faceList_[probei] != -1 && faceList_[probei] != facei) { WarningInFunction << "Location " << location << " seems to be on multiple domains:" - << " cell " << faceList_[probeI] + << " cell " << faceList_[probei] << " on my domain " << Pstream::myProcNo() << " and face " << facei << " on some other domain." << endl @@ -249,18 +249,18 @@ Foam::label Foam::probes::prepare() unsigned int w = IOstream::defaultPrecision() + 7; - forAll(*this, probeI) + forAll(*this, probei) { - fout<< "# Probe " << probeI << ' ' << operator[](probeI) + fout<< "# Probe " << probei << ' ' << operator[](probei) << endl; } fout<< '#' << setw(IOstream::defaultPrecision() + 6) << "Probe"; - forAll(*this, probeI) + forAll(*this, probei) { - fout<< ' ' << setw(w) << probeI; + fout<< ' ' << setw(w) << probei; } fout<< endl; diff --git a/src/sampling/probes/probesTemplates.C b/src/sampling/probes/probesTemplates.C index 4ccfad82bfd..84d1ca2aa05 100644 --- a/src/sampling/probes/probesTemplates.C +++ b/src/sampling/probes/probesTemplates.C @@ -78,9 +78,9 @@ void Foam::probes::sampleAndWrite os << setw(w) << vField.time().timeToUserTime(vField.time().value()); - forAll(values, probeI) + forAll(values, probei) { - os << ' ' << setw(w) << values[probeI]; + os << ' ' << setw(w) << values[probei]; } os << endl; } @@ -102,9 +102,9 @@ void Foam::probes::sampleAndWrite os << setw(w) << sField.time().timeToUserTime(sField.time().value()); - forAll(values, probeI) + forAll(values, probei) { - os << ' ' << setw(w) << values[probeI]; + os << ' ' << setw(w) << values[probei]; } os << endl; } @@ -233,16 +233,16 @@ Foam::probes::sample interpolation<Type>::New(interpolationScheme_, vField) ); - forAll(*this, probeI) + forAll(*this, probei) { - if (elementList_[probeI] >= 0) + if (elementList_[probei] >= 0) { - const vector& position = operator[](probeI); + const vector& position = operator[](probei); - values[probeI] = interpolator().interpolate + values[probei] = interpolator().interpolate ( position, - elementList_[probeI], + elementList_[probei], -1 ); } @@ -250,11 +250,11 @@ Foam::probes::sample } else { - forAll(*this, probeI) + forAll(*this, probei) { - if (elementList_[probeI] >= 0) + if (elementList_[probei] >= 0) { - values[probeI] = vField[elementList_[probeI]]; + values[probei] = vField[elementList_[probei]]; } } } @@ -296,11 +296,11 @@ Foam::probes::sample Field<Type>& values = tValues.ref(); - forAll(*this, probeI) + forAll(*this, probei) { - if (faceList_[probeI] >= 0) + if (faceList_[probei] >= 0) { - values[probeI] = sField[faceList_[probeI]]; + values[probei] = sField[faceList_[probei]]; } } -- GitLab