Use Zero rather than pTraits<Type>::zero unless a static typed '0' is required
This commit is contained in:
@ -468,7 +468,7 @@ Foam::label Foam::isoSurface::generateFaceTriPoints
|
||||
(
|
||||
snappedPoint[pointI] != -1
|
||||
? snappedPoints[snappedPoint[pointI]]
|
||||
: pTraits<Type>::zero
|
||||
: Type(Zero)
|
||||
),
|
||||
|
||||
pVals[nextPointI],
|
||||
@ -477,7 +477,7 @@ Foam::label Foam::isoSurface::generateFaceTriPoints
|
||||
(
|
||||
snappedPoint[nextPointI] != -1
|
||||
? snappedPoints[snappedPoint[nextPointI]]
|
||||
: pTraits<Type>::zero
|
||||
: Type(Zero)
|
||||
),
|
||||
|
||||
cVals[own],
|
||||
@ -486,7 +486,7 @@ Foam::label Foam::isoSurface::generateFaceTriPoints
|
||||
(
|
||||
snappedCc[own] != -1
|
||||
? snappedPoints[snappedCc[own]]
|
||||
: pTraits<Type>::zero
|
||||
: Type(Zero)
|
||||
),
|
||||
|
||||
neiVal,
|
||||
@ -582,7 +582,7 @@ void Foam::isoSurface::generateTriPoints
|
||||
(
|
||||
snappedCc[nei[faceI]] != -1
|
||||
? snappedPoints[snappedCc[nei[faceI]]]
|
||||
: pTraits<Type>::zero
|
||||
: Type(Zero)
|
||||
),
|
||||
|
||||
triPoints,
|
||||
@ -594,7 +594,7 @@ void Foam::isoSurface::generateTriPoints
|
||||
|
||||
// Determine neighbouring snap status
|
||||
boolList neiSnapped(mesh_.nFaces()-mesh_.nInternalFaces(), false);
|
||||
List<Type> neiSnappedPoint(neiSnapped.size(), pTraits<Type>::zero);
|
||||
List<Type> neiSnappedPoint(neiSnapped.size(), Type(Zero));
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
const polyPatch& pp = patches[patchI];
|
||||
@ -680,7 +680,7 @@ void Foam::isoSurface::generateTriPoints
|
||||
cVals.boundaryField()[patchI][i],
|
||||
cCoords.boundaryField()[patchI][i],
|
||||
false,
|
||||
pTraits<Type>::zero,
|
||||
Type(Zero),
|
||||
|
||||
triPoints,
|
||||
triMeshCells
|
||||
@ -713,7 +713,7 @@ void Foam::isoSurface::generateTriPoints
|
||||
cVals.boundaryField()[patchI][i],
|
||||
cCoords.boundaryField()[patchI][i],
|
||||
false, // fc not snapped
|
||||
pTraits<Type>::zero,
|
||||
Type(Zero),
|
||||
|
||||
triPoints,
|
||||
triMeshCells
|
||||
@ -739,7 +739,7 @@ Foam::isoSurface::interpolate
|
||||
)
|
||||
{
|
||||
// One value per point
|
||||
tmp<Field<Type> > tvalues(new Field<Type>(nPoints, pTraits<Type>::zero));
|
||||
tmp<Field<Type> > tvalues(new Field<Type>(nPoints, Type(Zero)));
|
||||
Field<Type>& values = tvalues.ref();
|
||||
labelList nValues(values.size(), 0);
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@ bool Foam::sampledSurface::checkFieldSize(const Field<Type>& field) const
|
||||
template<class Type>
|
||||
Type Foam::sampledSurface::integrate(const Field<Type>& field) const
|
||||
{
|
||||
Type value = pTraits<Type>::zero;
|
||||
Type value = Zero;
|
||||
|
||||
if (checkFieldSize(field))
|
||||
{
|
||||
@ -73,7 +73,7 @@ Type Foam::sampledSurface::integrate(const tmp<Field<Type>>& field) const
|
||||
template<class Type>
|
||||
Type Foam::sampledSurface::average(const Field<Type>& field) const
|
||||
{
|
||||
Type value = pTraits<Type>::zero;
|
||||
Type value = Zero;
|
||||
|
||||
if (checkFieldSize(field))
|
||||
{
|
||||
@ -89,7 +89,7 @@ Type Foam::sampledSurface::average(const Field<Type>& field) const
|
||||
}
|
||||
else
|
||||
{
|
||||
return pTraits<Type>::zero;
|
||||
return Zero;
|
||||
}
|
||||
}
|
||||
|
||||
@ -174,7 +174,7 @@ Foam::sampledSurface::pointAverage
|
||||
false
|
||||
),
|
||||
mesh,
|
||||
dimensioned<Type>("zero", dimless, pTraits<Type>::zero)
|
||||
dimensioned<Type>("zero", dimless, Zero)
|
||||
)
|
||||
);
|
||||
GeometricField<Type, fvPatchField, volMesh>& cellAvg = tcellAvg.ref();
|
||||
|
||||
@ -56,7 +56,7 @@ Foam::sampledTriSurfaceMesh::sampleField
|
||||
|
||||
// Create flat boundary field
|
||||
|
||||
Field<Type> bVals(nBnd, pTraits<Type>::zero);
|
||||
Field<Type> bVals(nBnd, Zero);
|
||||
|
||||
forAll(vField.boundaryField(), patchI)
|
||||
{
|
||||
|
||||
@ -181,7 +181,7 @@ void Foam::nastranSurfaceWriter::writeTemplate
|
||||
const DynamicList<face>& dFaces = decomposedFaces[i];
|
||||
forAll(dFaces, faceI)
|
||||
{
|
||||
Type v = pTraits<Type>::zero;
|
||||
Type v = Zero;
|
||||
const face& f = dFaces[faceI];
|
||||
|
||||
forAll(f, fptI)
|
||||
|
||||
Reference in New Issue
Block a user