diff --git a/src/OpenFOAM/containers/Lists/BinSum/BinSum.C b/src/OpenFOAM/containers/Lists/BinSum/BinSum.C index 1e099613269d7f7582ace01f2f436e13b1c5aef3..3850f4b653f430779f1dbdadc25d8fe4d8874a77 100644 --- a/src/OpenFOAM/containers/Lists/BinSum/BinSum.C +++ b/src/OpenFOAM/containers/Lists/BinSum/BinSum.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,12 +35,12 @@ Foam::BinSum<IndexType, List, CombineOp>::BinSum const IndexType delta ) : - List(ceil((max-min)/delta), pTraits<typename List::value_type>::zero), + List(ceil((max-min)/delta), Zero), min_(min), max_(max), delta_(delta), - lowSum_(pTraits<typename List::value_type>::zero), - highSum_(pTraits<typename List::value_type>::zero) + lowSum_(Zero), + highSum_(Zero) {} @@ -55,12 +55,12 @@ Foam::BinSum<IndexType, List, CombineOp>::BinSum const CombineOp& cop ) : - List(ceil((max-min)/delta), pTraits<typename List::value_type>::zero), + List(ceil((max-min)/delta), Zero), min_(min), max_(max), delta_(delta), - lowSum_(pTraits<typename List::value_type>::zero), - highSum_(pTraits<typename List::value_type>::zero) + lowSum_(Zero), + highSum_(Zero) { forAll(indexVals, i) { diff --git a/src/OpenFOAM/containers/Lists/Distribution/Distribution.C b/src/OpenFOAM/containers/Lists/Distribution/Distribution.C index c5ee3a283c50c5830c3930af0ca64a654e2dddb8..e6d45249959002730420e82650684d1ec2c34cc8 100644 --- a/src/OpenFOAM/containers/Lists/Distribution/Distribution.C +++ b/src/OpenFOAM/containers/Lists/Distribution/Distribution.C @@ -196,7 +196,7 @@ Foam::Pair<Foam::label> Foam::Distribution<Type>::validLimits template<class Type> Type Foam::Distribution<Type>::mean() const { - Type meanValue(pTraits<Type>::zero); + Type meanValue(Zero); for (direction cmpt = 0; cmpt < pTraits<Type>::nComponents; cmpt++) { @@ -225,7 +225,7 @@ Type Foam::Distribution<Type>::mean() const template<class Type> Type Foam::Distribution<Type>::median() const { - Type medianValue(pTraits<Type>::zero); + Type medianValue(Zero); List<List<Pair<scalar>>> normDistribution = normalised(); diff --git a/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.C b/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.C index f110dd803db22f5fcfa8ba1d87db294d39916c33..f5381ef91e05712331a226d15542f99f301508d8 100644 --- a/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.C +++ b/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.C @@ -137,7 +137,7 @@ Foam::dimensioned<Type>::dimensioned : name_(name), dimensions_(dimSet), - value_(pTraits<Type>::zero) + value_(Zero) { initialize(is); } @@ -153,7 +153,7 @@ Foam::dimensioned<Type>::dimensioned : name_(name), dimensions_(dimSet), - value_(pTraits<Type>::zero) + value_(Zero) { initialize(dict.lookup(name)); } @@ -165,7 +165,7 @@ Foam::dimensioned<Type>::dimensioned : name_("undefined"), dimensions_(dimless), - value_(pTraits<Type>::zero) + value_(Zero) {} diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.C b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.C index 330336b2af8766762651516b10db107d7f16c574..f30797a79363b6c122418c7972bf8f81c7bc468a 100644 --- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.C +++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.C @@ -468,7 +468,7 @@ Type sum(const FieldField<Field, Type>& f) { if (f.size()) { - Type Sum = pTraits<Type>::zero; + Type Sum = Zero; forAll(f, i) { @@ -479,7 +479,7 @@ Type sum(const FieldField<Field, Type>& f) } else { - return pTraits<Type>::zero; + return Zero; } } @@ -524,7 +524,7 @@ Type average(const FieldField<Field, Type>& f) WarningInFunction << "empty fieldField, returning zero" << endl; - return pTraits<Type>::zero; + return Zero; } Type avrg = sum(f)/n; @@ -536,7 +536,7 @@ Type average(const FieldField<Field, Type>& f) WarningInFunction << "empty fieldField, returning zero" << endl; - return pTraits<Type>::zero; + return Zero; } } @@ -585,7 +585,7 @@ Type gAverage(const FieldField<Field, Type>& f) WarningInFunction << "empty fieldField, returning zero" << endl; - return pTraits<Type>::zero; + return Zero; } } diff --git a/src/OpenFOAM/fields/Fields/Field/Field.C b/src/OpenFOAM/fields/Fields/Field/Field.C index 31983797d19b00eb39702b0be57a10c5ecc46bc4..4b628788e8675a3cf14bf7e3fdd18dbd30b3dc0b 100644 --- a/src/OpenFOAM/fields/Fields/Field/Field.C +++ b/src/OpenFOAM/fields/Fields/Field/Field.C @@ -406,7 +406,7 @@ void Foam::Field<Type>::map const labelList& localAddrs = mapAddressing[i]; const scalarList& localWeights = mapWeights[i]; - f[i] = pTraits<Type>::zero; + f[i] = Zero; forAll(localAddrs, j) { @@ -533,7 +533,7 @@ void Foam::Field<Type>::rmap { Field<Type>& f = *this; - f = pTraits<Type>::zero; + f = Zero; forAll(mapF, i) { diff --git a/src/OpenFOAM/fields/Fields/Field/FieldFunctions.C b/src/OpenFOAM/fields/Fields/Field/FieldFunctions.C index c75a045f5d5ba6318c82e0dc2329309af723d48b..65d2406470973edebb3787920e27579e7c5a8888 100644 --- a/src/OpenFOAM/fields/Fields/Field/FieldFunctions.C +++ b/src/OpenFOAM/fields/Fields/Field/FieldFunctions.C @@ -346,13 +346,13 @@ Type sum(const UList<Type>& f) { if (f.size()) { - Type Sum = pTraits<Type>::zero; + Type Sum = Zero; TFOR_ALL_S_OP_F(Type, Sum, +=, Type, f) return Sum; } else { - return pTraits<Type>::zero; + return Zero; } } @@ -379,7 +379,7 @@ Type maxMagSqr(const UList<Type>& f) } else { - return pTraits<Type>::zero; + return Zero; } } @@ -417,13 +417,13 @@ scalar sumProd(const UList<Type>& f1, const UList<Type>& f2) { if (f1.size() && (f1.size() == f2.size())) { - scalar SumProd = 0.0; + scalar SumProd = 0; TFOR_ALL_S_OP_F_OP_F(scalar, SumProd, +=, Type, f1, &&, Type, f2) return SumProd; } else { - return 0.0; + return 0; } } @@ -433,7 +433,7 @@ Type sumCmptProd(const UList<Type>& f1, const UList<Type>& f2) { if (f1.size() && (f1.size() == f2.size())) { - Type SumProd = pTraits<Type>::zero; + Type SumProd = Zero; TFOR_ALL_S_OP_FUNC_F_F ( Type, @@ -449,7 +449,7 @@ Type sumCmptProd(const UList<Type>& f1, const UList<Type>& f2) } else { - return pTraits<Type>::zero; + return Zero; } } @@ -459,13 +459,13 @@ scalar sumSqr(const UList<Type>& f) { if (f.size()) { - scalar SumSqr = 0.0; + scalar SumSqr = 0; TFOR_ALL_S_OP_FUNC_F(scalar, SumSqr, +=, sqr, Type, f) return SumSqr; } else { - return 0.0; + return 0; } } @@ -476,13 +476,13 @@ scalar sumMag(const UList<Type>& f) { if (f.size()) { - scalar SumMag = 0.0; + scalar SumMag = 0; TFOR_ALL_S_OP_FUNC_F(scalar, SumMag, +=, mag, Type, f) return SumMag; } else { - return 0.0; + return 0; } } @@ -494,13 +494,13 @@ Type sumCmptMag(const UList<Type>& f) { if (f.size()) { - Type SumMag = pTraits<Type>::zero; + Type SumMag = Zero; TFOR_ALL_S_OP_FUNC_F(scalar, SumMag, +=, cmptMag, Type, f) return SumMag; } else { - return pTraits<Type>::zero; + return Zero; } } @@ -520,7 +520,7 @@ Type average(const UList<Type>& f) WarningInFunction << "empty field, returning zero" << endl; - return pTraits<Type>::zero; + return Zero; } } @@ -597,7 +597,7 @@ Type gAverage WarningInFunction << "empty field, returning zero." << endl; - return pTraits<Type>::zero; + return Zero; } } diff --git a/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C b/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C index 1fd8eac973e94ae22b4f934edaea327f25dbfd47..cc7c6be0ea5f40b170e6b97c6334f2beecd43e0c 100644 --- a/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C +++ b/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.C @@ -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 @@ -74,7 +74,7 @@ Foam::UniformDimensionedField<Type>::UniformDimensionedField ) : regIOobject(io), - dimensioned<Type>(regIOobject::name(), dimless, pTraits<Type>::zero) + dimensioned<Type>(regIOobject::name(), dimless, Zero) { dictionary dict(readStream(typeName)); scalar multiplier; diff --git a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.C index c22c91f79df3f3e16c31068cb530d83b1f8c08ca..e7c7dacb85e8244ba264e33dca740c665d273602 100644 --- a/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/basic/value/valuePointPatchField.C @@ -77,7 +77,7 @@ Foam::valuePointPatchField<Type>::valuePointPatchField } else if (!valueRequired) { - Field<Type>::operator=(pTraits<Type>::zero); + Field<Type>::operator=(Zero); } else { diff --git a/src/OpenFOAM/interpolations/interpolatePointToCell/interpolatePointToCell.C b/src/OpenFOAM/interpolations/interpolatePointToCell/interpolatePointToCell.C index c0e7192d1591bf8270a6d0a319812b877056a88c..c5d2cc4257771b9e07200ae7402a56de35e1c0c6 100644 --- a/src/OpenFOAM/interpolations/interpolatePointToCell/interpolatePointToCell.C +++ b/src/OpenFOAM/interpolations/interpolatePointToCell/interpolatePointToCell.C @@ -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 @@ -40,7 +40,7 @@ Type Foam::interpolatePointToCell labelHashSet pointHad(10*cFaces.size()); - Type sum(pTraits<Type>::zero); + Type sum = Zero; forAll(cFaces, i) { diff --git a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C index d12ce331dab7f062c5188db61f2348768a12b19b..fe2e5bd51424408e024907aed0f57a76c4f223ce 100644 --- a/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C +++ b/src/OpenFOAM/interpolations/interpolation2DTable/interpolation2DTable.C @@ -308,7 +308,7 @@ Type Foam::interpolation2DTable<Type>::operator() WarningInFunction << "cannot interpolate a zero-sized table - returning zero" << endl; - return pTraits<Type>::zero; + return Zero; } else if (nX == 1) { diff --git a/src/OpenFOAM/interpolations/interpolationWeights/interpolationWeights/interpolationWeightsTemplates.C b/src/OpenFOAM/interpolations/interpolationWeights/interpolationWeights/interpolationWeightsTemplates.C index 9050921b9e59214a2d8cce18205faa645e2f0368..1f2038cb913d2a5ecc13fd4b9e58dc65811173f7 100644 --- a/src/OpenFOAM/interpolations/interpolationWeights/interpolationWeights/interpolationWeightsTemplates.C +++ b/src/OpenFOAM/interpolations/interpolationWeights/interpolationWeights/interpolationWeightsTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -65,7 +65,7 @@ Foam::interpolationWeights::weightedSum } else { - return pTraits<returnType>::zero; + return Zero; } } diff --git a/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolate.C b/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolate.C index b44cd52352fe28d760c43b19ebba2b3ff5f4abc9..621e9a75746189a5e184f16903135fa24997c937 100644 --- a/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolate.C +++ b/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolate.C @@ -51,11 +51,7 @@ PatchToPatchInterpolation<FromPatch, ToPatch>::pointInterpolate tmp<Field<Type>> tresult ( - new Field<Type> - ( - toPatch_.nPoints(), - pTraits<Type>::zero - ) + new Field<Type>(toPatch_.nPoints(), Zero) ); Field<Type>& result = tresult(); @@ -119,11 +115,7 @@ PatchToPatchInterpolation<FromPatch, ToPatch>::faceInterpolate tmp<Field<Type>> tresult ( - new Field<Type> - ( - toPatch_.size(), - pTraits<Type>::zero - ) + new Field<Type>(toPatch_.size(), Zero) ); Field<Type>& result = tresult(); diff --git a/src/OpenFOAM/interpolations/primitivePatchInterpolation/PrimitivePatchInterpolation.C b/src/OpenFOAM/interpolations/primitivePatchInterpolation/PrimitivePatchInterpolation.C index e9253134ef47e7e9796565cdc6c38cb7dee032b9..30c5ec1e70aee818b615d4bf345028e2285263ab 100644 --- a/src/OpenFOAM/interpolations/primitivePatchInterpolation/PrimitivePatchInterpolation.C +++ b/src/OpenFOAM/interpolations/primitivePatchInterpolation/PrimitivePatchInterpolation.C @@ -188,7 +188,7 @@ tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::faceToPointInterpolate ( new Field<Type> ( - patch_.nPoints(), pTraits<Type>::zero + patch_.nPoints(), Zero ) ); @@ -245,7 +245,7 @@ tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::pointToFaceInterpolate new Field<Type> ( patch_.size(), - pTraits<Type>::zero + Zero ) ); @@ -300,7 +300,7 @@ tmp<Field<Type>> PrimitivePatchInterpolation<Patch>::faceToEdgeInterpolate tmp<Field<Type>> tresult ( - new Field<Type>(patch_.nEdges(), pTraits<Type>::zero) + new Field<Type>(patch_.nEdges(), Zero) ); Field<Type>& result = tresult.ref(); diff --git a/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrix.C b/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrix.C index dc682092022c3935d870d937c09e1e261369b0c4..5c811d20c39725378e6d752c97d21b3c8f8e9c7b 100644 --- a/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrix.C +++ b/src/OpenFOAM/matrices/LUscalarMatrix/LUscalarMatrix.C @@ -129,7 +129,7 @@ Foam::LUscalarMatrix::LUscalarMatrix nCells += lduMatrices[i].size(); } - scalarSquareMatrix m(nCells, nCells, 0.0); + scalarSquareMatrix m(nCells, 0.0); transfer(m); convert(lduMatrices); } @@ -137,7 +137,7 @@ Foam::LUscalarMatrix::LUscalarMatrix else { label nCells = ldum.lduAddr().size(); - scalarSquareMatrix m(nCells, nCells, 0.0); + scalarSquareMatrix m(nCells, 0.0); transfer(m); convert(ldum, interfaceCoeffs, interfaces); } diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.C b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.C index aa50c4def37b9c1a4752381dc17a78e92b394a4e..a36b31137bf48950b6872e6e2044e5e900f19935 100644 --- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.C +++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrix.C @@ -191,7 +191,7 @@ Foam::Field<DType>& Foam::LduMatrix<Type, DType, LUType>::diag() { if (!diagPtr_) { - diagPtr_ = new Field<DType>(lduAddr().size(), pTraits<DType>::zero); + diagPtr_ = new Field<DType>(lduAddr().size(), Zero); } return *diagPtr_; @@ -212,7 +212,7 @@ Foam::Field<LUType>& Foam::LduMatrix<Type, DType, LUType>::upper() upperPtr_ = new Field<LUType> ( lduAddr().lowerAddr().size(), - pTraits<LUType>::zero + Zero ); } } @@ -235,7 +235,7 @@ Foam::Field<LUType>& Foam::LduMatrix<Type, DType, LUType>::lower() lowerPtr_ = new Field<LUType> ( lduAddr().lowerAddr().size(), - pTraits<LUType>::zero + Zero ); } } @@ -249,7 +249,7 @@ Foam::Field<Type>& Foam::LduMatrix<Type, DType, LUType>::source() { if (!sourcePtr_) { - sourcePtr_ = new Field<Type>(lduAddr().size(), pTraits<Type>::zero); + sourcePtr_ = new Field<Type>(lduAddr().size(), Zero); } return *sourcePtr_; diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixOperations.C b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixOperations.C index 1c43bebcaf2b619a9789dbdd13634a06b1a060e6..8715b36752f67ec27b0c84d69647d650c16fa91f 100644 --- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixOperations.C +++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixOperations.C @@ -89,7 +89,7 @@ Foam::LduMatrix<Type, DType, LUType>::H(const Field<Type>& psi) const { tmp<Field<Type>> tHpsi ( - new Field<Type>(lduAddr().size(), pTraits<Type>::zero) + new Field<Type>(lduAddr().size(), Zero) ); if (lowerPtr_ || upperPtr_) diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSolver.C b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSolver.C index 8aed474b36a8d6e9ac9022d3605f2f3c60079979..157db46d7b99c506c34d04dd6cf622cb0d6f1893 100644 --- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSolver.C +++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixSolver.C @@ -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 @@ -131,7 +131,7 @@ Foam::LduMatrix<Type, DType, LUType>::solver::solver maxIter_(1000), minIter_(0), tolerance_(1e-6*pTraits<Type>::one), - relTol_(pTraits<Type>::zero) + relTol_(Zero) { readControls(); } diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/SolverPerformance.H b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/SolverPerformance.H index a933e1aecab4a993830641918b85f750216bc24b..1c639c4439ce152fe6a9d3dc56e35e29fd45e3ee 100644 --- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/SolverPerformance.H +++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/SolverPerformance.H @@ -110,8 +110,8 @@ public: SolverPerformance() : - initialResidual_(pTraits<Type>::zero), - finalResidual_(pTraits<Type>::zero), + initialResidual_(Zero), + finalResidual_(Zero), noIterations_(0), converged_(false), singular_(false) diff --git a/src/OpenFOAM/matrices/LduMatrix/Solvers/DiagonalSolver/DiagonalSolver.C b/src/OpenFOAM/matrices/LduMatrix/Solvers/DiagonalSolver/DiagonalSolver.C index adbe9113a271c750af850a9443baf3190840d232..4c1cf19a2653a929cc85a87db18e4610f594fa5a 100644 --- a/src/OpenFOAM/matrices/LduMatrix/Solvers/DiagonalSolver/DiagonalSolver.C +++ b/src/OpenFOAM/matrices/LduMatrix/Solvers/DiagonalSolver/DiagonalSolver.C @@ -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 @@ -67,8 +67,8 @@ Foam::DiagonalSolver<Type, DType, LUType>::solve ( typeName, this->fieldName_, - pTraits<Type>::zero, - pTraits<Type>::zero, + Zero, + Zero, 0, true, false diff --git a/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCCCG/PBiCCCG.C b/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCCCG/PBiCCCG.C index b770bdf21fad4531598e06c35675ee441bec0809..11f7d52aa748309ff6a93950ca97e0d60a461cc0 100644 --- a/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCCCG/PBiCCCG.C +++ b/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCCCG/PBiCCCG.C @@ -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 @@ -69,7 +69,7 @@ Foam::PBiCCCG<Type, DType, LUType>::solve Field<Type> pA(nCells); Type* __restrict__ pAPtr = pA.begin(); - Field<Type> pT(nCells, pTraits<Type>::zero); + Field<Type> pT(nCells, Zero); Type* __restrict__ pTPtr = pT.begin(); Field<Type> wA(nCells); diff --git a/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCICG/PBiCICG.C b/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCICG/PBiCICG.C index 3043a016737b383c9e2635fe7a421cf621c084a4..860765e4c1966b530b9d2c4003324f0bdc23ab38 100644 --- a/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCICG/PBiCICG.C +++ b/src/OpenFOAM/matrices/LduMatrix/Solvers/PBiCICG/PBiCICG.C @@ -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 @@ -66,7 +66,7 @@ Foam::PBiCICG<Type, DType, LUType>::solve(Field<Type>& psi) const Field<Type> pA(nCells); Type* __restrict__ pAPtr = pA.begin(); - Field<Type> pT(nCells, pTraits<Type>::zero); + Field<Type> pT(nCells, Zero); Type* __restrict__ pTPtr = pT.begin(); Field<Type> wA(nCells); diff --git a/src/OpenFOAM/matrices/LduMatrix/Solvers/SmoothSolver/SmoothSolver.C b/src/OpenFOAM/matrices/LduMatrix/Solvers/SmoothSolver/SmoothSolver.C index 5dea9207d6c6fa619f609e154544f67485bec5df..76d3b4369ec471015a19753c5cbeecc525e66cdb 100644 --- a/src/OpenFOAM/matrices/LduMatrix/Solvers/SmoothSolver/SmoothSolver.C +++ b/src/OpenFOAM/matrices/LduMatrix/Solvers/SmoothSolver/SmoothSolver.C @@ -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 @@ -85,7 +85,7 @@ Foam::SmoothSolver<Type, DType, LUType>::solve(Field<Type>& psi) const } else { - Type normFactor = pTraits<Type>::zero; + Type normFactor = Zero; { Field<Type> Apsi(psi.size()); diff --git a/src/OpenFOAM/meshes/meshShapes/face/faceTemplates.C b/src/OpenFOAM/meshes/meshShapes/face/faceTemplates.C index dcfda1d6995dda229e644edd9efee8a79d074b4a..33d1f97b7850856a207b7cc99b6f622e0190f76a 100644 --- a/src/OpenFOAM/meshes/meshShapes/face/faceTemplates.C +++ b/src/OpenFOAM/meshes/meshShapes/face/faceTemplates.C @@ -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 @@ -71,7 +71,7 @@ Type Foam::face::average label nPoints = size(); point centrePoint = point::zero; - Type cf = pTraits<Type>::zero; + Type cf = Zero; for (label pI=0; pI<nPoints; pI++) { @@ -83,7 +83,7 @@ Type Foam::face::average cf /= nPoints; scalar sumA = 0; - Type sumAf = pTraits<Type>::zero; + Type sumAf = Zero; for (label pI=0; pI<nPoints; pI++) { diff --git a/src/OpenFOAM/primitives/demandDrivenEntry/demandDrivenEntry.C b/src/OpenFOAM/primitives/demandDrivenEntry/demandDrivenEntry.C index bac4117c78a440ca6fe21cf24c104c1769207594..cbb518b241c5121eb29f956524d5739e8e15805c 100644 --- a/src/OpenFOAM/primitives/demandDrivenEntry/demandDrivenEntry.C +++ b/src/OpenFOAM/primitives/demandDrivenEntry/demandDrivenEntry.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -50,7 +50,7 @@ Foam::demandDrivenEntry<Type>::demandDrivenEntry : dict_(dict), keyword_(keyword), - value_(pTraits<Type>::zero), + value_(Zero), stored_(false) {} diff --git a/src/OpenFOAM/primitives/functions/Function1/Constant/Constant.C b/src/OpenFOAM/primitives/functions/Function1/Constant/Constant.C index 8b757e59bc77bbe75ac825ae257ab3eba8aa5271..d1b5f3288575beb960654719845ac82559043fef 100644 --- a/src/OpenFOAM/primitives/functions/Function1/Constant/Constant.C +++ b/src/OpenFOAM/primitives/functions/Function1/Constant/Constant.C @@ -35,7 +35,7 @@ Foam::Function1Types::Constant<Type>::Constant ) : Function1<Type>(entryName), - value_(pTraits<Type>::zero) + value_(Zero) { Istream& is(dict.lookup(entryName)); word entryType(is); diff --git a/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.C b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.C index 3654a7563e57b6b67e754c1c38768586199aec0e..bccc14d7f5ebfd51d17ae823d881ad60db63736b 100644 --- a/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.C +++ b/src/OpenFOAM/primitives/functions/Function1/Function1/Function1.C @@ -69,7 +69,7 @@ Type Foam::Function1<Type>::value(const scalar x) const { NotImplemented; - return pTraits<Type>::zero; + return Zero; } @@ -78,7 +78,7 @@ Type Foam::Function1<Type>::integrate(const scalar x1, const scalar x2) const { NotImplemented; - return pTraits<Type>::zero; + return Zero; } diff --git a/src/OpenFOAM/primitives/functions/Function1/PolynomialEntry/PolynomialEntry.C b/src/OpenFOAM/primitives/functions/Function1/PolynomialEntry/PolynomialEntry.C index 4859b509499c045782bf68a58dd065275bc0056c..005e743e61d55b35951c9f63efa717cb2620061f 100644 --- a/src/OpenFOAM/primitives/functions/Function1/PolynomialEntry/PolynomialEntry.C +++ b/src/OpenFOAM/primitives/functions/Function1/PolynomialEntry/PolynomialEntry.C @@ -146,7 +146,7 @@ void Foam::Function1Types::Polynomial<Type>::convertTimeBase(const Time& t) template<class Type> Type Foam::Function1Types::Polynomial<Type>::value(const scalar x) const { - Type y(pTraits<Type>::zero); + Type y(Zero); forAll(coeffs_, i) { y += cmptMultiply @@ -167,7 +167,7 @@ Type Foam::Function1Types::Polynomial<Type>::integrate const scalar x2 ) const { - Type intx(pTraits<Type>::zero); + Type intx(Zero); if (canIntegrate_) { diff --git a/src/OpenFOAM/primitives/functions/Function1/Table/TableBase.C b/src/OpenFOAM/primitives/functions/Function1/Table/TableBase.C index 8217c6ca18050cbf162ac79dd0322c9dcbbf9d0c..a4f83a039c782b6ac1f6242a9e96c9c6ba848d8b 100644 --- a/src/OpenFOAM/primitives/functions/Function1/Table/TableBase.C +++ b/src/OpenFOAM/primitives/functions/Function1/Table/TableBase.C @@ -394,7 +394,7 @@ Foam::tmp<Foam::scalarField> Foam::Function1Types::TableBase<Type>::x() const template<class Type> Foam::tmp<Foam::Field<Type>> Foam::Function1Types::TableBase<Type>::y() const { - tmp<Field<Type>> tfld(new Field<Type>(table_.size(), pTraits<Type>::zero)); + tmp<Field<Type>> tfld(new Field<Type>(table_.size(), Zero)); Field<Type>& fld = tfld.ref(); forAll(table_, i)