mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Update loop index name probeI -> probei
This commit is contained in:
@ -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();
|
scalar span = boundaryTree.bb().mag();
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ void Foam::patchProbes::findElements(const fvMesh& mesh)
|
|||||||
sampleInfo.second().first() = magSqr(fc-sample);
|
sampleInfo.second().first() = magSqr(fc-sample);
|
||||||
sampleInfo.second().second() = Pstream::myProcNo();
|
sampleInfo.second().second() = Pstream::myProcNo();
|
||||||
|
|
||||||
nearest[probeI]= sampleInfo;
|
nearest[probei]= sampleInfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,9 +47,9 @@ void Foam::patchProbes::sampleAndWrite
|
|||||||
<< setw(w)
|
<< setw(w)
|
||||||
<< vField.time().timeToUserTime(vField.time().value());
|
<< vField.time().timeToUserTime(vField.time().value());
|
||||||
|
|
||||||
forAll(values, probeI)
|
forAll(values, probei)
|
||||||
{
|
{
|
||||||
probeStream << ' ' << setw(w) << values[probeI];
|
probeStream << ' ' << setw(w) << values[probei];
|
||||||
}
|
}
|
||||||
probeStream << endl;
|
probeStream << endl;
|
||||||
}
|
}
|
||||||
@ -73,9 +73,9 @@ void Foam::patchProbes::sampleAndWrite
|
|||||||
<< setw(w)
|
<< setw(w)
|
||||||
<< sField.time().timeToUserTime(sField.time().value());
|
<< sField.time().timeToUserTime(sField.time().value());
|
||||||
|
|
||||||
forAll(values, probeI)
|
forAll(values, probei)
|
||||||
{
|
{
|
||||||
probeStream << ' ' << setw(w) << values[probeI];
|
probeStream << ' ' << setw(w) << values[probei];
|
||||||
}
|
}
|
||||||
probeStream << endl;
|
probeStream << endl;
|
||||||
}
|
}
|
||||||
@ -206,15 +206,15 @@ Foam::patchProbes::sample
|
|||||||
|
|
||||||
const polyBoundaryMesh& patches = mesh_.boundaryMesh();
|
const polyBoundaryMesh& patches = mesh_.boundaryMesh();
|
||||||
|
|
||||||
forAll(*this, probeI)
|
forAll(*this, probei)
|
||||||
{
|
{
|
||||||
label facei = elementList_[probeI];
|
label facei = elementList_[probei];
|
||||||
|
|
||||||
if (facei >= 0)
|
if (facei >= 0)
|
||||||
{
|
{
|
||||||
label patchi = patches.whichPatch(facei);
|
label patchi = patches.whichPatch(facei);
|
||||||
label localFacei = patches[patchi].whichFace(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();
|
const polyBoundaryMesh& patches = mesh_.boundaryMesh();
|
||||||
|
|
||||||
forAll(*this, probeI)
|
forAll(*this, probei)
|
||||||
{
|
{
|
||||||
label facei = elementList_[probeI];
|
label facei = elementList_[probei];
|
||||||
|
|
||||||
if (facei >= 0)
|
if (facei >= 0)
|
||||||
{
|
{
|
||||||
label patchi = patches.whichPatch(facei);
|
label patchi = patches.whichPatch(facei);
|
||||||
label localFacei = patches[patchi].whichFace(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_.clear();
|
||||||
faceList_.setSize(size());
|
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);
|
const label celli = mesh.findCell(location);
|
||||||
|
|
||||||
elementList_[probeI] = celli;
|
elementList_[probei] = celli;
|
||||||
|
|
||||||
if (celli != -1)
|
if (celli != -1)
|
||||||
{
|
{
|
||||||
@ -85,28 +85,28 @@ void Foam::probes::findElements(const fvMesh& mesh)
|
|||||||
minFaceID = facei;
|
minFaceID = facei;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
faceList_[probeI] = minFaceID;
|
faceList_[probei] = minFaceID;
|
||||||
}
|
}
|
||||||
else
|
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
|
Pout<< "probes : found point " << location
|
||||||
<< " in cell " << elementList_[probeI]
|
<< " in cell " << elementList_[probei]
|
||||||
<< " and face " << faceList_[probeI] << endl;
|
<< " and face " << faceList_[probei] << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Check if all probes have been found.
|
// Check if all probes have been found.
|
||||||
forAll(elementList_, probeI)
|
forAll(elementList_, probei)
|
||||||
{
|
{
|
||||||
const vector& location = operator[](probeI);
|
const vector& location = operator[](probei);
|
||||||
label celli = elementList_[probeI];
|
label celli = elementList_[probei];
|
||||||
label facei = faceList_[probeI];
|
label facei = faceList_[probei];
|
||||||
|
|
||||||
// Check at least one processor with cell.
|
// Check at least one processor with cell.
|
||||||
reduce(celli, maxOp<label>());
|
reduce(celli, maxOp<label>());
|
||||||
@ -133,12 +133,12 @@ void Foam::probes::findElements(const fvMesh& mesh)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Make sure location not on two domains.
|
// Make sure location not on two domains.
|
||||||
if (elementList_[probeI] != -1 && elementList_[probeI] != celli)
|
if (elementList_[probei] != -1 && elementList_[probei] != celli)
|
||||||
{
|
{
|
||||||
WarningInFunction
|
WarningInFunction
|
||||||
<< "Location " << location
|
<< "Location " << location
|
||||||
<< " seems to be on multiple domains:"
|
<< " seems to be on multiple domains:"
|
||||||
<< " cell " << elementList_[probeI]
|
<< " cell " << elementList_[probei]
|
||||||
<< " on my domain " << Pstream::myProcNo()
|
<< " on my domain " << Pstream::myProcNo()
|
||||||
<< " and cell " << celli << " on some other domain."
|
<< " and cell " << celli << " on some other domain."
|
||||||
<< endl
|
<< endl
|
||||||
@ -147,12 +147,12 @@ void Foam::probes::findElements(const fvMesh& mesh)
|
|||||||
<< " to prevent this." << endl;
|
<< " to prevent this." << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (faceList_[probeI] != -1 && faceList_[probeI] != facei)
|
if (faceList_[probei] != -1 && faceList_[probei] != facei)
|
||||||
{
|
{
|
||||||
WarningInFunction
|
WarningInFunction
|
||||||
<< "Location " << location
|
<< "Location " << location
|
||||||
<< " seems to be on multiple domains:"
|
<< " seems to be on multiple domains:"
|
||||||
<< " cell " << faceList_[probeI]
|
<< " cell " << faceList_[probei]
|
||||||
<< " on my domain " << Pstream::myProcNo()
|
<< " on my domain " << Pstream::myProcNo()
|
||||||
<< " and face " << facei << " on some other domain."
|
<< " and face " << facei << " on some other domain."
|
||||||
<< endl
|
<< endl
|
||||||
@ -249,18 +249,18 @@ Foam::label Foam::probes::prepare()
|
|||||||
|
|
||||||
unsigned int w = IOstream::defaultPrecision() + 7;
|
unsigned int w = IOstream::defaultPrecision() + 7;
|
||||||
|
|
||||||
forAll(*this, probeI)
|
forAll(*this, probei)
|
||||||
{
|
{
|
||||||
fout<< "# Probe " << probeI << ' ' << operator[](probeI)
|
fout<< "# Probe " << probei << ' ' << operator[](probei)
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
fout<< '#' << setw(IOstream::defaultPrecision() + 6)
|
fout<< '#' << setw(IOstream::defaultPrecision() + 6)
|
||||||
<< "Probe";
|
<< "Probe";
|
||||||
|
|
||||||
forAll(*this, probeI)
|
forAll(*this, probei)
|
||||||
{
|
{
|
||||||
fout<< ' ' << setw(w) << probeI;
|
fout<< ' ' << setw(w) << probei;
|
||||||
}
|
}
|
||||||
fout<< endl;
|
fout<< endl;
|
||||||
|
|
||||||
|
|||||||
@ -78,9 +78,9 @@ void Foam::probes::sampleAndWrite
|
|||||||
|
|
||||||
os << setw(w) << vField.time().timeToUserTime(vField.time().value());
|
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;
|
os << endl;
|
||||||
}
|
}
|
||||||
@ -102,9 +102,9 @@ void Foam::probes::sampleAndWrite
|
|||||||
|
|
||||||
os << setw(w) << sField.time().timeToUserTime(sField.time().value());
|
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;
|
os << endl;
|
||||||
}
|
}
|
||||||
@ -233,16 +233,16 @@ Foam::probes::sample
|
|||||||
interpolation<Type>::New(interpolationScheme_, vField)
|
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,
|
position,
|
||||||
elementList_[probeI],
|
elementList_[probei],
|
||||||
-1
|
-1
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -250,11 +250,11 @@ Foam::probes::sample
|
|||||||
}
|
}
|
||||||
else
|
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();
|
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]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user