Commit 0aa28487 authored by Henry Weller's avatar Henry Weller
Browse files

Update loop index name probeI -> probei

parent 8f45162c
......@@ -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;
}
}
}
......
......@@ -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];
}
}
......
......@@ -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;
......
......@@ -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]];
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment