vector::zero -> Zero

This commit is contained in:
Henry Weller
2016-04-16 18:34:41 +01:00
parent 69e877a53a
commit 8c6fa81eba
273 changed files with 704 additions and 696 deletions

View File

@ -558,7 +558,7 @@ void Foam::medialAxisMeshMover::update(const dictionary& coeffDict)
points[pointI],
0.0,
pointI, // passive data
vector::zero // passive data
Zero // passive data
)
);
pointMedialDist[pointI] = maxInfo.last();
@ -614,7 +614,7 @@ void Foam::medialAxisMeshMover::update(const dictionary& coeffDict)
medialAxisPt, //points[pointI],
magSqr(points[pointI]-medialAxisPt),//0.0,
pointI, // passive data
vector::zero // passive data
Zero // passive data
)
);
pointMedialDist[pointI] = maxInfo.last();
@ -671,7 +671,7 @@ void Foam::medialAxisMeshMover::update(const dictionary& coeffDict)
points[pointI],
0.0,
pointI, // passive data
vector::zero // passive data
Zero // passive data
)
);
pointMedialDist[pointI] = maxInfo.last();
@ -728,7 +728,7 @@ void Foam::medialAxisMeshMover::update(const dictionary& coeffDict)
points[pointI],
0.0,
pointI, // passive data
vector::zero // passive data
Zero // passive data
)
);
pointMedialDist[pointI] = maxInfo.last();
@ -868,13 +868,13 @@ bool Foam::medialAxisMeshMover::unmarkExtrusion
if (extrudeStatus[patchPointI] == snappyLayerDriver::EXTRUDE)
{
extrudeStatus[patchPointI] = snappyLayerDriver::NOEXTRUDE;
patchDisp[patchPointI] = vector::zero;
patchDisp[patchPointI] = Zero;
return true;
}
else if (extrudeStatus[patchPointI] == snappyLayerDriver::EXTRUDEREMOVE)
{
extrudeStatus[patchPointI] = snappyLayerDriver::NOEXTRUDE;
patchDisp[patchPointI] = vector::zero;
patchDisp[patchPointI] = Zero;
return true;
}
else
@ -1639,7 +1639,7 @@ Foam::medialAxisMeshMover::medialAxisMeshMover
false
),
pMesh(),
dimensionedVector("dispVec", dimLength, vector::zero)
dimensionedVector("dispVec", dimLength, Zero)
),
medialRatio_
(
@ -1681,7 +1681,7 @@ Foam::medialAxisMeshMover::medialAxisMeshMover
false
),
pMesh(),
dimensionedVector("medialVec", dimLength, vector::zero)
dimensionedVector("medialVec", dimLength, Zero)
)
{
update(dict);
@ -1981,7 +1981,7 @@ void Foam::medialAxisMeshMover::calculateDisplacement
points[pointI],
0.0,
thickness[patchPointI], // transport layer thickness
vector::zero // passive vector
Zero // passive vector
);
}
@ -2007,7 +2007,7 @@ void Foam::medialAxisMeshMover::calculateDisplacement
{
if (!pointWallDist[pointI].valid(dummyTrackData))
{
displacement[pointI] = vector::zero;
displacement[pointI] = Zero;
}
else
{

View File

@ -1839,7 +1839,7 @@ Foam::tmp<Foam::pointVectorField> Foam::meshRefinement::makeDisplacementField
IOobject::AUTO_WRITE
),
pMesh,
dimensionedVector("displacement", dimLength, vector::zero),
dimensionedVector("displacement", dimLength, Zero),
patchFieldTypes
)
);

View File

