Standardized cell, patch and face loop index names

This commit is contained in:
Henry Weller
2016-04-25 10:28:32 +01:00
parent 2d5ff31649
commit 43beb06018
849 changed files with 13266 additions and 13266 deletions

View File

@ -184,13 +184,13 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::normaliseWeights
wghtSum.setSize(wght.size(), 0.0);
label nLowWeight = 0;
forAll(wght, faceI)
forAll(wght, facei)
{
scalarList& w = wght[faceI];
scalarList& w = wght[facei];
if (w.size())
{
scalar denom = patchAreas[faceI];
scalar denom = patchAreas[facei];
scalar s = sum(w);
scalar t = s/denom;
@ -205,7 +205,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::normaliseWeights
w[i] /= denom;
}
wghtSum[faceI] = t;
wghtSum[facei] = t;
if (t < lowWeightTol)
{
@ -214,7 +214,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::normaliseWeights
}
else
{
wghtSum[faceI] = 0;
wghtSum[facei] = 0;
}
}
@ -282,10 +282,10 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate
// Agglomerate face areas
{
srcMagSf.setSize(sourceRestrictAddressing.size(), 0.0);
forAll(sourceRestrictAddressing, faceI)
forAll(sourceRestrictAddressing, facei)
{
label coarseFaceI = sourceRestrictAddressing[faceI];
srcMagSf[coarseFaceI] += fineSrcMagSf[faceI];
label coarseFaceI = sourceRestrictAddressing[facei];
srcMagSf[coarseFaceI] += fineSrcMagSf[facei];
}
}
@ -418,15 +418,15 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate
srcAddress.setSize(sourceCoarseSize);
srcWeights.setSize(sourceCoarseSize);
forAll(fineSrcAddress, faceI)
forAll(fineSrcAddress, facei)
{
// All the elements contributing to faceI. Are slots in
// All the elements contributing to facei. Are slots in
// mapDistribute'd data.
const labelList& elems = fineSrcAddress[faceI];
const scalarList& weights = fineSrcWeights[faceI];
const scalar fineArea = fineSrcMagSf[faceI];
const labelList& elems = fineSrcAddress[facei];
const scalarList& weights = fineSrcWeights[facei];
const scalar fineArea = fineSrcMagSf[facei];
label coarseFaceI = sourceRestrictAddressing[faceI];
label coarseFaceI = sourceRestrictAddressing[facei];
labelList& newElems = srcAddress[coarseFaceI];
scalarList& newWeights = srcWeights[coarseFaceI];
@ -464,15 +464,15 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate
srcAddress.setSize(sourceCoarseSize);
srcWeights.setSize(sourceCoarseSize);
forAll(fineSrcAddress, faceI)
forAll(fineSrcAddress, facei)
{
// All the elements contributing to faceI. Are slots in
// All the elements contributing to facei. Are slots in
// mapDistribute'd data.
const labelList& elems = fineSrcAddress[faceI];
const scalarList& weights = fineSrcWeights[faceI];
const scalar fineArea = fineSrcMagSf[faceI];
const labelList& elems = fineSrcAddress[facei];
const scalarList& weights = fineSrcWeights[facei];
const scalar fineArea = fineSrcMagSf[facei];
label coarseFaceI = sourceRestrictAddressing[faceI];
label coarseFaceI = sourceRestrictAddressing[facei];
labelList& newElems = srcAddress[coarseFaceI];
scalarList& newWeights = srcWeights[coarseFaceI];
@ -867,14 +867,14 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update
// Calculate face areas
srcMagSf_.setSize(srcPatch.size());
forAll(srcMagSf_, faceI)
forAll(srcMagSf_, facei)
{
srcMagSf_[faceI] = srcPatch[faceI].mag(srcPatch.points());
srcMagSf_[facei] = srcPatch[facei].mag(srcPatch.points());
}
tgtMagSf_.setSize(tgtPatch.size());
forAll(tgtMagSf_, faceI)
forAll(tgtMagSf_, facei)
{
tgtMagSf_[faceI] = tgtPatch[faceI].mag(tgtPatch.points());
tgtMagSf_[facei] = tgtPatch[facei].mag(tgtPatch.points());
}
// Calculate if patches present on multiple processors
@ -1143,40 +1143,40 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget
List<Type> work(fld);
map.distribute(work);
forAll(result, faceI)
forAll(result, facei)
{
if (tgtWeightsSum_[faceI] < lowWeightCorrection_)
if (tgtWeightsSum_[facei] < lowWeightCorrection_)
{
result[faceI] = defaultValues[faceI];
result[facei] = defaultValues[facei];
}
else
{
const labelList& faces = tgtAddress_[faceI];
const scalarList& weights = tgtWeights_[faceI];
const labelList& faces = tgtAddress_[facei];
const scalarList& weights = tgtWeights_[facei];
forAll(faces, i)
{
cop(result[faceI], faceI, work[faces[i]], weights[i]);
cop(result[facei], facei, work[faces[i]], weights[i]);
}
}
}
}
else
{
forAll(result, faceI)
forAll(result, facei)
{
if (tgtWeightsSum_[faceI] < lowWeightCorrection_)
if (tgtWeightsSum_[facei] < lowWeightCorrection_)
{
result[faceI] = defaultValues[faceI];
result[facei] = defaultValues[facei];
}
else
{
const labelList& faces = tgtAddress_[faceI];
const scalarList& weights = tgtWeights_[faceI];
const labelList& faces = tgtAddress_[facei];
const scalarList& weights = tgtWeights_[facei];
forAll(faces, i)
{
cop(result[faceI], faceI, fld[faces[i]], weights[i]);
cop(result[facei], facei, fld[faces[i]], weights[i]);
}
}
}
@ -1228,40 +1228,40 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToSource
List<Type> work(fld);
map.distribute(work);
forAll(result, faceI)
forAll(result, facei)
{
if (srcWeightsSum_[faceI] < lowWeightCorrection_)
if (srcWeightsSum_[facei] < lowWeightCorrection_)
{
result[faceI] = defaultValues[faceI];
result[facei] = defaultValues[facei];
}
else
{
const labelList& faces = srcAddress_[faceI];
const scalarList& weights = srcWeights_[faceI];
const labelList& faces = srcAddress_[facei];
const scalarList& weights = srcWeights_[facei];
forAll(faces, i)
{
cop(result[faceI], faceI, work[faces[i]], weights[i]);
cop(result[facei], facei, work[faces[i]], weights[i]);
}
}
}
}
else
{
forAll(result, faceI)
forAll(result, facei)
{
if (srcWeightsSum_[faceI] < lowWeightCorrection_)
if (srcWeightsSum_[facei] < lowWeightCorrection_)
{
result[faceI] = defaultValues[faceI];
result[facei] = defaultValues[facei];
}
else
{
const labelList& faces = srcAddress_[faceI];
const scalarList& weights = srcWeights_[faceI];
const labelList& faces = srcAddress_[facei];
const scalarList& weights = srcWeights_[facei];
forAll(faces, i)
{
cop(result[faceI], faceI, fld[faces[i]], weights[i]);
cop(result[facei], facei, fld[faces[i]], weights[i]);
}
}
}

View File

@ -389,11 +389,11 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcProcMap
// Work array - whether processor bb overlaps the face bounds
boolList procBbOverlaps(Pstream::nProcs());
forAll(faces, faceI)
forAll(faces, facei)
{
if (faces[faceI].size())
if (faces[facei].size())
{
treeBoundBox faceBb(points, faces[faceI]);
treeBoundBox faceBb(points, faces[facei]);
// Find the processor this face overlaps
calcOverlappingProcs(procBb, faceBb, procBbOverlaps);
@ -402,7 +402,7 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcProcMap
{
if (procBbOverlaps[procI])
{
dynSendMap[procI].append(faceI);
dynSendMap[procI].append(facei);
}
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -109,12 +109,12 @@ bool Foam::AMIMethod<SourcePatch, TargetPatch>::initialise
srcFaceI = 0;
tgtFaceI = 0;
bool foundFace = false;
forAll(srcPatch_, faceI)
forAll(srcPatch_, facei)
{
tgtFaceI = findTargetFace(faceI);
tgtFaceI = findTargetFace(facei);
if (tgtFaceI >= 0)
{
srcFaceI = faceI;
srcFaceI = facei;
foundFace = true;
break;
}
@ -259,13 +259,13 @@ Foam::label Foam::AMIMethod<SourcePatch, TargetPatch>::findTargetFace
template<class SourcePatch, class TargetPatch>
void Foam::AMIMethod<SourcePatch, TargetPatch>::appendNbrFaces
(
const label faceI,
const label facei,
const TargetPatch& patch,
const DynamicList<label>& visitedFaces,
DynamicList<label>& faceIDs
) const
{
const labelList& nbrFaces = patch.faceFaces()[faceI];
const labelList& nbrFaces = patch.faceFaces()[facei];
// filter out faces already visited from face neighbours
forAll(nbrFaces, i)
@ -296,7 +296,7 @@ void Foam::AMIMethod<SourcePatch, TargetPatch>::appendNbrFaces
// prevent addition of face if it is not on the same plane-ish
if (valid)
{
const vector& n1 = patch.faceNormals()[faceI];
const vector& n1 = patch.faceNormals()[facei];
const vector& n2 = patch.faceNormals()[nbrFaceI];
scalar cosI = n1 & n2;

View File

@ -143,10 +143,10 @@ protected:
//- Find face on target patch that overlaps source face
label findTargetFace(const label srcFaceI) const;
//- Add faces neighbouring faceI to the ID list
//- Add faces neighbouring facei to the ID list
void appendNbrFaces
(
const label faceI,
const label facei,
const TargetPatch& patch,
const DynamicList<label>& visitedFaces,
DynamicList<label>& faceIDs

View File

@ -164,20 +164,20 @@ void Foam::directAMI<SourcePatch, TargetPatch>::restartAdvancingFront
label& tgtFaceI
) const
{
forAll(mapFlag, faceI)
forAll(mapFlag, facei)
{
if (mapFlag[faceI] == 0)
if (mapFlag[facei] == 0)
{
tgtFaceI = this->findTargetFace(faceI);
tgtFaceI = this->findTargetFace(facei);
if (tgtFaceI < 0)
{
mapFlag[faceI] = -1;
nonOverlapFaces.append(faceI);
mapFlag[facei] = -1;
nonOverlapFaces.append(facei);
}
else
{
srcFaceI = faceI;
srcFaceI = facei;
break;
}
}

View File

@ -234,20 +234,20 @@ void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::setNextFaces
{
// try to use existing seed
bool foundNextSeed = false;
for (label faceI = startSeedI; faceI < mapFlag.size(); faceI++)
for (label facei = startSeedI; facei < mapFlag.size(); facei++)
{
if (mapFlag[faceI])
if (mapFlag[facei])
{
if (!foundNextSeed)
{
startSeedI = faceI;
startSeedI = facei;
foundNextSeed = true;
}
if (seedFaces[faceI] != -1)
if (seedFaces[facei] != -1)
{
srcFaceI = faceI;
tgtFaceI = seedFaces[faceI];
srcFaceI = facei;
tgtFaceI = seedFaces[facei];
return;
}
@ -262,17 +262,17 @@ void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::setNextFaces
}
foundNextSeed = false;
for (label faceI = startSeedI; faceI < mapFlag.size(); faceI++)
for (label facei = startSeedI; facei < mapFlag.size(); facei++)
{
if (mapFlag[faceI])
if (mapFlag[facei])
{
if (!foundNextSeed)
{
startSeedI = faceI + 1;
startSeedI = facei + 1;
foundNextSeed = true;
}
srcFaceI = faceI;
srcFaceI = facei;
tgtFaceI = this->findTargetFace(srcFaceI);
if (tgtFaceI >= 0)

View File

@ -87,22 +87,22 @@ void Foam::mapNearestAMI<SourcePatch, TargetPatch>::setNextNearestFaces
forAll(srcNbr, i)
{
label faceI = srcNbr[i];
if (mapFlag[faceI])
label facei = srcNbr[i];
if (mapFlag[facei])
{
srcFaceI = faceI;
startSeedI = faceI + 1;
srcFaceI = facei;
startSeedI = facei + 1;
return;
}
}
forAll(mapFlag, faceI)
forAll(mapFlag, facei)
{
if (mapFlag[faceI])
if (mapFlag[facei])
{
srcFaceI = faceI;
tgtFaceI = this->findTargetFace(faceI);
srcFaceI = facei;
tgtFaceI = this->findTargetFace(facei);
if (tgtFaceI == -1)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -134,8 +134,8 @@ public:
//- Return neighbour point patch
const cyclicACMIPointPatch& neighbPatch() const
{
label patchI = cyclicACMIPolyPatch_.neighbPatchID();
const pointPatch& pp = this->boundaryMesh()[patchI];
label patchi = cyclicACMIPolyPatch_.neighbPatchID();
const pointPatch& pp = this->boundaryMesh()[patchi];
return refCast<const cyclicACMIPointPatch>(pp);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -82,10 +82,10 @@ void Foam::cyclicACMIPolyPatch::resetAMI
vectorField::subField Sf = faceAreas();
vectorField::subField noSf = nonOverlapPatch.faceAreas();
forAll(Sf, faceI)
forAll(Sf, facei)
{
Sf[faceI] = faceAreas0_[faceI];
noSf[faceI] = faceAreas0_[faceI];
Sf[facei] = faceAreas0_[facei];
noSf[facei] = faceAreas0_[facei];
}
// Calculate the AMI using partial face-area-weighted
@ -100,10 +100,10 @@ void Foam::cyclicACMIPolyPatch::resetAMI
tgtMask_ =
min(scalar(1) - tolerance_, max(tolerance_, AMI().tgtWeightsSum()));
forAll(Sf, faceI)
forAll(Sf, facei)
{
Sf[faceI] *= srcMask_[faceI];
noSf[faceI] *= 1.0 - srcMask_[faceI];
Sf[facei] *= srcMask_[facei];
noSf[facei] *= 1.0 - srcMask_[facei];
}
setNeighbourFaceAreas();
@ -127,10 +127,10 @@ void Foam::cyclicACMIPolyPatch::setNeighbourFaceAreas() const
vectorField::subField Sf = cp.faceAreas();
vectorField::subField noSf = pp.faceAreas();
forAll(Sf, faceI)
forAll(Sf, facei)
{
Sf[faceI] = tgtMask_[faceI]*faceAreas0[faceI];
noSf[faceI] = (1.0 - tgtMask_[faceI])*faceAreas0[faceI];
Sf[facei] = tgtMask_[facei]*faceAreas0[facei];
noSf[facei] = (1.0 - tgtMask_[facei])*faceAreas0[facei];
}
}
else
@ -400,9 +400,9 @@ Foam::label Foam::cyclicACMIPolyPatch::nonOverlapPatchID() const
const scalarField magSf(mag(faceAreas()));
const scalarField noMagSf(mag(noPp.faceAreas()));
forAll(magSf, faceI)
forAll(magSf, facei)
{
scalar ratio = mag(magSf[faceI]/(noMagSf[faceI] + ROOTVSMALL));
scalar ratio = mag(magSf[facei]/(noMagSf[facei] + ROOTVSMALL));
if (ratio - 1 > tolerance_)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -127,8 +127,8 @@ public:
//- Return neighbour point patch
const cyclicAMIPointPatch& neighbPatch() const
{
label patchI = cyclicAMIPolyPatch_.neighbPatchID();
const pointPatch& pp = this->boundaryMesh()[patchI];
label patchi = cyclicAMIPolyPatch_.neighbPatchID();
const pointPatch& pp = this->boundaryMesh()[patchi];
return refCast<const cyclicAMIPointPatch>(pp);
}

View File

@ -52,18 +52,18 @@ Foam::vector Foam::cyclicAMIPolyPatch::findFaceNormalMaxRadius
const scalarField magRadSqr(magSqr(n));
label faceI = findMax(magRadSqr);
label facei = findMax(magRadSqr);
if (debug)
{
Info<< "findFaceMaxRadius(const pointField&) : patch: " << name() << nl
<< " rotFace = " << faceI << nl
<< " point = " << faceCentres[faceI] << nl
<< " distance = " << Foam::sqrt(magRadSqr[faceI])
<< " rotFace = " << facei << nl
<< " point = " << faceCentres[facei] << nl
<< " distance = " << Foam::sqrt(magRadSqr[facei])
<< endl;
}
return n[faceI];
return n[facei];
}
@ -845,7 +845,7 @@ void Foam::cyclicAMIPolyPatch::transformPosition(pointField& l) const
void Foam::cyclicAMIPolyPatch::transformPosition
(
point& l,
const label faceI
const label facei
) const
{
if (!parallel())
@ -854,7 +854,7 @@ void Foam::cyclicAMIPolyPatch::transformPosition
(
forwardT().size() == 1
? forwardT()[0]
: forwardT()[faceI]
: forwardT()[facei]
);
if (transform() == ROTATIONAL)
@ -872,7 +872,7 @@ void Foam::cyclicAMIPolyPatch::transformPosition
(
separation().size() == 1
? separation()[0]
: separation()[faceI]
: separation()[facei]
);
l -= s;
@ -883,7 +883,7 @@ void Foam::cyclicAMIPolyPatch::transformPosition
void Foam::cyclicAMIPolyPatch::reverseTransformPosition
(
point& l,
const label faceI
const label facei
) const
{
if (!parallel())
@ -892,7 +892,7 @@ void Foam::cyclicAMIPolyPatch::reverseTransformPosition
(
reverseT().size() == 1
? reverseT()[0]
: reverseT()[faceI]
: reverseT()[facei]
);
if (transform() == ROTATIONAL)
@ -910,7 +910,7 @@ void Foam::cyclicAMIPolyPatch::reverseTransformPosition
(
separation().size() == 1
? separation()[0]
: separation()[faceI]
: separation()[facei]
);
l += s;
@ -921,7 +921,7 @@ void Foam::cyclicAMIPolyPatch::reverseTransformPosition
void Foam::cyclicAMIPolyPatch::reverseTransformDirection
(
vector& d,
const label faceI
const label facei
) const
{
if (!parallel())
@ -930,7 +930,7 @@ void Foam::cyclicAMIPolyPatch::reverseTransformDirection
(
reverseT().size() == 1
? reverseT()[0]
: reverseT()[faceI]
: reverseT()[facei]
);
d = Foam::transform(T, d);
@ -988,16 +988,16 @@ bool Foam::cyclicAMIPolyPatch::order
Foam::label Foam::cyclicAMIPolyPatch::pointFace
(
const label faceI,
const label facei,
const vector& n,
point& p
) const
{
point prt(p);
reverseTransformPosition(prt, faceI);
reverseTransformPosition(prt, facei);
vector nrt(n);
reverseTransformDirection(nrt, faceI);
reverseTransformDirection(nrt, facei);
label nbrFaceI = -1;
@ -1008,7 +1008,7 @@ Foam::label Foam::cyclicAMIPolyPatch::pointFace
*this,
neighbPatch(),
nrt,
faceI,
facei,
prt
);
}
@ -1019,7 +1019,7 @@ Foam::label Foam::cyclicAMIPolyPatch::pointFace
neighbPatch(),
*this,
nrt,
faceI,
facei,
prt
);
}

View File

@ -326,21 +326,21 @@ public:
virtual void transformPosition
(
point& l,
const label faceI
const label facei
) const;
//- Transform a patch-based position from this side to nbr side
virtual void reverseTransformPosition
(
point& l,
const label faceI
const label facei
) const;
//- Transform a patch-based direction from this side to nbr side
virtual void reverseTransformDirection
(
vector& d,
const label faceI
const label facei
) const;
@ -410,7 +410,7 @@ public:
// following trajectory vector n
label pointFace
(
const label faceI,
const label facei,
const vector& n,
point& p
) const;

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
@ -73,7 +73,7 @@ namespace Foam
void operator()
(
Type& x,
const label faceI,
const label facei,
const Type& y,
const scalar weight
) const
@ -83,11 +83,11 @@ namespace Foam
label meshFaceI = -1;
if (patch_.owner())
{
meshFaceI = patch_.start() + faceI;
meshFaceI = patch_.start() + facei;
}
else
{
meshFaceI = patch_.neighbPatch().start() + faceI;
meshFaceI = patch_.neighbPatch().start() + facei;
}
x.updateFace
(
@ -106,7 +106,7 @@ namespace Foam
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// Update info for cellI, at position pt, with information from
// Update info for celli, at position pt, with information from
// neighbouring face/cell.
// Updates:
// - changedCell_, changedCells_, nChangedCells_,
@ -114,7 +114,7 @@ namespace Foam
template<class Type, class TrackingData>
bool Foam::FaceCellWave<Type, TrackingData>::updateCell
(
const label cellI,
const label celli,
const label neighbourFaceI,
const Type& neighbourInfo,
const scalar tol,
@ -129,7 +129,7 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateCell
cellInfo.updateCell
(
mesh_,
cellI,
celli,
neighbourFaceI,
neighbourInfo,
tol,
@ -138,10 +138,10 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateCell
if (propagate)
{
if (!changedCell_[cellI])
if (!changedCell_[celli])
{
changedCell_[cellI] = true;
changedCells_[nChangedCells_++] = cellI;
changedCell_[celli] = true;
changedCells_[nChangedCells_++] = celli;
}
}
@ -154,7 +154,7 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateCell
}
// Update info for faceI, at position pt, with information from
// Update info for facei, at position pt, with information from
// neighbouring face/cell.
// Updates:
// - changedFace_, changedFaces_, nChangedFaces_,
@ -162,7 +162,7 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateCell
template<class Type, class TrackingData>
bool Foam::FaceCellWave<Type, TrackingData>::updateFace
(
const label faceI,
const label facei,
const label neighbourCellI,
const Type& neighbourInfo,
const scalar tol,
@ -177,7 +177,7 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateFace
faceInfo.updateFace
(
mesh_,
faceI,
facei,
neighbourCellI,
neighbourInfo,
tol,
@ -186,10 +186,10 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateFace
if (propagate)
{
if (!changedFace_[faceI])
if (!changedFace_[facei])
{
changedFace_[faceI] = true;
changedFaces_[nChangedFaces_++] = faceI;
changedFace_[facei] = true;
changedFaces_[nChangedFaces_++] = facei;
}
}
@ -202,7 +202,7 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateFace
}
// Update info for faceI, at position pt, with information from
// Update info for facei, at position pt, with information from
// same face.
// Updates:
// - changedFace_, changedFaces_, nChangedFaces_,
@ -210,7 +210,7 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateFace
template<class Type, class TrackingData>
bool Foam::FaceCellWave<Type, TrackingData>::updateFace
(
const label faceI,
const label facei,
const Type& neighbourInfo,
const scalar tol,
Type& faceInfo
@ -224,7 +224,7 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateFace
faceInfo.updateFace
(
mesh_,
faceI,
facei,
neighbourInfo,
tol,
td_
@ -232,10 +232,10 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateFace
if (propagate)
{
if (!changedFace_[faceI])
if (!changedFace_[facei])
{
changedFace_[faceI] = true;
changedFaces_[nChangedFaces_++] = faceI;
changedFace_[facei] = true;
changedFaces_[nChangedFaces_++] = facei;
}
}
@ -298,9 +298,9 @@ template<class Type, class TrackingData>
template<class PatchType>
bool Foam::FaceCellWave<Type, TrackingData>::hasPatch() const
{
forAll(mesh_.boundaryMesh(), patchI)
forAll(mesh_.boundaryMesh(), patchi)
{
if (isA<PatchType>(mesh_.boundaryMesh()[patchI]))
if (isA<PatchType>(mesh_.boundaryMesh()[patchi]))
{
return true;
}
@ -319,23 +319,23 @@ void Foam::FaceCellWave<Type, TrackingData>::setFaceInfo
{
forAll(changedFaces, changedFaceI)
{
label faceI = changedFaces[changedFaceI];
label facei = changedFaces[changedFaceI];
bool wasValid = allFaceInfo_[faceI].valid(td_);
bool wasValid = allFaceInfo_[facei].valid(td_);
// Copy info for faceI
allFaceInfo_[faceI] = changedFacesInfo[changedFaceI];
// Copy info for facei
allFaceInfo_[facei] = changedFacesInfo[changedFaceI];
// Maintain count of unset faces
if (!wasValid && allFaceInfo_[faceI].valid(td_))
if (!wasValid && allFaceInfo_[facei].valid(td_))
{
--nUnvisitedFaces_;
}
// Mark faceI as changed, both on list and on face itself.
// Mark facei as changed, both on list and on face itself.
changedFace_[faceI] = true;
changedFaces_[nChangedFaces_++] = faceI;
changedFace_[facei] = true;
changedFaces_[nChangedFaces_++] = facei;
}
}
@ -462,16 +462,16 @@ void Foam::FaceCellWave<Type, TrackingData>::transform
{
const tensor& T = rotTensor[0];
for (label faceI = 0; faceI < nFaces; faceI++)
for (label facei = 0; facei < nFaces; facei++)
{
faceInfo[faceI].transform(mesh_, T, td_);
faceInfo[facei].transform(mesh_, T, td_);
}
}
else
{
for (label faceI = 0; faceI < nFaces; faceI++)
for (label facei = 0; facei < nFaces; facei++)
{
faceInfo[faceI].transform(mesh_, rotTensor[faceI], td_);
faceInfo[facei].transform(mesh_, rotTensor[facei], td_);
}
}
}
@ -487,9 +487,9 @@ void Foam::FaceCellWave<Type, TrackingData>::offset
labelList& faces
)
{
for (label faceI = 0; faceI < nFaces; faceI++)
for (label facei = 0; facei < nFaces; facei++)
{
faces[faceI] += cycOffset;
faces[facei] += cycOffset;
}
}
@ -509,10 +509,10 @@ void Foam::FaceCellWave<Type, TrackingData>::handleProcPatches()
forAll(procPatches, i)
{
label patchI = procPatches[i];
label patchi = procPatches[i];
const processorPolyPatch& procPatch =
refCast<const processorPolyPatch>(mesh_.boundaryMesh()[patchI]);
refCast<const processorPolyPatch>(mesh_.boundaryMesh()[patchi]);
// Allocate buffers
label nSendFaces;
@ -540,7 +540,7 @@ void Foam::FaceCellWave<Type, TrackingData>::handleProcPatches()
if (debug & 2)
{
Pout<< " Processor patch " << patchI << ' ' << procPatch.name()
Pout<< " Processor patch " << patchi << ' ' << procPatch.name()
<< " communicating with " << procPatch.neighbProcNo()
<< " Sending:" << nSendFaces
<< endl;
@ -559,10 +559,10 @@ void Foam::FaceCellWave<Type, TrackingData>::handleProcPatches()
forAll(procPatches, i)
{
label patchI = procPatches[i];
label patchi = procPatches[i];
const processorPolyPatch& procPatch =
refCast<const processorPolyPatch>(mesh_.boundaryMesh()[patchI]);
refCast<const processorPolyPatch>(mesh_.boundaryMesh()[patchi]);
// Allocate buffers
labelList receiveFaces;
@ -575,7 +575,7 @@ void Foam::FaceCellWave<Type, TrackingData>::handleProcPatches()
if (debug & 2)
{
Pout<< " Processor patch " << patchI << ' ' << procPatch.name()
Pout<< " Processor patch " << patchi << ' ' << procPatch.name()
<< " communicating with " << procPatch.neighbProcNo()
<< " Receiving:" << receiveFaces.size()
<< endl;
@ -617,9 +617,9 @@ void Foam::FaceCellWave<Type, TrackingData>::handleProcPatches()
template<class Type, class TrackingData>
void Foam::FaceCellWave<Type, TrackingData>::handleCyclicPatches()
{
forAll(mesh_.boundaryMesh(), patchI)
forAll(mesh_.boundaryMesh(), patchi)
{
const polyPatch& patch = mesh_.boundaryMesh()[patchI];
const polyPatch& patch = mesh_.boundaryMesh()[patchi];
if (isA<cyclicPolyPatch>(patch))
{
@ -666,7 +666,7 @@ void Foam::FaceCellWave<Type, TrackingData>::handleCyclicPatches()
if (debug & 2)
{
Pout<< " Cyclic patch " << patchI << ' ' << cycPatch.name()
Pout<< " Cyclic patch " << patchi << ' ' << cycPatch.name()
<< " Changed : " << nReceiveFaces
<< endl;
}
@ -702,9 +702,9 @@ void Foam::FaceCellWave<Type, TrackingData>::handleCyclicPatches()
template<class Type, class TrackingData>
void Foam::FaceCellWave<Type, TrackingData>::handleAMICyclicPatches()
{
forAll(mesh_.boundaryMesh(), patchI)
forAll(mesh_.boundaryMesh(), patchi)
{
const polyPatch& patch = mesh_.boundaryMesh()[patchI];
const polyPatch& patch = mesh_.boundaryMesh()[patchi];
if (isA<cyclicAMIPolyPatch>(patch))
{
@ -951,30 +951,30 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::faceToCell()
changedFaceI++
)
{
label faceI = changedFaces_[changedFaceI];
if (!changedFace_[faceI])
label facei = changedFaces_[changedFaceI];
if (!changedFace_[facei])
{
FatalErrorInFunction
<< "Face " << faceI
<< "Face " << facei
<< " not marked as having been changed"
<< abort(FatalError);
}
const Type& neighbourWallInfo = allFaceInfo_[faceI];
const Type& neighbourWallInfo = allFaceInfo_[facei];
// Evaluate all connected cells
// Owner
label cellI = owner[faceI];
Type& currentWallInfo = allCellInfo_[cellI];
label celli = owner[facei];
Type& currentWallInfo = allCellInfo_[celli];
if (!currentWallInfo.equal(neighbourWallInfo, td_))
{
updateCell
(
cellI,
faceI,
celli,
facei,
neighbourWallInfo,
propagationTol_,
currentWallInfo
@ -982,17 +982,17 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::faceToCell()
}
// Neighbour.
if (faceI < nInternalFaces)
if (facei < nInternalFaces)
{
cellI = neighbour[faceI];
Type& currentWallInfo2 = allCellInfo_[cellI];
celli = neighbour[facei];
Type& currentWallInfo2 = allCellInfo_[celli];
if (!currentWallInfo2.equal(neighbourWallInfo, td_))
{
updateCell
(
cellI,
faceI,
celli,
facei,
neighbourWallInfo,
propagationTol_,
currentWallInfo2
@ -1001,7 +1001,7 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::faceToCell()
}
// Reset status of face
changedFace_[faceI] = false;
changedFace_[facei] = false;
}
// Handled all changed faces by now
@ -1034,30 +1034,30 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::cellToFace()
changedCellI++
)
{
label cellI = changedCells_[changedCellI];
if (!changedCell_[cellI])
label celli = changedCells_[changedCellI];
if (!changedCell_[celli])
{
FatalErrorInFunction
<< "Cell " << cellI << " not marked as having been changed"
<< "Cell " << celli << " not marked as having been changed"
<< abort(FatalError);
}
const Type& neighbourWallInfo = allCellInfo_[cellI];
const Type& neighbourWallInfo = allCellInfo_[celli];
// Evaluate all connected faces
const labelList& faceLabels = cells[cellI];
const labelList& faceLabels = cells[celli];
forAll(faceLabels, faceLabelI)
{
label faceI = faceLabels[faceLabelI];
Type& currentWallInfo = allFaceInfo_[faceI];
label facei = faceLabels[faceLabelI];
Type& currentWallInfo = allFaceInfo_[facei];
if (!currentWallInfo.equal(neighbourWallInfo, td_))
{
updateFace
(
faceI,
cellI,
facei,
celli,
neighbourWallInfo,
propagationTol_,
currentWallInfo
@ -1066,7 +1066,7 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::cellToFace()
}
// Reset status of cell
changedCell_[cellI] = false;
changedCell_[celli] = false;
}
// Handled all changed cells by now

View File

@ -131,7 +131,7 @@ class FaceCellWave
// statistics.
bool updateCell
(
const label cellI,
const label celli,
const label neighbourFaceI,
const Type& neighbourInfo,
const scalar tol,
@ -142,7 +142,7 @@ class FaceCellWave
// statistics.
bool updateFace
(
const label faceI,
const label facei,
const label neighbourCellI,
const Type& neighbourInfo,
const scalar tol,
@ -153,7 +153,7 @@ class FaceCellWave
// statistics.
bool updateFace
(
const label faceI,
const label facei,
const Type& neighbourInfo,
const scalar tol,
Type& faceInfo

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
@ -106,7 +106,7 @@ updateEdge
}
// Update info for faceI, at position pt, with information from
// Update info for facei, at position pt, with information from
// neighbouring edge.
// Updates:
// - changedFace_, changedFaces_,
@ -120,7 +120,7 @@ template
bool Foam::PatchEdgeFaceWave<PrimitivePatchType, Type, TrackingData>::
updateFace
(
const label faceI,
const label facei,
const label neighbourEdgeI,
const Type& neighbourInfo,
Type& faceInfo
@ -135,7 +135,7 @@ updateFace
(
mesh_,
patch_,
faceI,
facei,
neighbourEdgeI,
neighbourInfo,
propagationTol_,
@ -144,10 +144,10 @@ updateFace
if (propagate)
{
if (!changedFace_[faceI])
if (!changedFace_[facei])
{
changedFace_[faceI] = true;
changedFaces_.append(faceI);
changedFace_[facei] = true;
changedFaces_.append(facei);
}
}
@ -495,21 +495,21 @@ faceToEdge()
forAll(changedFaces_, changedFaceI)
{
label faceI = changedFaces_[changedFaceI];
label facei = changedFaces_[changedFaceI];
if (!changedFace_[faceI])
if (!changedFace_[facei])
{
FatalErrorInFunction
<< "face " << faceI
<< "face " << facei
<< " not marked as having been changed" << nl
<< "This might be caused by multiple occurences of the same"
<< " seed edge." << abort(FatalError);
}
const Type& neighbourWallInfo = allFaceInfo_[faceI];
const Type& neighbourWallInfo = allFaceInfo_[facei];
// Evaluate all connected edges
const labelList& fEdges = patch_.faceEdges()[faceI];
const labelList& fEdges = patch_.faceEdges()[facei];
forAll(fEdges, fEdgeI)
{
@ -522,7 +522,7 @@ faceToEdge()
updateEdge
(
edgeI,
faceI,
facei,
neighbourWallInfo,
currentWallInfo
);
@ -578,15 +578,15 @@ edgeToFace()
const labelList& eFaces = edgeFaces[edgeI];
forAll(eFaces, eFaceI)
{
label faceI = eFaces[eFaceI];
label facei = eFaces[eFaceI];
Type& currentWallInfo = allFaceInfo_[faceI];
Type& currentWallInfo = allFaceInfo_[facei];
if (!currentWallInfo.equal(neighbourWallInfo, td_))
{
updateFace
(
faceI,
facei,
edgeI,
neighbourWallInfo,
currentWallInfo

View File

@ -142,7 +142,7 @@ class PatchEdgeFaceWave
// statistics.
bool updateFace
(
const label faceI,
const label facei,
const label neighbourEdgeI,
const Type& neighbourInfo,
Type& faceInfo

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
@ -139,7 +139,7 @@ public:
const polyMesh& mesh,
const primitivePatch& patch,
const label edgeI,
const label faceI,
const label facei,
const patchEdgeFaceInfo& faceInfo,
const scalar tol,
TrackingData& td
@ -163,7 +163,7 @@ public:
(
const polyMesh& mesh,
const primitivePatch& patch,
const label faceI,
const label facei,
const label edgeI,
const patchEdgeFaceInfo& edgeInfo,
const scalar tol,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -186,7 +186,7 @@ inline bool Foam::patchEdgeFaceInfo::updateEdge
const polyMesh& mesh,
const primitivePatch& patch,
const label edgeI,
const label faceI,
const label facei,
const patchEdgeFaceInfo& faceInfo,
const scalar tol,
TrackingData& td
@ -223,14 +223,14 @@ inline bool Foam::patchEdgeFaceInfo::updateFace
(
const polyMesh& mesh,
const primitivePatch& patch,
const label faceI,
const label facei,
const label edgeI,
const patchEdgeFaceInfo& edgeInfo,
const scalar tol,
TrackingData& td
)
{
return update(patch.faceCentres()[faceI], edgeInfo, tol, td);
return update(patch.faceCentres()[facei], edgeInfo, tol, td);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -120,7 +120,7 @@ public:
const polyMesh& mesh,
const indirectPrimitivePatch& patch,
const label edgeI,
const label faceI,
const label facei,
const patchEdgeFaceRegion& faceInfo,
const scalar tol,
TrackingData& td
@ -144,7 +144,7 @@ public:
(
const polyMesh& mesh,
const indirectPrimitivePatch& patch,
const label faceI,
const label facei,
const label edgeI,
const patchEdgeFaceRegion& edgeInfo,
const scalar tol,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -122,7 +122,7 @@ inline bool Foam::patchEdgeFaceRegion::updateEdge
const polyMesh& mesh,
const indirectPrimitivePatch& patch,
const label edgeI,
const label faceI,
const label facei,
const patchEdgeFaceRegion& faceInfo,
const scalar tol,
TrackingData& td
@ -152,7 +152,7 @@ inline bool Foam::patchEdgeFaceRegion::updateFace
(
const polyMesh& mesh,
const indirectPrimitivePatch& patch,
const label faceI,
const label facei,
const label edgeI,
const patchEdgeFaceRegion& edgeInfo,
const scalar tol,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -108,7 +108,7 @@ public:
const polyMesh& mesh,
const Patch& patch,
const label edgeI,
const label faceI,
const label facei,
const patchEdgeFaceRegions& faceInfo,
const scalar tol,
TrackingData& td
@ -132,7 +132,7 @@ public:
(
const polyMesh& mesh,
const Patch& patch,
const label faceI,
const label facei,
const label edgeI,
const patchEdgeFaceRegions& edgeInfo,
const scalar tol,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -85,16 +85,16 @@ inline bool Foam::patchEdgeFaceRegions::updateEdge
const polyMesh& mesh,
const Patch& patch,
const label edgeI,
const label faceI,
const label facei,
const patchEdgeFaceRegions& faceInfo,
const scalar tol,
TrackingData& td
)
{
const face& f = patch.localFaces()[faceI];
const face& f = patch.localFaces()[facei];
const edge& e = patch.edges()[edgeI];
label index = findIndex(patch.faceEdges()[faceI], edgeI);
label index = findIndex(patch.faceEdges()[facei], edgeI);
bool sameOrientation = (f[index] == e.start());
// Get information in edge-order
@ -188,18 +188,18 @@ inline bool Foam::patchEdgeFaceRegions::updateFace
(
const polyMesh& mesh,
const Patch& patch,
const label faceI,
const label facei,
const label edgeI,
const patchEdgeFaceRegions& edgeInfo,
const scalar tol,
TrackingData& td
)
{
const face& f = patch.localFaces()[faceI];
const face& f = patch.localFaces()[facei];
const edge& e = patch.edges()[edgeI];
// Find starting point of edge on face.
label index0 = findIndex(patch.faceEdges()[faceI], edgeI);
label index0 = findIndex(patch.faceEdges()[facei], edgeI);
label index1 = f.fcIndex(index0);
bool sameOrientation = (f[index0] == e.start());

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -156,11 +156,11 @@ void Foam::patchPatchDist::correct()
// Extract into *this
setSize(patch_.size());
nUnset_ = 0;
forAll(allFaceInfo, faceI)
forAll(allFaceInfo, facei)
{
if (allFaceInfo[faceI].valid(calc.data()))
if (allFaceInfo[facei].valid(calc.data()))
{
operator[](faceI) = Foam::sqrt(allFaceInfo[faceI].distSqr());
operator[](facei) = Foam::sqrt(allFaceInfo[facei].distSqr());
}
else
{

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
@ -294,9 +294,9 @@ Foam::label Foam::PointEdgeWave<Type, TrackingData>::countPatchType() const
{
label nPatches = 0;
forAll(mesh_.boundaryMesh(), patchI)
forAll(mesh_.boundaryMesh(), patchi)
{
if (isA<PatchType>(mesh_.boundaryMesh()[patchI]))
if (isA<PatchType>(mesh_.boundaryMesh()[patchi]))
{
nPatches++;
}
@ -319,9 +319,9 @@ void Foam::PointEdgeWave<Type, TrackingData>::handleProcPatches()
forAll(mesh_.globalData().processorPatches(), i)
{
label patchI = mesh_.globalData().processorPatches()[i];
label patchi = mesh_.globalData().processorPatches()[i];
const processorPolyPatch& procPatch =
refCast<const processorPolyPatch>(mesh_.boundaryMesh()[patchI]);
refCast<const processorPolyPatch>(mesh_.boundaryMesh()[patchi]);
patchInfo.clear();
patchInfo.reserve(procPatch.nPoints());
@ -348,7 +348,7 @@ void Foam::PointEdgeWave<Type, TrackingData>::handleProcPatches()
//if (debug)
//{
// Pout<< "Processor patch " << patchI << ' ' << procPatch.name()
// Pout<< "Processor patch " << patchi << ' ' << procPatch.name()
// << " communicating with " << procPatch.neighbProcNo()
// << " Sending:" << patchInfo.size() << endl;
//}
@ -366,9 +366,9 @@ void Foam::PointEdgeWave<Type, TrackingData>::handleProcPatches()
forAll(mesh_.globalData().processorPatches(), i)
{
label patchI = mesh_.globalData().processorPatches()[i];
label patchi = mesh_.globalData().processorPatches()[i];
const processorPolyPatch& procPatch =
refCast<const processorPolyPatch>(mesh_.boundaryMesh()[patchI]);
refCast<const processorPolyPatch>(mesh_.boundaryMesh()[patchi]);
List<Type> patchInfo;
labelList patchPoints;
@ -380,7 +380,7 @@ void Foam::PointEdgeWave<Type, TrackingData>::handleProcPatches()
//if (debug)
//{
// Pout<< "Processor patch " << patchI << ' ' << procPatch.name()
// Pout<< "Processor patch " << patchi << ' ' << procPatch.name()
// << " communicating with " << procPatch.neighbProcNo()
// << " Received:" << patchInfo.size() << endl;
//}
@ -428,9 +428,9 @@ void Foam::PointEdgeWave<Type, TrackingData>::handleCyclicPatches()
DynamicList<label> nbrPoints;
DynamicList<label> thisPoints;
forAll(mesh_.boundaryMesh(), patchI)
forAll(mesh_.boundaryMesh(), patchi)
{
const polyPatch& patch = mesh_.boundaryMesh()[patchI];
const polyPatch& patch = mesh_.boundaryMesh()[patchi];
if (isA<cyclicPolyPatch>(patch))
{
@ -479,7 +479,7 @@ void Foam::PointEdgeWave<Type, TrackingData>::handleCyclicPatches()
//if (debug)
//{
// Pout<< "Cyclic patch " << patchI << ' ' << patch.name()
// Pout<< "Cyclic patch " << patchi << ' ' << patch.name()
// << " Changed : " << nbrInfo.size()
// << endl;
//}

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,11 +107,11 @@ Foam::boolList Foam::cellClassification::markFaces
forAll(myFaces, myFaceI)
{
label faceI = myFaces[myFaceI];
label facei = myFaces[myFaceI];
if (!cutFace[faceI])
if (!cutFace[facei])
{
cutFace[faceI] = true;
cutFace[facei] = true;
nCutFaces++;
}
@ -133,11 +133,11 @@ Foam::boolList Foam::cellClassification::markFaces
label allFaceI = 0;
forAll(cutFace, faceI)
forAll(cutFace, facei)
{
if (!cutFace[faceI])
if (!cutFace[facei])
{
allFaces[allFaceI++] = faceI;
allFaces[allFaceI++] = facei;
}
}
@ -208,11 +208,11 @@ Foam::boolList Foam::cellClassification::markFaces
}
else
{
label faceI = faceTree.shapes().faceLabels()[pHit.index()];
label facei = faceTree.shapes().faceLabels()[pHit.index()];
if (!cutFace[faceI])
if (!cutFace[facei])
{
cutFace[faceI] = true;
cutFace[facei] = true;
nAddFaces++;
}
@ -258,16 +258,16 @@ void Foam::cellClassification::markCells
List<cellInfo> cellInfoList(mesh_.nCells());
// Mark cut cells first
forAll(piercedFace, faceI)
forAll(piercedFace, facei)
{
if (piercedFace[faceI])
if (piercedFace[facei])
{
cellInfoList[mesh_.faceOwner()[faceI]] =
cellInfoList[mesh_.faceOwner()[facei]] =
cellInfo(cellClassification::CUT);
if (mesh_.isInternalFace(faceI))
if (mesh_.isInternalFace(facei))
{
cellInfoList[mesh_.faceNeighbour()[faceI]] =
cellInfoList[mesh_.faceNeighbour()[facei]] =
cellInfo(cellClassification::CUT);
}
}
@ -283,9 +283,9 @@ void Foam::cellClassification::markCells
forAll(outsidePts, outsidePtI)
{
// Use linear search for points.
label cellI = queryMesh.findCell(outsidePts[outsidePtI], -1, false);
label celli = queryMesh.findCell(outsidePts[outsidePtI], -1, false);
if (returnReduce(cellI, maxOp<label>()) == -1)
if (returnReduce(celli, maxOp<label>()) == -1)
{
FatalErrorInFunction
<< "outsidePoint " << outsidePts[outsidePtI]
@ -294,12 +294,12 @@ void Foam::cellClassification::markCells
<< exit(FatalError);
}
if (cellI >= 0)
if (celli >= 0)
{
cellInfoList[cellI] = cellInfo(cellClassification::OUTSIDE);
cellInfoList[celli] = cellInfo(cellClassification::OUTSIDE);
// Mark faces of cellI
const labelList& myFaces = mesh_.cells()[cellI];
// Mark faces of celli
const labelList& myFaces = mesh_.cells()[celli];
forAll(myFaces, myFaceI)
{
outsideFacesMap.insert(myFaces[myFaceI]);
@ -332,15 +332,15 @@ void Foam::cellClassification::markCells
// Get information out of cellInfoList
const List<cellInfo>& allInfo = cellInfoCalc.allCellInfo();
forAll(allInfo, cellI)
forAll(allInfo, celli)
{
label t = allInfo[cellI].type();
label t = allInfo[celli].type();
if (t == cellClassification::NOTSET)
{
t = cellClassification::INSIDE;
}
operator[](cellI) = t;
operator[](celli) = t;
}
}
@ -398,12 +398,12 @@ void Foam::cellClassification::classifyPoints
bool Foam::cellClassification::usesMixedPointsOnly
(
const List<pointStatus>& pointSide,
const label cellI
const label celli
) const
{
const faceList& faces = mesh_.faces();
const cell& cFaces = mesh_.cells()[cellI];
const cell& cFaces = mesh_.cells()[celli];
forAll(cFaces, cFaceI)
{
@ -440,33 +440,33 @@ void Foam::cellClassification::getMeshOutside
// Get faces on interface between meshType and non-meshType
for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++)
for (label facei = 0; facei < mesh_.nInternalFaces(); facei++)
{
label ownType = operator[](own[faceI]);
label nbrType = operator[](nbr[faceI]);
label ownType = operator[](own[facei]);
label nbrType = operator[](nbr[facei]);
if (ownType == meshType && nbrType != meshType)
{
outsideFaces[outsideI] = faces[faceI];
outsideOwner[outsideI] = own[faceI]; // meshType cell
outsideFaces[outsideI] = faces[facei];
outsideOwner[outsideI] = own[facei]; // meshType cell
outsideI++;
}
else if (ownType != meshType && nbrType == meshType)
{
outsideFaces[outsideI] = faces[faceI];
outsideOwner[outsideI] = nbr[faceI]; // meshType cell
outsideFaces[outsideI] = faces[facei];
outsideOwner[outsideI] = nbr[facei]; // meshType cell
outsideI++;
}
}
// Get faces on outside of real mesh with cells of meshType.
for (label faceI = mesh_.nInternalFaces(); faceI < mesh_.nFaces(); faceI++)
for (label facei = mesh_.nInternalFaces(); facei < mesh_.nFaces(); facei++)
{
if (operator[](own[faceI]) == meshType)
if (operator[](own[facei]) == meshType)
{
outsideFaces[outsideI] = faces[faceI];
outsideOwner[outsideI] = own[faceI]; // meshType cell
outsideFaces[outsideI] = faces[facei];
outsideOwner[outsideI] = own[facei]; // meshType cell
outsideI++;
}
}
@ -541,17 +541,17 @@ Foam::label Foam::cellClassification::trimCutCells
labelList newCellType(*this);
// // Split types into outside and rest
// forAll(*this, cellI)
// forAll(*this, celli)
// {
// label type = operator[](cellI);
// label type = operator[](celli);
//
// if (type == meshType)
// {
// newCellType[cellI] = type;
// newCellType[celli] = type;
// }
// else
// {
// newCellType[cellI] = fillType;
// newCellType[celli] = fillType;
// }
// }
@ -597,15 +597,15 @@ Foam::label Foam::cellClassification::trimCutCells
label nChanged = 0;
forAll(newCellType, cellI)
forAll(newCellType, celli)
{
if (operator[](cellI) == cellClassification::CUT)
if (operator[](celli) == cellClassification::CUT)
{
if (newCellType[cellI] != meshType)
if (newCellType[celli] != meshType)
{
// Cell was cutCell but further than nLayers away from
// meshType. Convert to fillType.
operator[](cellI) = fillType;
operator[](celli) = fillType;
nChanged++;
}
}
@ -701,13 +701,13 @@ Foam::label Foam::cellClassification::fillHangingCells
forAll(pCells, i)
{
label cellI = pCells[i];
label celli = pCells[i];
if (operator[](cellI) == meshType)
if (operator[](celli) == meshType)
{
if (usesMixedPointsOnly(pointSide, cellI))
if (usesMixedPointsOnly(pointSide, celli))
{
operator[](cellI) = fillType;
operator[](celli) = fillType;
nChanged++;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -183,7 +183,7 @@ private:
bool usesMixedPointsOnly
(
const List<pointStatus>&,
const label cellI
const label celli
) const;
//- Get faces (and its 'owner') inbetween cells of differing type

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
@ -110,7 +110,7 @@ Foam::scalar Foam::cellDistFuncs::smallestDist
}
// Get point neighbours of faceI (including faceI). Returns number of faces.
// Get point neighbours of facei (including facei). Returns number of faces.
// Note: does not allocate storage but does use linear search to determine
// uniqueness. For polygonal faces this might be quite inefficient.
Foam::label Foam::cellDistFuncs::getPointNeighbours
@ -151,12 +151,12 @@ Foam::label Foam::cellDistFuncs::getPointNeighbours
forAll(pointNbs, nbI)
{
label faceI = pointNbs[nbI];
label facei = pointNbs[nbI];
// Check for faceI in edge-neighbours part of neighbours
if (findIndex(nEdgeNbs, neighbours, faceI) == -1)
// Check for facei in edge-neighbours part of neighbours
if (findIndex(nEdgeNbs, neighbours, facei) == -1)
{
neighbours[nNeighbours++] = faceI;
neighbours[nNeighbours++] = facei;
}
}
}
@ -232,11 +232,11 @@ Foam::label Foam::cellDistFuncs::maxPatchSize
{
label maxSize = 0;
forAll(mesh().boundaryMesh(), patchI)
forAll(mesh().boundaryMesh(), patchi)
{
if (patchIDs.found(patchI))
if (patchIDs.found(patchi))
{
const polyPatch& patch = mesh().boundaryMesh()[patchI];
const polyPatch& patch = mesh().boundaryMesh()[patchi];
maxSize = Foam::max(maxSize, patch.size());
}
@ -254,11 +254,11 @@ const
{
label sum = 0;
forAll(mesh().boundaryMesh(), patchI)
forAll(mesh().boundaryMesh(), patchi)
{
if (patchIDs.found(patchI))
if (patchIDs.found(patchi))
{
const polyPatch& patch = mesh().boundaryMesh()[patchI];
const polyPatch& patch = mesh().boundaryMesh()[patchi];
sum += patch.size();
}
@ -285,11 +285,11 @@ void Foam::cellDistFuncs::correctBoundaryFaceCells
const vectorField& cellCentres = mesh().cellCentres();
const labelList& faceOwner = mesh().faceOwner();
forAll(mesh().boundaryMesh(), patchI)
forAll(mesh().boundaryMesh(), patchi)
{
if (patchIDs.found(patchI))
if (patchIDs.found(patchi))
{
const polyPatch& patch = mesh().boundaryMesh()[patchI];
const polyPatch& patch = mesh().boundaryMesh()[patchi];
// Check cells with face on wall
forAll(patch, patchFaceI)
@ -301,13 +301,13 @@ void Foam::cellDistFuncs::correctBoundaryFaceCells
neighbours
);
label cellI = faceOwner[patch.start() + patchFaceI];
label celli = faceOwner[patch.start() + patchFaceI];
label minFaceI = -1;
wallDistCorrected[cellI] = smallestDist
wallDistCorrected[celli] = smallestDist
(
cellCentres[cellI],
cellCentres[celli],
patch,
nNeighbours,
neighbours,
@ -315,7 +315,7 @@ void Foam::cellDistFuncs::correctBoundaryFaceCells
);
// Store wallCell and its nearest neighbour
nearestFace.insert(cellI, minFaceI);
nearestFace.insert(celli, minFaceI);
}
}
}
@ -335,11 +335,11 @@ void Foam::cellDistFuncs::correctBoundaryPointCells
const vectorField& cellCentres = mesh().cellCentres();
forAll(mesh().boundaryMesh(), patchI)
forAll(mesh().boundaryMesh(), patchi)
{
if (patchIDs.found(patchI))
if (patchIDs.found(patchi))
{
const polyPatch& patch = mesh().boundaryMesh()[patchI];
const polyPatch& patch = mesh().boundaryMesh()[patchi];
const labelList& meshPoints = patch.meshPoints();
const labelListList& pointFaces = patch.pointFaces();
@ -352,17 +352,17 @@ void Foam::cellDistFuncs::correctBoundaryPointCells
forAll(neighbours, neighbourI)
{
label cellI = neighbours[neighbourI];
label celli = neighbours[neighbourI];
if (!nearestFace.found(cellI))
if (!nearestFace.found(celli))
{
const labelList& wallFaces = pointFaces[meshPointI];
label minFaceI = -1;
wallDistCorrected[cellI] = smallestDist
wallDistCorrected[celli] = smallestDist
(
cellCentres[cellI],
cellCentres[celli],
patch,
wallFaces.size(),
wallFaces,
@ -370,7 +370,7 @@ void Foam::cellDistFuncs::correctBoundaryPointCells
);
// Store wallCell and its nearest neighbour
nearestFace.insert(cellI, minFaceI);
nearestFace.insert(celli, minFaceI);
}
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -37,11 +37,11 @@ Foam::labelHashSet Foam::cellDistFuncs::getPatchIDs() const
labelHashSet patchIDs(bMesh.size());
forAll(bMesh, patchI)
forAll(bMesh, patchi)
{
if (isA<Type>(bMesh[patchI]))
if (isA<Type>(bMesh[patchi]))
{
patchIDs.insert(patchI);
patchIDs.insert(patchi);
}
}
return patchIDs;

View File

@ -40,13 +40,13 @@ void Foam::patchDataWave<TransferType>::setChangedFaces
label nChangedFaces = 0;
forAll(mesh.boundaryMesh(), patchI)
forAll(mesh.boundaryMesh(), patchi)
{
if (patchIDs.found(patchI))
if (patchIDs.found(patchi))
{
const polyPatch& patch = mesh.boundaryMesh()[patchI];
const polyPatch& patch = mesh.boundaryMesh()[patchi];
const Field<Type>& patchField = initialPatchValuePtrs_[patchI];
const Field<Type>& patchField = initialPatchValuePtrs_[patchi];
forAll(patch.faceCentres(), patchFaceI)
{
@ -86,48 +86,48 @@ Foam::label Foam::patchDataWave<TransferType>::getValues
// Copy cell values
distance_.setSize(cellInfo.size());
forAll(cellInfo, cellI)
forAll(cellInfo, celli)
{
const TransferType & wpn = cellInfo[cellI];
const TransferType & wpn = cellInfo[celli];
scalar dist = wpn.distSqr();
if (cellInfo[cellI].valid(waveInfo.data()))
if (cellInfo[celli].valid(waveInfo.data()))
{
distance_[cellI] = Foam::sqrt(dist);
distance_[celli] = Foam::sqrt(dist);
cellData_[cellI] = cellInfo[cellI].data();
cellData_[celli] = cellInfo[celli].data();
}
else
{
// Illegal/unset value. What to do with data?
// Note: mag for now. Should maybe be member of TransferType?
distance_[cellI] = mag(dist);
distance_[celli] = mag(dist);
//cellData_[cellI] = point::max;
cellData_[cellI] = cellInfo[cellI].data();
//cellData_[celli] = point::max;
cellData_[celli] = cellInfo[celli].data();
nIllegal++;
}
}
// Copy boundary values
forAll(patchDistance_, patchI)
forAll(patchDistance_, patchi)
{
const polyPatch& patch = mesh.boundaryMesh()[patchI];
const polyPatch& patch = mesh.boundaryMesh()[patchi];
// Allocate storage for patchDistance
scalarField* patchFieldPtr = new scalarField(patch.size());
patchDistance_.set(patchI, patchFieldPtr);
patchDistance_.set(patchi, patchFieldPtr);
scalarField& patchField = *patchFieldPtr;
// Allocate storage for patchData
Field<Type>* patchDataFieldPtr = new Field<Type>(patch.size());
patchData_.set(patchI, patchDataFieldPtr);
patchData_.set(patchi, patchDataFieldPtr);
Field<Type>& patchDataField = *patchDataFieldPtr;
@ -265,11 +265,11 @@ void Foam::patchDataWave<TransferType>::correct()
forAll(wallCells, wallCellI)
{
label cellI = wallCells[wallCellI];
label celli = wallCells[wallCellI];
label faceI = nearestFace[cellI];
label facei = nearestFace[celli];
cellData_[cellI] = faceInfo[faceI].data();
cellData_[celli] = faceInfo[facei].data();
}
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -41,11 +41,11 @@ void Foam::patchWave::setChangedFaces
label nChangedFaces = 0;
forAll(mesh.boundaryMesh(), patchI)
forAll(mesh.boundaryMesh(), patchi)
{
if (patchIDs.found(patchI))
if (patchIDs.found(patchi))
{
const polyPatch& patch = mesh.boundaryMesh()[patchI];
const polyPatch& patch = mesh.boundaryMesh()[patchi];
forAll(patch.faceCentres(), patchFaceI)
{
@ -77,31 +77,31 @@ Foam::label Foam::patchWave::getValues(const MeshWave<wallPoint>& waveInfo)
// Copy cell values
distance_.setSize(cellInfo.size());
forAll(cellInfo, cellI)
forAll(cellInfo, celli)
{
scalar dist = cellInfo[cellI].distSqr();
scalar dist = cellInfo[celli].distSqr();
if (cellInfo[cellI].valid(waveInfo.data()))
if (cellInfo[celli].valid(waveInfo.data()))
{
distance_[cellI] = Foam::sqrt(dist);
distance_[celli] = Foam::sqrt(dist);
}
else
{
distance_[cellI] = dist;
distance_[celli] = dist;
nIllegal++;
}
}
// Copy boundary values
forAll(patchDistance_, patchI)
forAll(patchDistance_, patchi)
{
const polyPatch& patch = mesh().boundaryMesh()[patchI];
const polyPatch& patch = mesh().boundaryMesh()[patchi];
// Allocate storage for patchDistance
scalarField* patchDistPtr = new scalarField(patch.size());
patchDistance_.set(patchI, patchDistPtr);
patchDistance_.set(patchi, patchDistPtr);
scalarField& patchField = *patchDistPtr;

View File

@ -113,7 +113,7 @@ public:
// Needed by meshWave
//- Influence of neighbouring face.
// Calls update(...) with cellCentre of cellI
// Calls update(...) with cellCentre of celli
template<class TrackingData>
inline bool updateCell
(
@ -126,7 +126,7 @@ public:
);
//- Influence of neighbouring cell.
// Calls update(...) with faceCentre of faceI
// Calls update(...) with faceCentre of facei
template<class TrackingData>
inline bool updateFace
(
@ -140,7 +140,7 @@ public:
//- Influence of different value on same face.
// Merge new and old info.
// Calls update(...) with faceCentre of faceI
// Calls update(...) with faceCentre of facei
template<class TrackingData>
inline bool updateFace
(

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
@ -36,12 +36,12 @@ License
// Return true if edge start and end are on increasing face vertices. (edge is
// guaranteed to be on face)
bool Foam::cellFeatures::faceAlignedEdge(const label faceI, const label edgeI)
bool Foam::cellFeatures::faceAlignedEdge(const label facei, const label edgeI)
const
{
const edge& e = mesh_.edges()[edgeI];
const face& f = mesh_.faces()[faceI];
const face& f = mesh_.faces()[facei];
forAll(f, fp)
{
@ -55,7 +55,7 @@ bool Foam::cellFeatures::faceAlignedEdge(const label faceI, const label edgeI)
FatalErrorInFunction
<< "Can not find edge " << mesh_.edges()[edgeI]
<< " on face " << faceI << abort(FatalError);
<< " on face " << facei << abort(FatalError);
return false;
}
@ -85,12 +85,12 @@ Foam::label Foam::cellFeatures::nextEdge
forAll(eFaces, eFaceI)
{
label faceI = eFaces[eFaceI];
label facei = eFaces[eFaceI];
if
(
meshTools::faceOnCell(mesh_, cellI_, faceI)
&& (toSuperFace[faceI] == superFaceI)
meshTools::faceOnCell(mesh_, celli_, facei)
&& (toSuperFace[facei] == superFaceI)
)
{
return edgeI;
@ -120,7 +120,7 @@ bool Foam::cellFeatures::isCellFeatureEdge
label face0;
label face1;
meshTools::getEdgeFaces(mesh_, cellI_, edgeI, face0, face1);
meshTools::getEdgeFaces(mesh_, celli_, edgeI, face0, face1);
// Check the angle between them by comparing the face normals.
@ -178,16 +178,16 @@ bool Foam::cellFeatures::isCellFeatureEdge
// edges.
void Foam::cellFeatures::walkSuperFace
(
const label faceI,
const label facei,
const label superFaceI,
Map<label>& toSuperFace
) const
{
if (!toSuperFace.found(faceI))
if (!toSuperFace.found(facei))
{
toSuperFace.insert(faceI, superFaceI);
toSuperFace.insert(facei, superFaceI);
const labelList& fEdges = mesh_.faceEdges()[faceI];
const labelList& fEdges = mesh_.faceEdges()[facei];
forAll(fEdges, fEdgeI)
{
@ -197,9 +197,9 @@ void Foam::cellFeatures::walkSuperFace
{
label face0;
label face1;
meshTools::getEdgeFaces(mesh_, cellI_, edgeI, face0, face1);
meshTools::getEdgeFaces(mesh_, celli_, edgeI, face0, face1);
if (face0 == faceI)
if (face0 == facei)
{
face0 = face1;
}
@ -220,7 +220,7 @@ void Foam::cellFeatures::calcSuperFaces() const
{
// Determine superfaces by edge walking across non-feature edges
const labelList& cFaces = mesh_.cells()[cellI_];
const labelList& cFaces = mesh_.cells()[celli_];
// Mapping from old to super face:
// <not found> : not visited
@ -231,13 +231,13 @@ void Foam::cellFeatures::calcSuperFaces() const
forAll(cFaces, cFaceI)
{
label faceI = cFaces[cFaceI];
label facei = cFaces[cFaceI];
if (!toSuperFace.found(faceI))
if (!toSuperFace.found(facei))
{
walkSuperFace
(
faceI,
facei,
superFaceI,
toSuperFace
);
@ -251,9 +251,9 @@ void Foam::cellFeatures::calcSuperFaces() const
forAll(cFaces, cFaceI)
{
label faceI = cFaces[cFaceI];
label facei = cFaces[cFaceI];
faceMap_[toSuperFace[faceI]].append(faceI);
faceMap_[toSuperFace[facei]].append(facei);
}
forAll(faceMap_, superI)
@ -270,9 +270,9 @@ void Foam::cellFeatures::calcSuperFaces() const
forAll(cFaces, cFaceI)
{
label faceI = cFaces[cFaceI];
label facei = cFaces[cFaceI];
label superFaceI = toSuperFace[faceI];
label superFaceI = toSuperFace[facei];
if (faces[superFaceI].empty())
{
@ -281,7 +281,7 @@ void Foam::cellFeatures::calcSuperFaces() const
// Find starting feature edge on face.
label startEdgeI = -1;
const labelList& fEdges = mesh_.faceEdges()[faceI];
const labelList& fEdges = mesh_.faceEdges()[facei];
forAll(fEdges, fEdgeI)
{
@ -300,15 +300,15 @@ void Foam::cellFeatures::calcSuperFaces() const
{
// Walk point-edge-point along feature edges
DynamicList<label> superFace(10*mesh_.faces()[faceI].size());
DynamicList<label> superFace(10*mesh_.faces()[facei].size());
const edge& e = mesh_.edges()[startEdgeI];
// Walk either start-end or end-start depending on orientation
// of face. SuperFace will have cellI as owner.
// of face. SuperFace will have celli as owner.
bool flipOrientation =
(mesh_.faceOwner()[faceI] == cellI_)
^ (faceAlignedEdge(faceI, startEdgeI));
(mesh_.faceOwner()[facei] == celli_)
^ (faceAlignedEdge(facei, startEdgeI));
label startVertI = -1;
@ -356,7 +356,7 @@ void Foam::cellFeatures::calcSuperFaces() const
{
WarningInFunction
<< " Can not collapse faces " << faceMap_[superFaceI]
<< " into one big face on cell " << cellI_ << endl
<< " into one big face on cell " << celli_ << endl
<< "Try decreasing minCos:" << minCos_ << endl;
}
else
@ -376,17 +376,17 @@ Foam::cellFeatures::cellFeatures
(
const primitiveMesh& mesh,
const scalar minCos,
const label cellI
const label celli
)
:
mesh_(mesh),
minCos_(minCos),
cellI_(cellI),
featureEdge_(10*mesh.cellEdges()[cellI].size()),
celli_(celli),
featureEdge_(10*mesh.cellEdges()[celli].size()),
facesPtr_(NULL),
faceMap_(0)
{
const labelList& cEdges = mesh_.cellEdges()[cellI_];
const labelList& cEdges = mesh_.cellEdges()[celli_];
forAll(cEdges, cEdgeI)
{
@ -478,19 +478,19 @@ bool Foam::cellFeatures::isFeaturePoint(const label edge0, const label edge1)
}
bool Foam::cellFeatures::isFeatureVertex(const label faceI, const label vertI)
bool Foam::cellFeatures::isFeatureVertex(const label facei, const label vertI)
const
{
if
(
(faceI < 0)
|| (faceI >= mesh_.nFaces())
(facei < 0)
|| (facei >= mesh_.nFaces())
|| (vertI < 0)
|| (vertI >= mesh_.nPoints())
)
{
FatalErrorInFunction
<< "Illegal face " << faceI << " or vertex " << vertI
<< "Illegal face " << facei << " or vertex " << vertI
<< abort(FatalError);
}
@ -503,7 +503,7 @@ bool Foam::cellFeatures::isFeatureVertex(const label faceI, const label vertI)
{
label edgeI = pEdges[pEdgeI];
if (meshTools::edgeOnFace(mesh_, faceI, edgeI))
if (meshTools::edgeOnFace(mesh_, facei, edgeI))
{
if (edge0 == -1)
{
@ -523,7 +523,7 @@ bool Foam::cellFeatures::isFeatureVertex(const label faceI, const label vertI)
{
FatalErrorInFunction
<< "Did not find two edges sharing vertex " << vertI
<< " on face " << faceI << " vertices:" << mesh_.faces()[faceI]
<< " on face " << facei << " vertices:" << mesh_.faces()[facei]
<< abort(FatalError);
}

View File

@ -69,7 +69,7 @@ class cellFeatures
// same face before edge/point is 'feature'.
scalar minCos_;
label cellI_;
label celli_;
//- Feature edges
labelHashSet featureEdge_;
@ -97,7 +97,7 @@ class cellFeatures
void walkSuperFace
(
const label faceI,
const label facei,
const label superFaceI,
Map<label>& toSuperFace
) const;
@ -120,7 +120,7 @@ public:
(
const primitiveMesh&,
const scalar minCos, // angle to use for feature recognition.
const label cellI
const label celli
);
@ -171,9 +171,9 @@ public:
// from one face but not from another.
bool isFeaturePoint(const label edge0, const label edge1) const;
//- Is vertexI on faceI used by two edges that form feature
//- Is vertexI on facei used by two edges that form feature
// point
bool isFeatureVertex(const label faceI, const label vertI) const;
bool isFeatureVertex(const label facei, const label vertI) const;
};

View File

@ -57,41 +57,41 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::nonOrthogonality() const
const labelList& own = mesh_.faceOwner();
const labelList& nei = mesh_.faceNeighbour();
forAll(nei, faceI)
forAll(nei, facei)
{
vector d = centres[nei[faceI]] - centres[own[faceI]];
vector s = areas[faceI];
vector d = centres[nei[facei]] - centres[own[facei]];
vector s = areas[facei];
scalar magS = mag(s);
scalar cosDDotS =
radToDeg(Foam::acos(min(1.0, (d & s)/(mag(d)*magS + VSMALL))));
result[own[faceI]] = max(cosDDotS, result[own[faceI]]);
result[own[facei]] = max(cosDDotS, result[own[facei]]);
result[nei[faceI]] = max(cosDDotS, result[nei[faceI]]);
result[nei[facei]] = max(cosDDotS, result[nei[facei]]);
}
forAll(mesh_.boundaryMesh(), patchI)
forAll(mesh_.boundaryMesh(), patchi)
{
const labelUList& faceCells =
mesh_.boundaryMesh()[patchI].faceCells();
mesh_.boundaryMesh()[patchi].faceCells();
const vectorField::subField faceCentres =
mesh_.boundaryMesh()[patchI].faceCentres();
mesh_.boundaryMesh()[patchi].faceCentres();
const vectorField::subField faceAreas =
mesh_.boundaryMesh()[patchI].faceAreas();
mesh_.boundaryMesh()[patchi].faceAreas();
forAll(faceCentres, faceI)
forAll(faceCentres, facei)
{
vector d = faceCentres[faceI] - centres[faceCells[faceI]];
vector s = faceAreas[faceI];
vector d = faceCentres[facei] - centres[faceCells[facei]];
vector s = faceAreas[facei];
scalar magS = mag(s);
scalar cosDDotS =
radToDeg(Foam::acos(min(1.0, (d & s)/(mag(d)*magS + VSMALL))));
result[faceCells[faceI]] = max(cosDDotS, result[faceCells[faceI]]);
result[faceCells[facei]] = max(cosDDotS, result[faceCells[facei]]);
}
}
@ -119,58 +119,58 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::skewness() const
const labelList& own = mesh_.faceOwner();
const labelList& nei = mesh_.faceNeighbour();
forAll(nei, faceI)
forAll(nei, facei)
{
scalar dOwn = mag
(
(faceCtrs[faceI] - cellCtrs[own[faceI]]) & areas[faceI]
)/mag(areas[faceI]);
(faceCtrs[facei] - cellCtrs[own[facei]]) & areas[facei]
)/mag(areas[facei]);
scalar dNei = mag
(
(cellCtrs[nei[faceI]] - faceCtrs[faceI]) & areas[faceI]
)/mag(areas[faceI]);
(cellCtrs[nei[facei]] - faceCtrs[facei]) & areas[facei]
)/mag(areas[facei]);
point faceIntersection =
cellCtrs[own[faceI]]
+ (dOwn/(dOwn+dNei))*(cellCtrs[nei[faceI]] - cellCtrs[own[faceI]]);
cellCtrs[own[facei]]
+ (dOwn/(dOwn+dNei))*(cellCtrs[nei[facei]] - cellCtrs[own[facei]]);
scalar skewness =
mag(faceCtrs[faceI] - faceIntersection)
/(mag(cellCtrs[nei[faceI]] - cellCtrs[own[faceI]]) + VSMALL);
mag(faceCtrs[facei] - faceIntersection)
/(mag(cellCtrs[nei[facei]] - cellCtrs[own[facei]]) + VSMALL);
result[own[faceI]] = max(skewness, result[own[faceI]]);
result[own[facei]] = max(skewness, result[own[facei]]);
result[nei[faceI]] = max(skewness, result[nei[faceI]]);
result[nei[facei]] = max(skewness, result[nei[facei]]);
}
forAll(mesh_.boundaryMesh(), patchI)
forAll(mesh_.boundaryMesh(), patchi)
{
const labelUList& faceCells =
mesh_.boundaryMesh()[patchI].faceCells();
mesh_.boundaryMesh()[patchi].faceCells();
const vectorField::subField faceCentres =
mesh_.boundaryMesh()[patchI].faceCentres();
mesh_.boundaryMesh()[patchi].faceCentres();
const vectorField::subField faceAreas =
mesh_.boundaryMesh()[patchI].faceAreas();
mesh_.boundaryMesh()[patchi].faceAreas();
forAll(faceCentres, faceI)
forAll(faceCentres, facei)
{
vector n = faceAreas[faceI]/mag(faceAreas[faceI]);
vector n = faceAreas[facei]/mag(faceAreas[facei]);
point faceIntersection =
cellCtrs[faceCells[faceI]]
+ ((faceCentres[faceI] - cellCtrs[faceCells[faceI]])&n)*n;
cellCtrs[faceCells[facei]]
+ ((faceCentres[facei] - cellCtrs[faceCells[facei]])&n)*n;
scalar skewness =
mag(faceCentres[faceI] - faceIntersection)
mag(faceCentres[facei] - faceIntersection)
/(
mag(faceCentres[faceI] - cellCtrs[faceCells[faceI]])
mag(faceCentres[facei] - cellCtrs[faceCells[facei]])
+ VSMALL
);
result[faceCells[faceI]] = max(skewness, result[faceCells[faceI]]);
result[faceCells[facei]] = max(skewness, result[faceCells[facei]]);
}
}
@ -196,35 +196,35 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::faceNonOrthogonality() const
const labelList& own = mesh_.faceOwner();
const labelList& nei = mesh_.faceNeighbour();
forAll(nei, faceI)
forAll(nei, facei)
{
vector d = centres[nei[faceI]] - centres[own[faceI]];
vector s = areas[faceI];
vector d = centres[nei[facei]] - centres[own[facei]];
vector s = areas[facei];
scalar magS = mag(s);
scalar cosDDotS =
radToDeg(Foam::acos(min(1.0, (d & s)/(mag(d)*magS + VSMALL))));
result[faceI] = cosDDotS;
result[facei] = cosDDotS;
}
label globalFaceI = mesh_.nInternalFaces();
forAll(mesh_.boundaryMesh(), patchI)
forAll(mesh_.boundaryMesh(), patchi)
{
const labelUList& faceCells =
mesh_.boundaryMesh()[patchI].faceCells();
mesh_.boundaryMesh()[patchi].faceCells();
const vectorField::subField faceCentres =
mesh_.boundaryMesh()[patchI].faceCentres();
mesh_.boundaryMesh()[patchi].faceCentres();
const vectorField::subField faceAreas =
mesh_.boundaryMesh()[patchI].faceAreas();
mesh_.boundaryMesh()[patchi].faceAreas();
forAll(faceCentres, faceI)
forAll(faceCentres, facei)
{
vector d = faceCentres[faceI] - centres[faceCells[faceI]];
vector s = faceAreas[faceI];
vector d = faceCentres[facei] - centres[faceCells[facei]];
vector s = faceAreas[facei];
scalar magS = mag(s);
scalar cosDDotS =
@ -257,53 +257,53 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::faceSkewness() const
const labelList& own = mesh_.faceOwner();
const labelList& nei = mesh_.faceNeighbour();
forAll(nei, faceI)
forAll(nei, facei)
{
scalar dOwn = mag
(
(faceCtrs[faceI] - cellCtrs[own[faceI]]) & areas[faceI]
)/mag(areas[faceI]);
(faceCtrs[facei] - cellCtrs[own[facei]]) & areas[facei]
)/mag(areas[facei]);
scalar dNei = mag
(
(cellCtrs[nei[faceI]] - faceCtrs[faceI]) & areas[faceI]
)/mag(areas[faceI]);
(cellCtrs[nei[facei]] - faceCtrs[facei]) & areas[facei]
)/mag(areas[facei]);
point faceIntersection =
cellCtrs[own[faceI]]
+ (dOwn/(dOwn+dNei))*(cellCtrs[nei[faceI]] - cellCtrs[own[faceI]]);
cellCtrs[own[facei]]
+ (dOwn/(dOwn+dNei))*(cellCtrs[nei[facei]] - cellCtrs[own[facei]]);
result[faceI] =
mag(faceCtrs[faceI] - faceIntersection)
/(mag(cellCtrs[nei[faceI]] - cellCtrs[own[faceI]]) + VSMALL);
result[facei] =
mag(faceCtrs[facei] - faceIntersection)
/(mag(cellCtrs[nei[facei]] - cellCtrs[own[facei]]) + VSMALL);
}
label globalFaceI = mesh_.nInternalFaces();
forAll(mesh_.boundaryMesh(), patchI)
forAll(mesh_.boundaryMesh(), patchi)
{
const labelUList& faceCells =
mesh_.boundaryMesh()[patchI].faceCells();
mesh_.boundaryMesh()[patchi].faceCells();
const vectorField::subField faceCentres =
mesh_.boundaryMesh()[patchI].faceCentres();
mesh_.boundaryMesh()[patchi].faceCentres();
const vectorField::subField faceAreas =
mesh_.boundaryMesh()[patchI].faceAreas();
mesh_.boundaryMesh()[patchi].faceAreas();
forAll(faceCentres, faceI)
forAll(faceCentres, facei)
{
vector n = faceAreas[faceI]/mag(faceAreas[faceI]);
vector n = faceAreas[facei]/mag(faceAreas[facei]);
point faceIntersection =
cellCtrs[faceCells[faceI]]
+ ((faceCentres[faceI] - cellCtrs[faceCells[faceI]])&n)*n;
cellCtrs[faceCells[facei]]
+ ((faceCentres[facei] - cellCtrs[faceCells[facei]])&n)*n;
result[globalFaceI++] =
mag(faceCentres[faceI] - faceIntersection)
mag(faceCentres[facei] - faceIntersection)
/(
mag(faceCentres[faceI] - cellCtrs[faceCells[faceI]])
mag(faceCentres[facei] - cellCtrs[faceCells[facei]])
+ VSMALL
);
}

View File

@ -67,8 +67,8 @@ void Foam::cylindrical::init
tensorField& R = Rptr_();
forAll(cells, i)
{
label cellI = cells[i];
vector dir = cc[cellI] - origin_;
label celli = cells[i];
vector dir = cc[celli] - origin_;
dir /= mag(dir) + VSMALL;
R[i] = axesRotation(e3_, dir).R();
@ -79,12 +79,12 @@ void Foam::cylindrical::init
Rptr_.reset(new tensorField(mesh.nCells()));
tensorField& R = Rptr_();
forAll(cc, cellI)
forAll(cc, celli)
{
vector dir = cc[cellI] - origin_;
vector dir = cc[celli] - origin_;
dir /= mag(dir) + VSMALL;
R[cellI] = axesRotation(e3_, dir).R();
R[celli] = axesRotation(e3_, dir).R();
}
}
}
@ -194,11 +194,11 @@ void Foam::cylindrical::updateCells
forAll(cells, i)
{
label cellI = cells[i];
vector dir = cc[cellI] - origin_;
label celli = cells[i];
vector dir = cc[celli] - origin_;
dir /= mag(dir) + VSMALL;
R[cellI] = axesRotation(e3_, dir).R();
R[celli] = axesRotation(e3_, dir).R();
}
}
@ -307,8 +307,8 @@ Foam::tmp<Foam::tensorField> Foam::cylindrical::transformTensor
tensorField& t = tt.ref();
forAll(cellMap, i)
{
const label cellI = cellMap[i];
t[i] = R[cellI] & tf[i] & Rtr[cellI];
const label celli = cellMap[i];
t[i] = R[celli] & tf[i] & Rtr[celli];
}
return tt;

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
@ -120,11 +120,11 @@ class edgeFaceCirculator
inline void setEnd();
//- Check and set faceLabel_ and ownerSide_
inline void setFace(const label faceI, const label cellI);
inline void setFace(const label facei, const label celli);
//- Set faceLabel_ to be the other face on the cell that uses the
// edge.
inline void otherFace(const label cellI);
inline void otherFace(const label celli);
public:

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
@ -36,29 +36,29 @@ void Foam::edgeFaceCirculator::setEnd()
void Foam::edgeFaceCirculator::setFace
(
const label faceI,
const label cellI
const label facei,
const label celli
)
{
faceLabel_ = faceI;
faceLabel_ = facei;
if (!isBoundaryEdge_ && !mesh_.isInternalFace(faceI))
if (!isBoundaryEdge_ && !mesh_.isInternalFace(facei))
{
FatalErrorInFunction
<< "Edge is not defined as boundary edge but still walked to"
<< " boundary face:" << faceI << " on cell:" << cellI
<< " boundary face:" << facei << " on cell:" << celli
<< abort(FatalError);
}
}
void Foam::edgeFaceCirculator::otherFace(const label cellI)
void Foam::edgeFaceCirculator::otherFace(const label celli)
{
const face& f = mesh_.faces()[faceLabel_];
label v0 = f[index_];
label v1 = f.nextLabel(index_);
const cell& cFaces = mesh_.cells()[cellI];
const cell& cFaces = mesh_.cells()[celli];
forAll(cFaces, i)
{
@ -71,7 +71,7 @@ void Foam::edgeFaceCirculator::otherFace(const label cellI)
if (fp >= 0)
{
index_ = fp;
setFace(faceB, cellI);
setFace(faceB, celli);
return;
}
}
@ -220,17 +220,17 @@ void Foam::edgeFaceCirculator::setCanonical()
{
if (ownerSide_)
{
label cellI = mesh_.faceNeighbour()[faceLabel_];
otherFace(cellI);
label celli = mesh_.faceNeighbour()[faceLabel_];
otherFace(celli);
// Maintain reverse direction of walking
ownerSide_ = (mesh_.faceOwner()[faceLabel_] == cellI);
ownerSide_ = (mesh_.faceOwner()[faceLabel_] == celli);
}
else
{
label cellI = mesh_.faceOwner()[faceLabel_];
otherFace(cellI);
label celli = mesh_.faceOwner()[faceLabel_];
otherFace(celli);
// Maintain reverse direction of walking
ownerSide_ = (mesh_.faceOwner()[faceLabel_] == cellI);
ownerSide_ = (mesh_.faceOwner()[faceLabel_] == celli);
}
}
else if (ownerSide_)
@ -239,10 +239,10 @@ void Foam::edgeFaceCirculator::setCanonical()
}
else
{
label cellI = mesh_.faceOwner()[faceLabel_];
otherFace(cellI);
label celli = mesh_.faceOwner()[faceLabel_];
otherFace(celli);
// Maintain reverse direction of walking
ownerSide_ = (mesh_.faceOwner()[faceLabel_] == cellI);
ownerSide_ = (mesh_.faceOwner()[faceLabel_] == celli);
}
i++;
@ -360,10 +360,10 @@ Foam::edgeFaceCirculator::operator++()
else if (ownerSide_)
{
// Step to owner
label cellI = mesh_.faceOwner()[faceLabel_];
otherFace(cellI);
label celli = mesh_.faceOwner()[faceLabel_];
otherFace(celli);
// Maintain direction of walking
ownerSide_ = (mesh_.faceOwner()[faceLabel_] != cellI);
ownerSide_ = (mesh_.faceOwner()[faceLabel_] != celli);
// Check for internal edge : ends on starting face.
if (!isBoundaryEdge_ && faceLabel_ == startFaceLabel_)
@ -374,10 +374,10 @@ Foam::edgeFaceCirculator::operator++()
else if (mesh_.isInternalFace(faceLabel_))
{
// Step to neighbour
label cellI = mesh_.faceNeighbour()[faceLabel_];
otherFace(cellI);
label celli = mesh_.faceNeighbour()[faceLabel_];
otherFace(celli);
// Maintain direction of walking
ownerSide_ = (mesh_.faceOwner()[faceLabel_] != cellI);
ownerSide_ = (mesh_.faceOwner()[faceLabel_] != celli);
// Check for internal edge : ends on starting face.
if (!isBoundaryEdge_ && faceLabel_ == startFaceLabel_)

View File

@ -39,11 +39,11 @@ namespace Foam
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
Foam::treeBoundBox Foam::treeDataFace::calcBb(const label faceI) const
Foam::treeBoundBox Foam::treeDataFace::calcBb(const label facei) const
{
const pointField& points = mesh_.points();
const face& f = mesh_.faces()[faceI];
const face& f = mesh_.faces()[facei];
treeBoundBox bb(points[f[0]], points[f[0]]);
@ -207,12 +207,12 @@ Foam::volumeType Foam::treeDataFace::getVolumeType
// Get actual intersection point on face
label faceI = faceLabels_[info.index()];
label facei = faceLabels_[info.index()];
if (debug & 2)
{
Pout<< "getSampleType : sample:" << sample
<< " nearest face:" << faceI;
<< " nearest face:" << facei;
}
const pointField& points = mesh_.points();
@ -220,9 +220,9 @@ Foam::volumeType Foam::treeDataFace::getVolumeType
// Retest to classify where on face info is. Note: could be improved. We
// already have point.
const face& f = mesh_.faces()[faceI];
const vector& area = mesh_.faceAreas()[faceI];
const point& fc = mesh_.faceCentres()[faceI];
const face& f = mesh_.faces()[facei];
const vector& area = mesh_.faceAreas()[facei];
const point& fc = mesh_.faceCentres()[facei];
pointHit curHit = f.nearestPoint(sample, points);
const point& curPt = curHit.rawPoint();
@ -312,7 +312,7 @@ Foam::volumeType Foam::treeDataFace::getVolumeType
// 3] Get the 'real' edge the face intersection is on
//
const labelList& myEdges = mesh_.faceEdges()[faceI];
const labelList& myEdges = mesh_.faceEdges()[facei];
forAll(myEdges, myEdgeI)
{
@ -413,7 +413,7 @@ Foam::volumeType Foam::treeDataFace::getVolumeType
if (debug & 2)
{
Pout<< "Did not find sample " << sample
<< " anywhere related to nearest face " << faceI << endl
<< " anywhere related to nearest face " << facei << endl
<< "Face:";
forAll(f, fp)
@ -459,9 +459,9 @@ bool Foam::treeDataFace::overlaps
// 2. Check if one or more face points inside
label faceI = faceLabels_[index];
label facei = faceLabels_[index];
const face& f = mesh_.faces()[faceI];
const face& f = mesh_.faces()[facei];
if (cubeBb.containsAny(points, f))
{
return true;
@ -469,7 +469,7 @@ bool Foam::treeDataFace::overlaps
// 3. Difficult case: all points are outside but connecting edges might
// go through cube. Use triangle-bounding box intersection.
const point& fc = mesh_.faceCentres()[faceI];
const point& fc = mesh_.faceCentres()[facei];
forAll(f, fp)
{
@ -558,15 +558,15 @@ bool Foam::treeDataFace::findIntersectOp::operator()
}
}
const label faceI = shape.faceLabels_[index];
const label facei = shape.faceLabels_[index];
const vector dir(end - start);
pointHit inter = shape.mesh_.faces()[faceI].intersection
pointHit inter = shape.mesh_.faces()[facei].intersection
(
start,
dir,
shape.mesh_.faceCentres()[faceI],
shape.mesh_.faceCentres()[facei],
shape.mesh_.points(),
intersection::HALF_RAY
);

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
@ -85,7 +85,7 @@ class treeDataFace
// Private Member Functions
//- Calculate face bounding box
treeBoundBox calcBb(const label cellI) const;
treeBoundBox calcBb(const label celli) const;
//- Initialise all member data
void update();

View File

@ -175,16 +175,16 @@ Foam::volumeType Foam::treeDataPrimitivePatch<PatchType>::getVolumeType
}
// Get actual intersection point on face
label faceI = info.index();
label facei = info.index();
if (debug & 2)
{
Pout<< "getSampleType : sample:" << sample
<< " nearest face:" << faceI;
<< " nearest face:" << facei;
}
const pointField& points = patch_.localPoints();
const typename PatchType::FaceType& f = patch_.localFaces()[faceI];
const typename PatchType::FaceType& f = patch_.localFaces()[facei];
// Retest to classify where on face info is. Note: could be improved. We
// already have point.
@ -269,7 +269,7 @@ Foam::volumeType Foam::treeDataPrimitivePatch<PatchType>::getVolumeType
// 3] Get the 'real' edge the face intersection is on
//
const labelList& fEdges = patch_.faceEdges()[faceI];
const labelList& fEdges = patch_.faceEdges()[facei];
forAll(fEdges, fEdgeI)
{
@ -359,7 +359,7 @@ Foam::volumeType Foam::treeDataPrimitivePatch<PatchType>::getVolumeType
if (debug & 2)
{
Pout<< "Did not find sample " << sample
<< " anywhere related to nearest face " << faceI << endl
<< " anywhere related to nearest face " << facei << endl
<< "Face:";
forAll(f, fp)

View File

@ -46,13 +46,13 @@ Foam::volumeType Foam::treeDataPrimitivePatch<Foam::triSurface>::getVolumeType
}
// Get actual intersection point on face
label faceI = info.index();
label facei = info.index();
triSurfaceTools::sideType t = triSurfaceTools::surfaceSide
(
patch_,
sample,
faceI
facei
);
if (t == triSurfaceTools::UNKNOWN)

View File

@ -101,12 +101,12 @@ Foam::tmp<Foam::pointField> Foam::mappedPatchBase::facePoints
tmp<pointField> tfacePoints(new pointField(patch_.size()));
pointField& facePoints = tfacePoints.ref();
forAll(pp, faceI)
forAll(pp, facei)
{
facePoints[faceI] = facePoint
facePoints[facei] = facePoint
(
mesh,
pp.start()+faceI,
pp.start()+facei,
polyMesh::FACE_DIAG_TRIS
).rawPoint();
}
@ -220,22 +220,22 @@ void Foam::mappedPatchBase::findSamples
{
const point& sample = samples[sampleI];
label cellI = tree.findInside(sample);
label celli = tree.findInside(sample);
if (cellI == -1)
if (celli == -1)
{
nearest[sampleI].second().first() = Foam::sqr(GREAT);
nearest[sampleI].second().second() = Pstream::myProcNo();
}
else
{
const point& cc = mesh.cellCentres()[cellI];
const point& cc = mesh.cellCentres()[celli];
nearest[sampleI].first() = pointIndexHit
(
true,
cc,
cellI
celli
);
nearest[sampleI].second().first() = magSqr(cc-sample);
nearest[sampleI].second().second() = Pstream::myProcNo();
@ -433,22 +433,22 @@ void Foam::mappedPatchBase::findSamples
{
const point& sample = samples[sampleI];
label faceI = meshSearchEngine.findNearestFace(sample);
label facei = meshSearchEngine.findNearestFace(sample);
if (faceI == -1)
if (facei == -1)
{
nearest[sampleI].second().first() = Foam::sqr(GREAT);
nearest[sampleI].second().second() = Pstream::myProcNo();
}
else
{
const point& fc = mesh.faceCentres()[faceI];
const point& fc = mesh.faceCentres()[facei];
nearest[sampleI].first() = pointIndexHit
(
true,
fc,
faceI
facei
);
nearest[sampleI].second().first() = magSqr(fc-sample);
nearest[sampleI].second().second() = Pstream::myProcNo();
@ -738,29 +738,29 @@ void Foam::mappedPatchBase::calcMapping() const
forAll(map, i)
{
label faceI = map[i];
label facei = map[i];
if (used[faceI] == 0)
if (used[facei] == 0)
{
used[faceI] = 1;
used[facei] = 1;
}
else
{
FatalErrorInFunction
<< "On patch " << patch_.name()
<< " patchface " << faceI
<< " patchface " << facei
<< " is assigned to more than once."
<< abort(FatalError);
}
}
}
forAll(used, faceI)
forAll(used, facei)
{
if (used[faceI] == 0)
if (used[facei] == 0)
{
FatalErrorInFunction
<< "On patch " << patch_.name()
<< " patchface " << faceI
<< " patchface " << facei
<< " is never assigned to."
<< abort(FatalError);
}
@ -1246,9 +1246,9 @@ const Foam::polyPatch& Foam::mappedPatchBase::samplePolyPatch() const
{
const polyMesh& nbrMesh = sampleMesh();
const label patchI = nbrMesh.boundaryMesh().findPatchID(samplePatch());
const label patchi = nbrMesh.boundaryMesh().findPatchID(samplePatch());
if (patchI == -1)
if (patchi == -1)
{
FatalErrorInFunction
<< "Cannot find patch " << samplePatch()
@ -1257,7 +1257,7 @@ const Foam::polyPatch& Foam::mappedPatchBase::samplePolyPatch() const
<< exit(FatalError);
}
return nbrMesh.boundaryMesh()[patchI];
return nbrMesh.boundaryMesh()[patchi];
}
@ -1305,11 +1305,11 @@ Foam::tmp<Foam::pointField> Foam::mappedPatchBase::samplePoints() const
Foam::pointIndexHit Foam::mappedPatchBase::facePoint
(
const polyMesh& mesh,
const label faceI,
const label facei,
const polyMesh::cellDecomposition decompMode
)
{
const point& fc = mesh.faceCentres()[faceI];
const point& fc = mesh.faceCentres()[facei];
switch (decompMode)
{
@ -1318,7 +1318,7 @@ Foam::pointIndexHit Foam::mappedPatchBase::facePoint
{
// For both decompositions the face centre is guaranteed to be
// on the face
return pointIndexHit(true, fc, faceI);
return pointIndexHit(true, fc, facei);
}
break;
@ -1330,7 +1330,7 @@ Foam::pointIndexHit Foam::mappedPatchBase::facePoint
// cell-centre with face-diagonal-decomposition triangles.
const pointField& p = mesh.points();
const face& f = mesh.faces()[faceI];
const face& f = mesh.faces()[facei];
if (f.size() <= 3)
{
@ -1338,11 +1338,11 @@ Foam::pointIndexHit Foam::mappedPatchBase::facePoint
return pointIndexHit(true, fc, 0);
}
label cellI = mesh.faceOwner()[faceI];
const point& cc = mesh.cellCentres()[cellI];
label celli = mesh.faceOwner()[facei];
const point& cc = mesh.cellCentres()[celli];
vector d = fc-cc;
const label fp0 = mesh.tetBasePtIs()[faceI];
const label fp0 = mesh.tetBasePtIs()[facei];
const point& basePoint = p[f[fp0]];
label fp = f.fcIndex(fp0);

View File

@ -414,7 +414,7 @@ public:
static pointIndexHit facePoint
(
const polyMesh&,
const label faceI,
const label facei,
const polyMesh::cellDecomposition
);

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
@ -297,14 +297,14 @@ Foam::label Foam::meshSearch::findCellLinear(const point& location) const
bool cellFound = false;
label n = 0;
label cellI = -1;
label celli = -1;
while ((!cellFound) && (n < mesh_.nCells()))
{
if (mesh_.pointInCell(location, n, cellDecompMode_))
{
cellFound = true;
cellI = n;
celli = n;
}
else
{
@ -313,7 +313,7 @@ Foam::label Foam::meshSearch::findCellLinear(const point& location) const
}
if (cellFound)
{
return cellI;
return celli;
}
else
{
@ -354,29 +354,29 @@ Foam::label Foam::meshSearch::findCellWalk
forAll(cFaces, i)
{
label faceI = cFaces[i];
label facei = cFaces[i];
if (mesh_.isInternalFace(faceI))
if (mesh_.isInternalFace(facei))
{
label cellI = mesh_.faceOwner()[faceI];
if (cellI == curCellI)
label celli = mesh_.faceOwner()[facei];
if (celli == curCellI)
{
cellI = mesh_.faceNeighbour()[faceI];
celli = mesh_.faceNeighbour()[facei];
}
// Check if this is the correct cell
if (mesh_.pointInCell(location, cellI, cellDecompMode_))
if (mesh_.pointInCell(location, celli, cellDecompMode_))
{
return cellI;
return celli;
}
// Also calculate the nearest cell
scalar distSqr = magSqr(mesh_.cellCentres()[cellI] - location);
scalar distSqr = magSqr(mesh_.cellCentres()[celli] - location);
if (distSqr < nearestDistSqr)
{
nearestDistSqr = distSqr;
nearestCellI = cellI;
nearestCellI = celli;
}
}
}
@ -440,15 +440,15 @@ Foam::label Foam::meshSearch::findNearestBoundaryFaceWalk
forAll(neighbours, nI)
{
label faceI = neighbours[nI];
label facei = neighbours[nI];
if
(
(faceI >= mesh_.nInternalFaces())
&& (faceI != lastFaceI)
(facei >= mesh_.nInternalFaces())
&& (facei != lastFaceI)
)
{
const face& f = mesh_.faces()[faceI];
const face& f = mesh_.faces()[facei];
pointHit curHit = f.nearestPoint
(
@ -460,7 +460,7 @@ Foam::label Foam::meshSearch::findNearestBoundaryFaceWalk
if (curHit.distance() < minDist)
{
minDist = curHit.distance();
curFaceI = faceI;
curFaceI = facei;
closer = true; // a closer neighbour has been found
}
}
@ -644,18 +644,18 @@ const
//// Works by checking if there is a face inbetween the point and the cell
//// centre.
//// Check for internal uses proper face decomposition or just average normal.
//bool Foam::meshSearch::pointInCell(const point& p, label cellI) const
//bool Foam::meshSearch::pointInCell(const point& p, label celli) const
//{
// if (faceDecomp_)
// {
// const point& ctr = mesh_.cellCentres()[cellI];
// const point& ctr = mesh_.cellCentres()[celli];
//
// vector dir(p - ctr);
// scalar magDir = mag(dir);
//
// // Check if any faces are hit by ray from cell centre to p.
// // If none -> p is in cell.
// const labelList& cFaces = mesh_.cells()[cellI];
// const labelList& cFaces = mesh_.cells()[celli];
//
// // Make sure half_ray does not pick up any faces on the wrong
// // side of the ray.
@ -663,9 +663,9 @@ const
//
// forAll(cFaces, i)
// {
// label faceI = cFaces[i];
// label facei = cFaces[i];
//
// pointHit inter = mesh_.faces()[faceI].ray
// pointHit inter = mesh_.faces()[facei].ray
// (
// ctr,
// dir,
@ -695,7 +695,7 @@ const
// }
// else
// {
// const labelList& f = mesh_.cells()[cellI];
// const labelList& f = mesh_.cells()[celli];
// const labelList& owner = mesh_.faceOwner();
// const vectorField& cf = mesh_.faceCentres();
// const vectorField& Sf = mesh_.faceAreas();
@ -705,7 +705,7 @@ const
// label nFace = f[facei];
// vector proj = p - cf[nFace];
// vector normal = Sf[nFace];
// if (owner[nFace] == cellI)
// if (owner[nFace] == celli)
// {
// if ((normal & proj) > 0)
// {
@ -840,12 +840,12 @@ Foam::label Foam::meshSearch::findNearestBoundaryFace
for
(
label faceI = mesh_.nInternalFaces();
faceI < mesh_.nFaces();
faceI++
label facei = mesh_.nInternalFaces();
facei < mesh_.nFaces();
facei++
)
{
const face& f = mesh_.faces()[faceI];
const face& f = mesh_.faces()[facei];
pointHit curHit =
f.nearestPoint
@ -857,7 +857,7 @@ Foam::label Foam::meshSearch::findNearestBoundaryFace
if (curHit.distance() < minDist)
{
minDist = curHit.distance();
minFaceI = faceI;
minFaceI = facei;
}
}
return minFaceI;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -43,10 +43,10 @@ bool Foam::meshStructure::isStructuredCell
(
const polyMesh& mesh,
const label layerI,
const label cellI
const label celli
) const
{
const cell& cFaces = mesh.cells()[cellI];
const cell& cFaces = mesh.cells()[celli];
// Count number of side faces
label nSide = 0;
@ -142,10 +142,10 @@ void Foam::meshStructure::correct
cellToPatchFaceAddressing_.setSize(mesh.nCells());
cellLayer_.setSize(mesh.nCells());
forAll(cellToPatchFaceAddressing_, cellI)
forAll(cellToPatchFaceAddressing_, celli)
{
cellToPatchFaceAddressing_[cellI] = cellData[cellI].data();
cellLayer_[cellI] = cellData[cellI].distance();
cellToPatchFaceAddressing_[celli] = cellData[celli].data();
cellLayer_[celli] = cellData[celli].distance();
}
@ -158,43 +158,43 @@ void Foam::meshStructure::correct
faceToPatchEdgeAddressing_ = labelMin;
faceLayer_.setSize(mesh.nFaces());
forAll(faceToPatchFaceAddressing_, faceI)
forAll(faceToPatchFaceAddressing_, facei)
{
label own = mesh.faceOwner()[faceI];
label patchFaceI = faceData[faceI].data();
label patchDist = faceData[faceI].distance();
label own = mesh.faceOwner()[facei];
label patchFaceI = faceData[facei].data();
label patchDist = faceData[facei].distance();
if (mesh.isInternalFace(faceI))
if (mesh.isInternalFace(facei))
{
label nei = mesh.faceNeighbour()[faceI];
label nei = mesh.faceNeighbour()[facei];
if (cellData[own].distance() == cellData[nei].distance())
{
// side face
faceToPatchFaceAddressing_[faceI] = 0;
faceLayer_[faceI] = cellData[own].distance();
faceToPatchFaceAddressing_[facei] = 0;
faceLayer_[facei] = cellData[own].distance();
}
else if (cellData[own].distance() < cellData[nei].distance())
{
// unturned face
faceToPatchFaceAddressing_[faceI] = patchFaceI+1;
faceToPatchEdgeAddressing_[faceI] = -1;
faceLayer_[faceI] = patchDist;
faceToPatchFaceAddressing_[facei] = patchFaceI+1;
faceToPatchEdgeAddressing_[facei] = -1;
faceLayer_[facei] = patchDist;
}
else
{
// turned face
faceToPatchFaceAddressing_[faceI] = -(patchFaceI+1);
faceToPatchEdgeAddressing_[faceI] = -1;
faceLayer_[faceI] = patchDist;
faceToPatchFaceAddressing_[facei] = -(patchFaceI+1);
faceToPatchEdgeAddressing_[facei] = -1;
faceLayer_[facei] = patchDist;
}
}
else if (patchDist == cellData[own].distance())
{
// starting face
faceToPatchFaceAddressing_[faceI] = -(patchFaceI+1);
faceToPatchEdgeAddressing_[faceI] = -1;
faceLayer_[faceI] = patchDist;
faceToPatchFaceAddressing_[facei] = -(patchFaceI+1);
faceToPatchEdgeAddressing_[facei] = -1;
faceLayer_[facei] = patchDist;
}
else
{
@ -261,14 +261,14 @@ void Foam::meshStructure::correct
}
// Look up on faces
forAll(faceToPatchEdgeAddressing_, faceI)
forAll(faceToPatchEdgeAddressing_, facei)
{
if (faceToPatchEdgeAddressing_[faceI] == labelMin)
if (faceToPatchEdgeAddressing_[facei] == labelMin)
{
// Face not yet done. Check if all points on same level
// or if not see what edge it originates from
const face& f = mesh.faces()[faceI];
const face& f = mesh.faces()[facei];
label levelI = pointLayer_[f[0]];
for (label fp = 1; fp < f.size(); fp++)
@ -283,19 +283,19 @@ void Foam::meshStructure::correct
if (levelI != -1)
{
// All same level
//Pout<< "Horizontal boundary face " << faceI
// << " at:" << mesh.faceCentres()[faceI]
// << " data:" << faceData[faceI]
//Pout<< "Horizontal boundary face " << facei
// << " at:" << mesh.faceCentres()[facei]
// << " data:" << faceData[facei]
// << " pointDatas:"
// << UIndirectList<pointTopoDistanceData>(pointData, f)
// << endl;
label patchFaceI = faceData[faceI].data();
label patchDist = faceData[faceI].distance();
label patchFaceI = faceData[facei].data();
label patchDist = faceData[facei].distance();
faceToPatchEdgeAddressing_[faceI] = -1;
faceToPatchFaceAddressing_[faceI] = patchFaceI+1;
faceLayer_[faceI] = patchDist;
faceToPatchEdgeAddressing_[facei] = -1;
faceToPatchFaceAddressing_[facei] = patchFaceI+1;
faceLayer_[facei] = patchDist;
}
else
{
@ -317,10 +317,10 @@ void Foam::meshStructure::correct
);
if (fnd != pointsToEdge.end())
{
faceToPatchEdgeAddressing_[faceI] = fnd();
faceToPatchFaceAddressing_[faceI] = 0;
label own = mesh.faceOwner()[faceI];
faceLayer_[faceI] = cellData[own].distance();
faceToPatchEdgeAddressing_[facei] = fnd();
faceToPatchFaceAddressing_[facei] = 0;
label own = mesh.faceOwner()[facei];
faceLayer_[facei] = cellData[own].distance();
// Note: could test whether the other edges on the
// face are consistent
@ -346,13 +346,13 @@ void Foam::meshStructure::correct
forAll(lCells, lCellI)
{
label cellI = lCells[lCellI];
label celli = lCells[lCellI];
structured_ = isStructuredCell
(
mesh,
layerI,
cellI
celli
);
if (!structured_)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -88,7 +88,7 @@ class meshStructure
(
const polyMesh& mesh,
const label layerI,
const label cellI
const label celli
) const;
//- Calculate all maps.

View File

@ -284,39 +284,39 @@ void Foam::meshTools::writeOBJ
bool Foam::meshTools::edgeOnCell
(
const primitiveMesh& mesh,
const label cellI,
const label celli,
const label edgeI
)
{
return findIndex(mesh.edgeCells(edgeI), cellI) != -1;
return findIndex(mesh.edgeCells(edgeI), celli) != -1;
}
bool Foam::meshTools::edgeOnFace
(
const primitiveMesh& mesh,
const label faceI,
const label facei,
const label edgeI
)
{
return findIndex(mesh.faceEdges(faceI), edgeI) != -1;
return findIndex(mesh.faceEdges(facei), edgeI) != -1;
}
// Return true if faceI part of cellI
// Return true if facei part of celli
bool Foam::meshTools::faceOnCell
(
const primitiveMesh& mesh,
const label cellI,
const label faceI
const label celli,
const label facei
)
{
if (mesh.isInternalFace(faceI))
if (mesh.isInternalFace(facei))
{
if
(
(mesh.faceOwner()[faceI] == cellI)
|| (mesh.faceNeighbour()[faceI] == cellI)
(mesh.faceOwner()[facei] == celli)
|| (mesh.faceNeighbour()[facei] == celli)
)
{
return true;
@ -324,7 +324,7 @@ bool Foam::meshTools::faceOnCell
}
else
{
if (mesh.faceOwner()[faceI] == cellI)
if (mesh.faceOwner()[facei] == celli)
{
return true;
}
@ -426,18 +426,18 @@ Foam::label Foam::meshTools::getSharedFace
forAll(cFaces, cFaceI)
{
label faceI = cFaces[cFaceI];
label facei = cFaces[cFaceI];
if
(
mesh.isInternalFace(faceI)
mesh.isInternalFace(facei)
&& (
mesh.faceOwner()[faceI] == cell1I
|| mesh.faceNeighbour()[faceI] == cell1I
mesh.faceOwner()[facei] == cell1I
|| mesh.faceNeighbour()[facei] == cell1I
)
)
{
return faceI;
return facei;
}
}
@ -453,11 +453,11 @@ Foam::label Foam::meshTools::getSharedFace
}
// Get the two faces on cellI using edgeI.
// Get the two faces on celli using edgeI.
void Foam::meshTools::getEdgeFaces
(
const primitiveMesh& mesh,
const label cellI,
const label celli,
const label edgeI,
label& face0,
label& face1
@ -470,17 +470,17 @@ void Foam::meshTools::getEdgeFaces
forAll(eFaces, eFaceI)
{
label faceI = eFaces[eFaceI];
label facei = eFaces[eFaceI];
if (faceOnCell(mesh, cellI, faceI))
if (faceOnCell(mesh, celli, facei))
{
if (face0 == -1)
{
face0 = faceI;
face0 = facei;
}
else
{
face1 = faceI;
face1 = facei;
return;
}
@ -491,7 +491,7 @@ void Foam::meshTools::getEdgeFaces
{
FatalErrorInFunction
<< "Can not find faces using edge " << mesh.edges()[edgeI]
<< " on cell " << cellI << abort(FatalError);
<< " on cell " << celli << abort(FatalError);
}
}
@ -535,17 +535,17 @@ Foam::label Foam::meshTools::otherEdge
Foam::label Foam::meshTools::otherFace
(
const primitiveMesh& mesh,
const label cellI,
const label faceI,
const label celli,
const label facei,
const label edgeI
)
{
label face0;
label face1;
getEdgeFaces(mesh, cellI, edgeI, face0, face1);
getEdgeFaces(mesh, celli, edgeI, face0, face1);
if (face0 == faceI)
if (face0 == facei)
{
return face1;
}
@ -561,21 +561,21 @@ Foam::label Foam::meshTools::otherCell
(
const primitiveMesh& mesh,
const label otherCellI,
const label faceI
const label facei
)
{
if (!mesh.isInternalFace(faceI))
if (!mesh.isInternalFace(facei))
{
FatalErrorInFunction
<< "Face " << faceI << " is not internal"
<< "Face " << facei << " is not internal"
<< abort(FatalError);
}
label newCellI = mesh.faceOwner()[faceI];
label newCellI = mesh.faceOwner()[facei];
if (newCellI == otherCellI)
{
newCellI = mesh.faceNeighbour()[faceI];
newCellI = mesh.faceNeighbour()[facei];
}
return newCellI;
}
@ -586,13 +586,13 @@ Foam::label Foam::meshTools::otherCell
Foam::label Foam::meshTools::walkFace
(
const primitiveMesh& mesh,
const label faceI,
const label facei,
const label startEdgeI,
const label startVertI,
const label nEdges
)
{
const labelList& fEdges = mesh.faceEdges(faceI);
const labelList& fEdges = mesh.faceEdges(facei);
label edgeI = startEdgeI;
@ -720,7 +720,7 @@ void Foam::meshTools::constrainDirection
void Foam::meshTools::getParallelEdges
(
const primitiveMesh& mesh,
const label cellI,
const label celli,
const label e0,
label& e1,
label& e2,
@ -728,32 +728,32 @@ void Foam::meshTools::getParallelEdges
)
{
// Go to any face using e0
label faceI = meshTools::otherFace(mesh, cellI, -1, e0);
label facei = meshTools::otherFace(mesh, celli, -1, e0);
// Opposite edge on face
e1 = meshTools::walkFace(mesh, faceI, e0, mesh.edges()[e0].end(), 2);
e1 = meshTools::walkFace(mesh, facei, e0, mesh.edges()[e0].end(), 2);
faceI = meshTools::otherFace(mesh, cellI, faceI, e1);
facei = meshTools::otherFace(mesh, celli, facei, e1);
e2 = meshTools::walkFace(mesh, faceI, e1, mesh.edges()[e1].end(), 2);
e2 = meshTools::walkFace(mesh, facei, e1, mesh.edges()[e1].end(), 2);
faceI = meshTools::otherFace(mesh, cellI, faceI, e2);
facei = meshTools::otherFace(mesh, celli, facei, e2);
e3 = meshTools::walkFace(mesh, faceI, e2, mesh.edges()[e2].end(), 2);
e3 = meshTools::walkFace(mesh, facei, e2, mesh.edges()[e2].end(), 2);
}
Foam::vector Foam::meshTools::edgeToCutDir
(
const primitiveMesh& mesh,
const label cellI,
const label celli,
const label startEdgeI
)
{
if (!hexMatcher().isA(mesh, cellI))
if (!hexMatcher().isA(mesh, celli))
{
FatalErrorInFunction
<< "Not a hex : cell:" << cellI << abort(FatalError);
<< "Not a hex : cell:" << celli << abort(FatalError);
}
@ -761,12 +761,12 @@ Foam::vector Foam::meshTools::edgeToCutDir
label edgeI = startEdgeI;
label faceI = -1;
label facei = -1;
for (label i = 0; i < 3; i++)
{
// Step to next face, next edge
faceI = meshTools::otherFace(mesh, cellI, faceI, edgeI);
facei = meshTools::otherFace(mesh, celli, facei, edgeI);
vector eVec(normEdgeVec(mesh, edgeI));
@ -781,7 +781,7 @@ Foam::vector Foam::meshTools::edgeToCutDir
label vertI = mesh.edges()[edgeI].end();
edgeI = meshTools::walkFace(mesh, faceI, edgeI, vertI, 2);
edgeI = meshTools::walkFace(mesh, facei, edgeI, vertI, 2);
}
avgVec /= mag(avgVec) + VSMALL;
@ -794,17 +794,17 @@ Foam::vector Foam::meshTools::edgeToCutDir
Foam::label Foam::meshTools::cutDirToEdge
(
const primitiveMesh& mesh,
const label cellI,
const label celli,
const vector& cutDir
)
{
if (!hexMatcher().isA(mesh, cellI))
if (!hexMatcher().isA(mesh, celli))
{
FatalErrorInFunction
<< "Not a hex : cell:" << cellI << abort(FatalError);
<< "Not a hex : cell:" << celli << abort(FatalError);
}
const labelList& cEdges = mesh.cellEdges()[cellI];
const labelList& cEdges = mesh.cellEdges()[celli];
labelHashSet doneEdges(2*cEdges.size());
@ -819,7 +819,7 @@ Foam::label Foam::meshTools::cutDirToEdge
if (!doneEdges.found(e0))
{
vector avgDir(edgeToCutDir(mesh, cellI, e0));
vector avgDir(edgeToCutDir(mesh, celli, e0));
scalar cosAngle = mag(avgDir & cutDir);
@ -831,7 +831,7 @@ Foam::label Foam::meshTools::cutDirToEdge
// Mark off edges in cEdges.
label e1, e2, e3;
getParallelEdges(mesh, cellI, e0, e1, e2, e3);
getParallelEdges(mesh, celli, e0, e1, e2, e3);
doneEdges.insert(e0);
doneEdges.insert(e1);
@ -846,7 +846,7 @@ Foam::label Foam::meshTools::cutDirToEdge
if (!doneEdges.found(cEdges[cEdgeI]))
{
FatalErrorInFunction
<< "Cell:" << cellI << " edges:" << cEdges << endl
<< "Cell:" << celli << " edges:" << cEdges << endl
<< "Edge:" << cEdges[cEdgeI] << " not yet handled"
<< abort(FatalError);
}
@ -856,7 +856,7 @@ Foam::label Foam::meshTools::cutDirToEdge
{
FatalErrorInFunction
<< "Problem : did not find edge aligned with " << cutDir
<< " on cell " << cellI << abort(FatalError);
<< " on cell " << celli << abort(FatalError);
}
return maxEdgeI;

View File

@ -171,7 +171,7 @@ namespace meshTools
bool edgeOnCell
(
const primitiveMesh&,
const label cellI,
const label celli,
const label edgeI
);
@ -179,7 +179,7 @@ namespace meshTools
bool edgeOnFace
(
const primitiveMesh&,
const label faceI,
const label facei,
const label edgeI
);
@ -187,8 +187,8 @@ namespace meshTools
bool faceOnCell
(
const primitiveMesh&,
const label cellI,
const label faceI
const label celli,
const label facei
);
//- Return edge among candidates that uses the two vertices.
@ -228,7 +228,7 @@ namespace meshTools
void getEdgeFaces
(
const primitiveMesh&,
const label cellI,
const label celli,
const label edgeI,
label& face0,
label& face1
@ -244,13 +244,13 @@ namespace meshTools
const label vertI
);
//- Return face on cell using edgeI but not faceI. Throws error
//- Return face on cell using edgeI but not facei. Throws error
// if none found.
label otherFace
(
const primitiveMesh&,
const label cellI,
const label faceI,
const label celli,
const label facei,
const label edgeI
);
@ -259,8 +259,8 @@ namespace meshTools
label otherCell
(
const primitiveMesh&,
const label cellI,
const label faceI
const label celli,
const label facei
);
//- Returns label of edge nEdges away from startEdge (in the direction
@ -268,7 +268,7 @@ namespace meshTools
label walkFace
(
const primitiveMesh&,
const label faceI,
const label facei,
const label startEdgeI,
const label startVertI,
const label nEdges
@ -310,7 +310,7 @@ namespace meshTools
void getParallelEdges
(
const primitiveMesh&,
const label cellI,
const label celli,
const label e0,
label&,
label&,
@ -322,7 +322,7 @@ namespace meshTools
vector edgeToCutDir
(
const primitiveMesh&,
const label cellI,
const label celli,
const label edgeI
);
@ -331,7 +331,7 @@ namespace meshTools
label cutDirToEdge
(
const primitiveMesh&,
const label cellI,
const label celli,
const vector& cutDir
);

View File

@ -320,13 +320,13 @@ Foam::tmp<Foam::tensorField> Foam::momentOfInertia::meshInertia
Foam::tensor Foam::momentOfInertia::meshInertia
(
const polyMesh& mesh,
label cellI
label celli
)
{
List<tetIndices> cellTets = polyMeshTetDecomposition::cellTetIndices
(
mesh,
cellI
celli
);
triFaceList faces(cellTets.size());

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
@ -111,7 +111,7 @@ public:
static tensor meshInertia
(
const polyMesh& mesh,
label cellI
label celli
);
};

View File

@ -76,19 +76,19 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
const faceList& oldFaces = mesh.faces();
const labelListList& pFaces = mesh.pointFaces();
forAll(Cells, cellI)
forAll(Cells, celli)
{
const labelList& curFaces = Cells[cellI];
const edgeList cellEdges = Cells[cellI].edges(oldFaces);
const labelList cellPoints = Cells[cellI].labels(oldFaces);
const labelList& curFaces = Cells[celli];
const edgeList cellEdges = Cells[celli].edges(oldFaces);
const labelList cellPoints = Cells[celli].labels(oldFaces);
// Find the edges used only once in the cell
labelList edgeUsage(cellEdges.size(), 0);
forAll(curFaces, faceI)
forAll(curFaces, facei)
{
edgeList curFaceEdges = oldFaces[curFaces[faceI]].edges();
edgeList curFaceEdges = oldFaces[curFaces[facei]].edges();
forAll(curFaceEdges, faceEdgeI)
{
@ -118,15 +118,15 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
else if (edgeUsage[edgeI] != 2)
{
WarningInFunction
<< "edge " << cellEdges[edgeI] << " in cell " << cellI
<< "edge " << cellEdges[edgeI] << " in cell " << celli
<< " used " << edgeUsage[edgeI] << " times. " << nl
<< "Should be 1 or 2 - serious error "
<< "in mesh structure. " << endl;
#ifdef DEBUG_ZIPUP
forAll(curFaces, faceI)
forAll(curFaces, facei)
{
Info<< "face: " << oldFaces[curFaces[faceI]]
Info<< "face: " << oldFaces[curFaces[facei]]
<< endl;
}
@ -143,7 +143,7 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
#endif
// Gather the problem cell
problemCells.insert(cellI);
problemCells.insert(celli);
}
}
@ -153,11 +153,11 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
singleEdges.setSize(nSingleEdges);
#ifdef DEBUG_ZIPUP
Info<< "Cell " << cellI << endl;
Info<< "Cell " << celli << endl;
forAll(curFaces, faceI)
forAll(curFaces, facei)
{
Info<< "face: " << oldFaces[curFaces[faceI]] << endl;
Info<< "face: " << oldFaces[curFaces[facei]] << endl;
}
Info<< "Cell edges: " << cellEdges << nl
@ -499,7 +499,7 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
<< nl << "Point: " << orderedEdge[checkI]
<< " edge: " << orderedEdge << endl;
problemCells.insert(cellI);
problemCells.insert(celli);
}
}
}
@ -527,12 +527,12 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
facesSharingEdge[nfse++] = endPF[pfI];
}
forAll(facesSharingEdge, faceI)
forAll(facesSharingEdge, facei)
{
bool faceChanges = false;
// Label of the face being analysed
const label currentFaceIndex = facesSharingEdge[faceI];
const label currentFaceIndex = facesSharingEdge[facei];
const edgeList curFaceEdges =
oldFaces[currentFaceIndex].edges();
@ -696,7 +696,7 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
<< " face: "
<< newFace << endl;
problemCells.insert(cellI);
problemCells.insert(celli);
}
}
}
@ -743,10 +743,10 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
labelList patchSizes(bMesh.size(), 0);
labelList patchStarts(bMesh.size(), 0);
forAll(bMesh, patchI)
forAll(bMesh, patchi)
{
patchSizes[patchI] = bMesh[patchI].size();
patchStarts[patchI] = bMesh[patchI].start();
patchSizes[patchi] = bMesh[patchi].size();
patchStarts[patchi] = bMesh[patchi].start();
}
// Reset the mesh. Number of active faces is one beyond the last patch

View File

@ -116,71 +116,71 @@ void Foam::primitiveMeshGeometry::updateCellCentresAndVols
forAll(changedFaces, i)
{
label faceI = changedFaces[i];
cEst[own[faceI]] += faceCentres_[faceI];
nCellFaces[own[faceI]] += 1;
label facei = changedFaces[i];
cEst[own[facei]] += faceCentres_[facei];
nCellFaces[own[facei]] += 1;
if (mesh_.isInternalFace(faceI))
if (mesh_.isInternalFace(facei))
{
cEst[nei[faceI]] += faceCentres_[faceI];
nCellFaces[nei[faceI]] += 1;
cEst[nei[facei]] += faceCentres_[facei];
nCellFaces[nei[facei]] += 1;
}
}
forAll(changedCells, i)
{
label cellI = changedCells[i];
cEst[cellI] /= nCellFaces[cellI];
label celli = changedCells[i];
cEst[celli] /= nCellFaces[celli];
}
forAll(changedFaces, i)
{
label faceI = changedFaces[i];
label facei = changedFaces[i];
// Calculate 3*face-pyramid volume
scalar pyr3Vol = max
(
faceAreas_[faceI] & (faceCentres_[faceI] - cEst[own[faceI]]),
faceAreas_[facei] & (faceCentres_[facei] - cEst[own[facei]]),
VSMALL
);
// Calculate face-pyramid centre
vector pc = (3.0/4.0)*faceCentres_[faceI] + (1.0/4.0)*cEst[own[faceI]];
vector pc = (3.0/4.0)*faceCentres_[facei] + (1.0/4.0)*cEst[own[facei]];
// Accumulate volume-weighted face-pyramid centre
cellCentres_[own[faceI]] += pyr3Vol*pc;
cellCentres_[own[facei]] += pyr3Vol*pc;
// Accumulate face-pyramid volume
cellVolumes_[own[faceI]] += pyr3Vol;
cellVolumes_[own[facei]] += pyr3Vol;
if (mesh_.isInternalFace(faceI))
if (mesh_.isInternalFace(facei))
{
// Calculate 3*face-pyramid volume
scalar pyr3Vol = max
(
faceAreas_[faceI] & (cEst[nei[faceI]] - faceCentres_[faceI]),
faceAreas_[facei] & (cEst[nei[facei]] - faceCentres_[facei]),
VSMALL
);
// Calculate face-pyramid centre
vector pc =
(3.0/4.0)*faceCentres_[faceI]
+ (1.0/4.0)*cEst[nei[faceI]];
(3.0/4.0)*faceCentres_[facei]
+ (1.0/4.0)*cEst[nei[facei]];
// Accumulate volume-weighted face-pyramid centre
cellCentres_[nei[faceI]] += pyr3Vol*pc;
cellCentres_[nei[facei]] += pyr3Vol*pc;
// Accumulate face-pyramid volume
cellVolumes_[nei[faceI]] += pyr3Vol;
cellVolumes_[nei[facei]] += pyr3Vol;
}
}
forAll(changedCells, i)
{
label cellI = changedCells[i];
label celli = changedCells[i];
cellCentres_[cellI] /= cellVolumes_[cellI];
cellVolumes_[cellI] *= (1.0/3.0);
cellCentres_[celli] /= cellVolumes_[celli];
cellVolumes_[celli] *= (1.0/3.0);
}
}
@ -197,13 +197,13 @@ Foam::labelList Foam::primitiveMeshGeometry::affectedCells
forAll(changedFaces, i)
{
label faceI = changedFaces[i];
label facei = changedFaces[i];
affectedCells.insert(own[faceI]);
affectedCells.insert(own[facei]);
if (mesh_.isInternalFace(faceI))
if (mesh_.isInternalFace(facei))
{
affectedCells.insert(nei[faceI]);
affectedCells.insert(nei[facei]);
}
}
return affectedCells.toc();
@ -281,12 +281,12 @@ bool Foam::primitiveMeshGeometry::checkFaceDotProduct
forAll(checkFaces, i)
{
label faceI = checkFaces[i];
label facei = checkFaces[i];
if (mesh.isInternalFace(faceI))
if (mesh.isInternalFace(facei))
{
vector d = cellCentres[nei[faceI]] - cellCentres[own[faceI]];
const vector& s = faceAreas[faceI];
vector d = cellCentres[nei[facei]] - cellCentres[own[facei]];
const vector& s = faceAreas[facei];
scalar dDotS = (d & s)/(mag(d)*mag(s) + VSMALL);
@ -297,16 +297,16 @@ bool Foam::primitiveMeshGeometry::checkFaceDotProduct
if (report)
{
// Severe non-orthogonality but mesh still OK
Pout<< "Severe non-orthogonality for face " << faceI
<< " between cells " << own[faceI]
<< " and " << nei[faceI]
Pout<< "Severe non-orthogonality for face " << facei
<< " between cells " << own[facei]
<< " and " << nei[facei]
<< ": Angle = " << radToDeg(::acos(dDotS))
<< " deg." << endl;
}
if (setPtr)
{
setPtr->insert(faceI);
setPtr->insert(facei);
}
severeNonOrth++;
@ -318,9 +318,9 @@ bool Foam::primitiveMeshGeometry::checkFaceDotProduct
{
WarningInFunction
<< "Severe non-orthogonality detected for face "
<< faceI
<< " between cells " << own[faceI] << " and "
<< nei[faceI]
<< facei
<< " between cells " << own[facei] << " and "
<< nei[facei]
<< ": Angle = " << radToDeg(::acos(dDotS))
<< " deg." << endl;
}
@ -329,7 +329,7 @@ bool Foam::primitiveMeshGeometry::checkFaceDotProduct
if (setPtr)
{
setPtr->insert(faceI);
setPtr->insert(facei);
}
}
}
@ -416,13 +416,13 @@ bool Foam::primitiveMeshGeometry::checkFacePyramids
forAll(checkFaces, i)
{
label faceI = checkFaces[i];
label facei = checkFaces[i];
// Create the owner pyramid - it will have negative volume
scalar pyrVol = pyramidPointFaceRef
(
f[faceI],
cellCentres[own[faceI]]
f[facei],
cellCentres[own[facei]]
).mag(p);
if (pyrVol > -minPyrVol)
@ -432,29 +432,29 @@ bool Foam::primitiveMeshGeometry::checkFacePyramids
Pout<< "bool primitiveMeshGeometry::checkFacePyramids("
<< "const bool, const scalar, const pointField&"
<< ", const labelList&, labelHashSet*): "
<< "face " << faceI << " points the wrong way. " << endl
<< "face " << facei << " points the wrong way. " << endl
<< "Pyramid volume: " << -pyrVol
<< " Face " << f[faceI] << " area: " << f[faceI].mag(p)
<< " Owner cell: " << own[faceI] << endl
<< " Face " << f[facei] << " area: " << f[facei].mag(p)
<< " Owner cell: " << own[facei] << endl
<< "Owner cell vertex labels: "
<< mesh.cells()[own[faceI]].labels(f)
<< mesh.cells()[own[facei]].labels(f)
<< endl;
}
if (setPtr)
{
setPtr->insert(faceI);
setPtr->insert(facei);
}
nErrorPyrs++;
}
if (mesh.isInternalFace(faceI))
if (mesh.isInternalFace(facei))
{
// Create the neighbour pyramid - it will have positive volume
scalar pyrVol =
pyramidPointFaceRef(f[faceI], cellCentres[nei[faceI]]).mag(p);
pyramidPointFaceRef(f[facei], cellCentres[nei[facei]]).mag(p);
if (pyrVol < minPyrVol)
{
@ -463,18 +463,18 @@ bool Foam::primitiveMeshGeometry::checkFacePyramids
Pout<< "bool primitiveMeshGeometry::checkFacePyramids("
<< "const bool, const scalar, const pointField&"
<< ", const labelList&, labelHashSet*): "
<< "face " << faceI << " points the wrong way. " << endl
<< "face " << facei << " points the wrong way. " << endl
<< "Pyramid volume: " << -pyrVol
<< " Face " << f[faceI] << " area: " << f[faceI].mag(p)
<< " Neighbour cell: " << nei[faceI] << endl
<< " Face " << f[facei] << " area: " << f[facei].mag(p)
<< " Neighbour cell: " << nei[facei] << endl
<< "Neighbour cell vertex labels: "
<< mesh.cells()[nei[faceI]].labels(f)
<< mesh.cells()[nei[facei]].labels(f)
<< endl;
}
if (setPtr)
{
setPtr->insert(faceI);
setPtr->insert(facei);
}
nErrorPyrs++;
@ -532,21 +532,21 @@ bool Foam::primitiveMeshGeometry::checkFaceSkewness
forAll(checkFaces, i)
{
label faceI = checkFaces[i];
label facei = checkFaces[i];
if (mesh.isInternalFace(faceI))
if (mesh.isInternalFace(facei))
{
scalar dOwn = mag(faceCentres[faceI] - cellCentres[own[faceI]]);
scalar dNei = mag(faceCentres[faceI] - cellCentres[nei[faceI]]);
scalar dOwn = mag(faceCentres[facei] - cellCentres[own[facei]]);
scalar dNei = mag(faceCentres[facei] - cellCentres[nei[facei]]);
point faceIntersection =
cellCentres[own[faceI]]*dNei/(dOwn+dNei)
+ cellCentres[nei[faceI]]*dOwn/(dOwn+dNei);
cellCentres[own[facei]]*dNei/(dOwn+dNei)
+ cellCentres[nei[facei]]*dOwn/(dOwn+dNei);
scalar skewness =
mag(faceCentres[faceI] - faceIntersection)
mag(faceCentres[facei] - faceIntersection)
/ (
mag(cellCentres[nei[faceI]]-cellCentres[own[faceI]])
mag(cellCentres[nei[facei]]-cellCentres[own[facei]])
+ VSMALL
);
@ -557,13 +557,13 @@ bool Foam::primitiveMeshGeometry::checkFaceSkewness
{
if (report)
{
Pout<< "Severe skewness for face " << faceI
Pout<< "Severe skewness for face " << facei
<< " skewness = " << skewness << endl;
}
if (setPtr)
{
setPtr->insert(faceI);
setPtr->insert(facei);
}
nWarnSkew++;
@ -579,17 +579,17 @@ bool Foam::primitiveMeshGeometry::checkFaceSkewness
// Boundary faces: consider them to have only skewness error.
// (i.e. treat as if mirror cell on other side)
vector faceNormal = faceAreas[faceI];
vector faceNormal = faceAreas[facei];
faceNormal /= mag(faceNormal) + VSMALL;
vector dOwn = faceCentres[faceI] - cellCentres[own[faceI]];
vector dOwn = faceCentres[facei] - cellCentres[own[facei]];
vector dWall = faceNormal*(faceNormal & dOwn);
point faceIntersection = cellCentres[own[faceI]] + dWall;
point faceIntersection = cellCentres[own[facei]] + dWall;
scalar skewness =
mag(faceCentres[faceI] - faceIntersection)
mag(faceCentres[facei] - faceIntersection)
/(2*mag(dWall) + VSMALL);
// Check if the skewness vector is greater than the PN vector.
@ -599,13 +599,13 @@ bool Foam::primitiveMeshGeometry::checkFaceSkewness
{
if (report)
{
Pout<< "Severe skewness for boundary face " << faceI
Pout<< "Severe skewness for boundary face " << facei
<< " skewness = " << skewness << endl;
}
if (setPtr)
{
setPtr->insert(faceI);
setPtr->insert(facei);
}
nWarnSkew++;
@ -670,14 +670,14 @@ bool Foam::primitiveMeshGeometry::checkFaceWeights
forAll(checkFaces, i)
{
label faceI = checkFaces[i];
label facei = checkFaces[i];
if (mesh.isInternalFace(faceI))
if (mesh.isInternalFace(facei))
{
const point& fc = faceCentres[faceI];
const point& fc = faceCentres[facei];
scalar dOwn = mag(faceAreas[faceI] & (fc-cellCentres[own[faceI]]));
scalar dNei = mag(faceAreas[faceI] & (cellCentres[nei[faceI]]-fc));
scalar dOwn = mag(faceAreas[facei] & (fc-cellCentres[own[facei]]));
scalar dNei = mag(faceAreas[facei] & (cellCentres[nei[facei]]-fc));
scalar weight = min(dNei,dOwn)/(dNei+dOwn);
@ -685,13 +685,13 @@ bool Foam::primitiveMeshGeometry::checkFaceWeights
{
if (report)
{
Pout<< "Small weighting factor for face " << faceI
Pout<< "Small weighting factor for face " << facei
<< " weight = " << weight << endl;
}
if (setPtr)
{
setPtr->insert(faceI);
setPtr->insert(facei);
}
nWarnWeight++;
@ -763,11 +763,11 @@ bool Foam::primitiveMeshGeometry::checkFaceAngles
forAll(checkFaces, i)
{
label faceI = checkFaces[i];
label facei = checkFaces[i];
const face& f = fcs[faceI];
const face& f = fcs[facei];
vector faceNormal = faceAreas[faceI];
vector faceNormal = faceAreas[facei];
faceNormal /= mag(faceNormal) + VSMALL;
// Get edge from f[0] to f[size-1];
@ -801,16 +801,16 @@ bool Foam::primitiveMeshGeometry::checkFaceAngles
if ((edgeNormal & faceNormal) < SMALL)
{
if (faceI != errorFaceI)
if (facei != errorFaceI)
{
// Count only one error per face.
errorFaceI = faceI;
errorFaceI = facei;
nConcave++;
}
if (setPtr)
{
setPtr->insert(faceI);
setPtr->insert(facei);
}
maxEdgeSin = max(maxEdgeSin, magEdgeNormal);
@ -900,15 +900,15 @@ bool Foam::primitiveMeshGeometry::checkFaceAngles
//
// forAll(checkFaces, i)
// {
// label faceI = checkFaces[i];
// label facei = checkFaces[i];
//
// const face& f = fcs[faceI];
// const face& f = fcs[facei];
//
// scalar magArea = mag(faceAreas[faceI]);
// scalar magArea = mag(faceAreas[facei]);
//
// if (f.size() > 3 && magArea > VSMALL)
// {
// const point& fc = faceCentres[faceI];
// const point& fc = faceCentres[facei];
//
// // Calculate the sum of magnitude of areas and compare to
// // magnitude of sum of areas.
@ -938,7 +938,7 @@ bool Foam::primitiveMeshGeometry::checkFaceAngles
//
// if (setPtr)
// {
// setPtr->insert(faceI);
// setPtr->insert(facei);
// }
// }
// }
@ -1025,17 +1025,17 @@ bool Foam::primitiveMeshGeometry::checkFaceTwist
forAll(checkFaces, i)
{
label faceI = checkFaces[i];
label facei = checkFaces[i];
const face& f = fcs[faceI];
const face& f = fcs[facei];
scalar magArea = mag(faceAreas[faceI]);
scalar magArea = mag(faceAreas[facei]);
if (f.size() > 3 && magArea > VSMALL)
{
const vector nf = faceAreas[faceI] / magArea;
const vector nf = faceAreas[facei] / magArea;
const point& fc = faceCentres[faceI];
const point& fc = faceCentres[facei];
forAll(f, fpI)
{
@ -1057,7 +1057,7 @@ bool Foam::primitiveMeshGeometry::checkFaceTwist
if (setPtr)
{
setPtr->insert(faceI);
setPtr->insert(facei);
}
}
}
@ -1118,13 +1118,13 @@ bool Foam::primitiveMeshGeometry::checkFaceArea
forAll(checkFaces, i)
{
label faceI = checkFaces[i];
label facei = checkFaces[i];
if (mag(faceAreas[faceI]) < minArea)
if (mag(faceAreas[facei]) < minArea)
{
if (setPtr)
{
setPtr->insert(faceI);
setPtr->insert(facei);
}
nZeroArea++;
}
@ -1192,12 +1192,12 @@ bool Foam::primitiveMeshGeometry::checkCellDeterminant
forAll(cFaces, cFaceI)
{
label faceI = cFaces[cFaceI];
label facei = cFaces[cFaceI];
scalar magArea = mag(faceAreas[faceI]);
scalar magArea = mag(faceAreas[facei]);
magAreaSum += magArea;
areaSum += faceAreas[faceI]*(faceAreas[faceI]/magArea);
areaSum += faceAreas[facei]*(faceAreas[facei]/magArea);
}
scalar scaledDet = det(areaSum/magAreaSum)/0.037037037037037;
@ -1213,8 +1213,8 @@ bool Foam::primitiveMeshGeometry::checkCellDeterminant
// Insert all faces of the cell.
forAll(cFaces, cFaceI)
{
label faceI = cFaces[cFaceI];
setPtr->insert(faceI);
label facei = cFaces[cFaceI];
setPtr->insert(facei);
}
}
nWarnDet++;

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
@ -119,17 +119,17 @@ void Foam::localPointRegion::countPointRegions
forAllConstIter(Map<label>, candidateFace, iter)
{
label faceI = iter.key();
label facei = iter.key();
if (!mesh.isInternalFace(faceI))
if (!mesh.isInternalFace(facei))
{
const face& f = mesh.faces()[faceI];
const face& f = mesh.faces()[facei];
if (minRegion[faceI].empty())
if (minRegion[facei].empty())
{
FatalErrorInFunction
<< "Face from candidateFace without minRegion set." << endl
<< "Face:" << faceI << " fc:" << mesh.faceCentres()[faceI]
<< "Face:" << facei << " fc:" << mesh.faceCentres()[facei]
<< " verts:" << f << abort(FatalError);
}
@ -142,7 +142,7 @@ void Foam::localPointRegion::countPointRegions
if (candidatePoint[pointI])
{
label region = minRegion[faceI][fp];
label region = minRegion[facei][fp];
if (minPointRegion[pointI] == -1)
{
@ -173,7 +173,7 @@ void Foam::localPointRegion::countPointRegions
}
label meshFaceMapI = meshFaceMap_.size();
meshFaceMap_.insert(faceI, meshFaceMapI);
meshFaceMap_.insert(facei, meshFaceMapI);
}
}
}
@ -185,11 +185,11 @@ void Foam::localPointRegion::countPointRegions
// region!
forAllConstIter(Map<label>, candidateFace, iter)
{
label faceI = iter.key();
label facei = iter.key();
if (mesh.isInternalFace(faceI))
if (mesh.isInternalFace(facei))
{
const face& f = mesh.faces()[faceI];
const face& f = mesh.faces()[facei];
forAll(f, fp)
{
@ -198,7 +198,7 @@ void Foam::localPointRegion::countPointRegions
if (candidatePoint[f[fp]] && meshPointMap_.found(f[fp]))
{
label meshFaceMapI = meshFaceMap_.size();
meshFaceMap_.insert(faceI, meshFaceMapI);
meshFaceMap_.insert(facei, meshFaceMapI);
}
}
}
@ -221,9 +221,9 @@ void Foam::localPointRegion::countPointRegions
//// Print a bit
//{
// label faceI = iter.key();
// const face& f = mesh.faces()[faceI];
// Pout<< "Face:" << faceI << " fc:" << mesh.faceCentres()[faceI]
// label facei = iter.key();
// const face& f = mesh.faces()[facei];
// Pout<< "Face:" << facei << " fc:" << mesh.faceCentres()[facei]
// << " verts:" << f << endl;
// forAll(f, fp)
// {
@ -268,29 +268,29 @@ void Foam::localPointRegion::calcPointRegions
Map<label> candidateCell(nBnd);
label candidateCellI = 0;
forAll(mesh.faces(), faceI)
forAll(mesh.faces(), facei)
{
const face& f = mesh.faces()[faceI];
const face& f = mesh.faces()[facei];
forAll(f, fp)
{
if (candidatePoint[f[fp]])
{
// Mark face
if (candidateFace.insert(faceI, candidateFaceI))
if (candidateFace.insert(facei, candidateFaceI))
{
candidateFaceI++;
}
// Mark cells
if (candidateCell.insert(faceOwner[faceI], candidateCellI))
if (candidateCell.insert(faceOwner[facei], candidateCellI))
{
candidateCellI++;
}
if (mesh.isInternalFace(faceI))
if (mesh.isInternalFace(facei))
{
label nei = faceNeighbour[faceI];
label nei = faceNeighbour[facei];
if (candidateCell.insert(nei, candidateCellI))
{
candidateCellI++;
@ -315,19 +315,19 @@ void Foam::localPointRegion::calcPointRegions
faceList minRegion(mesh.nFaces());
forAllConstIter(Map<label>, candidateFace, iter)
{
label faceI = iter.key();
const face& f = mesh.faces()[faceI];
label facei = iter.key();
const face& f = mesh.faces()[facei];
if (mesh.isInternalFace(faceI))
if (mesh.isInternalFace(facei))
{
label globOwn = globalCells.toGlobal(faceOwner[faceI]);
label globNei = globalCells.toGlobal(faceNeighbour[faceI]);
minRegion[faceI].setSize(f.size(), min(globOwn, globNei));
label globOwn = globalCells.toGlobal(faceOwner[facei]);
label globNei = globalCells.toGlobal(faceNeighbour[facei]);
minRegion[facei].setSize(f.size(), min(globOwn, globNei));
}
else
{
label globOwn = globalCells.toGlobal(faceOwner[faceI]);
minRegion[faceI].setSize(f.size(), globOwn);
label globOwn = globalCells.toGlobal(faceOwner[facei]);
minRegion[facei].setSize(f.size(), globOwn);
}
}
@ -346,17 +346,17 @@ void Foam::localPointRegion::calcPointRegions
{
minPointValue.clear();
label cellI = iter.key();
const cell& cFaces = mesh.cells()[cellI];
label celli = iter.key();
const cell& cFaces = mesh.cells()[celli];
// Determine minimum per point
forAll(cFaces, cFaceI)
{
label faceI = cFaces[cFaceI];
label facei = cFaces[cFaceI];
if (minRegion[faceI].size())
if (minRegion[facei].size())
{
const face& f = mesh.faces()[faceI];
const face& f = mesh.faces()[facei];
forAll(f, fp)
{
@ -365,12 +365,12 @@ void Foam::localPointRegion::calcPointRegions
if (iter == minPointValue.end())
{
minPointValue.insert(pointI, minRegion[faceI][fp]);
minPointValue.insert(pointI, minRegion[facei][fp]);
}
else
{
label currentMin = iter();
iter() = min(currentMin, minRegion[faceI][fp]);
iter() = min(currentMin, minRegion[facei][fp]);
}
}
}
@ -379,19 +379,19 @@ void Foam::localPointRegion::calcPointRegions
// Set face minimum from point minimum
forAll(cFaces, cFaceI)
{
label faceI = cFaces[cFaceI];
label facei = cFaces[cFaceI];
if (minRegion[faceI].size())
if (minRegion[facei].size())
{
const face& f = mesh.faces()[faceI];
const face& f = mesh.faces()[facei];
forAll(f, fp)
{
label minVal = minPointValue[f[fp]];
if (minVal != minRegion[faceI][fp])
if (minVal != minRegion[facei][fp])
{
minRegion[faceI][fp] = minVal;
minRegion[facei][fp] = minVal;
nChanged++;
}
}
@ -456,11 +456,11 @@ Foam::localPointRegion::localPointRegion(const polyMesh& mesh)
// Get any point on the outside which is on a non-coupled boundary
boolList candidatePoint(mesh.nPoints(), false);
forAll(patches, patchI)
forAll(patches, patchi)
{
if (!patches[patchI].coupled())
if (!patches[patchi].coupled())
{
const polyPatch& pp = patches[patchI];
const polyPatch& pp = patches[patchi];
forAll(pp.meshPoints(), i)
{

View File

@ -43,31 +43,31 @@ defineTypeNameAndDebug(regionSplit, 0);
// Handle (non-processor) coupled faces.
void Foam::regionSplit::transferCoupledFaceRegion
(
const label faceI,
const label facei,
const label otherFaceI,
labelList& faceRegion,
DynamicList<label>& newChangedFaces
) const
{
if (faceRegion[faceI] >= 0)
if (faceRegion[facei] >= 0)
{
if (faceRegion[otherFaceI] == -1)
{
faceRegion[otherFaceI] = faceRegion[faceI];
faceRegion[otherFaceI] = faceRegion[facei];
newChangedFaces.append(otherFaceI);
}
else if (faceRegion[otherFaceI] == -2)
{
// otherFaceI blocked but faceI is not. Is illegal for coupled
// otherFaceI blocked but facei is not. Is illegal for coupled
// faces, not for explicit connections.
}
else if (faceRegion[otherFaceI] != faceRegion[faceI])
else if (faceRegion[otherFaceI] != faceRegion[facei])
{
FatalErrorInFunction
<< "Problem : coupled face " << faceI
<< " on patch " << mesh().boundaryMesh().whichPatch(faceI)
<< " has region " << faceRegion[faceI]
<< "Problem : coupled face " << facei
<< " on patch " << mesh().boundaryMesh().whichPatch(facei)
<< " has region " << faceRegion[facei]
<< " but coupled face " << otherFaceI
<< " has region " << faceRegion[otherFaceI]
<< endl
@ -76,16 +76,16 @@ void Foam::regionSplit::transferCoupledFaceRegion
<< abort(FatalError);
}
}
else if (faceRegion[faceI] == -1)
else if (faceRegion[facei] == -1)
{
if (faceRegion[otherFaceI] >= 0)
{
faceRegion[faceI] = faceRegion[otherFaceI];
newChangedFaces.append(faceI);
faceRegion[facei] = faceRegion[otherFaceI];
newChangedFaces.append(facei);
}
else if (faceRegion[otherFaceI] == -2)
{
// otherFaceI blocked but faceI is not. Is illegal for coupled
// otherFaceI blocked but facei is not. Is illegal for coupled
// faces, not for explicit connections.
}
}
@ -114,12 +114,12 @@ void Foam::regionSplit::fillSeedMask
forAll(cFaces, i)
{
label faceI = cFaces[i];
label facei = cFaces[i];
if (faceRegion[faceI] == -1)
if (faceRegion[facei] == -1)
{
faceRegion[faceI] = markValue;
changedFaces[nFaces++] = faceI;
faceRegion[facei] = markValue;
changedFaces[nFaces++] = facei;
}
}
changedFaces.setSize(nFaces);
@ -139,9 +139,9 @@ void Foam::regionSplit::fillSeedMask
forAll(changedFaces, i)
{
label faceI = changedFaces[i];
label facei = changedFaces[i];
label own = mesh().faceOwner()[faceI];
label own = mesh().faceOwner()[facei];
if (cellRegion[own] == -1)
{
@ -149,9 +149,9 @@ void Foam::regionSplit::fillSeedMask
changedCells.append(own);
}
if (mesh().isInternalFace(faceI))
if (mesh().isInternalFace(facei))
{
label nei = mesh().faceNeighbour()[faceI];
label nei = mesh().faceNeighbour()[facei];
if (cellRegion[nei] == -1)
{
@ -173,18 +173,18 @@ void Foam::regionSplit::fillSeedMask
forAll(changedCells, i)
{
label cellI = changedCells[i];
label celli = changedCells[i];
const cell& cFaces = mesh().cells()[cellI];
const cell& cFaces = mesh().cells()[celli];
forAll(cFaces, cFaceI)
{
label faceI = cFaces[cFaceI];
label facei = cFaces[cFaceI];
if (faceRegion[faceI] == -1)
if (faceRegion[facei] == -1)
{
faceRegion[faceI] = markValue;
newChangedFaces.append(faceI);
faceRegion[facei] = markValue;
newChangedFaces.append(facei);
}
}
}
@ -202,9 +202,9 @@ void Foam::regionSplit::fillSeedMask
const polyBoundaryMesh& patches = mesh().boundaryMesh();
forAll(patches, patchI)
forAll(patches, patchi)
{
const polyPatch& pp = patches[patchI];
const polyPatch& pp = patches[patchi];
if
(
@ -217,21 +217,21 @@ void Foam::regionSplit::fillSeedMask
const cyclicPolyPatch& cycPatch =
refCast<const cyclicPolyPatch>(pp);
label faceI = cycPatch.start();
label facei = cycPatch.start();
forAll(cycPatch, i)
{
label otherFaceI = cycPatch.transformGlobalFace(faceI);
label otherFaceI = cycPatch.transformGlobalFace(facei);
transferCoupledFaceRegion
(
faceI,
facei,
otherFaceI,
faceRegion,
newChangedFaces
);
faceI++;
facei++;
}
}
}
@ -273,14 +273,14 @@ Foam::label Foam::regionSplit::calcLocalRegionSplit
boolList syncBlockedFace(blockedFace);
syncTools::swapFaceList(mesh(), syncBlockedFace);
forAll(syncBlockedFace, faceI)
forAll(syncBlockedFace, facei)
{
if (syncBlockedFace[faceI] != blockedFace[faceI])
if (syncBlockedFace[facei] != blockedFace[facei])
{
FatalErrorInFunction
<< "Face " << faceI << " not synchronised. My value:"
<< blockedFace[faceI] << " coupled value:"
<< syncBlockedFace[faceI]
<< "Face " << facei << " not synchronised. My value:"
<< blockedFace[facei] << " coupled value:"
<< syncBlockedFace[facei]
<< abort(FatalError);
}
}
@ -294,11 +294,11 @@ Foam::label Foam::regionSplit::calcLocalRegionSplit
if (blockedFace.size())
{
forAll(blockedFace, faceI)
forAll(blockedFace, facei)
{
if (blockedFace[faceI])
if (blockedFace[facei])
{
faceRegion[faceI] = -2;
faceRegion[facei] = -2;
}
}
}
@ -347,22 +347,22 @@ Foam::label Foam::regionSplit::calcLocalRegionSplit
if (debug)
{
forAll(cellRegion, cellI)
forAll(cellRegion, celli)
{
if (cellRegion[cellI] < 0)
if (cellRegion[celli] < 0)
{
FatalErrorInFunction
<< "cell:" << cellI << " region:" << cellRegion[cellI]
<< "cell:" << celli << " region:" << cellRegion[celli]
<< abort(FatalError);
}
}
forAll(faceRegion, faceI)
forAll(faceRegion, facei)
{
if (faceRegion[faceI] == -1)
if (faceRegion[facei] == -1)
{
FatalErrorInFunction
<< "face:" << faceI << " region:" << faceRegion[faceI]
<< "face:" << facei << " region:" << faceRegion[facei]
<< abort(FatalError);
}
}
@ -405,9 +405,9 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit
// Convert regions to global ones
forAll(cellRegion, cellI)
forAll(cellRegion, celli)
{
cellRegion[cellI] = globalRegions.toGlobal(cellRegion[cellI]);
cellRegion[celli] = globalRegions.toGlobal(cellRegion[celli]);
}
@ -429,9 +429,9 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit
const polyBoundaryMesh& patches = mesh().boundaryMesh();
labelList nbrRegion(mesh().nFaces()-mesh().nInternalFaces(), -1);
forAll(patches, patchI)
forAll(patches, patchi)
{
const polyPatch& pp = patches[patchI];
const polyPatch& pp = patches[patchi];
if (pp.coupled())
{
@ -445,8 +445,8 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit
forAll(patchCells, i)
{
label faceI = pp.start()+i;
if (!blockedFace.size() || !blockedFace[faceI])
label facei = pp.start()+i;
if (!blockedFace.size() || !blockedFace[facei])
{
patchNbrRegion[i] = cellRegion[patchCells[i]];
}
@ -457,9 +457,9 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit
Map<label> globalToMerged(mesh().nFaces()-mesh().nInternalFaces());
forAll(patches, patchI)
forAll(patches, patchi)
{
const polyPatch& pp = patches[patchI];
const polyPatch& pp = patches[patchi];
if (pp.coupled())
{
@ -473,9 +473,9 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit
forAll(patchCells, i)
{
label faceI = pp.start()+i;
label facei = pp.start()+i;
if (!blockedFace.size() || !blockedFace[faceI])
if (!blockedFace.size() || !blockedFace[facei])
{
if (patchNbrRegion[i] < cellRegion[patchCells[i]])
{
@ -512,13 +512,13 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit
}
// Renumber the regions according to the globalToMerged
forAll(cellRegion, cellI)
forAll(cellRegion, celli)
{
label regionI = cellRegion[cellI];
label regionI = cellRegion[celli];
Map<label>::const_iterator iter = globalToMerged.find(regionI);
if (iter != globalToMerged.end())
{
cellRegion[cellI] = iter();
cellRegion[celli] = iter();
}
}
}
@ -531,12 +531,12 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit
label nCompact = 0;
{
labelHashSet localRegion(mesh().nFaces()-mesh().nInternalFaces());
forAll(cellRegion, cellI)
forAll(cellRegion, celli)
{
if
(
globalRegions.isLocal(cellRegion[cellI])
&& localRegion.insert(cellRegion[cellI])
globalRegions.isLocal(cellRegion[celli])
&& localRegion.insert(cellRegion[celli])
)
{
nCompact++;
@ -571,9 +571,9 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit
nonLocal[procI].resize((nLocalRegions-nCompact)/Pstream::nProcs());
}
forAll(cellRegion, cellI)
forAll(cellRegion, celli)
{
label region = cellRegion[cellI];
label region = cellRegion[celli];
if (globalRegions.isLocal(region))
{
Map<label>::const_iterator iter = globalToCompact.find(region);
@ -663,9 +663,9 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit
}
// Finally renumber the regions
forAll(cellRegion, cellI)
forAll(cellRegion, celli)
{
cellRegion[cellI] = globalToCompact[cellRegion[cellI]];
cellRegion[celli] = globalToCompact[cellRegion[celli]];
}
return globalCompactPtr;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -129,7 +129,7 @@ class regionSplit
//- Transfer faceRegion data from one face to the other (or vice versa)
void transferCoupledFaceRegion
(
const label faceI,
const label facei,
const label otherFaceI,
labelList& faceRegion,

View File

@ -763,9 +763,9 @@ bool Foam::searchableSurfaces::checkQuality
);
label nBadTris = 0;
forAll(s, faceI)
forAll(s, facei)
{
const labelledTri& f = s[faceI];
const labelledTri& f = s[facei];
scalar q = triPointRef
(

View File

@ -407,14 +407,14 @@ void Foam::triSurfaceMesh::boundingSpheres
const pointField& pts = triSurface::points();
forAll(*this, faceI)
forAll(*this, facei)
{
const labelledTri& f = triSurface::operator[](faceI);
const point& fc = centres[faceI];
const labelledTri& f = triSurface::operator[](facei);
const point& fc = centres[facei];
forAll(f, fp)
{
const point& pt = pts[f[fp]];
radiusSqr[faceI] = max(radiusSqr[faceI], Foam::magSqr(fc-pt));
radiusSqr[facei] = max(radiusSqr[facei], Foam::magSqr(fc-pt));
}
}
@ -651,15 +651,15 @@ void Foam::triSurfaceMesh::getNormal
{
if (info[i].hit())
{
label faceI = info[i].index();
normal[i] = s[faceI].normal(pts);
label facei = info[i].index();
normal[i] = s[facei].normal(pts);
scalar qual = s[faceI].tri(pts).quality();
scalar qual = s[facei].tri(pts).quality();
if (qual < minQuality_)
{
// Search neighbouring triangles
const labelList& fFaces = faceFaces[faceI];
const labelList& fFaces = faceFaces[facei];
forAll(fFaces, j)
{
@ -688,12 +688,12 @@ void Foam::triSurfaceMesh::getNormal
{
if (info[i].hit())
{
label faceI = info[i].index();
label facei = info[i].index();
// Cached:
//normal[i] = faceNormals()[faceI];
//normal[i] = faceNormals()[facei];
// Uncached
normal[i] = s[faceI].normal(pts);
normal[i] = s[facei].normal(pts);
normal[i] /= mag(normal[i]) + VSMALL;
}
else

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,13 +56,13 @@ void Foam::boxToCell::combine(topoSet& set, const bool add) const
{
const pointField& ctrs = mesh_.cellCentres();
forAll(ctrs, cellI)
forAll(ctrs, celli)
{
forAll(bbs_, i)
{
if (bbs_[i].contains(ctrs[cellI]))
if (bbs_[i].contains(ctrs[celli]))
{
addOrDelete(set, cellI, add);
addOrDelete(set, celli, add);
break;
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -57,9 +57,9 @@ void Foam::cylinderAnnulusToCell::combine(topoSet& set, const bool add) const
const pointField& ctrs = mesh_.cellCentres();
forAll(ctrs, cellI)
forAll(ctrs, celli)
{
vector d = ctrs[cellI] - p1_;
vector d = ctrs[celli] - p1_;
scalar magD = d & axis;
if ((magD > 0) && (magD < magAxis2))
@ -67,7 +67,7 @@ void Foam::cylinderAnnulusToCell::combine(topoSet& set, const bool add) const
scalar d2 = (d & d) - sqr(magD)/magAxis2;
if ((d2 < orad2) && (d2 > irad2))
{
addOrDelete(set, cellI, add);
addOrDelete(set, celli, add);
}
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -55,9 +55,9 @@ void Foam::cylinderToCell::combine(topoSet& set, const bool add) const
const pointField& ctrs = mesh_.cellCentres();
forAll(ctrs, cellI)
forAll(ctrs, celli)
{
vector d = ctrs[cellI] - p1_;
vector d = ctrs[celli] - p1_;
scalar magD = d & axis;
if ((magD > 0) && (magD < magAxis2))
@ -65,7 +65,7 @@ void Foam::cylinderToCell::combine(topoSet& set, const bool add) const
scalar d2 = (d & d) - sqr(magD)/magAxis2;
if (d2 < rad2)
{
addOrDelete(set, cellI, add);
addOrDelete(set, celli, add);
}
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -75,22 +75,22 @@ void Foam::faceToCell::combine(topoSet& set, const bool add) const
// Handle owner/neighbour/any selection
forAllConstIter(faceSet, loadedSet, iter)
{
const label faceI = iter.key();
const label facei = iter.key();
if ((option_ == OWNER) || (option_ == ANY))
{
const label cellI = mesh_.faceOwner()[faceI];
const label celli = mesh_.faceOwner()[facei];
addOrDelete(set, cellI, add);
addOrDelete(set, celli, add);
}
if (mesh_.isInternalFace(faceI))
if (mesh_.isInternalFace(facei))
{
if ((option_ == NEIGHBOUR) || (option_ == ANY))
{
const label cellI = mesh_.faceNeighbour()[faceI];
const label celli = mesh_.faceNeighbour()[facei];
addOrDelete(set, cellI, add);
addOrDelete(set, celli, add);
}
}
}
@ -104,8 +104,8 @@ void Foam::faceToCell::combine(topoSet& set, const bool add) const
forAllConstIter(faceSet, loadedSet, iter)
{
const label faceI = iter.key();
const label own = mesh_.faceOwner()[faceI];
const label facei = iter.key();
const label own = mesh_.faceOwner()[facei];
Map<label>::iterator fndOwn = facesPerCell.find(own);
@ -118,9 +118,9 @@ void Foam::faceToCell::combine(topoSet& set, const bool add) const
fndOwn()++;
}
if (mesh_.isInternalFace(faceI))
if (mesh_.isInternalFace(facei))
{
label nei = mesh_.faceNeighbour()[faceI];
label nei = mesh_.faceNeighbour()[facei];
Map<label>::iterator fndNei = facesPerCell.find(nei);
@ -139,11 +139,11 @@ void Foam::faceToCell::combine(topoSet& set, const bool add) const
// -> all faces in set.
forAllConstIter(Map<label>, facesPerCell, iter)
{
const label cellI = iter.key();
const label celli = iter.key();
if (iter() == mesh_.cells()[cellI].size())
if (iter() == mesh_.cells()[celli].size())
{
addOrDelete(set, cellI, add);
addOrDelete(set, celli, add);
}
}
}

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
@ -71,11 +71,11 @@ void Foam::fieldToCell::applyToSet
Info<< " Adding all cells with value of field " << fieldName_
<< " within range " << min_ << ".." << max_ << endl;
forAll(field, cellI)
forAll(field, celli)
{
if (field[cellI] >= min_ && field[cellI] <= max_)
if (field[celli] >= min_ && field[celli] <= max_)
{
set.insert(cellI);
set.insert(celli);
}
}
}
@ -84,11 +84,11 @@ void Foam::fieldToCell::applyToSet
Info<< " Removing all cells with value of field " << fieldName_
<< " within range " << min_ << ".." << max_ << endl;
forAll(field, cellI)
forAll(field, celli)
{
if (field[cellI] >= min_ && field[cellI] <= max_)
if (field[celli] >= min_ && field[celli] <= max_)
{
set.erase(cellI);
set.erase(celli);
}
}
}
@ -168,15 +168,15 @@ void Foam::fieldToCell::applyToSet
// const polyBoundaryMesh& patches = mesh().boundaryMesh();
//
// List<polyPatch*> newPatches(patches.size());
// forAll(patches, patchI)
// forAll(patches, patchi)
// {
// const polyPatch& pp = patches[patchI];
// const polyPatch& pp = patches[patchi];
//
// newPatches[patchI] =
// patches[patchI].clone
// newPatches[patchi] =
// patches[patchi].clone
// (
// fMesh.boundaryMesh(),
// patchI,
// patchi,
// pp.size(),
// pp.start()
// ).ptr();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -59,36 +59,36 @@ void Foam::nbrToCell::combine(topoSet& set, const bool add) const
boolList isCoupled(mesh_.nFaces()-mesh_.nInternalFaces(), false);
forAll(patches, patchI)
forAll(patches, patchi)
{
const polyPatch& pp = patches[patchI];
const polyPatch& pp = patches[patchi];
if (pp.coupled())
{
label faceI = pp.start();
label facei = pp.start();
forAll(pp, i)
{
isCoupled[faceI-mesh_.nInternalFaces()] = true;
faceI++;
isCoupled[facei-mesh_.nInternalFaces()] = true;
facei++;
}
}
}
forAll(cells, cellI)
forAll(cells, celli)
{
const cell& cFaces = cells[cellI];
const cell& cFaces = cells[celli];
label nNbrCells = 0;
forAll(cFaces, i)
{
label faceI = cFaces[i];
label facei = cFaces[i];
if (mesh_.isInternalFace(faceI))
if (mesh_.isInternalFace(facei))
{
nNbrCells++;
}
else if (isCoupled[faceI-mesh_.nInternalFaces()])
else if (isCoupled[facei-mesh_.nInternalFaces()])
{
nNbrCells++;
}
@ -96,7 +96,7 @@ void Foam::nbrToCell::combine(topoSet& set, const bool add) const
if (nNbrCells <= minNbrs_)
{
addOrDelete(set, cellI, add);
addOrDelete(set, celli, add);
}
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -87,18 +87,18 @@ void Foam::pointToCell::combine(topoSet& set, const bool add) const
else if (option_ == EDGE)
{
const faceList& faces = mesh_.faces();
forAll(faces, faceI)
forAll(faces, facei)
{
const face& f = faces[faceI];
const face& f = faces[facei];
forAll(f, fp)
{
if (loadedSet.found(f[fp]) && loadedSet.found(f.nextLabel(fp)))
{
addOrDelete(set, mesh_.faceOwner()[faceI], add);
if (mesh_.isInternalFace(faceI))
addOrDelete(set, mesh_.faceOwner()[facei], add);
if (mesh_.isInternalFace(facei))
{
addOrDelete(set, mesh_.faceNeighbour()[faceI], add);
addOrDelete(set, mesh_.faceNeighbour()[facei], add);
}
}
}

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
@ -64,15 +64,15 @@ void Foam::regionToCell::markRegionFaces
// Internal faces
const labelList& faceOwner = mesh_.faceOwner();
const labelList& faceNeighbour = mesh_.faceNeighbour();
forAll(faceNeighbour, faceI)
forAll(faceNeighbour, facei)
{
if
(
selectedCell[faceOwner[faceI]]
!= selectedCell[faceNeighbour[faceI]]
selectedCell[faceOwner[facei]]
!= selectedCell[faceNeighbour[facei]]
)
{
regionFace[faceI] = true;
regionFace[facei] = true;
}
}
@ -82,21 +82,21 @@ void Foam::regionToCell::markRegionFaces
// Boundary faces
const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
forAll(pbm, patchI)
forAll(pbm, patchi)
{
const polyPatch& pp = pbm[patchI];
const polyPatch& pp = pbm[patchi];
const labelUList& faceCells = pp.faceCells();
forAll(faceCells, i)
{
label faceI = pp.start()+i;
label bFaceI = faceI-mesh_.nInternalFaces();
label facei = pp.start()+i;
label bFaceI = facei-mesh_.nInternalFaces();
if
(
selectedCell[faceCells[i]]
!= selectedCell[nbrSelected[bFaceI]]
)
{
regionFace[faceI] = true;
regionFace[facei] = true;
}
}
}
@ -115,13 +115,13 @@ Foam::boolList Foam::regionToCell::findRegions
{
// Find the region containing the insidePoint
label cellI = mesh_.findCell(insidePoints_[i]);
label celli = mesh_.findCell(insidePoints_[i]);
label keepRegionI = -1;
label keepProcI = -1;
if (cellI != -1)
if (celli != -1)
{
keepRegionI = cellRegion[cellI];
keepRegionI = cellRegion[celli];
keepProcI = Pstream::myProcNo();
}
reduce(keepRegionI, maxOp<label>());
@ -140,7 +140,7 @@ Foam::boolList Foam::regionToCell::findRegions
if (verbose)
{
Info<< " Found location " << insidePoints_[i]
<< " in cell " << cellI << " on processor " << keepProcI
<< " in cell " << celli << " on processor " << keepProcI
<< " in global region " << keepRegionI
<< " out of " << cellRegion.nRegions() << " regions." << endl;
}
@ -166,11 +166,11 @@ void Foam::regionToCell::unselectOutsideRegions
boolList keepRegion(findRegions(true, cellRegion));
// Go back to bool per cell
forAll(cellRegion, cellI)
forAll(cellRegion, celli)
{
if (!keepRegion[cellRegion[cellI]])
if (!keepRegion[cellRegion[celli]])
{
selectedCell[cellI] = false;
selectedCell[celli] = false;
}
}
}
@ -188,9 +188,9 @@ void Foam::regionToCell::shrinkRegions
const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
forAll(pbm, patchI)
forAll(pbm, patchi)
{
const polyPatch& pp = pbm[patchI];
const polyPatch& pp = pbm[patchi];
if (!pp.coupled() && !isA<emptyPolyPatch>(pp))
{
@ -205,11 +205,11 @@ void Foam::regionToCell::shrinkRegions
}
}
forAll(selectedCell, cellI)
forAll(selectedCell, celli)
{
if (!selectedCell[cellI])
if (!selectedCell[celli])
{
const labelList& cPoints = mesh_.cellPoints(cellI);
const labelList& cPoints = mesh_.cellPoints(celli);
forAll(cPoints, i)
{
boundaryPoint[cPoints[i]] = true;
@ -231,10 +231,10 @@ void Foam::regionToCell::shrinkRegions
const labelList& pCells = mesh_.pointCells(pointI);
forAll(pCells, i)
{
label cellI = pCells[i];
if (selectedCell[cellI])
label celli = pCells[i];
if (selectedCell[celli])
{
selectedCell[cellI] = false;
selectedCell[celli] = false;
nChanged++;
}
}
@ -279,11 +279,11 @@ void Foam::regionToCell::erode
// Extract cells in regions that are not to be kept.
boolList removeCell(mesh_.nCells(), false);
forAll(cellRegion, cellI)
forAll(cellRegion, celli)
{
if (shrunkSelectedCell[cellI] && !keepRegion[cellRegion[cellI]])
if (shrunkSelectedCell[celli] && !keepRegion[cellRegion[celli]])
{
removeCell[cellI] = true;
removeCell[celli] = true;
}
}
@ -297,11 +297,11 @@ void Foam::regionToCell::erode
{
// Grow selected cell in regions that are not for keeping
boolList boundaryPoint(mesh_.nPoints(), false);
forAll(removeCell, cellI)
forAll(removeCell, celli)
{
if (removeCell[cellI])
if (removeCell[celli])
{
const labelList& cPoints = mesh_.cellPoints(cellI);
const labelList& cPoints = mesh_.cellPoints(celli);
forAll(cPoints, i)
{
boundaryPoint[cPoints[i]] = true;
@ -320,10 +320,10 @@ void Foam::regionToCell::erode
const labelList& pCells = mesh_.pointCells(pointI);
forAll(pCells, i)
{
label cellI = pCells[i];
if (!removeCell[cellI])
label celli = pCells[i];
if (!removeCell[celli])
{
removeCell[cellI] = true;
removeCell[celli] = true;
nChanged++;
}
}
@ -336,11 +336,11 @@ void Foam::regionToCell::erode
// Unmark removeCell
forAll(removeCell, cellI)
forAll(removeCell, celli)
{
if (removeCell[cellI])
if (removeCell[celli])
{
selectedCell[cellI] = false;
selectedCell[celli] = false;
}
}
}
@ -373,11 +373,11 @@ void Foam::regionToCell::combine(topoSet& set, const bool add) const
}
forAll(selectedCell, cellI)
forAll(selectedCell, celli)
{
if (selectedCell[cellI])
if (selectedCell[celli])
{
addOrDelete(set, cellI, add);
addOrDelete(set, celli, add);
}
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -92,7 +92,7 @@ void Foam::rotatedBoxToCell::combine(topoSet& set, const bool add) const
const pointField& ctrs = mesh_.cellCentres();
forAll(ctrs, cellI)
forAll(ctrs, celli)
{
bool inside = true;
@ -100,7 +100,7 @@ void Foam::rotatedBoxToCell::combine(topoSet& set, const bool add) const
{
const face& f = boxFaces[i];
if (((ctrs[cellI] - boxPoints[f[0]]) & boxFaceNormals[i]) > 0)
if (((ctrs[celli] - boxPoints[f[0]]) & boxFaceNormals[i]) > 0)
{
inside = false;
break;
@ -109,7 +109,7 @@ void Foam::rotatedBoxToCell::combine(topoSet& set, const bool add) const
if (inside)
{
addOrDelete(set, cellI, add);
addOrDelete(set, celli, add);
}
}
}

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
@ -64,13 +64,13 @@ void Foam::shapeToCell::combine(topoSet& set, const bool add) const
{
if (type_ == "splitHex")
{
for (label cellI = 0; cellI < mesh_.nCells(); cellI++)
for (label celli = 0; celli < mesh_.nCells(); celli++)
{
cellFeatures superCell(mesh_, featureCos, cellI);
cellFeatures superCell(mesh_, featureCos, celli);
if (hexMatcher().isA(superCell.faces()))
{
addOrDelete(set, cellI, add);
addOrDelete(set, celli, add);
}
}
}
@ -80,11 +80,11 @@ void Foam::shapeToCell::combine(topoSet& set, const bool add) const
const cellShapeList& cellShapes = mesh_.cellShapes();
forAll(cellShapes, cellI)
forAll(cellShapes, celli)
{
if (cellShapes[cellI].model() == wantedModel)
if (cellShapes[celli].model() == wantedModel)
{
addOrDelete(set, cellI, add);
addOrDelete(set, celli, add);
}
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,12 +53,12 @@ void Foam::sphereToCell::combine(topoSet& set, const bool add) const
const scalar radSquared = radius_*radius_;
forAll(ctrs, cellI)
forAll(ctrs, celli)
{
scalar offset = magSqr(centre_ - ctrs[cellI]);
scalar offset = magSqr(centre_ - ctrs[celli]);
if (offset <= radSquared)
{
addOrDelete(set, cellI, add);
addOrDelete(set, celli, add);
}
}
}

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
@ -99,7 +99,7 @@ bool Foam::surfaceToCell::differingPointNormals
const triSurfaceSearch& querySurf,
const vector& span, // Current search span
const label cellI,
const label celli,
const label cellTriI, // Nearest (to cell centre) surface triangle
Map<label>& pointToNearest // Cache for nearest triangle to point
@ -111,7 +111,7 @@ bool Foam::surfaceToCell::differingPointNormals
const faceList& faces = mesh().faces();
const pointField& points = mesh().points();
const labelList& cFaces = mesh().cells()[cellI];
const labelList& cFaces = mesh().cells()[celli];
forAll(cFaces, cFaceI)
{
@ -161,15 +161,15 @@ void Foam::surfaceToCell::combine(topoSet& set, const bool add) const
Info<< " Marked inside/outside using surface orientation in = "
<< timer.cpuTimeIncrement() << " s" << endl << endl;
forAll(isInside, cellI)
forAll(isInside, celli)
{
if (isInside[cellI] && includeInside_)
if (isInside[celli] && includeInside_)
{
addOrDelete(set, cellI, add);
addOrDelete(set, celli, add);
}
else if (!isInside[cellI] && includeOutside_)
else if (!isInside[celli] && includeOutside_)
{
addOrDelete(set, cellI, add);
addOrDelete(set, celli, add);
}
}
}
@ -191,8 +191,8 @@ void Foam::surfaceToCell::combine(topoSet& set, const bool add) const
const point& outsidePoint = outsidePoints_[outsideI];
// Find cell point is in. Linear search.
label cellI = queryMesh.findCell(outsidePoint, -1, false);
if (returnReduce(cellI, maxOp<label>()) == -1)
label celli = queryMesh.findCell(outsidePoint, -1, false);
if (returnReduce(celli, maxOp<label>()) == -1)
{
FatalErrorInFunction
<< "outsidePoint " << outsidePoint
@ -216,9 +216,9 @@ void Foam::surfaceToCell::combine(topoSet& set, const bool add) const
<< timer.cpuTimeIncrement() << " s" << endl << endl;
//- Add/remove cells using set
forAll(cellType, cellI)
forAll(cellType, celli)
{
label cType = cellType[cellI];
label cType = cellType[celli];
if
(
@ -236,7 +236,7 @@ void Foam::surfaceToCell::combine(topoSet& set, const bool add) const
)
)
{
addOrDelete(set, cellI, add);
addOrDelete(set, celli, add);
}
}
}
@ -261,15 +261,15 @@ void Foam::surfaceToCell::combine(topoSet& set, const bool add) const
// No need to test curvature. Insert near cells into set.
forAll(ctrs, cellI)
forAll(ctrs, celli)
{
const point& c = ctrs[cellI];
const point& c = ctrs[celli];
pointIndexHit inter = querySurf().nearest(c, span);
if (inter.hit() && (mag(inter.hitPoint() - c) < nearDist_))
{
addOrDelete(set, cellI, add);
addOrDelete(set, celli, add);
}
}
@ -288,9 +288,9 @@ void Foam::surfaceToCell::combine(topoSet& set, const bool add) const
// Cache for nearest surface triangle for a point
Map<label> pointToNearest(mesh_.nCells()/10);
forAll(ctrs, cellI)
forAll(ctrs, celli)
{
const point& c = ctrs[cellI];
const point& c = ctrs[celli];
pointIndexHit inter = querySurf().nearest(c, span);
@ -302,13 +302,13 @@ void Foam::surfaceToCell::combine(topoSet& set, const bool add) const
(
querySurf(),
span,
cellI,
celli,
inter.index(), // nearest surface triangle
pointToNearest
)
)
{
addOrDelete(set, cellI, add);
addOrDelete(set, celli, add);
}
}
}

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
@ -127,7 +127,7 @@ class surfaceToCell
(
const triSurfaceSearch& querySurf,
const vector& span,
const label cellI,
const label celli,
const label cellTriI,
Map<label>& pointToNearest
) const;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -61,11 +61,11 @@ Foam::scalar Foam::targetVolumeToCell::volumeOfSet
) const
{
scalar sumVol = 0.0;
forAll(selected, cellI)
forAll(selected, celli)
{
if (selected[cellI])
if (selected[celli])
{
sumVol += mesh_.cellVolumes()[cellI];
sumVol += mesh_.cellVolumes()[celli];
}
}
return returnReduce(sumVol, sumOp<scalar>());
@ -84,13 +84,13 @@ Foam::label Foam::targetVolumeToCell::selectCells
label nSelected = 0;
forAll(mesh_.cellCentres(), cellI)
forAll(mesh_.cellCentres(), celli)
{
const point& cc = mesh_.cellCentres()[cellI];
const point& cc = mesh_.cellCentres()[celli];
if (maskSet[cellI] && ((cc&n_) < normalComp))
if (maskSet[celli] && ((cc&n_) < normalComp))
{
selected[cellI] = true;
selected[celli] = true;
nSelected++;
}
}
@ -256,11 +256,11 @@ void Foam::targetVolumeToCell::combine(topoSet& set, const bool add) const
Info<< " Selected " << nSelected << " with actual volume " << selectedVol
<< endl;
forAll(selected, cellI)
forAll(selected, celli)
{
if (selected[cellI])
if (selected[celli])
{
addOrDelete(set, cellI, add);
addOrDelete(set, celli, add);
}
}
}

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
@ -125,11 +125,11 @@ void Foam::setToCellZone::applyToSet
forAllConstIter(cellSet, fSet, iter)
{
label cellI = iter.key();
label celli = iter.key();
if (!fzSet.found(cellI))
if (!fzSet.found(celli))
{
newAddressing.append(cellI);
newAddressing.append(celli);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,12 +56,12 @@ void Foam::boundaryToFace::combine(topoSet& set, const bool add) const
{
for
(
label faceI = mesh().nInternalFaces();
faceI < mesh().nFaces();
faceI++
label facei = mesh().nInternalFaces();
facei < mesh().nFaces();
facei++
)
{
addOrDelete(set, faceI, add);
addOrDelete(set, facei, add);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,13 +56,13 @@ void Foam::boxToFace::combine(topoSet& set, const bool add) const
{
const pointField& ctrs = mesh_.faceCentres();
forAll(ctrs, faceI)
forAll(ctrs, facei)
{
forAll(bbs_, i)
{
if (bbs_[i].contains(ctrs[faceI]))
if (bbs_[i].contains(ctrs[facei]))
{
addOrDelete(set, faceI, add);
addOrDelete(set, facei, add);
break;
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -81,8 +81,8 @@ void Foam::cellToFace::combine(topoSet& set, const bool add) const
// Add all faces from cell
forAllConstIter(cellSet, loadedSet, iter)
{
const label cellI = iter.key();
const labelList& cFaces = mesh_.cells()[cellI];
const label celli = iter.key();
const labelList& cFaces = mesh_.cells()[celli];
forAll(cFaces, cFaceI)
{
@ -101,11 +101,11 @@ void Foam::cellToFace::combine(topoSet& set, const bool add) const
// Check all internal faces
for (label faceI = 0; faceI < nInt; faceI++)
for (label facei = 0; facei < nInt; facei++)
{
if (loadedSet.found(own[faceI]) && loadedSet.found(nei[faceI]))
if (loadedSet.found(own[facei]) && loadedSet.found(nei[facei]))
{
addOrDelete(set, faceI, add);
addOrDelete(set, facei, add);
}
}
@ -113,17 +113,17 @@ void Foam::cellToFace::combine(topoSet& set, const bool add) const
// Get coupled cell status
boolList neiInSet(mesh_.nFaces()-nInt, false);
forAll(patches, patchI)
forAll(patches, patchi)
{
const polyPatch& pp = patches[patchI];
const polyPatch& pp = patches[patchi];
if (pp.coupled())
{
label faceI = pp.start();
label facei = pp.start();
forAll(pp, i)
{
neiInSet[faceI-nInt] = loadedSet.found(own[faceI]);
faceI++;
neiInSet[facei-nInt] = loadedSet.found(own[facei]);
facei++;
}
}
}
@ -131,20 +131,20 @@ void Foam::cellToFace::combine(topoSet& set, const bool add) const
// Check all boundary faces
forAll(patches, patchI)
forAll(patches, patchi)
{
const polyPatch& pp = patches[patchI];
const polyPatch& pp = patches[patchi];
if (pp.coupled())
{
label faceI = pp.start();
label facei = pp.start();
forAll(pp, i)
{
if (loadedSet.found(own[faceI]) && neiInSet[faceI-nInt])
if (loadedSet.found(own[facei]) && neiInSet[facei-nInt])
{
addOrDelete(set, faceI, add);
addOrDelete(set, facei, add);
}
faceI++;
facei++;
}
}
}

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
@ -128,14 +128,14 @@ void Foam::normalToFace::applyToSet
Info<< " Adding faces according to normal being aligned with "
<< normal_ << " (to within " << tol_ << ") ..." << endl;
forAll(mesh_.faceAreas(), faceI)
forAll(mesh_.faceAreas(), facei)
{
vector n = mesh_.faceAreas()[faceI];
vector n = mesh_.faceAreas()[facei];
n /= mag(n) + VSMALL;
if (mag(1 - (n & normal_)) < tol_)
{
set.insert(faceI);
set.insert(facei);
}
}
}
@ -149,14 +149,14 @@ void Foam::normalToFace::applyToSet
forAllConstIter(topoSet, set, iter)
{
const label faceI = iter.key();
const label facei = iter.key();
vector n = mesh_.faceAreas()[faceI];
vector n = mesh_.faceAreas()[facei];
n /= mag(n) + VSMALL;
if (mag(1 - (n & normal_)) < tol_)
{
toBeRemoved.append(faceI);
toBeRemoved.append(facei);
}
}

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
@ -63,21 +63,21 @@ void Foam::patchToFace::combine(topoSet& set, const bool add) const
forAllConstIter(labelHashSet, patchIDs, iter)
{
label patchI = iter.key();
label patchi = iter.key();
const polyPatch& pp = mesh_.boundaryMesh()[patchI];
const polyPatch& pp = mesh_.boundaryMesh()[patchi];
Info<< " Found matching patch " << pp.name()
<< " with " << pp.size() << " faces." << endl;
for
(
label faceI = pp.start();
faceI < pp.start() + pp.size();
faceI++
label facei = pp.start();
facei < pp.start() + pp.size();
facei++
)
{
addOrDelete(set, faceI, add);
addOrDelete(set, facei, add);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -100,13 +100,13 @@ void Foam::pointToFace::combine(topoSet& set, const bool add) const
forAll(pFaces, pFaceI)
{
const label faceI = pFaces[pFaceI];
const label facei = pFaces[pFaceI];
Map<label>::iterator fndFace = numPoints.find(faceI);
Map<label>::iterator fndFace = numPoints.find(facei);
if (fndFace == numPoints.end())
{
numPoints.insert(faceI, 1);
numPoints.insert(facei, 1);
}
else
{
@ -120,26 +120,26 @@ void Foam::pointToFace::combine(topoSet& set, const bool add) const
// in face -> all points of face
forAllConstIter(Map<label>, numPoints, iter)
{
const label faceI = iter.key();
const label facei = iter.key();
if (iter() == mesh_.faces()[faceI].size())
if (iter() == mesh_.faces()[facei].size())
{
addOrDelete(set, faceI, add);
addOrDelete(set, facei, add);
}
}
}
else if (option_ == EDGE)
{
const faceList& faces = mesh_.faces();
forAll(faces, faceI)
forAll(faces, facei)
{
const face& f = faces[faceI];
const face& f = faces[facei];
forAll(f, fp)
{
if (loadedSet.found(f[fp]) && loadedSet.found(f.nextLabel(fp)))
{
addOrDelete(set, faceI, add);
addOrDelete(set, facei, add);
break;
}
}

View File

@ -62,7 +62,7 @@ void Foam::regionToFace::markZone
(
const indirectPrimitivePatch& patch,
const label procI,
const label faceI,
const label facei,
const label zoneI,
labelList& faceZone
) const
@ -76,7 +76,7 @@ void Foam::regionToFace::markZone
if (Pstream::myProcNo() == procI)
{
const labelList& fEdges = patch.faceEdges()[faceI];
const labelList& fEdges = patch.faceEdges()[facei];
forAll(fEdges, i)
{
changedEdges.append(fEdges[i]);
@ -100,11 +100,11 @@ void Foam::regionToFace::markZone
returnReduce(patch.nEdges(), sumOp<label>())
);
forAll(allFaceInfo, faceI)
forAll(allFaceInfo, facei)
{
if (allFaceInfo[faceI].region() == zoneI)
if (allFaceInfo[facei].region() == zoneI)
{
faceZone[faceI] = zoneI;
faceZone[facei] = zoneI;
}
}
}
@ -164,11 +164,11 @@ void Foam::regionToFace::combine(topoSet& set, const bool add) const
faceRegion
);
forAll(faceRegion, faceI)
forAll(faceRegion, facei)
{
if (faceRegion[faceI] == 0)
if (faceRegion[facei] == 0)
{
addOrDelete(set, patch.addressing()[faceI], add);
addOrDelete(set, patch.addressing()[facei], add);
}
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -71,7 +71,7 @@ class regionToFace
(
const indirectPrimitivePatch& patch,
const label procI,
const label faceI,
const label facei,
const label zoneI,
labelList& faceZone
) const;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -117,10 +117,10 @@ void Foam::searchableSurfaceToFaceZone::applyToSet
const pointField& cc = mesh_.cellCentres();
// Internal faces
for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++)
for (label facei = 0; facei < mesh_.nInternalFaces(); facei++)
{
start[faceI] = cc[mesh_.faceOwner()[faceI]];
end[faceI] = cc[mesh_.faceNeighbour()[faceI]];
start[facei] = cc[mesh_.faceOwner()[facei]];
end[facei] = cc[mesh_.faceNeighbour()[facei]];
}
// Boundary faces
@ -129,26 +129,26 @@ void Foam::searchableSurfaceToFaceZone::applyToSet
const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
forAll(pbm, patchI)
forAll(pbm, patchi)
{
const polyPatch& pp = pbm[patchI];
const polyPatch& pp = pbm[patchi];
if (pp.coupled())
{
forAll(pp, i)
{
label faceI = pp.start()+i;
start[faceI] = cc[mesh_.faceOwner()[faceI]];
end[faceI] = nbrCellCentres[faceI-mesh_.nInternalFaces()];
label facei = pp.start()+i;
start[facei] = cc[mesh_.faceOwner()[facei]];
end[facei] = nbrCellCentres[facei-mesh_.nInternalFaces()];
}
}
else
{
forAll(pp, i)
{
label faceI = pp.start()+i;
start[faceI] = cc[mesh_.faceOwner()[faceI]];
end[faceI] = mesh_.faceCentres()[faceI];
label facei = pp.start()+i;
start[facei] = cc[mesh_.faceOwner()[facei]];
end[facei] = mesh_.faceCentres()[facei];
}
}
}
@ -174,13 +174,13 @@ void Foam::searchableSurfaceToFaceZone::applyToSet
DynamicList<label> newAddressing(fzSet.addressing());
DynamicList<bool> newFlipMap(fzSet.flipMap());
forAll(hits, faceI)
forAll(hits, facei)
{
if (hits[faceI].hit() && !fzSet.found(faceI))
if (hits[facei].hit() && !fzSet.found(facei))
{
newAddressing.append(faceI);
vector d = end[faceI]-start[faceI];
newFlipMap.append((normals[faceI] & d) < 0);
newAddressing.append(facei);
vector d = end[facei]-start[facei];
newFlipMap.append((normals[facei] & d) < 0);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -130,13 +130,13 @@ void Foam::setAndNormalToFaceZone::applyToSet
forAllConstIter(faceSet, fSet, iter)
{
label faceI = iter.key();
label facei = iter.key();
if (!fzSet.found(faceI))
if (!fzSet.found(facei))
{
newAddressing.append(faceI);
newAddressing.append(facei);
vector n = faces[faceI].normal(points);
vector n = faces[facei].normal(points);
if ((n & normal_) > 0)
{
newFlipMap.append(false);

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
@ -127,11 +127,11 @@ void Foam::setToFaceZone::applyToSet
forAllConstIter(faceSet, fSet, iter)
{
label faceI = iter.key();
label facei = iter.key();
if (!fzSet.found(faceI))
if (!fzSet.found(facei))
{
newAddressing.append(faceI);
newAddressing.append(facei);
newFlipMap.append(false);
}
}

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
@ -133,18 +133,18 @@ void Foam::setsToFaceZone::applyToSet
forAllConstIter(faceSet, fSet, iter)
{
label faceI = iter.key();
label facei = iter.key();
if (!fzSet.found(faceI))
if (!fzSet.found(facei))
{
bool flipFace = false;
label own = mesh_.faceOwner()[faceI];
label own = mesh_.faceOwner()[facei];
bool ownFound = cSet.found(own);
if (mesh_.isInternalFace(faceI))
if (mesh_.isInternalFace(facei))
{
label nei = mesh_.faceNeighbour()[faceI];
label nei = mesh_.faceNeighbour()[facei];
bool neiFound = cSet.found(nei);
if (ownFound && !neiFound)
@ -159,11 +159,11 @@ void Foam::setsToFaceZone::applyToSet
{
WarningInFunction
<< "One of owner or neighbour of internal face "
<< faceI << " should be in cellSet "
<< facei << " should be in cellSet "
<< cSet.name()
<< " to be able to determine orientation."
<< endl
<< "Face:" << faceI << " own:" << own
<< "Face:" << facei << " own:" << own
<< " OwnInCellSet:" << ownFound
<< " nei:" << nei
<< " NeiInCellSet:" << neiFound
@ -181,7 +181,7 @@ void Foam::setsToFaceZone::applyToSet
flipFace = !flipFace;
}
newAddressing.append(faceI);
newAddressing.append(facei);
newFlipMap.append(flipFace);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -70,8 +70,8 @@ void Foam::cellToPoint::combine(topoSet& set, const bool add) const
// Add all point from cells in loadedSet
forAllConstIter(cellSet, loadedSet, iter)
{
const label cellI = iter.key();
const labelList& cFaces = mesh_.cells()[cellI];
const label celli = iter.key();
const labelList& cFaces = mesh_.cells()[celli];
forAll(cFaces, cFaceI)
{

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
@ -139,17 +139,17 @@ Foam::Istream& Foam::topoSetSource::checkIs(Istream& is)
void Foam::topoSetSource::addOrDelete
(
topoSet& set,
const label cellI,
const label celli,
const bool add
) const
{
if (add)
{
set.insert(cellI);
set.insert(celli);
}
else
{
set.erase(cellI);
set.erase(celli);
}
}

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
@ -126,8 +126,8 @@ protected:
const polyMesh& mesh_;
//- Add (if bool) cellI to set or delete cellI from set.
void addOrDelete(topoSet& set, const label cellI, const bool) const;
//- Add (if bool) celli to set or delete celli from set.
void addOrDelete(topoSet& set, const label celli, const bool) const;
private:

View File

@ -139,9 +139,9 @@ void cellZoneSet::invert(const label maxLen)
// Count
label n = 0;
for (label cellI = 0; cellI < maxLen; cellI++)
for (label celli = 0; celli < maxLen; celli++)
{
if (!found(cellI))
if (!found(celli))
{
n++;
}
@ -151,11 +151,11 @@ void cellZoneSet::invert(const label maxLen)
addressing_.setSize(n);
n = 0;
for (label cellI = 0; cellI < maxLen; cellI++)
for (label celli = 0; celli < maxLen; celli++)
{
if (!found(cellI))
if (!found(celli))
{
addressing_[n] = cellI;
addressing_[n] = celli;
n++;
}
}
@ -172,11 +172,11 @@ void cellZoneSet::subset(const topoSet& set)
forAll(fSet.addressing(), i)
{
label cellI = fSet.addressing()[i];
label celli = fSet.addressing()[i];
if (found(cellI))
if (found(celli))
{
newAddressing.append(cellI);
newAddressing.append(celli);
}
}
@ -193,11 +193,11 @@ void cellZoneSet::addSet(const topoSet& set)
forAll(fSet.addressing(), i)
{
label cellI = fSet.addressing()[i];
label celli = fSet.addressing()[i];
if (!found(cellI))
if (!found(celli))
{
newAddressing.append(cellI);
newAddressing.append(celli);
}
}
@ -214,12 +214,12 @@ void cellZoneSet::deleteSet(const topoSet& set)
forAll(addressing_, i)
{
label cellI = addressing_[i];
label celli = addressing_[i];
if (!fSet.found(cellI))
if (!fSet.found(celli))
{
// Not found in fSet so add
newAddressing.append(cellI);
newAddressing.append(celli);
}
}
@ -290,8 +290,8 @@ void cellZoneSet::updateMesh(const mapPolyMesh& morphMap)
label n = 0;
forAll(addressing_, i)
{
label cellI = addressing_[i];
label newCellI = morphMap.reverseCellMap()[cellI];
label celli = addressing_[i];
label newCellI = morphMap.reverseCellMap()[celli];
if (newCellI >= 0)
{
newAddressing[n] = newCellI;

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
@ -122,16 +122,16 @@ void faceSet::sync(const polyMesh& mesh)
label nAdded = 0;
forAll(set, faceI)
forAll(set, facei)
{
if (set[faceI])
if (set[facei])
{
if (insert(faceI))
if (insert(facei))
{
nAdded++;
}
}
else if (found(faceI))
else if (found(facei))
{
FatalErrorInFunction
<< "Problem : syncing removed faces from set."

View File

@ -144,9 +144,9 @@ void faceZoneSet::invert(const label maxLen)
// Count
label n = 0;
for (label faceI = 0; faceI < maxLen; faceI++)
for (label facei = 0; facei < maxLen; facei++)
{
if (!found(faceI))
if (!found(facei))
{
n++;
}
@ -157,11 +157,11 @@ void faceZoneSet::invert(const label maxLen)
flipMap_.setSize(n);
n = 0;
for (label faceI = 0; faceI < maxLen; faceI++)
for (label facei = 0; facei < maxLen; facei++)
{
if (!found(faceI))
if (!found(facei))
{
addressing_[n] = faceI;
addressing_[n] = facei;
flipMap_[n] = false; //? or true?
n++;
}
@ -187,9 +187,9 @@ void faceZoneSet::subset(const topoSet& set)
forAll(fSet.addressing(), i)
{
label faceI = fSet.addressing()[i];
label facei = fSet.addressing()[i];
Map<label>::const_iterator iter = faceToIndex.find(faceI);
Map<label>::const_iterator iter = faceToIndex.find(facei);
if (iter != faceToIndex.end())
{
@ -199,7 +199,7 @@ void faceZoneSet::subset(const topoSet& set)
{
nConflict++;
}
newAddressing.append(faceI);
newAddressing.append(facei);
newFlipMap.append(flipMap_[index]);
}
}
@ -235,9 +235,9 @@ void faceZoneSet::addSet(const topoSet& set)
forAll(fSet.addressing(), i)
{
label faceI = fSet.addressing()[i];
label facei = fSet.addressing()[i];
Map<label>::const_iterator iter = faceToIndex.find(faceI);
Map<label>::const_iterator iter = faceToIndex.find(facei);
if (iter != faceToIndex.end())
{
@ -250,7 +250,7 @@ void faceZoneSet::addSet(const topoSet& set)
}
else
{
newAddressing.append(faceI);
newAddressing.append(facei);
newFlipMap.append(fSet.flipMap()[i]);
}
}
@ -286,9 +286,9 @@ void faceZoneSet::deleteSet(const topoSet& set)
forAll(addressing_, i)
{
label faceI = addressing_[i];
label facei = addressing_[i];
Map<label>::const_iterator iter = faceToIndex.find(faceI);
Map<label>::const_iterator iter = faceToIndex.find(facei);
if (iter != faceToIndex.end())
{
@ -302,7 +302,7 @@ void faceZoneSet::deleteSet(const topoSet& set)
else
{
// Not found in fSet so add
newAddressing.append(faceI);
newAddressing.append(facei);
newFlipMap.append(fSet.flipMap()[i]);
}
}
@ -385,8 +385,8 @@ void faceZoneSet::updateMesh(const mapPolyMesh& morphMap)
label n = 0;
forAll(addressing_, i)
{
label faceI = addressing_[i];
label newFaceI = morphMap.reverseFaceMap()[faceI];
label facei = addressing_[i];
label newFaceI = morphMap.reverseFaceMap()[facei];
if (newFaceI >= 0)
{
newAddressing[n] = newFaceI;

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
@ -454,11 +454,11 @@ void Foam::topoSet::invert(const label maxLen)
clear();
resize(2*(maxLen - currentSet.size()));
for (label cellI = 0; cellI < maxLen; cellI++)
for (label celli = 0; celli < maxLen; celli++)
{
if (!currentSet.found(cellI))
if (!currentSet.found(celli))
{
insert(cellI);
insert(celli);
}
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -69,16 +69,16 @@ License
//(
// const primitiveMesh& mesh,
// const boolList& selectedPoint,
// const label cellI
// const label celli
//)
//{
// const labelList& cFaces = mesh.cells()[cellI];
// const labelList& cFaces = mesh.cells()[celli];
//
// forAll(cFaces, cFaceI)
// {
// label faceI = cFaces[cFaceI];
// label facei = cFaces[cFaceI];
//
// const face& f = mesh.faces()[faceI];
// const face& f = mesh.faces()[facei];
//
// forAll(f, fp)
// {
@ -149,16 +149,16 @@ License
// label nRemoved = 0;
// forAllConstIter(labelHashSet, flatCandidates, iter)
// {
// label cellI = iter.key();
// label celli = iter.key();
//
// const cell& cll = cells[cellI];
// const cell& cll = cells[celli];
//
// scalar newVol = cll.mag(newPoints, faces);
// scalar oldVol = mesh.cellVolumes()[cellI];
// scalar oldVol = mesh.cellVolumes()[celli];
//
// if (newVol < 0.1 * oldVol)
// {
// internalCells.erase(cellI);
// internalCells.erase(celli);
// nRemoved++;
// }
// }
@ -258,21 +258,21 @@ void Foam::surfaceSets::getSurfaceSets
);
}
forAll(cellType, cellI)
forAll(cellType, celli)
{
label cType = cellType[cellI];
label cType = cellType[celli];
if (cType == cellClassification::CUT)
{
cut.insert(cellI);
cut.insert(celli);
}
else if (cType == cellClassification::INSIDE)
{
inside.insert(cellI);
inside.insert(celli);
}
else if (cType == cellClassification::OUTSIDE)
{
outside.insert(cellI);
outside.insert(celli);
}
}
}
@ -295,12 +295,12 @@ Foam::labelHashSet Foam::surfaceSets::getHangingCells
List<pointStatus> pointSide(mesh.nPoints(), NOTSET);
for (label cellI = 0; cellI < mesh.nCells(); cellI++)
for (label celli = 0; celli < mesh.nCells(); celli++)
{
if (internalCells.found(cellI))
if (internalCells.found(celli))
{
// Inside cell. Mark all vertices seen from this cell.
const labelList& cFaces = cells[cellI];
const labelList& cFaces = cells[celli];
forAll(cFaces, cFaceI)
{
@ -328,7 +328,7 @@ Foam::labelHashSet Foam::surfaceSets::getHangingCells
else
{
// Outside cell
const labelList& cFaces = cells[cellI];
const labelList& cFaces = cells[celli];
forAll(cFaces, cFaceI)
{
@ -376,8 +376,8 @@ Foam::labelHashSet Foam::surfaceSets::getHangingCells
forAllConstIter(labelHashSet, internalCells, iter)
{
const label cellI = iter.key();
const cell& cFaces = cells[cellI];
const label celli = iter.key();
const cell& cFaces = cells[celli];
label usesMixedOnly = true;
@ -401,7 +401,7 @@ Foam::labelHashSet Foam::surfaceSets::getHangingCells
}
if (usesMixedOnly)
{
mixedOnlyCells.insert(cellI);
mixedOnlyCells.insert(celli);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -87,7 +87,7 @@ class surfaceSets
//(
// const primitiveMesh& mesh,
// const boolList& selectedPoint,
// const label cellI
// const label celli
//);
////- Find points used only by internalCells and remove from

View File

@ -137,9 +137,9 @@ Foam::geometricSurfacePatchList Foam::booleanSurface::mergePatches
// Copy all patches of surf1
label combinedPatchI = 0;
forAll(surf1.patches(), patchI)
forAll(surf1.patches(), patchi)
{
combinedPatches[combinedPatchI++] = surf1.patches()[patchI];
combinedPatches[combinedPatchI++] = surf1.patches()[patchi];
}
// (inefficiently) add unique patches from surf2
@ -308,15 +308,15 @@ void Foam::booleanSurface::propagateSide
(
const triSurface& surf,
const label prevState,
const label faceI,
const label facei,
labelList& side
)
{
if (side[faceI] == UNVISITED)
if (side[facei] == UNVISITED)
{
side[faceI] = prevState;
side[facei] = prevState;
const labelledTri& tri = surf.localFaces()[faceI];
const labelledTri& tri = surf.localFaces()[facei];
// Get copy of face labels
label a = tri[0];
@ -325,7 +325,7 @@ void Foam::booleanSurface::propagateSide
// Go and visit my edges' face-neighbours.
const labelList& myEdges = surf.faceEdges()[faceI];
const labelList& myEdges = surf.faceEdges()[facei];
label edgeAB = findEdge(surf.edges(), myEdges, edge(a, b));
@ -333,7 +333,7 @@ void Foam::booleanSurface::propagateSide
(
surf,
a,
faceI,
facei,
prevState,
edgeAB,
side
@ -345,7 +345,7 @@ void Foam::booleanSurface::propagateSide
(
surf,
b,
faceI,
facei,
prevState,
edgeBC,
side
@ -357,7 +357,7 @@ void Foam::booleanSurface::propagateSide
(
surf,
c,
faceI,
facei,
prevState,
edgeCA,
side
@ -485,11 +485,11 @@ Foam::booleanSurface::booleanSurface
// Subset zone which includes cutSurf2FaceI
boolList includedFaces1(cutSurf1.size(), false);
forAll(faceZone1, faceI)
forAll(faceZone1, facei)
{
if (faceZone1[faceI] == faceZone1[cutSurf1FaceI])
if (faceZone1[facei] == faceZone1[cutSurf1FaceI])
{
includedFaces1[faceI] = true;
includedFaces1[facei] = true;
}
}
@ -533,11 +533,11 @@ Foam::booleanSurface::booleanSurface
// Subset zone which includes cutSurf2FaceI
boolList includedFaces2(cutSurf2.size(), false);
forAll(faceZone2, faceI)
forAll(faceZone2, facei)
{
if (faceZone2[faceI] == faceZone2[cutSurf2FaceI])
if (faceZone2[facei] == faceZone2[cutSurf2FaceI])
{
includedFaces2[faceI] = true;
includedFaces2[facei] = true;
}
}
@ -651,18 +651,18 @@ Foam::booleanSurface::booleanSurface
// Copy faces from subSurf1. No need for renumbering.
label combinedFaceI = 0;
forAll(subSurf1, faceI)
forAll(subSurf1, facei)
{
faceMap_[combinedFaceI] = faceMap1[faceI];
combinedFaces[combinedFaceI++] = subSurf1[faceI];
faceMap_[combinedFaceI] = faceMap1[facei];
combinedFaces[combinedFaceI++] = subSurf1[facei];
}
// Copy and renumber faces from subSurf2.
forAll(subSurf2, faceI)
forAll(subSurf2, facei)
{
const labelledTri& f = subSurf2[faceI];
const labelledTri& f = subSurf2[facei];
faceMap_[combinedFaceI] = -faceMap2[faceI]-1;
faceMap_[combinedFaceI] = -faceMap2[facei]-1;
combinedFaces[combinedFaceI++] =
labelledTri
@ -858,16 +858,16 @@ Foam::booleanSurface::booleanSurface
label combinedFaceI = 0;
forAll(cutSurf1, faceI)
forAll(cutSurf1, facei)
{
combinedFaces[combinedFaceI++] = cutSurf1[faceI];
combinedFaces[combinedFaceI++] = cutSurf1[facei];
}
forAll(cutSurf2, faceI)
forAll(cutSurf2, facei)
{
labelledTri& combinedTri = combinedFaces[combinedFaceI++];
const labelledTri& tri = cutSurf2[faceI];
const labelledTri& tri = cutSurf2[facei];
forAll(tri, fp)
{
@ -918,13 +918,13 @@ Foam::booleanSurface::booleanSurface
label combinedFaceI = 0;
forAll(cutSurf1, faceI)
forAll(cutSurf1, facei)
{
faceMap_[combinedFaceI++] = cutSurf1.faceMap()[faceI];
faceMap_[combinedFaceI++] = cutSurf1.faceMap()[facei];
}
forAll(cutSurf2, faceI)
forAll(cutSurf2, facei)
{
faceMap_[combinedFaceI++] = -cutSurf2.faceMap()[faceI] - 1;
faceMap_[combinedFaceI++] = -cutSurf2.faceMap()[facei] - 1;
}
triSurface::operator=(combinedSurf);
@ -945,14 +945,14 @@ Foam::booleanSurface::booleanSurface
label minFaceI = -1;
pointHit minHit(false, Zero, GREAT, true);
forAll(combinedSurf, faceI)
forAll(combinedSurf, facei)
{
pointHit curHit = combinedSurf[faceI].nearestPoint(outsidePoint, pts);
pointHit curHit = combinedSurf[facei].nearestPoint(outsidePoint, pts);
if (curHit.distance() < minHit.distance())
{
minHit = curHit;
minFaceI = faceI;
minFaceI = facei;
}
}
@ -981,43 +981,43 @@ Foam::booleanSurface::booleanSurface
boolList include(combinedSurf.size(), false);
forAll(side, faceI)
forAll(side, facei)
{
if (side[faceI] == UNVISITED)
if (side[facei] == UNVISITED)
{
FatalErrorInFunction
<< "Face " << faceI << " has not been reached by walking from"
<< "Face " << facei << " has not been reached by walking from"
<< " nearest point " << minHit.rawPoint()
<< " nearest face " << minFaceI << exit(FatalError);
}
else if (side[faceI] == OUTSIDE)
else if (side[facei] == OUTSIDE)
{
if (booleanOp == booleanSurface::UNION)
{
include[faceI] = true;
include[facei] = true;
}
else if (booleanOp == booleanSurface::INTERSECTION)
{
include[faceI] = false;
include[facei] = false;
}
else // difference
{
include[faceI] = (faceI < cutSurf1.size()); // face from surf1
include[facei] = (facei < cutSurf1.size()); // face from surf1
}
}
else // inside
{
if (booleanOp == booleanSurface::UNION)
{
include[faceI] = false;
include[facei] = false;
}
else if (booleanOp == booleanSurface::INTERSECTION)
{
include[faceI] = true;
include[facei] = true;
}
else // difference
{
include[faceI] = (faceI >= cutSurf1.size()); // face from surf2
include[facei] = (facei >= cutSurf1.size()); // face from surf2
}
}
}
@ -1038,10 +1038,10 @@ Foam::booleanSurface::booleanSurface
// Create face map
faceMap_.setSize(subSurf.size());
forAll(subToCombinedFace, faceI)
forAll(subToCombinedFace, facei)
{
// Get label in combinedSurf
label combinedFaceI = subToCombinedFace[faceI];
label combinedFaceI = subToCombinedFace[facei];
// First faces in combinedSurf come from cutSurf1.
@ -1049,13 +1049,13 @@ Foam::booleanSurface::booleanSurface
{
label cutSurf1Face = combinedFaceI;
faceMap_[faceI] = cutSurf1.faceMap()[cutSurf1Face];
faceMap_[facei] = cutSurf1.faceMap()[cutSurf1Face];
}
else
{
label cutSurf2Face = combinedFaceI - cutSurf1.size();
faceMap_[faceI] = - cutSurf2.faceMap()[cutSurf2Face] - 1;
faceMap_[facei] = - cutSurf2.faceMap()[cutSurf2Face] - 1;
}
}

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
@ -148,7 +148,7 @@ class booleanSurface
(
const triSurface& surf,
const label prevState,
const label faceI,
const label facei,
labelList& side
);
@ -209,31 +209,31 @@ public:
return faceMap_;
}
bool from1(const label faceI) const
bool from1(const label facei) const
{
return faceMap_[faceI] >= 0;
return faceMap_[facei] >= 0;
}
bool surf1Face(const label faceI) const
bool surf1Face(const label facei) const
{
if (!from1(faceI))
if (!from1(facei))
{
FatalErrorInFunction
<< "face " << faceI << " not from surface 1"
<< "face " << facei << " not from surface 1"
<< abort(FatalError);
}
return faceMap_[faceI];
return faceMap_[facei];
}
bool surf2Face(const label faceI) const
bool surf2Face(const label facei) const
{
if (from1(faceI))
if (from1(facei))
{
FatalErrorInFunction
<< "face " << faceI << " not from surface 2"
<< "face " << facei << " not from surface 2"
<< abort(FatalError);
}
return -faceMap_[faceI]-1;
return -faceMap_[facei]-1;
}
};

View File

@ -266,28 +266,28 @@ Foam::edgeSurface::edgeSurface
// Get the face from the correct surface
const FixedList<label, 2>& twoFaces = iter.key();
label faceI;
label facei;
if (isFirstSurface)
{
faceI = twoFaces[0];
facei = twoFaces[0];
}
else
{
faceI = twoFaces[1];
facei = twoFaces[1];
}
// Store on face-edge addressing. (note: offset edge)
allFaceEdges[faceI].append(edgeI + nSurfaceEdges_);
allFaceEdges[facei].append(edgeI + nSurfaceEdges_);
}
// Transfer.
edges_.transfer(allEdges);
parentEdges_.transfer(allParentEdges);
forAll(allFaceEdges, faceI)
forAll(allFaceEdges, facei)
{
faceEdges_[faceI].transfer(allFaceEdges[faceI]);
faceEdges_[facei].transfer(allFaceEdges[facei]);
}
@ -301,14 +301,14 @@ Foam::edgeSurface::edgeSurface
{
Pout<< "edgeSurface : Dumping faceEdges to files" << endl;
forAll(faceEdges_, faceI)
forAll(faceEdges_, facei)
{
const labelList& fEdges = faceEdges_[faceI];
const labelList& fEdges = faceEdges_[facei];
if (fEdges.size() != 3)
{
fileName faceFName("face_" + name(faceI) + ".obj");
Pout<< "edgeSurface : Dumping faceEdges for face " << faceI
fileName faceFName("face_" + name(facei) + ".obj");
Pout<< "edgeSurface : Dumping faceEdges for face " << facei
<< " to " << faceFName << endl;
OFstream fStream(faceFName);
@ -341,7 +341,7 @@ Foam::edgeSurface::edgeSurface
void Foam::edgeSurface::addIntersectionEdges
(
const label faceI,
const label facei,
const edgeList& additionalEdges
)
{
@ -349,7 +349,7 @@ void Foam::edgeSurface::addIntersectionEdges
{
Pout<< "Old face consisted of edges:" << endl;
const labelList& fEdges = faceEdges_[faceI];
const labelList& fEdges = faceEdges_[facei];
forAll(fEdges, i)
{
const edge& e = edges_[fEdges[i]];
@ -375,7 +375,7 @@ void Foam::edgeSurface::addIntersectionEdges
}
// Append to faceEdges.
labelList& fEdges = faceEdges_[faceI];
labelList& fEdges = faceEdges_[facei];
label nFEdges = fEdges.size();
@ -393,7 +393,7 @@ void Foam::edgeSurface::addIntersectionEdges
if (debug & 2)
{
const labelList& fEdges = faceEdges_[faceI];
const labelList& fEdges = faceEdges_[facei];
Pout<< "New face consists of edges:" << endl;
forAll(fEdges, i)

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
@ -195,7 +195,7 @@ public:
//- Add intersection edges to a face. Used for connecting
// floating intersection on face to rest of face.
void addIntersectionEdges(const label faceI, const edgeList&);
void addIntersectionEdges(const label facei, const edgeList&);
};

View File

@ -286,13 +286,13 @@ Foam::Map<Foam::DynamicList<Foam::label>>
Foam::intersectedSurface::calcPointEdgeAddressing
(
const edgeSurface& eSurf,
const label faceI
const label facei
)
{
const pointField& points = eSurf.points();
const edgeList& edges = eSurf.edges();
const labelList& fEdges = eSurf.faceEdges()[faceI];
const labelList& fEdges = eSurf.faceEdges()[facei];
Map<DynamicList<label>> facePointEdges(4*fEdges.size());
@ -381,7 +381,7 @@ Foam::label Foam::intersectedSurface::nextEdge
(
const edgeSurface& eSurf,
const Map<label>& visited,
const label faceI,
const label facei,
const vector& n,
const Map<DynamicList<label>>& facePointEdges,
const label prevEdgeI,
@ -390,7 +390,7 @@ Foam::label Foam::intersectedSurface::nextEdge
{
const pointField& points = eSurf.points();
const edgeList& edges = eSurf.edges();
const labelList& fEdges = eSurf.faceEdges()[faceI];
const labelList& fEdges = eSurf.faceEdges()[facei];
// Edges connected to prevVertI
@ -400,7 +400,7 @@ Foam::label Foam::intersectedSurface::nextEdge
{
// Problem. Point not connected.
{
Pout<< "Writing face:" << faceI << " to face.obj" << endl;
Pout<< "Writing face:" << facei << " to face.obj" << endl;
OFstream str("face.obj");
writeOBJ(points, edges, fEdges, str);
@ -456,7 +456,7 @@ Foam::label Foam::intersectedSurface::nextEdge
if (mag(mag(e1) - 1) > SMALL)
{
{
Pout<< "Writing face:" << faceI << " to face.obj" << endl;
Pout<< "Writing face:" << facei << " to face.obj" << endl;
OFstream str("face.obj");
writeOBJ(points, edges, fEdges, str);
@ -524,7 +524,7 @@ Foam::label Foam::intersectedSurface::nextEdge
{
// No unvisited edge found
{
Pout<< "Writing face:" << faceI << " to face.obj" << endl;
Pout<< "Writing face:" << facei << " to face.obj" << endl;
OFstream str("face.obj");
writeOBJ(points, edges, fEdges, str);
@ -559,7 +559,7 @@ Foam::label Foam::intersectedSurface::nextEdge
Foam::face Foam::intersectedSurface::walkFace
(
const edgeSurface& eSurf,
const label faceI,
const label facei,
const vector& n,
const Map<DynamicList<label>>& facePointEdges,
@ -573,7 +573,7 @@ Foam::face Foam::intersectedSurface::walkFace
const edgeList& edges = eSurf.edges();
// Overestimate size of face
face f(eSurf.faceEdges()[faceI].size());
face f(eSurf.faceEdges()[facei].size());
label fp = 0;
@ -619,7 +619,7 @@ Foam::face Foam::intersectedSurface::walkFace
(
eSurf,
visited,
faceI,
facei,
n,
facePointEdges,
edgeI,
@ -636,7 +636,7 @@ Foam::face Foam::intersectedSurface::walkFace
void Foam::intersectedSurface::findNearestVisited
(
const edgeSurface& eSurf,
const label faceI,
const label facei,
const Map<DynamicList<label>>& facePointEdges,
const Map<label>& pointVisited,
const point& pt,
@ -673,7 +673,7 @@ void Foam::intersectedSurface::findNearestVisited
if (minVertI == -1)
{
const labelList& fEdges = eSurf.faceEdges()[faceI];
const labelList& fEdges = eSurf.faceEdges()[facei];
SeriousErrorInFunction
<< "Dumping face edges to faceEdges.obj" << endl;
@ -698,7 +698,7 @@ void Foam::intersectedSurface::findNearestVisited
Foam::faceList Foam::intersectedSurface::resplitFace
(
const triSurface& surf,
const label faceI,
const label facei,
const Map<DynamicList<label>>& facePointEdges,
const Map<label>& visited,
edgeSurface& eSurf
@ -706,9 +706,9 @@ Foam::faceList Foam::intersectedSurface::resplitFace
{
{
// Dump face for debugging.
Pout<< "Writing face:" << faceI << " to face.obj" << endl;
Pout<< "Writing face:" << facei << " to face.obj" << endl;
OFstream str("face.obj");
writeOBJ(eSurf.points(), eSurf.edges(), eSurf.faceEdges()[faceI], str);
writeOBJ(eSurf.points(), eSurf.edges(), eSurf.faceEdges()[facei], str);
}
@ -804,7 +804,7 @@ Foam::faceList Foam::intersectedSurface::resplitFace
findNearestVisited
(
eSurf,
faceI,
facei,
facePointEdges,
pointVisited,
eSurf.points()[pointI],
@ -851,7 +851,7 @@ Foam::faceList Foam::intersectedSurface::resplitFace
findNearestVisited
(
eSurf,
faceI,
facei,
facePointEdges,
pointVisited,
eSurf.points()[pointI],
@ -888,34 +888,34 @@ Foam::faceList Foam::intersectedSurface::resplitFace
edgeList additionalEdges(1);
additionalEdges[0] = edge(visitedVert0, unvisitedVert0);
eSurf.addIntersectionEdges(faceI, additionalEdges);
eSurf.addIntersectionEdges(facei, additionalEdges);
fileName newFName("face_" + Foam::name(faceI) + "_newEdges.obj");
Pout<< "Dumping face:" << faceI << " to " << newFName << endl;
fileName newFName("face_" + Foam::name(facei) + "_newEdges.obj");
Pout<< "Dumping face:" << facei << " to " << newFName << endl;
writeLocalOBJ
(
eSurf.points(),
eSurf.edges(),
eSurf.faceEdges()[faceI],
eSurf.faceEdges()[facei],
newFName
);
// Retry splitFace. Use recursion since is rare situation.
return splitFace(surf, faceI, eSurf);
return splitFace(surf, facei, eSurf);
}
Foam::faceList Foam::intersectedSurface::splitFace
(
const triSurface& surf,
const label faceI,
const label facei,
edgeSurface& eSurf
)
{
// Alias
const pointField& points = eSurf.points();
const edgeList& edges = eSurf.edges();
const labelList& fEdges = eSurf.faceEdges()[faceI];
const labelList& fEdges = eSurf.faceEdges()[facei];
// Create local (for the face only) point-edge connectivity.
Map<DynamicList<label>> facePointEdges
@ -923,7 +923,7 @@ Foam::faceList Foam::intersectedSurface::splitFace
calcPointEdgeAddressing
(
eSurf,
faceI
facei
)
);
@ -944,11 +944,11 @@ Foam::faceList Foam::intersectedSurface::splitFace
if
(
owner == faceI
owner == facei
|| sameEdgeOrder
(
surf.localFaces()[owner],
surf.localFaces()[faceI]
surf.localFaces()[facei]
)
)
{
@ -1025,7 +1025,7 @@ Foam::faceList Foam::intersectedSurface::splitFace
//printVisit(eSurf.edges(), fEdges, visited);
//{
// Pout<< "Writing face:" << faceI << " to face.obj" << endl;
// Pout<< "Writing face:" << facei << " to face.obj" << endl;
// OFstream str("face.obj");
// writeOBJ(eSurf.points(), eSurf.edges(), fEdges, str);
//}
@ -1035,8 +1035,8 @@ Foam::faceList Foam::intersectedSurface::splitFace
walkFace
(
eSurf,
faceI,
surf.faceNormals()[faceI],
facei,
surf.faceNormals()[facei],
facePointEdges,
startEdgeI,
@ -1064,7 +1064,7 @@ Foam::faceList Foam::intersectedSurface::splitFace
FatalErrorInFunction
<< "Problem: edge " << edgeI << " vertices "
<< edges[edgeI] << " on face " << faceI
<< edges[edgeI] << " on face " << facei
<< " has visited status " << stat << " from a "
<< "righthanded walk along all"
<< " of the triangle edges. Are the original surfaces"
@ -1092,7 +1092,7 @@ Foam::faceList Foam::intersectedSurface::splitFace
return resplitFace
(
surf,
faceI,
facei,
facePointEdges,
visited,
eSurf
@ -1106,7 +1106,7 @@ Foam::faceList Foam::intersectedSurface::splitFace
vector n = faces[0].normal(eSurf.points());
if ((n & surf.faceNormals()[faceI]) < 0)
if ((n & surf.faceNormals()[facei]) < 0)
{
forAll(faces, i)
{
@ -1161,9 +1161,9 @@ Foam::intersectedSurface::intersectedSurface
// Identity for face map
faceMap_.setSize(size());
forAll(faceMap_, faceI)
forAll(faceMap_, facei)
{
faceMap_[faceI] = faceI;
faceMap_[facei] = facei;
}
return;
}
@ -1185,11 +1185,11 @@ Foam::intersectedSurface::intersectedSurface
// Start in newTris for decomposed face.
labelList startTriI(surf.size(), 0);
forAll(surf, faceI)
forAll(surf, facei)
{
startTriI[faceI] = newTris.size();
startTriI[facei] = newTris.size();
if (eSurf.faceEdges()[faceI].size() != surf.faceEdges()[faceI].size())
if (eSurf.faceEdges()[facei].size() != surf.faceEdges()[facei].size())
{
// Face has been cut by intersection.
// Cut face into multiple subfaces. Use faceEdge information
@ -1200,7 +1200,7 @@ Foam::intersectedSurface::intersectedSurface
splitFace
(
surf,
faceI, // current triangle
facei, // current triangle
eSurf // face-edge description of surface
// + intersection
)
@ -1213,12 +1213,12 @@ Foam::intersectedSurface::intersectedSurface
// fileName fName
// (
// "face_"
// + Foam::name(faceI)
// + Foam::name(facei)
// + "_subFace_"
// + Foam::name(newFaceI)
// + ".obj"
// );
// Pout<< "Writing original face:" << faceI << " subFace:"
// Pout<< "Writing original face:" << facei << " subFace:"
// << newFaceI << " to " << fName << endl;
//
// OFstream str(fName);
@ -1236,8 +1236,8 @@ Foam::intersectedSurface::intersectedSurface
// }
const vector& n = surf.faceNormals()[faceI];
const label region = surf[faceI].region();
const vector& n = surf.faceNormals()[facei];
const label region = surf[facei].region();
faceTriangulation tris(eSurf.points(), newF, n);
@ -1250,7 +1250,7 @@ Foam::intersectedSurface::intersectedSurface
if (t[i] < 0 || t[i] >= eSurf.points().size())
{
FatalErrorInFunction
<< "Face triangulation of face " << faceI
<< "Face triangulation of face " << facei
<< " uses points outside range 0.."
<< eSurf.points().size()-1 << endl
<< "Triangulation:"
@ -1266,7 +1266,7 @@ Foam::intersectedSurface::intersectedSurface
{
// Face has not been cut at all. No need to renumber vertices since
// eSurf keeps surface vertices first.
newTris.append(surf.localFaces()[faceI]);
newTris.append(surf.localFaces()[facei]);
}
}
@ -1288,11 +1288,11 @@ Foam::intersectedSurface::intersectedSurface
// Construct mapping back into original surface
faceMap_.setSize(size());
for (label faceI = 0; faceI < surf.size()-1; faceI++)
for (label facei = 0; facei < surf.size()-1; facei++)
{
for (label triI = startTriI[faceI]; triI < startTriI[faceI+1]; triI++)
for (label triI = startTriI[facei]; triI < startTriI[facei+1]; triI++)
{
faceMap_[triI] = faceI;
faceMap_[triI] = facei;
}
}
for (label triI = startTriI[surf.size()-1]; triI < size(); triI++)

View File

@ -170,7 +170,7 @@ private:
static Map<DynamicList<label>> calcPointEdgeAddressing
(
const edgeSurface&,
const label faceI
const label facei
);
//- Choose edge out of candidates (facePointEdges) according to
@ -179,7 +179,7 @@ private:
(
const edgeSurface& eSurf,
const Map<label>& visited,
const label faceI,
const label facei,
const vector& n, // original triangle normal
const Map<DynamicList<label>>& facePointEdges,
const label prevEdgeI,
@ -190,7 +190,7 @@ private:
static face walkFace
(
const edgeSurface& eSurf,
const label faceI,
const label facei,
const vector& n,
const Map<DynamicList<label>>& facePointEdges,
@ -205,7 +205,7 @@ private:
static void findNearestVisited
(
const edgeSurface& eSurf,
const label faceI,
const label facei,
const Map<DynamicList<label>>& facePointEdges,
const Map<label>& pointVisited,
const point& pt,
@ -220,7 +220,7 @@ private:
static faceList resplitFace
(
const triSurface& surf,
const label faceI,
const label facei,
const Map<DynamicList<label>>& facePointEdges,
const Map<label>& visited,
edgeSurface& eSurf
@ -231,7 +231,7 @@ private:
static faceList splitFace
(
const triSurface& surf,
const label faceI,
const label facei,
edgeSurface& eSurf
);

View File

@ -52,11 +52,11 @@ bool Foam::surfaceIntersection::excludeEdgeHit
(
const triSurface& surf,
const label edgeI,
const label faceI,
const label facei,
const scalar
)
{
const triSurface::FaceType& f = surf.localFaces()[faceI];
const triSurface::FaceType& f = surf.localFaces()[facei];
const edge& e = surf.edges()[edgeI];
forAll(f, fp)
@ -72,7 +72,7 @@ bool Foam::surfaceIntersection::excludeEdgeHit
// vector eVec = e.vec(surf.localPoints());
// eVec /= mag(eVec) + VSMALL;
//
// const labelList& eLabels = surf.faceEdges()[faceI];
// const labelList& eLabels = surf.faceEdges()[facei];
//
// // Get edge vector of 0th edge of face
// vector e0Vec = surf.edges()[eLabels[0]].vec(surf.localPoints());
@ -97,12 +97,12 @@ bool Foam::surfaceIntersection::excludeEdgeHit
// }
//
// // Check if same as faceNormal
// if (mag(n & surf.faceNormals()[faceI]) > 1-tol)
// if (mag(n & surf.faceNormals()[facei]) > 1-tol)
// {
//
// Pout<< "edge:" << e << " face:" << faceI
// Pout<< "edge:" << e << " face:" << facei
// << " e0Vec:" << e0Vec << " n:" << n
// << " normalComponent:" << (n & surf.faceNormals()[faceI])
// << " normalComponent:" << (n & surf.faceNormals()[facei])
// << " tol:" << tol << endl;
//
// return true;

Some files were not shown because too many files have changed in this diff Show More