Commit 158a9252 authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: Updated xxx::zero->Zero

parent af14c117
......@@ -88,7 +88,7 @@ tmp<vectorField> calcVertexNormals(const triSurface& surf)
// Weight = fA / (mag(e0)^2 * mag(e1)^2);
tmp<vectorField> tpointNormals
(
new pointField(surf.nPoints(), vector::zero)
new pointField(surf.nPoints(), Zero)
);
vectorField& pointNormals = tpointNormals.ref();
......@@ -151,7 +151,7 @@ tmp<vectorField> calcPointNormals
{
if (!isFeaturePoint[e[i]])
{
pointNormals[e[i]] = vector::zero;
pointNormals[e[i]] = Zero;
}
}
}
......@@ -164,7 +164,7 @@ tmp<vectorField> calcPointNormals
const labelList& eFaces = edgeFaces[edgeI];
// Get average edge normal
vector n = vector::zero;
vector n = Zero;
forAll(eFaces, i)
{
n += s.faceNormals()[eFaces[i]];
......@@ -483,7 +483,7 @@ void lloydsSmoothing
{
const labelList& pFaces = pointFaces[pointI];
point avg = point::zero;
point avg(Zero);
forAll(pFaces, pFaceI)
{
avg += faceCentres[pFaces[pFaceI]];
......@@ -498,7 +498,7 @@ void lloydsSmoothing
const pointField& points = s.points();
vectorField pointSum(s.nPoints(), vector::zero);
vectorField pointSum(s.nPoints(), Zero);
labelList nPointSum(s.nPoints(), 0);
forAll(edges, edgeI)
......
......@@ -230,7 +230,7 @@ public:
// point and density specification
inline tensor inertia
(
PointRef refPt = vector::zero,
PointRef refPt = Zero,
scalar density = 1.0
) const;
......
......@@ -525,7 +525,7 @@ void Foam::motionSmootherAlgo::setDisplacement
label pointI = cppMeshPoints[i];
if (isPatchPoint[pointI])
{
displacement[pointI] = vector::zero;
displacement[pointI] = Zero;
}
}
}
......
......@@ -118,7 +118,7 @@ void Foam::polyMeshGeometry::updateCellCentresAndVols
const labelList& cFaces(cells[cellI]);
// Estimate the cell centre and bounding box using the face centres
vector cEst = vector::zero;
vector cEst(Zero);
boundBox bb(boundBox::invertedBox);
forAll(cFaces, cFaceI)
......
......@@ -112,7 +112,7 @@ void Foam::pointMVCWeight::calcWeights
u(j) = uVec[toLocal[f[j]]];
}
vector v(point::zero);
vector v(Zero);
forAll(f, j)
{
label jPlus1 = f.fcIndex(j);
......
......@@ -124,7 +124,7 @@ displacementSBRStressFvMotionSolver
(
"cellDisplacement",
displacementMotionSolver::pointDisplacement().dimensions(),
vector::zero
Zero
),
cellMotionBoundaryTypes<vector>
(
......
......@@ -169,7 +169,7 @@ displacementLaplacianFvMotionSolver
(
"cellDisplacement",
pointDisplacement_.dimensions(),
vector::zero
Zero
),
cellMotionBoundaryTypes<vector>(pointDisplacement_.boundaryField())
),
......
......@@ -74,7 +74,7 @@ surfaceAlignedSBRStressFvMotionSolver
IOobject::NO_WRITE
),
fvMesh_,
dimensionedVector("zero", dimless, vector::zero)
dimensionedVector("zero", dimless, Zero)
),
maxAng_(coeffDict().lookupOrDefault<scalar>("maxAng", 80.0)),
minAng_(coeffDict().lookupOrDefault<scalar>("minAng", 20.0)),
......@@ -93,7 +93,7 @@ surfaceAlignedSBRStressFvMotionSolver
IOobject::NO_WRITE
),
fvMesh_,
dimensionedSymmTensor("zero", dimless, symmTensor::zero)
dimensionedSymmTensor("zero", dimless, Zero)
),
minSigmaDiff_(coeffDict().lookupOrDefault<scalar>("minSigmaDiff", 1e-4))
{
......@@ -131,8 +131,8 @@ Foam::surfaceAlignedSBRStressFvMotionSolver::
void Foam::surfaceAlignedSBRStressFvMotionSolver::calculateCellRot()
{
cellRot_.internalField() = vector::zero;
pointDisplacement_.internalField() = vector::zero;
cellRot_.internalField() = Zero;
pointDisplacement_.internalField() = Zero;
// Find intersections
pointField start(fvMesh_.nInternalFaces());
......@@ -316,7 +316,7 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::solve()
IOobject::NO_WRITE
),
fvMesh_,
dimensionedVector("zero", dimLength, vector::zero),
dimensionedVector("zero", dimLength, Zero),
cellMotionBoundaryTypes<vector>
(
pointDisplacement().boundaryField()
......
......@@ -123,11 +123,11 @@ void Foam::patchTransformedInterpolation::interpolate
pointDisplacement.correctBoundaryConditions();
vectorField pointRotation(nPoints, vector::zero);
vectorField pointRotation(nPoints, Zero);
scalarField pointExpansion(nPoints, scalar(0));
labelList pointDisplacementNSum(nPoints, 0);
vectorField pointDisplacementSum(nPoints, vector::zero);
vectorField pointDisplacementSum(nPoints, Zero);
forAll(patches_, patchI)
{
......
......@@ -179,9 +179,9 @@ directionalPressureGradientExplicitSource
:
cellSetOption(sourceName, modelType, dict, mesh),
model_(PressureDropModelNames_.read(coeffs_.lookup("model"))),
gradP0_(cells_.size(), vector::zero),
dGradP_(cells_.size(), vector::zero),
gradPporous_(cells_.size(), vector::zero),
gradP0_(cells_.size(), Zero),
dGradP_(cells_.size(), Zero),
gradPporous_(cells_.size(), Zero),
flowDir_(coeffs_.lookup("flowDir")),
invAPtr_(NULL),
D_(0),
......@@ -386,7 +386,7 @@ void Foam::fv::directionalPressureGradientExplicitSource::correct
}
// Accumulate 'upstream' velocity into cells
vectorField UfCells(cells_.size(), vector::zero);
vectorField UfCells(cells_.size(), Zero);
scalarField UfCellWeights(cells_.size(), 0.0);
const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
......@@ -486,7 +486,7 @@ void Foam::fv::directionalPressureGradientExplicitSource::addSup
IOobject::NO_WRITE
),
mesh_,
dimensionedVector("zero", eqn.dimensions()/dimVolume, vector::zero)
dimensionedVector("zero", eqn.dimensions()/dimVolume, Zero)
);
UIndirectList<vector>(Su, cells_) = gradP0_ + dGradP_ + gradPporous_;
......@@ -536,7 +536,7 @@ void Foam::fv::directionalPressureGradientExplicitSource::constrain
}
gradP0_ += dGradP_;
dGradP_ = vector::zero;
dGradP_ = Zero;
}
......
......@@ -36,7 +36,7 @@ namespace Foam
Foam::kinematicParcelInjectionData::kinematicParcelInjectionData()
:
x_(point::zero),
x_(Zero),
U_(Zero),
d_(0.0),
rho_(0.0),
......
......@@ -630,13 +630,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
......@@ -1224,7 +1224,7 @@ Foam::medialAxisMeshMover::medialAxisMeshMover
false
),
pMesh(),
dimensionedVector("dispVec", dimLength, vector::zero)
dimensionedVector("dispVec", dimLength, Zero)
),
medialRatio_
(
......@@ -1266,7 +1266,7 @@ Foam::medialAxisMeshMover::medialAxisMeshMover
false
),
pMesh(),
dimensionedVector("medialVec", dimLength, vector::zero)
dimensionedVector("medialVec", dimLength, Zero)
)
{
update(dict);
......@@ -1594,7 +1594,7 @@ void Foam::medialAxisMeshMover::calculateDisplacement
{
if (!pointWallDist[pointI].valid(dummyTrackData))
{
displacement[pointI] = vector::zero;
displacement[pointI] = Zero;
}
else
{
......
......@@ -1737,7 +1737,7 @@ Foam::tmp<Foam::pointVectorField> Foam::meshRefinement::makeDisplacementField
IOobject::AUTO_WRITE
),
pMesh,
dimensionedVector("displacement", dimLength, vector::zero),
dimensionedVector("displacement", dimLength, Zero),
patchFieldTypes
)
);
......
......@@ -1558,7 +1558,7 @@ bool Foam::meshRefinement::isGap
{
scalar cosAngle = (normal0 & normal1);
vector avg = vector::zero;
vector avg = Zero;
if (cosAngle < (-1+planarCos))
{
// Opposite normals
......@@ -1615,7 +1615,7 @@ bool Foam::meshRefinement::isNormalGap
{
scalar cosAngle = (normal0 & normal1);
vector avg = vector::zero;
vector avg = Zero;
if (cosAngle < (-1+planarCos))
{
// Opposite normals
......@@ -1782,8 +1782,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
......
......@@ -536,7 +536,7 @@ void Foam::refinementFeatures::findNearestEdge
nearInfo.setSize(samples.size());
nearInfo = pointIndexHit();
nearNormal.setSize(samples.size());
nearNormal = vector::zero;
nearNormal = Zero;
forAll(edgeTrees_, featI)
{
......@@ -595,7 +595,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 =
......
......@@ -1216,7 +1216,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);
......@@ -1325,7 +1325,7 @@ void Foam::refinementSurfaces::findNearestIntersection
surface1.setSize(start.size());
surface1 = -1;
normal1.setSize(start.size());
normal1 = vector::zero;
normal1 = Zero;
// Current end of segment to test.
pointField nearest(end);
......@@ -1374,7 +1374,7 @@ void Foam::refinementSurfaces::findNearestIntersection
hitInfo1.setSize(start.size());
hitInfo1 = pointIndexHit();
normal1.setSize(start.size());
normal1 = vector::zero;
normal1 = Zero;
// Current end of segment to test.
pointField nearest(end);
......@@ -1559,7 +1559,7 @@ void Foam::refinementSurfaces::findNearestRegion
hitRegion.setSize(hitSurface.size());
hitRegion = -1;
hitNormal.setSize(hitSurface.size());
hitNormal = vector::zero;
hitNormal = Zero;
forAll(surfacesToTest, i)
{
......@@ -1784,7 +1784,7 @@ void Foam::refinementSurfaces::findNearestRegion
hitRegion.setSize(hitSurface.size());
hitRegion = -1;
hitNormal.setSize(hitSurface.size());
hitNormal = vector::zero;
hitNormal = Zero;
forAll(surfacesToTest, i)
{
......
......@@ -223,14 +223,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
......@@ -866,7 +866,7 @@ Foam::snappyLayerDriver::makeLayerDisplacementField
IOobject::AUTO_WRITE
),
pMesh,
dimensionedVector("displacement", dimLength, vector::zero),
dimensionedVector("displacement", dimLength, Zero),
patchFieldTypes,
actualPatchTypes
)
......@@ -953,7 +953,7 @@ void Foam::snappyLayerDriver::growNoExtrusion
{
if (extrudeStatus[patchPointI] == NOEXTRUDE)
{
patchDisp[patchPointI] = vector::zero;
patchDisp[patchPointI] = Zero;
patchNLayers[patchPointI] = 0;
}
}
......@@ -1532,7 +1532,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
{
......@@ -1561,7 +1561,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];
......@@ -1798,7 +1798,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;
}
}
......@@ -3681,7 +3681,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)
{
......
......@@ -1025,7 +1025,7 @@ Foam::label Foam::snappyRefineDriver::refinementInterfaceRefine
// const scalar rCVol = pow(cellVolumes[cellI], -5.0/3.0);
//
// // Determine principal axes of cell
// symmTensor R(symmTensor::zero);
// symmTensor R(Zero);
//
// forAll(cFaces, i)
// {
......
......@@ -250,7 +250,7 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::smoothInternalDisplacement
// Calculate average of connected cells
labelList nCells(mesh.nPoints(), 0);
pointField sumLocation(mesh.nPoints(), vector::zero);
pointField sumLocation(mesh.nPoints(), Zero);
forAll(isMovingPoint, pointI)
{
......@@ -276,7 +276,7 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::smoothInternalDisplacement
vector::zero
);
tmp<pointField> tdisplacement(new pointField(mesh.nPoints(), vector::zero));
tmp<pointField> tdisplacement(new pointField(mesh.nPoints(), Zero));
pointField& displacement = tdisplacement.ref();
label nAdapted = 0;
......@@ -370,7 +370,7 @@ Foam::tmp<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)
......@@ -418,7 +418,7 @@ Foam::tmp<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
......@@ -521,7 +521,7 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::smoothPatchDisplacement
// Displacement to calculate.
tmp<pointField> tpatchDisp(new pointField(meshPoints.size(), vector::zero));
tmp<pointField> tpatchDisp(new pointField(meshPoints.size(), Zero));
pointField& patchDisp = tpatchDisp.ref();
forAll(pointFaces, i)
......@@ -597,7 +597,7 @@ Foam::tmp<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)
......@@ -997,7 +997,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);
......@@ -1805,7 +1805,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)
{
......@@ -2754,7 +2754,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
......
......@@ -152,7 +152,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();
......@@ -233,9 +233,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;
......@@ -408,7 +408,7 @@ void Foam::snappySnapDriver::calcNearestFace
//
//// Determine rotation axis
//faceRotation.setSize(pp.size());
//faceRotation = vector::zero;
//faceRotation = Zero;
//
//forAll(faceRotation, faceI)
//{
......@@ -745,7 +745,7 @@ Foam::pointIndexHit Foam::snappySnapDriver::findMultiPatchPoint
}
}
}
return pointIndexHit(false, vector::zero, labelMax);
return pointIndexHit(false, Zero, labelMax);
}
......@@ -933,7 +933,7 @@ void Foam::snappySnapDriver::featureAttractionUsingReconstruction
pointConstraint& patchConstraint
) const
{
patchAttraction = vector::zero;
patchAttraction = Zero;
patchConstraint = pointConstraint();
const List<point>& pfSurfNormals = pointFaceSurfNormals[pointI];
......@@ -1155,7 +1155,7 @@ void Foam::snappySnapDriver::featureAttractionUsingReconstruction
forAll(pp.localPoints(), pointI)
{
vector attraction = vector::zero;
vector attraction = Zero;
pointConstraint constraint;
featureAttractionUsingReconstruction
......@@ -1510,7 +1510,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++;
......@@ -2193,14 +2193,14 @@ 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;