mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Further standardization of loop index naming: pointI -> pointi, patchI -> patchi
This commit is contained in:
@ -581,25 +581,25 @@ int main(int argc, char *argv[])
|
||||
// Determine points and extrusion
|
||||
pointField layer0Points(extrudePatch.nPoints());
|
||||
pointField displacement(extrudePatch.nPoints());
|
||||
forAll(displacement, pointI)
|
||||
forAll(displacement, pointi)
|
||||
{
|
||||
const vector& patchNormal = extrudePatchPointNormals[pointI];
|
||||
const vector& patchNormal = extrudePatchPointNormals[pointi];
|
||||
|
||||
// layer0 point
|
||||
layer0Points[pointI] = model()
|
||||
layer0Points[pointi] = model()
|
||||
(
|
||||
extrudePatch.localPoints()[pointI],
|
||||
extrudePatch.localPoints()[pointi],
|
||||
patchNormal,
|
||||
0
|
||||
);
|
||||
// layerN point
|
||||
point extrudePt = model()
|
||||
(
|
||||
extrudePatch.localPoints()[pointI],
|
||||
extrudePatch.localPoints()[pointi],
|
||||
patchNormal,
|
||||
model().nLayers()
|
||||
);
|
||||
displacement[pointI] = extrudePt - layer0Points[pointI];
|
||||
displacement[pointi] = extrudePt - layer0Points[pointi];
|
||||
}
|
||||
|
||||
|
||||
@ -659,27 +659,27 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
// Reset points according to extrusion model
|
||||
forAll(layerExtrude.addedPoints(), pointI)
|
||||
forAll(layerExtrude.addedPoints(), pointi)
|
||||
{
|
||||
const labelList& pPoints = layerExtrude.addedPoints()[pointI];
|
||||
forAll(pPoints, pPointI)
|
||||
const labelList& pPoints = layerExtrude.addedPoints()[pointi];
|
||||
forAll(pPoints, pPointi)
|
||||
{
|
||||
label meshPointI = pPoints[pPointI];
|
||||
label meshPointi = pPoints[pPointi];
|
||||
|
||||
point modelPt
|
||||
(
|
||||
model()
|
||||
(
|
||||
extrudePatch.localPoints()[pointI],
|
||||
extrudePatchPointNormals[pointI],
|
||||
pPointI+1 // layer
|
||||
extrudePatch.localPoints()[pointi],
|
||||
extrudePatchPointNormals[pointi],
|
||||
pPointi+1 // layer
|
||||
)
|
||||
);
|
||||
|
||||
const_cast<DynamicList<point>&>
|
||||
(
|
||||
meshMod().points()
|
||||
)[meshPointI] = modelPt;
|
||||
)[meshPointi] = modelPt;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2440,16 +2440,16 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
meshMod.points()
|
||||
);
|
||||
label meshPointI = extrudePatch.localPoints().size();
|
||||
label meshPointi = extrudePatch.localPoints().size();
|
||||
forAll(localRegionPoints, regionI)
|
||||
{
|
||||
label pointI = localRegionPoints[regionI];
|
||||
point pt = extrudePatch.localPoints()[pointI];
|
||||
label pointi = localRegionPoints[regionI];
|
||||
point pt = extrudePatch.localPoints()[pointi];
|
||||
const vector& n = localRegionNormals[regionI];
|
||||
|
||||
for (label layerI = 1; layerI <= model().nLayers(); layerI++)
|
||||
{
|
||||
newPoints[meshPointI++] = model()(pt, n, layerI);
|
||||
newPoints[meshPointi++] = model()(pt, n, layerI);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -226,13 +226,13 @@ void Foam::extrude2DMesh::setRefinement
|
||||
{
|
||||
label offset = layer * points.size();
|
||||
|
||||
forAll(points, pointI)
|
||||
forAll(points, pointi)
|
||||
{
|
||||
// Don't need the surface normal for either linearDirection or
|
||||
// wedge. Will need to add to be able to use others.
|
||||
point newPoint = model_
|
||||
(
|
||||
points[pointI],
|
||||
points[pointi],
|
||||
vector(),
|
||||
layer
|
||||
);
|
||||
@ -240,7 +240,7 @@ void Foam::extrude2DMesh::setRefinement
|
||||
meshMod.addPoint
|
||||
(
|
||||
newPoint,
|
||||
pointI + offset,
|
||||
pointi + offset,
|
||||
-1, // zoneID
|
||||
true // inCell
|
||||
);
|
||||
@ -390,24 +390,24 @@ void Foam::extrude2DMesh::setRefinement
|
||||
|
||||
const face& f = faces[nextFacei];
|
||||
|
||||
label nextPointI;
|
||||
label nextPointi;
|
||||
if (mesh_.faceOwner()[nextFacei] == celli)
|
||||
{
|
||||
frontFace[0] = f[0];
|
||||
nextPointI = f[1];
|
||||
nextPointi = f[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
frontFace[0] = f[1];
|
||||
nextPointI = f[0];
|
||||
nextPointi = f[0];
|
||||
}
|
||||
|
||||
|
||||
for (label i = 1; i < frontFace.size(); i++)
|
||||
{
|
||||
frontFace[i] = nextPointI;
|
||||
frontFace[i] = nextPointi;
|
||||
|
||||
// Find face containing pointI
|
||||
// Find face containing pointi
|
||||
forAll(cFaces, cFacei)
|
||||
{
|
||||
label facei = cFaces[cFacei];
|
||||
@ -415,15 +415,15 @@ void Foam::extrude2DMesh::setRefinement
|
||||
{
|
||||
const face& f = faces[facei];
|
||||
|
||||
if (f[0] == nextPointI)
|
||||
if (f[0] == nextPointi)
|
||||
{
|
||||
nextPointI = f[1];
|
||||
nextPointi = f[1];
|
||||
nextFacei = facei;
|
||||
break;
|
||||
}
|
||||
else if (f[1] == nextPointI)
|
||||
else if (f[1] == nextPointi)
|
||||
{
|
||||
nextPointI = f[0];
|
||||
nextPointi = f[0];
|
||||
nextFacei = facei;
|
||||
break;
|
||||
}
|
||||
@ -486,24 +486,24 @@ void Foam::extrude2DMesh::setRefinement
|
||||
|
||||
const face& f = faces[nextFacei];
|
||||
|
||||
label nextPointI;
|
||||
label nextPointi;
|
||||
if (mesh_.faceOwner()[nextFacei] == celli)
|
||||
{
|
||||
frontFace[0] = f[0];
|
||||
nextPointI = f[1];
|
||||
nextPointi = f[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
frontFace[0] = f[1];
|
||||
nextPointI = f[0];
|
||||
nextPointi = f[0];
|
||||
}
|
||||
|
||||
|
||||
for (label i = 1; i < frontFace.size(); i++)
|
||||
{
|
||||
frontFace[i] = nextPointI;
|
||||
frontFace[i] = nextPointi;
|
||||
|
||||
// Find face containing pointI
|
||||
// Find face containing pointi
|
||||
forAll(cFaces, cFacei)
|
||||
{
|
||||
label facei = cFaces[cFacei];
|
||||
@ -511,15 +511,15 @@ void Foam::extrude2DMesh::setRefinement
|
||||
{
|
||||
const face& f = faces[facei];
|
||||
|
||||
if (f[0] == nextPointI)
|
||||
if (f[0] == nextPointi)
|
||||
{
|
||||
nextPointI = f[1];
|
||||
nextPointi = f[1];
|
||||
nextFacei = facei;
|
||||
break;
|
||||
}
|
||||
else if (f[1] == nextPointI)
|
||||
else if (f[1] == nextPointi)
|
||||
{
|
||||
nextPointI = f[0];
|
||||
nextPointi = f[0];
|
||||
nextFacei = facei;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -78,28 +78,28 @@ static const NamedEnum<ExtrudeMode, 2> ExtrudeModeNames;
|
||||
// pointField layer1Points(fMesh.nPoints());
|
||||
// pointField displacement(fMesh.nPoints());
|
||||
|
||||
// forAll(layer0Points, pointI)
|
||||
// forAll(layer0Points, pointi)
|
||||
// {
|
||||
// const labelList& meshPoints = fMesh.meshPoints();
|
||||
// label meshPointI = meshPoints[pointI];
|
||||
// label meshPointi = meshPoints[pointi];
|
||||
|
||||
// layer0Points[meshPointI] = model
|
||||
// layer0Points[meshPointi] = model
|
||||
// (
|
||||
// fMesh.points()[meshPointI],
|
||||
// fMesh.pointNormals()[pointI],
|
||||
// fMesh.points()[meshPointi],
|
||||
// fMesh.pointNormals()[pointi],
|
||||
// 0
|
||||
// );
|
||||
|
||||
// layer1Points[meshPointI] = model
|
||||
// layer1Points[meshPointi] = model
|
||||
// (
|
||||
// fMesh.points()[meshPointI],
|
||||
// fMesh.pointNormals()[pointI],
|
||||
// fMesh.points()[meshPointi],
|
||||
// fMesh.pointNormals()[pointi],
|
||||
// 1
|
||||
// );
|
||||
|
||||
// displacement[pointI] =
|
||||
// layer1Points[meshPointI]
|
||||
// - layer0Points[meshPointI];
|
||||
// displacement[pointi] =
|
||||
// layer1Points[meshPointi]
|
||||
// - layer0Points[meshPointi];
|
||||
// }
|
||||
|
||||
// fMesh.movePoints(layer0Points);
|
||||
|
||||
@ -537,9 +537,9 @@ int main(int argc, char *argv[])
|
||||
// Enforce the boundary conditions
|
||||
const triad& fixedAlignment = fixedAlignments[pI];
|
||||
|
||||
forAll(pPoints, adjPointI)
|
||||
forAll(pPoints, adjPointi)
|
||||
{
|
||||
const label adjPointIndex = pPoints[adjPointI];
|
||||
const label adjPointIndex = pPoints[adjPointi];
|
||||
|
||||
scalar dist = mag(points[pI] - points[adjPointIndex]);
|
||||
|
||||
|
||||
@ -91,9 +91,9 @@ void Foam::DelaunayMesh<Triangulation>::addPatches
|
||||
label nPatches = patchFaces.size();
|
||||
|
||||
patchDicts.setSize(nPatches);
|
||||
forAll(patchDicts, patchI)
|
||||
forAll(patchDicts, patchi)
|
||||
{
|
||||
patchDicts.set(patchI, new dictionary());
|
||||
patchDicts.set(patchi, new dictionary());
|
||||
}
|
||||
|
||||
label nBoundaryFaces = 0;
|
||||
|
||||
@ -364,9 +364,9 @@ void Foam::smoothAlignmentSolver::smoothAlignments
|
||||
|
||||
triad& newTriad = triadAv[pI];
|
||||
|
||||
forAll(pPoints, adjPointI)
|
||||
forAll(pPoints, adjPointi)
|
||||
{
|
||||
const label adjPointIndex = pPoints[adjPointI];
|
||||
const label adjPointIndex = pPoints[adjPointi];
|
||||
|
||||
scalar dist = mag(points[pI] - points[adjPointIndex]);
|
||||
|
||||
|
||||
@ -2566,7 +2566,7 @@ void Foam::conformalVoronoiMesh::removeUnusedPoints
|
||||
}
|
||||
}
|
||||
|
||||
label pointI = 0;
|
||||
label pointi = 0;
|
||||
|
||||
labelList oldToNew(pts.size(), label(-1));
|
||||
|
||||
@ -2577,7 +2577,7 @@ void Foam::conformalVoronoiMesh::removeUnusedPoints
|
||||
{
|
||||
if (ptUsed[ptUI] == true)
|
||||
{
|
||||
oldToNew[ptUI] = pointI++;
|
||||
oldToNew[ptUI] = pointi++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2585,12 +2585,12 @@ void Foam::conformalVoronoiMesh::removeUnusedPoints
|
||||
inplaceReorder(oldToNew, boundaryPts);
|
||||
|
||||
Info<< " Removing "
|
||||
<< returnReduce(pts.size() - pointI, sumOp<label>())
|
||||
<< returnReduce(pts.size() - pointi, sumOp<label>())
|
||||
<< " unused points"
|
||||
<< endl;
|
||||
|
||||
pts.setSize(pointI);
|
||||
boundaryPts.setSize(pointI);
|
||||
pts.setSize(pointi);
|
||||
boundaryPts.setSize(pointi);
|
||||
|
||||
// Renumber the faces to use the new point numbers
|
||||
|
||||
|
||||
@ -1831,10 +1831,10 @@ Foam::conformalVoronoiMesh::nearestFeatureEdgeLocations
|
||||
{
|
||||
label index = elems[elemI];
|
||||
|
||||
const Foam::point& pointI
|
||||
const Foam::point& pointi
|
||||
= edgeLocationTreePtr_().shapes().shapePoints()[index];
|
||||
|
||||
pointIndexHit nearHit(true, pointI, index);
|
||||
pointIndexHit nearHit(true, pointi, index);
|
||||
|
||||
dynPointHit.append(nearHit);
|
||||
}
|
||||
|
||||
@ -307,11 +307,11 @@ void Foam::conformalVoronoiMesh::writeMesh(const fileName& instance)
|
||||
// )()
|
||||
// );
|
||||
//
|
||||
// label pointI = findIndex(pointDualAddressing, -1);
|
||||
// if (pointI != -1)
|
||||
// label pointi = findIndex(pointDualAddressing, -1);
|
||||
// if (pointi != -1)
|
||||
// {
|
||||
// WarningInFunction
|
||||
// << "Delaunay vertex " << pointI
|
||||
// << "Delaunay vertex " << pointi
|
||||
// << " does not have a corresponding dual cell." << endl;
|
||||
// }
|
||||
//
|
||||
@ -350,21 +350,21 @@ void Foam::conformalVoronoiMesh::writeMesh(const fileName& instance)
|
||||
// points
|
||||
// );
|
||||
//
|
||||
// forAll(pointDualAddressing, pointI)
|
||||
// forAll(pointDualAddressing, pointi)
|
||||
// {
|
||||
// label index = pointDualAddressing[pointI];
|
||||
// label index = pointDualAddressing[pointi];
|
||||
//
|
||||
// if (index > 0)
|
||||
// {
|
||||
// label celli = index-1;
|
||||
// dualPoints[pointI] = mesh.cellCentres()[celli];
|
||||
// dualPoints[pointi] = mesh.cellCentres()[celli];
|
||||
// }
|
||||
// else if (index < 0)
|
||||
// {
|
||||
// label facei = -index-1;
|
||||
// if (facei >= mesh.nInternalFaces())
|
||||
// {
|
||||
// dualPoints[pointI] = mesh.faceCentres()[facei];
|
||||
// dualPoints[pointi] = mesh.faceCentres()[facei];
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
@ -1388,8 +1388,8 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::findRemainingProtrusionSet
|
||||
|
||||
forAllConstIter(labelHashSet, protrudingBoundaryPoints, iter)
|
||||
{
|
||||
const label pointI = iter.key();
|
||||
const labelList& pCells = mesh.pointCells()[pointI];
|
||||
const label pointi = iter.key();
|
||||
const labelList& pCells = mesh.pointCells()[pointi];
|
||||
|
||||
forAll(pCells, pCI)
|
||||
{
|
||||
|
||||
@ -276,23 +276,23 @@ Foam::labelList Foam::conformalVoronoiMesh::calcCellZones
|
||||
selectInside = false;
|
||||
}
|
||||
|
||||
forAll(volType, pointI)
|
||||
forAll(volType, pointi)
|
||||
{
|
||||
if (cellToSurface[pointI] == -1)
|
||||
if (cellToSurface[pointi] == -1)
|
||||
{
|
||||
if
|
||||
(
|
||||
(
|
||||
volType[pointI] == volumeType::INSIDE
|
||||
volType[pointi] == volumeType::INSIDE
|
||||
&& selectInside
|
||||
)
|
||||
|| (
|
||||
volType[pointI] == volumeType::OUTSIDE
|
||||
volType[pointi] == volumeType::OUTSIDE
|
||||
&& !selectInside
|
||||
)
|
||||
)
|
||||
{
|
||||
cellToSurface[pointI] = surfI;
|
||||
cellToSurface[pointi] = surfI;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1112,17 +1112,17 @@ void Foam::conformationSurfaces::findEdgeNearest
|
||||
);
|
||||
|
||||
// Update minDistSqr and arguments
|
||||
forAll(hitInfo, pointI)
|
||||
forAll(hitInfo, pointi)
|
||||
{
|
||||
if (hitInfo[pointI].hit())
|
||||
if (hitInfo[pointi].hit())
|
||||
{
|
||||
minDistSqr[pointI] = magSqr
|
||||
minDistSqr[pointi] = magSqr
|
||||
(
|
||||
hitInfo[pointI].hitPoint()
|
||||
- samples[pointI]
|
||||
hitInfo[pointi].hitPoint()
|
||||
- samples[pointi]
|
||||
);
|
||||
edgeHits[pointI] = hitInfo[pointI];
|
||||
featuresHit[pointI] = testI;
|
||||
edgeHits[pointi] = hitInfo[pointi];
|
||||
featuresHit[pointi] = testI;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -352,14 +352,14 @@ tmp<scalarField> signedDistance
|
||||
// Push back to original
|
||||
forAll(volType, i)
|
||||
{
|
||||
label pointI = surfIndices[i];
|
||||
scalar dist = mag(points[pointI] - nearest[pointI].hitPoint());
|
||||
label pointi = surfIndices[i];
|
||||
scalar dist = mag(points[pointi] - nearest[pointi].hitPoint());
|
||||
|
||||
volumeType vT = volType[i];
|
||||
|
||||
if (vT == volumeType::OUTSIDE)
|
||||
{
|
||||
fld[pointI] = dist;
|
||||
fld[pointi] = dist;
|
||||
}
|
||||
else if (vT == volumeType::INSIDE)
|
||||
{
|
||||
|
||||
@ -206,9 +206,9 @@ public:
|
||||
// return true;
|
||||
//}
|
||||
//const pointField points(bb.points());
|
||||
//forAll(points, pointI)
|
||||
//forAll(points, pointi)
|
||||
//{
|
||||
// scalar pointVal = signedDistance(points[pointI]) - _iso_val;
|
||||
// scalar pointVal = signedDistance(points[pointi]) - _iso_val;
|
||||
// if (ccVal*pointVal < 0)
|
||||
// {
|
||||
// return true;
|
||||
@ -518,10 +518,10 @@ int main(int argc, char *argv[])
|
||||
|
||||
Point* vertices = mc.vertices();
|
||||
pointField points(mc.nverts());
|
||||
forAll(points, pointI)
|
||||
forAll(points, pointi)
|
||||
{
|
||||
const Point& v = vertices[pointI];
|
||||
points[pointI] = converter.toGlobal(v);
|
||||
const Point& v = vertices[pointi];
|
||||
points[pointi] = converter.toGlobal(v);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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
|
||||
@ -141,7 +141,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Generate points
|
||||
pointField points(mc.size_x()*mc.size_y()*mc.size_z());
|
||||
label pointI = 0;
|
||||
label pointi = 0;
|
||||
|
||||
point pt;
|
||||
for( int k = 0 ; k < mc.size_z() ; k++ )
|
||||
@ -153,7 +153,7 @@ int main(int argc, char *argv[])
|
||||
for( int i = 0 ; i < mc.size_x() ; i++ )
|
||||
{
|
||||
pt.x() = bb.min().x() + i*d.x();
|
||||
points[pointI++] = pt;
|
||||
points[pointi++] = pt;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -181,14 +181,14 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
// Fill elements
|
||||
pointI = 0;
|
||||
pointi = 0;
|
||||
for( int k = 0 ; k < mc.size_z() ; k++ )
|
||||
{
|
||||
for( int j = 0 ; j < mc.size_y() ; j++ )
|
||||
{
|
||||
for( int i = 0 ; i < mc.size_x() ; i++ )
|
||||
{
|
||||
mc.set_data(float(signedDist[pointI++]), i, j, k);
|
||||
mc.set_data(float(signedDist[pointi++]), i, j, k);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -226,10 +226,10 @@ int main(int argc, char *argv[])
|
||||
|
||||
Vertex* vertices = mc.vertices();
|
||||
pointField points(mc.nverts());
|
||||
forAll(points, pointI)
|
||||
forAll(points, pointi)
|
||||
{
|
||||
Vertex& v = vertices[pointI];
|
||||
points[pointI] = point
|
||||
Vertex& v = vertices[pointi];
|
||||
points[pointi] = point
|
||||
(
|
||||
bb.min().x() + v.x*span.x()/mc.size_x(),
|
||||
bb.min().y() + v.y*span.y()/mc.size_y(),
|
||||
|
||||
@ -938,7 +938,7 @@ void Foam::CV2D::newPoints()
|
||||
/*
|
||||
void Foam::CV2D::moveInternalPoints(const point2DField& newPoints)
|
||||
{
|
||||
label pointI = 0;
|
||||
label pointi = 0;
|
||||
|
||||
for
|
||||
(
|
||||
@ -949,7 +949,7 @@ void Foam::CV2D::moveInternalPoints(const point2DField& newPoints)
|
||||
{
|
||||
if (vit->internalPoint())
|
||||
{
|
||||
movePoint(vit, newPoints[pointI++]);
|
||||
movePoint(vit, newPoints[pointi++]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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,9 +130,9 @@ inline const Foam::point2D& Foam::CV2D::toPoint2D(const point& p) const
|
||||
inline const Foam::point2DField Foam::CV2D::toPoint2D(const pointField& p) const
|
||||
{
|
||||
point2DField temp(p.size());
|
||||
forAll(temp, pointI)
|
||||
forAll(temp, pointi)
|
||||
{
|
||||
temp[pointI] = point2D(p[pointI].x(), p[pointI].y());
|
||||
temp[pointi] = point2D(p[pointi].x(), p[pointi].y());
|
||||
}
|
||||
return temp;
|
||||
}
|
||||
|
||||
@ -433,14 +433,14 @@ Foam::shortEdgeFilter2D::filter()
|
||||
// Maintain addressing from new to old point field
|
||||
labelList newPtToOldPt(totalNewPoints, -1);
|
||||
|
||||
forAll(points, pointI)
|
||||
forAll(points, pointi)
|
||||
{
|
||||
// If the point is NOT going to be removed.
|
||||
if (pointsToRemove[pointI] == -1)
|
||||
if (pointsToRemove[pointi] == -1)
|
||||
{
|
||||
newPoints[pointI - numberRemoved] = points[pointI];
|
||||
newPointNumbers[pointI] = pointI - numberRemoved;
|
||||
newPtToOldPt[pointI - numberRemoved] = pointI;
|
||||
newPoints[pointi - numberRemoved] = points[pointi];
|
||||
newPointNumbers[pointi] = pointi - numberRemoved;
|
||||
newPtToOldPt[pointi - numberRemoved] = pointi;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -466,31 +466,31 @@ Foam::shortEdgeFilter2D::filter()
|
||||
|
||||
forAll(f, fp)
|
||||
{
|
||||
label pointI = f[fp];
|
||||
label pointi = f[fp];
|
||||
// If not removing the point, then add it to the new face.
|
||||
if (pointsToRemove[pointI] == -1)
|
||||
if (pointsToRemove[pointi] == -1)
|
||||
{
|
||||
newFace[newFaceSize++] = newPointNumbers[pointI];
|
||||
newFace[newFaceSize++] = newPointNumbers[pointi];
|
||||
}
|
||||
else
|
||||
{
|
||||
label newPointI = pointsToRemove[pointI];
|
||||
label newPointi = pointsToRemove[pointi];
|
||||
// Replace deleted point with point that it is being
|
||||
// collapsed to.
|
||||
if
|
||||
(
|
||||
f.nextLabel(fp) != newPointI
|
||||
&& f.prevLabel(fp) != newPointI
|
||||
f.nextLabel(fp) != newPointi
|
||||
&& f.prevLabel(fp) != newPointi
|
||||
)
|
||||
{
|
||||
label pChain = newPointI;
|
||||
label pChain = newPointi;
|
||||
label totalChain = 0;
|
||||
for (label nChain = 0; nChain <= totalChain; ++nChain)
|
||||
{
|
||||
if (newPointNumbers[pChain] != -1)
|
||||
{
|
||||
newFace[newFaceSize++] = newPointNumbers[pChain];
|
||||
newPointNumbers[pointI] = newPointNumbers[pChain];
|
||||
newPointNumbers[pointi] = newPointNumbers[pChain];
|
||||
maxChain = max(totalChain, maxChain);
|
||||
}
|
||||
else
|
||||
@ -498,7 +498,7 @@ Foam::shortEdgeFilter2D::filter()
|
||||
WarningInFunction
|
||||
<< "Point " << pChain
|
||||
<< " marked for deletion as well as point "
|
||||
<< pointI << nl
|
||||
<< pointi << nl
|
||||
<< " Incrementing maxChain by 1 from "
|
||||
<< totalChain << " to " << totalChain + 1
|
||||
<< endl;
|
||||
@ -509,9 +509,9 @@ Foam::shortEdgeFilter2D::filter()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (newPointNumbers[newPointI] != -1)
|
||||
if (newPointNumbers[newPointi] != -1)
|
||||
{
|
||||
newPointNumbers[pointI] = newPointNumbers[newPointI];
|
||||
newPointNumbers[pointi] = newPointNumbers[newPointi];
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -549,12 +549,12 @@ Foam::shortEdgeFilter2D::filter()
|
||||
patchSizes_
|
||||
);
|
||||
|
||||
forAll(newPointNumbers, pointI)
|
||||
forAll(newPointNumbers, pointi)
|
||||
{
|
||||
if (newPointNumbers[pointI] == -1)
|
||||
if (newPointNumbers[pointi] == -1)
|
||||
{
|
||||
WarningInFunction
|
||||
<< pointI << " will be deleted and " << newPointNumbers[pointI]
|
||||
<< pointi << " will be deleted and " << newPointNumbers[pointi]
|
||||
<< ", so it will not be replaced. "
|
||||
<< "This will cause edges to be deleted." << endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user