Standardized cell, patch, face and processor loop index names

This commit is contained in:
Henry Weller
2016-04-25 12:00:53 +01:00
parent 43beb06018
commit 450728ea84
525 changed files with 6296 additions and 6296 deletions

View File

@ -148,8 +148,8 @@ protected:
const word& outputName,
const vector& minC,
const vector& maxC,
const label minProcI,
const label maxProcI,
const label minProci,
const label maxProci,
const Type& minValue,
const Type& maxValue
);

View File

@ -35,8 +35,8 @@ void Foam::fieldMinMax::output
const word& outputName,
const vector& minC,
const vector& maxC,
const label minProcI,
const label maxProcI,
const label minProci,
const label maxProci,
const Type& minValue,
const Type& maxValue
)
@ -54,7 +54,7 @@ void Foam::fieldMinMax::output
if (Pstream::parRun())
{
file<< token::TAB << minProcI;
file<< token::TAB << minProci;
}
file<< token::TAB << maxValue
@ -62,7 +62,7 @@ void Foam::fieldMinMax::output
if (Pstream::parRun())
{
file<< token::TAB << maxProcI;
file<< token::TAB << maxProci;
}
file<< endl;
@ -73,7 +73,7 @@ void Foam::fieldMinMax::output
if (Pstream::parRun())
{
if (log_) Info<< " on processor " << minProcI;
if (log_) Info<< " on processor " << minProci;
}
if (log_) Info
@ -82,7 +82,7 @@ void Foam::fieldMinMax::output
if (Pstream::parRun())
{
if (log_) Info<< " on processor " << maxProcI;
if (log_) Info<< " on processor " << maxProci;
}
}
else
@ -109,7 +109,7 @@ void Foam::fieldMinMax::calcMinMaxFields
if (obr_.foundObject<fieldType>(fieldName))
{
const label procI = Pstream::myProcNo();
const label proci = Pstream::myProcNo();
const fieldType& field = obr_.lookupObject<fieldType>(fieldName);
const fvMesh& mesh = field.mesh();
@ -127,17 +127,17 @@ void Foam::fieldMinMax::calcMinMaxFields
scalarList minVs(Pstream::nProcs());
List<vector> minCs(Pstream::nProcs());
label minProcI = findMin(magField);
minVs[procI] = magField[minProcI];
minCs[procI] = field.mesh().C()[minProcI];
label minProci = findMin(magField);
minVs[proci] = magField[minProci];
minCs[proci] = field.mesh().C()[minProci];
labelList maxIs(Pstream::nProcs());
scalarList maxVs(Pstream::nProcs());
List<vector> maxCs(Pstream::nProcs());
label maxProcI = findMax(magField);
maxVs[procI] = magField[maxProcI];
maxCs[procI] = field.mesh().C()[maxProcI];
label maxProci = findMax(magField);
maxVs[proci] = magField[maxProci];
maxCs[proci] = field.mesh().C()[maxProci];
forAll(magFieldBoundary, patchi)
{
@ -147,17 +147,17 @@ void Foam::fieldMinMax::calcMinMaxFields
const vectorField& Cfp = CfBoundary[patchi];
label minPI = findMin(mfp);
if (mfp[minPI] < minVs[procI])
if (mfp[minPI] < minVs[proci])
{
minVs[procI] = mfp[minPI];
minCs[procI] = Cfp[minPI];
minVs[proci] = mfp[minPI];
minCs[proci] = Cfp[minPI];
}
label maxPI = findMax(mfp);
if (mfp[maxPI] > maxVs[procI])
if (mfp[maxPI] > maxVs[proci])
{
maxVs[procI] = mfp[maxPI];
maxCs[procI] = Cfp[maxPI];
maxVs[proci] = mfp[maxPI];
maxCs[proci] = Cfp[maxPI];
}
}
}
@ -199,18 +199,18 @@ void Foam::fieldMinMax::calcMinMaxFields
List<Type> minVs(Pstream::nProcs());
List<vector> minCs(Pstream::nProcs());
label minProcI = findMin(field);
minVs[procI] = field[minProcI];
minCs[procI] = field.mesh().C()[minProcI];
label minProci = findMin(field);
minVs[proci] = field[minProci];
minCs[proci] = field.mesh().C()[minProci];
Pstream::gatherList(minVs);
Pstream::gatherList(minCs);
List<Type> maxVs(Pstream::nProcs());
List<vector> maxCs(Pstream::nProcs());
label maxProcI = findMax(field);
maxVs[procI] = field[maxProcI];
maxCs[procI] = field.mesh().C()[maxProcI];
label maxProci = findMax(field);
maxVs[proci] = field[maxProci];
maxCs[proci] = field.mesh().C()[maxProci];
forAll(fieldBoundary, patchi)
{
@ -220,17 +220,17 @@ void Foam::fieldMinMax::calcMinMaxFields
const vectorField& Cfp = CfBoundary[patchi];
label minPI = findMin(fp);
if (fp[minPI] < minVs[procI])
if (fp[minPI] < minVs[proci])
{
minVs[procI] = fp[minPI];
minCs[procI] = Cfp[minPI];
minVs[proci] = fp[minPI];
minCs[proci] = Cfp[minPI];
}
label maxPI = findMax(fp);
if (fp[maxPI] > maxVs[procI])
if (fp[maxPI] > maxVs[proci])
{
maxVs[procI] = fp[maxPI];
maxCs[procI] = Cfp[maxPI];
maxVs[proci] = fp[maxPI];
maxCs[proci] = Cfp[maxPI];
}
}
}

