STYLE: use forAllIter, forAllConstIter instead of long-hand version

STYLE: use 'forAll(' NOT 'forAll (', as per coding guide
This commit is contained in:
Mark Olesen
2010-04-12 11:18:38 +02:00
parent 0f58ac5a9b
commit a50f01b079
220 changed files with 1144 additions and 1898 deletions

View File

@ -71,12 +71,12 @@ void Foam::meshToMesh::calcAddressing()
// set reference to boundary
const polyPatchList& patchesFrom = fromMesh_.boundaryMesh();
forAll (patchesFrom, patchI)
forAll(patchesFrom, patchI)
{
// get reference to cells next to the boundary
const unallocLabelList& bCells = patchesFrom[patchI].faceCells();
forAll (bCells, faceI)
forAll(bCells, faceI)
{
boundaryCell[bCells[faceI]] = true;
}
@ -126,7 +126,7 @@ void Foam::meshToMesh::calcAddressing()
oc
);
forAll (toMesh_.boundaryMesh(), patchi)
forAll(toMesh_.boundaryMesh(), patchi)
{
const polyPatch& toPatch = toMesh_.boundaryMesh()[patchi];
@ -243,7 +243,7 @@ void Foam::meshToMesh::cellAddresses
const vectorField& centresFrom = fromMesh.cellCentres();
const labelListList& cc = fromMesh.cellCells();
forAll (points, toI)
forAll(points, toI)
{
// pick up target position
const vector& p = points[toI];
@ -260,7 +260,7 @@ void Foam::meshToMesh::cellAddresses
// set the current list of neighbouring cells
const labelList& neighbours = cc[curCell];
forAll (neighbours, nI)
forAll(neighbours, nI)
{
scalar curDistSqr =
magSqr(p - centresFrom[neighbours[nI]]);
@ -300,7 +300,7 @@ void Foam::meshToMesh::cellAddresses
// set the current list of neighbouring cells
const labelList& neighbours = cc[curCell];
forAll (neighbours, nI)
forAll(neighbours, nI)
{
// search through all the neighbours.
// If point is in neighbour reset current cell
@ -319,12 +319,12 @@ void Foam::meshToMesh::cellAddresses
// set the current list of neighbouring cells
const labelList& neighbours = cc[curCell];
forAll (neighbours, nI)
forAll(neighbours, nI)
{
// set the current list of neighbour-neighbouring cells
const labelList& nn = cc[neighbours[nI]];
forAll (nn, nI)
forAll(nn, nI)
{
// search through all the neighbours.
// If point is in neighbour reset current cell

View File

@ -50,7 +50,7 @@ void Foam::meshToMesh::calculateInverseDistanceWeights() const
const vectorField& centreFrom = fromMesh_.C().internalField();
const vectorField& centreTo = toMesh_.C().internalField();
forAll (cellAddressing_, celli)
forAll(cellAddressing_, celli)
{
if (cellAddressing_[celli] != -1)
{
@ -81,7 +81,7 @@ void Foam::meshToMesh::calculateInverseDistanceWeights() const
scalar sumInvDist = invDist;
// now add the neighbours
forAll (neighbours, ni)
forAll(neighbours, ni)
{
invDist = 1.0/mag(target - centreFrom[neighbours[ni]]);
invDistCoeffs[celli][ni + 1] = invDist;
@ -89,7 +89,7 @@ void Foam::meshToMesh::calculateInverseDistanceWeights() const
}
// divide by the total inverse-distance
forAll (invDistCoeffs[celli], i)
forAll(invDistCoeffs[celli], i)
{
invDistCoeffs[celli][i] /= sumInvDist;
}

View File

@ -50,7 +50,7 @@ Foam::meshToMesh::meshToMesh
boundaryAddressing_(toMesh_.boundaryMesh().size()),
inverseDistanceWeightsPtr_(NULL)
{
forAll (fromMesh_.boundaryMesh(), patchi)
forAll(fromMesh_.boundaryMesh(), patchi)
{
fromMeshPatches_.insert
(
@ -59,7 +59,7 @@ Foam::meshToMesh::meshToMesh
);
}
forAll (toMesh_.boundaryMesh(), patchi)
forAll(toMesh_.boundaryMesh(), patchi)
{
toMeshPatches_.insert
(
@ -68,7 +68,7 @@ Foam::meshToMesh::meshToMesh
);
}
forAll (cuttingPatchNames, i)
forAll(cuttingPatchNames, i)
{
if (toMeshPatches_.found(cuttingPatchNames[i]))
{
@ -91,7 +91,7 @@ Foam::meshToMesh::meshToMesh
}
}
forAll (toMesh_.boundaryMesh(), patchi)
forAll(toMesh_.boundaryMesh(), patchi)
{
// Add the processor patches in the toMesh to the cuttingPatches list
if (isA<processorPolyPatch>(toMesh_.boundaryMesh()[patchi]))
@ -134,7 +134,7 @@ Foam::meshToMesh::meshToMesh
<< exit(FatalError);
}
forAll (fromMesh_.boundaryMesh(), patchi)
forAll(fromMesh_.boundaryMesh(), patchi)
{
if
(

View File

@ -67,7 +67,7 @@ void Foam::meshToMesh::interpolateField
// get reference to cellCells
const labelListList& cc = fromMesh_.cellCells();
forAll (toF, celli)
forAll(toF, celli)
{
if (adr[celli] != -1)
{
@ -97,7 +97,7 @@ void Foam::meshToMesh::interpolateField
// Cell-Point interpolation
interpolationCellPoint<Type> interpolator(fromVf);
forAll (toF, celli)
forAll(toF, celli)
{
if (adr[celli] != -1)
{
@ -206,7 +206,7 @@ void Foam::meshToMesh::interpolate
{
interpolateInternalField(toVf, fromVf, ord);
forAll (toMesh_.boundaryMesh(), patchi)
forAll(toMesh_.boundaryMesh(), patchi)
{
const fvPatch& toPatch = toMesh_.boundary()[patchi];
@ -338,7 +338,7 @@ Foam::meshToMesh::interpolate
boundaryAddressing_.size()
);
forAll (boundaryAddressing_, patchI)
forAll(boundaryAddressing_, patchI)
{
patchFields.set
(