Commit 683cfb9d authored by Henry Weller's avatar Henry Weller
Browse files

vector::zero -> Zero

parent 23a87793
......@@ -1677,7 +1677,7 @@ Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLine
if ((startBit & endBit) != 0)
{
// Both start and end outside domain and in same block.
return pointIndexHit(false, vector::zero, -1);
return pointIndexHit(false, Zero, -1);
}
......@@ -1691,7 +1691,7 @@ Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLine
// Track start to inside domain.
if (!treeBb.intersects(start, end, trackStart))
{
return pointIndexHit(false, vector::zero, -1);
return pointIndexHit(false, Zero, -1);
}
}
......@@ -1700,7 +1700,7 @@ Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLine
// Track end to inside domain.
if (!treeBb.intersects(end, trackStart, trackEnd))
{
return pointIndexHit(false, vector::zero, -1);
return pointIndexHit(false, Zero, -1);
}
}
......@@ -2129,7 +2129,7 @@ Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findNearest
{
scalar nearestDistSqr = startDistSqr;
label nearestShapeI = -1;
point nearestPoint = vector::zero;
point nearestPoint = Zero;
if (nodes_.size())
{
......@@ -2174,7 +2174,7 @@ Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findNearest
}
else
{
nearestPoint = vector::zero;
nearestPoint = Zero;
}
return pointIndexHit(nearestShapeI != -1, nearestPoint, nearestShapeI);
......
......@@ -1710,7 +1710,7 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findLine
if ((startBit & endBit) != 0)
{
// Both start and end outside domain and in same block.
return pointIndexHit(false, vector::zero, -1);
return pointIndexHit(false, Zero, -1);
}
......@@ -1724,7 +1724,7 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findLine
// Track start to inside domain.
if (!treeBb.intersects(start, end, trackStart))
{
return pointIndexHit(false, vector::zero, -1);
return pointIndexHit(false, Zero, -1);
}
}
......@@ -1733,7 +1733,7 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findLine
// Track end to inside domain.
if (!treeBb.intersects(end, trackStart, trackEnd))
{
return pointIndexHit(false, vector::zero, -1);
return pointIndexHit(false, Zero, -1);
}
}
......@@ -2350,7 +2350,7 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findNearest
{
scalar nearestDistSqr = startDistSqr;
label nearestShapeI = -1;
point nearestPoint = vector::zero;
point nearestPoint = Zero;
if (nodes_.size())
{
......@@ -2401,7 +2401,7 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findNearest
) const
{
label nearestShapeI = -1;
point nearestPoint = vector::zero;
point nearestPoint = Zero;
if (nodes_.size())
{
......
......@@ -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
......@@ -27,7 +27,7 @@ License
inline Foam::pointConstraint::pointConstraint()
:
Tuple2<label, vector>(0, vector::zero)
Tuple2<label, vector>(0, Zero)
{}
......@@ -68,7 +68,7 @@ void Foam::pointConstraint::applyConstraint(const vector& cd)
if (mag(cd & second()) > 1e-3)
{
first() = 3;
second() = vector::zero;
second() = Zero;
}
}
}
......@@ -103,13 +103,13 @@ void Foam::pointConstraint::combine(const pointConstraint& pc)
{
// Different directions
first() = 3;
second() = vector::zero;
second() = Zero;
}
}
else
{
first() = 3;
second() = vector::zero;
second() = Zero;
}
}
}
......@@ -131,7 +131,7 @@ Foam::tensor Foam::pointConstraint::constraintTransformation() const
}
else
{
return tensor::zero;
return Zero;
}
}
......@@ -172,7 +172,7 @@ const
// Knock out remaining vectors
for (direction dir = n; dir < vecs.size(); dir++)
{
vecs[dir] = vector::zero;
vecs[dir] = Zero;
}
tt = tensor(vecs[0], vecs[1], vecs[2]);
......
......@@ -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
......@@ -80,7 +80,7 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcPointAddressing() const
const typename FromPatch::FaceType& hitFace =
fromPatchFaces[proj[pointI].hitObject()];
point hitPoint = point::zero;
point hitPoint = Zero;
if (proj[pointI].hit())
{
......
......@@ -51,8 +51,8 @@ void Foam::boundBox::calculate(const UList<point>& points, const bool doReduce)
{
if (points.empty())
{
min_ = point::zero;
max_ = point::zero;
min_ = Zero;
max_ = Zero;
if (doReduce && Pstream::parRun())
{
......@@ -87,8 +87,8 @@ void Foam::boundBox::calculate(const UList<point>& points, const bool doReduce)
Foam::boundBox::boundBox(const UList<point>& points, const bool doReduce)
:
min_(point::zero),
max_(point::zero)
min_(Zero),
max_(Zero)
{
calculate(points, doReduce);
}
......@@ -96,8 +96,8 @@ Foam::boundBox::boundBox(const UList<point>& points, const bool doReduce)
Foam::boundBox::boundBox(const tmp<pointField>& points, const bool doReduce)
:
min_(point::zero),
max_(point::zero)
min_(Zero),
max_(Zero)
{
calculate(points(), doReduce);
points.clear();
......@@ -111,8 +111,8 @@ Foam::boundBox::boundBox
const bool doReduce
)
:
min_(point::zero),
max_(point::zero)
min_(Zero),
max_(Zero)
{
if (points.empty() || indices.empty())
{
......
......@@ -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
......@@ -31,8 +31,8 @@ License
inline Foam::boundBox::boundBox()
:
min_(point::zero),
max_(point::zero)
min_(Zero),
max_(Zero)
{}
......
......@@ -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
......@@ -38,8 +38,8 @@ Foam::boundBox::boundBox
const bool doReduce
)
:
min_(point::zero),
max_(point::zero)
min_(Zero),
max_(Zero)
{
// a FixedList is never empty
if (points.empty())
......
......@@ -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
......@@ -192,7 +192,7 @@ Foam::point Foam::cell::centre
// first calculate the aproximate cell centre as the average of all
// face centres
vector cEst = vector::zero;
vector cEst = Zero;
scalar sumArea = 0;
const labelList& faces = *this;
......@@ -208,7 +208,7 @@ Foam::point Foam::cell::centre
// Calculate the centre by breaking the cell into pyramids and
// volume-weighted averaging their centres
vector sumVc = vector::zero;
vector sumVc = Zero;
scalar sumV = 0;
......@@ -251,7 +251,7 @@ Foam::scalar Foam::cell::mag
// first calculate the aproximate cell centre as the average of all
// face centres
vector cEst = vector::zero;
vector cEst = Zero;
scalar nCellFaces = 0;
const labelList& faces = *this;
......
......@@ -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
......@@ -35,7 +35,7 @@ Foam::vector Foam::cellModel::centre
) const
{
// Estimate centre of cell
vector cEst = vector::zero;
vector cEst = Zero;
// Sum the points idicated by the label list
forAll(pointLabels, i)
......@@ -50,7 +50,7 @@ Foam::vector Foam::cellModel::centre
// Calculate the centre by breaking the cell into pyramids and
// volume-weighted averaging their centres
scalar sumV = 0.0;
vector sumVc = vector::zero;
vector sumVc = Zero;
const faceList cellFaces = faces(pointLabels);
......@@ -92,7 +92,7 @@ Foam::scalar Foam::cellModel::mag
) const
{
// Estimate centre of cell
vector cEst = vector::zero;
vector cEst = Zero;
// Sum the points idicated by the label list
forAll(pointLabels, i)
......
......@@ -505,7 +505,7 @@ Foam::point Foam::face::centre(const pointField& points) const
}
point centrePoint = point::zero;
point centrePoint = Zero;
for (label pI=0; pI<nPoints; ++pI)
{
centrePoint += points[operator[](pI)];
......@@ -513,7 +513,7 @@ Foam::point Foam::face::centre(const pointField& points) const
centrePoint /= nPoints;
scalar sumA = 0;
vector sumAc = vector::zero;
vector sumAc = Zero;
for (label pI=0; pI<nPoints; ++pI)
{
......@@ -572,14 +572,14 @@ Foam::vector Foam::face::normal(const pointField& p) const
label pI;
point centrePoint = vector::zero;
point centrePoint = Zero;
for (pI = 0; pI < nPoints; ++pI)
{
centrePoint += p[operator[](pI)];
}
centrePoint /= nPoints;
vector n = vector::zero;
vector n = Zero;
point nextPoint = centrePoint;
......@@ -742,7 +742,7 @@ Foam::tensor Foam::face::inertia
const point ctr = centre(p);
tensor J = tensor::zero;
tensor J = Zero;
forAll(*this, i)
{
......
......@@ -70,7 +70,7 @@ Type Foam::face::average
label nPoints = size();
point centrePoint = point::zero;
point centrePoint = Zero;
Type cf = Zero;
for (label pI=0; pI<nPoints; pI++)
......
......@@ -1917,7 +1917,7 @@ Foam::pointField Foam::globalMeshData::sharedPoints() const
(
Pstream::blocking,
slave,
sharedPoints.size()*sizeof(vector::zero)
sharedPoints.size()*sizeof(Zero)
);
toSlave << sharedPoints;
}
......
......@@ -62,8 +62,8 @@ void Foam::polyMesh::calcDirections() const
label nEmptyPatches = 0;
label nWedgePatches = 0;
vector emptyDirVec = vector::zero;
vector wedgeDirVec = vector::zero;
vector emptyDirVec = Zero;
vector wedgeDirVec = Zero;
forAll(boundaryMesh(), patchi)
{
......@@ -205,8 +205,8 @@ Foam::polyMesh::polyMesh(const IOobject& io)
),
bounds_(points_),
comm_(UPstream::worldComm),
geometricD_(Vector<label>::zero),
solutionD_(Vector<label>::zero),
geometricD_(Zero),
solutionD_(Zero),
tetBasePtIsPtr_(NULL),
cellTreePtr_(NULL),
pointZones_
......@@ -399,8 +399,8 @@ Foam::polyMesh::polyMesh
),
bounds_(points_, syncPar),
comm_(UPstream::worldComm),
geometricD_(Vector<label>::zero),
solutionD_(Vector<label>::zero),
geometricD_(Zero),
solutionD_(Zero),
tetBasePtIsPtr_(NULL),
cellTreePtr_(NULL),
pointZones_
......@@ -550,8 +550,8 @@ Foam::polyMesh::polyMesh
),
bounds_(points_, syncPar),
comm_(UPstream::worldComm),
geometricD_(Vector<label>::zero),
solutionD_(Vector<label>::zero),
geometricD_(Zero),
solutionD_(Zero),
tetBasePtIsPtr_(NULL),
cellTreePtr_(NULL),
pointZones_
......@@ -888,8 +888,8 @@ void Foam::polyMesh::addPatches
}
// Reset valid directions
geometricD_ = Vector<label>::zero;
solutionD_ = Vector<label>::zero;
geometricD_ = Zero;
solutionD_ = Zero;
boundary_.setSize(p.size());
......@@ -1110,8 +1110,8 @@ Foam::tmp<Foam::scalarField> Foam::polyMesh::movePoints
cellZones_.movePoints(points_);
// Reset valid directions (could change with rotation)
geometricD_ = Vector<label>::zero;
solutionD_ = Vector<label>::zero;
geometricD_ = Zero;
solutionD_ = Zero;
meshObject::movePoints<polyMesh>(*this);
meshObject::movePoints<pointMesh>(*this);
......
......@@ -66,8 +66,8 @@ void Foam::polyMesh::clearGeom()
boundary_.clearGeom();
// Reset valid directions (could change with rotation)
geometricD_ = Vector<label>::zero;
solutionD_ = Vector<label>::zero;
geometricD_ = Zero;
solutionD_ = Zero;
// Remove the stored tet base points
tetBasePtIsPtr_.clear();
......@@ -134,8 +134,8 @@ void Foam::polyMesh::clearAddressing(const bool isMeshUpdate)
globalMeshDataPtr_.clear();
// Reset valid directions
geometricD_ = Vector<label>::zero;
solutionD_ = Vector<label>::zero;
geometricD_ = Zero;
solutionD_ = Zero;
// Update zones
pointZones_.clearAddressing();
......
......@@ -473,8 +473,8 @@ Foam::polyMesh::polyMesh
),
bounds_(points_, syncPar),
comm_(UPstream::worldComm),
geometricD_(Vector<label>::zero),
solutionD_(Vector<label>::zero),
geometricD_(Zero),
solutionD_(Zero),
tetBasePtIsPtr_(NULL),
cellTreePtr_(NULL),
pointZones_
......@@ -757,8 +757,8 @@ Foam::polyMesh::polyMesh
),
bounds_(points_, syncPar),
comm_(UPstream::worldComm),
geometricD_(Vector<label>::zero),
solutionD_(Vector<label>::zero),
geometricD_(Zero),
solutionD_(Zero),
tetBasePtIsPtr_(NULL),
cellTreePtr_(NULL),
pointZones_
......
......@@ -268,8 +268,8 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
// Derived info
bounds_ = boundBox(points_);
geometricD_ = Vector<label>::zero;
solutionD_ = Vector<label>::zero;
geometricD_ = Zero;
solutionD_ = Zero;
// Zones
pointZoneMesh newPointZones
......@@ -442,8 +442,8 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
bounds_ = boundBox(points_);
// Rotation can cause direction vector to change
geometricD_ = Vector<label>::zero;
solutionD_ = Vector<label>::zero;
geometricD_ = Zero;
solutionD_ = Zero;
return polyMesh::POINTS_MOVED;
}
......
......@@ -95,8 +95,8 @@ void Foam::polyMesh::updateMesh(const mapPolyMesh& mpm)
meshObject::updateMesh<pointMesh>(*this, mpm);
// Reset valid directions (could change by faces put into empty patches)
geometricD_ = Vector<label>::zero;
solutionD_ = Vector<label>::zero;
geometricD_ = Zero;
solutionD_ = Zero;
const_cast<Time&>(time()).functionObjects().updateMesh(mpm);
}
......
......@@ -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
......@@ -607,9 +607,9 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
coupledPolyPatch(name, size, start, index, bm, patchType, transform),
neighbPatchName_(word::null),
neighbPatchID_(-1),
rotationAxis_(vector::zero),
rotationCentre_(point::zero),
separationVector_(vector::zero),
rotationAxis_(Zero),
rotationCentre_(Zero),
separationVector_(Zero),
coupledPointsPtr_(NULL),
coupledEdgesPtr_(NULL)
{
......@@ -659,9 +659,9 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
neighbPatchName_(dict.lookupOrDefault("neighbourPatch", word::null)),
coupleGroup_(dict),
neighbPatchID_(-1),
rotationAxis_(vector::zero),
rotationCentre_(point::zero),
separationVector_(vector::zero),
rotationAxis_(Zero),
rotationCentre_(Zero),
separationVector_(Zero),
coupledPointsPtr_(NULL),
coupledEdgesPtr_(NULL)
{
......
......@@ -571,9 +571,9 @@ Foam::oldCyclicPolyPatch::oldCyclicPolyPatch
:
coupledPolyPatch(name, size, start, index, bm, patchType, transform),
featureCos_(0.9),
rotationAxis_(vector::zero),
rotationCentre_(point::zero),
separationVector_(vector::zero)
rotationAxis_(Zero),
rotationCentre_(Zero),
separationVector_(Zero)
{}
......@@ -588,9 +588,9 @@ Foam::oldCyclicPolyPatch::oldCyclicPolyPatch
:
coupledPolyPatch(name, dict, index, bm, patchType),
featureCos_(0.9),
rotationAxis_(vector::zero),
rotationCentre_(point::zero),
separationVector_(vector::zero)
rotationAxis_(Zero),
rotationCentre_(Zero),
separationVector_(Zero)
{
if (dict.found("neighbourPatch"))
{
......
......@@ -589,7 +589,7 @@ void Foam::processorPolyPatch::initOrder
// Get the average of the points of each face. This is needed in
// case the face centroid calculation is incorrect due to the face
// having a very high aspect ratio.
pointField facePointAverages(pp.size(), point::zero);
pointField facePointAverages(pp.size(), Zero);