@ -1528,7 +1528,7 @@ bool Foam::meshRefinement::isGap
{
scalar cosAngle = (normal0 & normal1);
vector avg = vector::zero;
vector avg = Zero;
if (cosAngle < (-1+planarCos))
{
// Opposite normals
@ -1585,7 +1585,7 @@ bool Foam::meshRefinement::isNormalGap
{
scalar cosAngle = (normal0 & normal1);
vector avg = vector::zero;
vector avg = Zero;
if (cosAngle < (-1+planarCos))
{
// Opposite normals
@ -1774,8 +1774,8 @@ Foam::label Foam::meshRefinement::markProximityRefinement
// minLevel) and cache per cell the max surface level and the local normal
// on that surface.
labelList cellMaxLevel(mesh_.nCells(), -1);
vectorField cellMaxNormal(mesh_.nCells(), vector::zero);
pointField cellMaxLocation(mesh_.nCells(), vector::zero);
vectorField cellMaxNormal(mesh_.nCells(), Zero);
pointField cellMaxLocation(mesh_.nCells(), Zero);
{
// Per segment the normals of the surfaces

View File

@ -535,7 +535,7 @@ void Foam::refinementFeatures::findNearestEdge
nearInfo.setSize(samples.size());
nearInfo = pointIndexHit();
nearNormal.setSize(samples.size());
nearNormal = vector::zero;
nearNormal = Zero;
forAll(edgeTrees_, featI)
{
@ -594,7 +594,7 @@ void Foam::refinementFeatures::findNearestRegionEdge
nearInfo.setSize(samples.size());
nearInfo = pointIndexHit();
nearNormal.setSize(samples.size());
nearNormal = vector::zero;
nearNormal = Zero;
const PtrList<indexedOctree<treeDataEdge>>& regionTrees =

View File

@ -935,7 +935,7 @@ void Foam::refinementSurfaces::findNearestIntersection
region1.setSize(start.size());
region1 = -1;
normal1.setSize(start.size());
normal1 = vector::zero;
normal1 = Zero;
// Current end of segment to test.
pointField nearest(end);
@ -1185,7 +1185,7 @@ void Foam::refinementSurfaces::findNearestRegion
hitRegion.setSize(hitSurface.size());
hitRegion = -1;
hitNormal.setSize(hitSurface.size());
hitNormal = vector::zero;
hitNormal = Zero;
forAll(surfacesToTest, i)
{

View File

@ -225,14 +225,14 @@ bool Foam::snappyLayerDriver::unmarkExtrusion
{
extrudeStatus[patchPointI] = NOEXTRUDE;
patchNLayers[patchPointI] = 0;
patchDisp[patchPointI] = vector::zero;
patchDisp[patchPointI] = Zero;
return true;
}
else if (extrudeStatus[patchPointI] == EXTRUDEREMOVE)
{
extrudeStatus[patchPointI] = NOEXTRUDE;
patchNLayers[patchPointI] = 0;
patchDisp[patchPointI] = vector::zero;
patchDisp[patchPointI] = Zero;
return true;
}
else
@ -868,7 +868,7 @@ Foam::snappyLayerDriver::makeLayerDisplacementField
IOobject::AUTO_WRITE
),
pMesh,
dimensionedVector("displacement", dimLength, vector::zero),
dimensionedVector("displacement", dimLength, Zero),
patchFieldTypes,
actualPatchTypes
)
@ -955,7 +955,7 @@ void Foam::snappyLayerDriver::growNoExtrusion
{
if (extrudeStatus[patchPointI] == NOEXTRUDE)
{
patchDisp[patchPointI] = vector::zero;
patchDisp[patchPointI] = Zero;
patchNLayers[patchPointI] = 0;
}
}
@ -1520,7 +1520,7 @@ void Foam::snappyLayerDriver::getPatchDisplacement
{
// Do not use unmarkExtrusion; forcibly set to zero extrusion.
patchNLayers[patchPointI] = 0;
patchDisp[patchPointI] = vector::zero;
patchDisp[patchPointI] = Zero;
}
else
{
@ -1549,7 +1549,7 @@ void Foam::snappyLayerDriver::getPatchDisplacement
{
if (extrudeStatus[patchPointI] == EXTRUDEREMOVE)
{
point avg(vector::zero);
point avg(Zero);
label nPoints = 0;
const labelList& pEdges = pp.pointEdges()[patchPointI];
@ -1786,7 +1786,7 @@ Foam::label Foam::snappyLayerDriver::truncateDisplacement
else if (extrudeStatus[patchPointI] == NOEXTRUDE)
{
// Make sure displacement is 0. Should already be so but ...
patchDisp[patchPointI] = vector::zero;
patchDisp[patchPointI] = Zero;
patchNLayers[patchPointI] = 0;
}
}
@ -3277,7 +3277,7 @@ void Foam::snappyLayerDriver::addLayers
// Calculate displacement for final layer for addPatchLayer.
// (layer of cells next to the original mesh)
vectorField finalDisp(patchNLayers.size(), vector::zero);
vectorField finalDisp(patchNLayers.size(), Zero);
forAll(nPatchPointLayers, i)
{

View File

@ -1097,7 +1097,7 @@ void Foam::snappyLayerDriver::medialAxisSmoothingInfo
medialAxisPt, //points[pointI],
magSqr(points[pointI]-medialAxisPt),//0.0,
pointI, // passive data
vector::zero // passive data
Zero // passive data
)
);
pointMedialDist[pointI] = maxInfo.last();
@ -1153,7 +1153,7 @@ void Foam::snappyLayerDriver::medialAxisSmoothingInfo
points[pointI],
0.0,
pointI, // passive data
vector::zero // passive data
Zero // passive data
)
);
pointMedialDist[pointI] = maxInfo.last();
@ -1203,7 +1203,7 @@ void Foam::snappyLayerDriver::medialAxisSmoothingInfo
points[pointI],
0.0,
pointI, // passive data
vector::zero // passive data
Zero // passive data
)
);
pointMedialDist[pointI] = maxInfo.last();
@ -1584,7 +1584,7 @@ void Foam::snappyLayerDriver::shrinkMeshMedialDistance
points[pointI],
0.0,
thickness[patchPointI], // transport layer thickness
vector::zero // passive vector
Zero // passive vector
);
}
@ -1608,7 +1608,7 @@ void Foam::snappyLayerDriver::shrinkMeshMedialDistance
{
if (!pointWallDist[pointI].valid(dummyTrackData))
{
displacement[pointI] = vector::zero;
displacement[pointI] = Zero;
}
else
{

View File

@ -189,7 +189,7 @@ Foam::pointField Foam::snappySnapDriver::smoothPatchDisplacement
// Get average position of boundary face centres
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vectorField avgBoundary(pointFaces.size(), vector::zero);
vectorField avgBoundary(pointFaces.size(), Zero);
labelList nBoundary(pointFaces.size(), 0);
forAll(pointFaces, patchPointI)
@ -237,7 +237,7 @@ Foam::pointField Foam::snappySnapDriver::smoothPatchDisplacement
vectorField avgInternal;
labelList nInternal;
{
vectorField globalSum(mesh.nPoints(), vector::zero);
vectorField globalSum(mesh.nPoints(), Zero);
labelList globalNum(mesh.nPoints(), 0);
// Note: no use of pointFaces
@ -351,7 +351,7 @@ Foam::pointField Foam::snappySnapDriver::smoothPatchDisplacement
// Displacement to calculate.
pointField patchDisp(meshPoints.size(), vector::zero);
pointField patchDisp(meshPoints.size(), Zero);
forAll(pointFaces, i)
{
@ -426,7 +426,7 @@ Foam::pointField Foam::snappySnapDriver::smoothPatchDisplacement
// const labelListList& pointEdges = pp.pointEdges();
// const edgeList& edges = pp.edges();
//
// tmp<pointField> tavg(new pointField(pointEdges.size(), vector::zero));
// tmp<pointField> tavg(new pointField(pointEdges.size(), Zero));
// pointField& avg = tavg();
//
// forAll(pointEdges, vertI)
@ -872,7 +872,7 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::avgCellCentres
tmp<pointField> tavgBoundary
(
new pointField(pointFaces.size(), vector::zero)
new pointField(pointFaces.size(), Zero)
);
pointField& avgBoundary = tavgBoundary.ref();
labelList nBoundary(pointFaces.size(), 0);
@ -1580,7 +1580,7 @@ Foam::vectorField Foam::snappySnapDriver::calcNearestSurface
const fvMesh& mesh = meshRefiner.mesh();
// Displacement per patch point
vectorField patchDisp(localPoints.size(), vector::zero);
vectorField patchDisp(localPoints.size(), Zero);
if (returnReduce(localPoints.size(), sumOp<label>()) > 0)
{
@ -1904,7 +1904,7 @@ Foam::vectorField Foam::snappySnapDriver::calcNearestSurface
// // the patch.
//
// // Displacement per patch point
// vectorField patchDisp(localPoints.size(), vector::zero);
// vectorField patchDisp(localPoints.size(), Zero);
// // Current best snap distance
// scalarField minSnapDist(snapDist);
// // Current surface snapped to
@ -2829,7 +2829,7 @@ void Foam::snappySnapDriver::doSnap
// if (snapParams.detectNearSurfacesSnap())
// {
// nearestPoint.setSize(pp.nPoints(), vector::max);
// nearestNormal.setSize(pp.nPoints(), vector::zero);
// nearestNormal.setSize(pp.nPoints(), Zero);
// }
//
// vectorField disp = calcNearestSurface
@ -3053,7 +3053,7 @@ void Foam::snappySnapDriver::doSnap
if (snapParams.detectNearSurfacesSnap())
{
nearestPoint.setSize(pp.nPoints(), vector::max);
nearestNormal.setSize(pp.nPoints(), vector::zero);
nearestNormal.setSize(pp.nPoints(), Zero);
}
vectorField disp = calcNearestSurface

View File

@ -150,7 +150,7 @@ void Foam::snappySnapDriver::smoothAndConstrain
// - same for feature points. They are already attracted to the
// nearest feature point.
vectorField dispSum(pp.nPoints(), vector::zero);
vectorField dispSum(pp.nPoints(), Zero);
labelList dispCount(pp.nPoints(), 0);
const labelListList& pointEdges = pp.pointEdges();
@ -231,9 +231,9 @@ void Foam::snappySnapDriver::calcNearestFace
// Displacement and orientation per pp face.
faceDisp.setSize(pp.size());
faceDisp = vector::zero;
faceDisp = Zero;
faceSurfaceNormal.setSize(pp.size());
faceSurfaceNormal = vector::zero;
faceSurfaceNormal = Zero;
faceSurfaceGlobalRegion.setSize(pp.size());
faceSurfaceGlobalRegion = -1;
@ -406,7 +406,7 @@ void Foam::snappySnapDriver::calcNearestFace
// Determine rotation axis
faceRotation.setSize(pp.size());
faceRotation = vector::zero;
faceRotation = Zero;
forAll(faceRotation, faceI)
{
@ -692,7 +692,7 @@ Foam::pointIndexHit Foam::snappySnapDriver::findMultiPatchPoint
}
}
}
return pointIndexHit(false, vector::zero, labelMax);
return pointIndexHit(false, Zero, labelMax);
}
@ -826,7 +826,7 @@ void Foam::snappySnapDriver::featureAttractionUsingReconstruction
pointConstraint& patchConstraint
) const
{
patchAttraction = vector::zero;
patchAttraction = Zero;
patchConstraint = pointConstraint();
const List<point>& pfSurfNormals = pointFaceSurfNormals[pointI];
@ -1048,7 +1048,7 @@ void Foam::snappySnapDriver::featureAttractionUsingReconstruction
forAll(pp.localPoints(), pointI)
{
vector attraction = vector::zero;
vector attraction = Zero;
pointConstraint constraint;
featureAttractionUsingReconstruction
@ -1403,7 +1403,7 @@ void Foam::snappySnapDriver::releasePointsNextToMultiPatch
//Pout<< "Knocking out constraint"
// << " on non-multiPatchPoint:"
// << pp.localPoints()[pointI] << endl;
patchAttraction[pointI] = vector::zero;
patchAttraction[pointI] = Zero;
patchConstraints[pointI] = pointConstraint();
nChanged++;
@ -1712,7 +1712,7 @@ Foam::snappySnapDriver::findNearFeaturePoint
// Current pointI nearer.
pointAttractor[featI][featPointI] = pointI;
pointConstraints[featI][featPointI].first() = 3;
pointConstraints[featI][featPointI].second() = vector::zero;
pointConstraints[featI][featPointI].second() = Zero;
// Store for later use
patchAttraction[pointI] = featPt-pt;
@ -1720,7 +1720,7 @@ Foam::snappySnapDriver::findNearFeaturePoint
pointConstraints[featI][featPointI];
// Reset oldPointI to nearest on feature edge
patchAttraction[oldPointI] = vector::zero;
patchAttraction[oldPointI] = Zero;
patchConstraints[oldPointI] = pointConstraint();
findNearFeatureEdge
@ -1744,7 +1744,7 @@ Foam::snappySnapDriver::findNearFeaturePoint
// Current pointI nearer.
pointAttractor[featI][featPointI] = pointI;
pointConstraints[featI][featPointI].first() = 3;
pointConstraints[featI][featPointI].second() = vector::zero;
pointConstraints[featI][featPointI].second() = Zero;
// Store for later use
patchAttraction[pointI] = featPt-pt;
@ -1831,7 +1831,7 @@ void Foam::snappySnapDriver::determineFeatures
{
const point& pt = pp.localPoints()[pointI];
vector attraction = vector::zero;
vector attraction = Zero;
pointConstraint constraint;
featureAttractionUsingReconstruction
@ -2373,7 +2373,7 @@ void Foam::snappySnapDriver::determineBaffleFeatures
pointAttractor[featI][featPointI] = pointI;
pointConstraints[featI][featPointI].first() = 3;
pointConstraints[featI][featPointI].second() =
vector::zero;
Zero;
// Store for later use
patchAttraction[pointI] = featPt-pt;
@ -2570,7 +2570,7 @@ void Foam::snappySnapDriver::reverseAttractMeshPoints
// Per mesh point the point on nearest feature edge.
patchAttraction.setSize(pp.nPoints());
patchAttraction = vector::zero;
patchAttraction = Zero;
patchConstraints.setSize(pp.nPoints());
patchConstraints = pointConstraint();
@ -2746,7 +2746,7 @@ void Foam::snappySnapDriver::featureAttractionUsingFeatureEdges
}
// Reverse: from pp point to nearest feature
vectorField rawPatchAttraction(pp.nPoints(), vector::zero);
vectorField rawPatchAttraction(pp.nPoints(), Zero);
List<pointConstraint> rawPatchConstraints(pp.nPoints());
determineFeatures
@ -3080,11 +3080,11 @@ Foam::vectorField Foam::snappySnapDriver::calcNearestSurfaceFeature
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// vector from point on surface back to face centre
vectorField faceDisp(pp.size(), vector::zero);
vectorField faceDisp(pp.size(), Zero);
// normal of surface at point on surface
vectorField faceSurfaceNormal(pp.size(), vector::zero);
vectorField faceSurfaceNormal(pp.size(), Zero);
labelList faceSurfaceGlobalRegion(pp.size(), -1);
vectorField faceRotation(pp.size(), vector::zero);
vectorField faceRotation(pp.size(), Zero);
calcNearestFace
(
@ -3132,7 +3132,7 @@ Foam::vectorField Foam::snappySnapDriver::calcNearestSurfaceFeature
// Nearest feature
patchAttraction.setSize(localPoints.size());
patchAttraction = vector::zero;
patchAttraction = Zero;
// Constraints at feature
patchConstraints.setSize(localPoints.size());
patchConstraints = pointConstraint();