View File

@ -253,10 +253,10 @@ void Foam::fieldValues::faceSource::combineMeshGeometry
// Renumber and flatten
label nFaces = 0;
label nPoints = 0;
forAll(allFaces, procI)
forAll(allFaces, proci)
{
nFaces += allFaces[procI].size();
nPoints += allPoints[procI].size();
nFaces += allFaces[proci].size();
nPoints += allPoints[proci].size();
}
faces.setSize(nFaces);
@ -287,11 +287,11 @@ void Foam::fieldValues::faceSource::combineMeshGeometry
}
// Other proc data follows
forAll(allFaces, procI)
forAll(allFaces, proci)
{
if (procI != Pstream::myProcNo())
if (proci != Pstream::myProcNo())
{
const faceList& fcs = allFaces[procI];
const faceList& fcs = allFaces[proci];
forAll(fcs, i)
{
const face& f = fcs[i];
@ -303,7 +303,7 @@ void Foam::fieldValues::faceSource::combineMeshGeometry
}
}
const pointField& pts = allPoints[procI];
const pointField& pts = allPoints[proci];
forAll(pts, i)
{
points[nPoints++] = pts[i];

View File

@ -32,13 +32,13 @@ Foam::findCellParticle::findCellParticle
const polyMesh& mesh,
const vector& position,
const label celli,
const label tetFaceI,
const label tetFacei,
const label tetPtI,
const point& end,
const label data
)
:
particle(mesh, position, celli, tetFaceI, tetPtI),
particle(mesh, position, celli, tetFacei, tetPtI),
end_(end),
data_(data)
{}

View File

@ -113,7 +113,7 @@ public:
const polyMesh& mesh,
const vector& position,
const label celli,
const label tetFaceI,
const label tetFacei,
const label tetPtI,
const point& end,
const label data

View File

@ -73,9 +73,9 @@ void Foam::nearWallFields::calcAddressing()
vectorField nf(patch.nf());
vectorField faceCellCentres(patch.patch().faceCellCentres());
forAll(patch, patchFaceI)
forAll(patch, patchFacei)
{
label meshFaceI = patch.start()+patchFaceI;
label meshFacei = patch.start()+patchFacei;
// Find starting point on face (since faceCentre might not
// be on face-diagonal decomposition)
@ -84,7 +84,7 @@ void Foam::nearWallFields::calcAddressing()
mappedPatchBase::facePoint
(
mesh,
meshFaceI,
meshFacei,
polyMesh::FACE_DIAG_TRIS
)
);
@ -98,16 +98,16 @@ void Foam::nearWallFields::calcAddressing()
else
{
// Fallback: start tracking from neighbouring cell centre
start = faceCellCentres[patchFaceI];
start = faceCellCentres[patchFacei];
}
const point end = start-distance_*nf[patchFaceI];
const point end = start-distance_*nf[patchFacei];
// Find tet for starting location
label celli = -1;
label tetFaceI = -1;
label tetFacei = -1;
label tetPtI = -1;
mesh.findCellFacePt(start, celli, tetFaceI, tetPtI);
mesh.findCellFacePt(start, celli, tetFacei, tetPtI);
// Add to cloud. Add originating face as passive data
cloud.addParticle
@ -117,7 +117,7 @@ void Foam::nearWallFields::calcAddressing()
mesh,
start,
celli,
tetFaceI,
tetFacei,
tetPtI,
end,
globalWalls.toGlobal(nPatchFaces) // passive data

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -107,7 +107,7 @@ void Foam::processorField::execute()
obr_.lookupObject<volScalarField>("processorID");
const_cast<volScalarField&>(procField) ==
dimensionedScalar("procI", dimless, Pstream::myProcNo());
dimensionedScalar("proci", dimless, Pstream::myProcNo());
}
}

View File

