mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Use Zero rather than pTraits<Type>::zero unless a static typed '0' is required
This commit is contained in:
@ -75,7 +75,7 @@ Type Foam::fieldValues::cellSource::processValues
|
||||
const scalarField& weightField
|
||||
) const
|
||||
{
|
||||
Type result = pTraits<Type>::zero;
|
||||
Type result = Zero;
|
||||
switch (operation_)
|
||||
{
|
||||
case opSum:
|
||||
|
||||
@ -81,7 +81,7 @@ Foam::tmp<Foam::Field<Type>> Foam::fieldValues::faceSource::getFieldValues
|
||||
const faceList& faces = surfacePtr_().faces();
|
||||
tmp<Field<Type>> tavg
|
||||
(
|
||||
new Field<Type>(faces.size(), pTraits<Type>::zero)
|
||||
new Field<Type>(faces.size(), Zero)
|
||||
);
|
||||
Field<Type>& avg = tavg.ref();
|
||||
|
||||
@ -127,7 +127,7 @@ Type Foam::fieldValues::faceSource::processSameTypeValues
|
||||
const scalarField& weightField
|
||||
) const
|
||||
{
|
||||
Type result = pTraits<Type>::zero;
|
||||
Type result = Zero;
|
||||
switch (operation_)
|
||||
{
|
||||
case opSum:
|
||||
@ -148,7 +148,7 @@ Type Foam::fieldValues::faceSource::processSameTypeValues
|
||||
<< pTraits<Type>::typeName
|
||||
<< exit(FatalError);
|
||||
|
||||
result = pTraits<Type>::zero;
|
||||
result = Zero;
|
||||
break;
|
||||
}
|
||||
case opSumDirectionBalance:
|
||||
@ -159,7 +159,7 @@ Type Foam::fieldValues::faceSource::processSameTypeValues
|
||||
<< pTraits<Type>::typeName
|
||||
<< exit(FatalError);
|
||||
|
||||
result = pTraits<Type>::zero;
|
||||
result = Zero;
|
||||
break;
|
||||
}
|
||||
case opAverage:
|
||||
|
||||
@ -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
|
||||
@ -36,7 +36,7 @@ Type Foam::fieldValues::fieldValueDelta::applyOperation
|
||||
const Type& value2
|
||||
) const
|
||||
{
|
||||
Type result = pTraits<Type>::zero;
|
||||
Type result = Zero;
|
||||
|
||||
switch (operation_)
|
||||
{
|
||||
@ -89,8 +89,8 @@ void Foam::fieldValues::fieldValueDelta::processFields(bool& found)
|
||||
const dictionary& results1 = source1Ptr_->resultDict();
|
||||
const dictionary& results2 = source2Ptr_->resultDict();
|
||||
|
||||
Type r1(pTraits<Type>::zero);
|
||||
Type r2(pTraits<Type>::zero);
|
||||
Type r1(Zero);
|
||||
Type r2(Zero);
|
||||
|
||||
forAll(fields1, i)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user