@ -544,10 +544,10 @@ void Foam::streamLine::write()
// processors.
label trackI = 0;
forAll(recvMap, procI)
forAll(recvMap, proci)
{
labelList& fromProc = recvMap[procI];
fromProc.setSize(globalTrackIDs.localSize(procI));
labelList& fromProc = recvMap[proci];
fromProc.setSize(globalTrackIDs.localSize(proci));
forAll(fromProc, i)
{
fromProc[i] = trackI++;

View File

@ -303,13 +303,13 @@ Foam::wallBoundedParticle::wallBoundedParticle
const polyMesh& mesh,
const vector& position,
const label celli,
const label tetFaceI,
const label tetFacei,
const label tetPtI,
const label meshEdgeStart,
const label diagEdge
)
:
particle(mesh, position, celli, tetFaceI, tetPtI),
particle(mesh, position, celli, tetFacei, tetPtI),
meshEdgeStart_(meshEdgeStart),
diagEdge_(diagEdge)
{}

View File

@ -225,7 +225,7 @@ public:
const polyMesh& c,
const vector& position,
const label celli,
const label tetFaceI,
const label tetFacei,
const label tetPtI,
const label meshEdgeStart,
const label diagEdge

View File

@ -42,10 +42,10 @@ void Foam::wallBoundedParticle::patchInteraction
if (!internalFace(facei_))
{
label origFaceI = facei_;
label origFacei = facei_;
label patchi = patch(facei_);
// No action taken for tetPtI_ for tetFaceI_ here, handled by
// No action taken for tetPtI_ for tetFacei_ here, handled by
// patch interaction call or later during processor transfer.
@ -66,7 +66,7 @@ void Foam::wallBoundedParticle::patchInteraction
{
// Did patch interaction model switch patches?
// Note: recalculate meshEdgeStart_, diagEdge_!
if (facei_ != origFaceI)
if (facei_ != origFacei)
{
patchi = patch(facei_);
}
@ -166,7 +166,7 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge
// check to the other internal tet on the edge.
if (mesh_.isInternalFace(tetFace()))
{
label nbrCellI =
label nbrCelli =
(
celli_ == mesh_.faceOwner()[facei_]
? mesh_.faceNeighbour()[facei_]
@ -175,13 +175,13 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge
// Check angle to nbrCell tet. Is it in the direction of the
// endposition? I.e. since volume of nbr tet is positive the
// tracking direction should be into the tet.
tetIndices nbrTi(nbrCellI, tetFaceI_, tetPtI_, mesh_);
tetIndices nbrTi(nbrCelli, tetFacei_, tetPtI_, mesh_);
if ((nbrTi.faceTri(mesh_).normal() & (endPosition-position())) < 0)
{
// Change into nbrCell. No need to change tetFace, tetPt.
//Pout<< " crossed from cell:" << celli_
// << " into " << nbrCellI << endl;
celli_ = nbrCellI;
// << " into " << nbrCelli << endl;
celli_ = nbrCelli;
patchInteraction(td, trackFraction);
}
else

View File

@ -110,13 +110,13 @@ Foam::tetIndices Foam::wallBoundedStreamLine::findNearestTet
const cell& cFaces = mesh.cells()[celli];
label minFaceI = -1;
label minFacei = -1;
label minTetPtI = -1;
scalar minDistSqr = sqr(GREAT);
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
label facei = cFaces[cFaceI];
label facei = cFaces[cFacei];
if (isWallPatch[facei])
{
@ -137,7 +137,7 @@ Foam::tetIndices Foam::wallBoundedStreamLine::findNearestTet
if (d2 < minDistSqr)
{
minDistSqr = d2;
minFaceI = facei;
minFacei = facei;
minTetPtI = i-1;
}
fp = nextFp;
@ -149,7 +149,7 @@ Foam::tetIndices Foam::wallBoundedStreamLine::findNearestTet
return tetIndices
(
celli,
minFaceI,
minFacei,
minTetPtI,
mesh
);
@ -589,9 +589,9 @@ void Foam::wallBoundedStreamLine::read(const dictionary& dict)
numFacesPerEdge.clear();
forAll(cFaces, cFaceI)
forAll(cFaces, cFacei)
{
label facei = cFaces[cFaceI];
label facei = cFaces[cFacei];
const face& f = mesh.faces()[facei];
forAll(f, fp)
{
@ -665,10 +665,10 @@ void Foam::wallBoundedStreamLine::write()
// processors.
label trackI = 0;
forAll(recvMap, procI)
forAll(recvMap, proci)
{
labelList& fromProc = recvMap[procI];
fromProc.setSize(globalTrackIDs.localSize(procI));
labelList& fromProc = recvMap[proci];
fromProc.setSize(globalTrackIDs.localSize(proci));
forAll(fromProc, i)
{
fromProc[i] = trackI++;

View File

@ -135,7 +135,7 @@ Foam::wallBoundedStreamLineParticle::wallBoundedStreamLineParticle
const polyMesh& mesh,
const vector& position,
const label celli,
const label tetFaceI,
const label tetFacei,
const label tetPtI,
const label meshEdgeStart,
const label diagEdge,
@ -147,7 +147,7 @@ Foam::wallBoundedStreamLineParticle::wallBoundedStreamLineParticle
mesh,
position,
celli,
tetFaceI,
tetFacei,
tetPtI,
meshEdgeStart,
diagEdge

View File

@ -161,7 +161,7 @@ public:
const polyMesh& c,
const vector& position,
const label celli,
const label tetFaceI,
const label tetFacei,
const label tetPtI,
const label meshEdgeStart,
const label diagEdge,