diff --git a/applications/solvers/combustion/chemFoam/readInitialConditions.H b/applications/solvers/combustion/chemFoam/readInitialConditions.H index e5f0599cee5f1c9d5167674ffa87ac63f7372106..5ffe9c97a920731fda5f91b0a7dfc9862726f466 100644 --- a/applications/solvers/combustion/chemFoam/readInitialConditions.H +++ b/applications/solvers/combustion/chemFoam/readInitialConditions.H @@ -29,8 +29,8 @@ ); } - scalarList Y0(nSpecie, 0.0); - scalarList X0(nSpecie, 0.0); + scalarList Y0(nSpecie, Zero); + scalarList X0(nSpecie, Zero); dictionary fractions(initialConditions.subDict("fractions")); if (fractionBasis == "mole") diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C index ef0cf6b6dd2875ea7e9323d13b7716aa41f5d614..e3565ca63c2eee2b39fbb3b80b72c4ac7f4241d2 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C @@ -44,7 +44,7 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField psiName_("thermo:psi"), muName_("thermo:mu"), accommodationCoeff_(1.0), - Twall_(p.size(), 0.0), + Twall_(p.size(), Zero), gamma_(1.4) { refValue() = 0.0; diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C index 612f76a3fff570cbddbd263c17f9343a19111d30..1dd6431324ac0066574028f22d66a7b25ba14fcd 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C @@ -45,7 +45,7 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField muName_("thermo:mu"), tauMCName_("tauMC"), accommodationCoeff_(1.0), - Uwall_(p.size(), vector(0.0, 0.0, 0.0)), + Uwall_(p.size(), Zero), thermalCreep_(true), curvature_(true) {} diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H index 6cafd11a6f563bfd70a7dcd93b5e7813f8606473..06567b8b5be63542553e145d92eec5eb8593d8d2 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H @@ -12,7 +12,7 @@ PtrList<radiation::radiationModel> radiation(fluidRegions.size()); List<scalar> initialMassFluid(fluidRegions.size()); List<label> pRefCellFluid(fluidRegions.size(), -1); -List<scalar> pRefValueFluid(fluidRegions.size(), 0.0); +List<scalar> pRefValueFluid(fluidRegions.size(), Zero); List<bool> frozenFlowFluid(fluidRegions.size(), false); PtrList<dimensionedScalar> rhoMax(fluidRegions.size()); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H index 42d399c53d5ed6af0431aa1471aec4223b506a85..d0092f800dca9538c019262961deaa4d0d7e3d0a 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H @@ -248,7 +248,7 @@ forAll(fluidRegions, i) IOobject::AUTO_WRITE ), fluidRegions[i], - dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ) ); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/initContinuityErrs.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/initContinuityErrs.H index 1a7f5a3262c79506f0459fd1bedbbbe1bd086e72..aa63cdc2d7b116b9dfe81eee6bce530dd608675e 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/initContinuityErrs.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/initContinuityErrs.H @@ -1 +1 @@ -List<scalar> cumulativeContErr(fluidRegions.size(), 0.0); +List<scalar> cumulativeContErr(fluidRegions.size(), Zero); diff --git a/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/interpolatedFaces.H b/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/interpolatedFaces.H index 00838f5fea4ec9cdb363d547805095a6bf784ba8..1bc385c90ac15392a74a9c5303ac0d6b90845e19 100644 --- a/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/interpolatedFaces.H +++ b/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/interpolatedFaces.H @@ -11,7 +11,7 @@ labelListList donorCell(mesh.nInternalFaces()); scalarListList weightCellCells(mesh.nInternalFaces()); // Interpolated HbyA faces -vectorField UIntFaces(mesh.nInternalFaces(), vector::zero); +vectorField UIntFaces(mesh.nInternalFaces(), Zero); // Determine receptor neighbour cells labelList receptorNeigCell(mesh.nInternalFaces(), -1); @@ -23,7 +23,7 @@ labelList receptorNeigCell(mesh.nInternalFaces(), -1); label nZones = gMax(zoneID)+1; PtrList<fvMeshSubset> meshParts(nZones); - labelList nCellsPerZone(nZones, 0); + labelList nCellsPerZone(nZones, Zero); // A mesh subset for each zone forAll(meshParts, zonei) @@ -173,7 +173,7 @@ labelList receptorNeigCell(mesh.nInternalFaces(), -1); } // contravariant U -vectorField U1Contrav(mesh.nInternalFaces(), vector::zero); +vectorField U1Contrav(mesh.nInternalFaces(), Zero); surfaceVectorField faceNormals(mesh.Sf()/mesh.magSf()); @@ -192,7 +192,8 @@ forAll(isNeiInterpolatedFace, faceI) if (cellId != -1) { const vector& n = faceNormals[faceI]; - vector n1 = vector::zero; + vector n1(Zero); + // 2-D cases if (mesh.nSolutionD() == 2) { diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFPatchTransfer/VoFPatchTransfer.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFPatchTransfer/VoFPatchTransfer.C index c6be4477da0fd630ad58131b71886823f89b92f4..0b4f1d7090b6006d519077c20751e8dec885addb 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFPatchTransfer/VoFPatchTransfer.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFPatchTransfer/VoFPatchTransfer.C @@ -266,7 +266,7 @@ void VoFPatchTransfer::correct getModelProperty<scalarField> ( "patchTransferredMasses", - scalarField(patchTransferredMasses_.size(), 0) + scalarField(patchTransferredMasses_.size(), Zero) ) ); @@ -302,7 +302,7 @@ void VoFPatchTransfer::patchTransferredMassTotals getModelProperty<scalarField> ( "patchTransferredMasses", - scalarField(patchTransferredMasses_.size(), 0) + scalarField(patchTransferredMasses_.size(), Zero) ) ); diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/DTRMParticle/DTRMParticleIO.C b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/DTRMParticle/DTRMParticleIO.C index e899ca35d8e712482def81dcb61f21f0f7c94dc5..d65c864ea72951df23b22e7689ddf9cb56f197d5 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/DTRMParticle/DTRMParticleIO.C +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/DTRMParticle/DTRMParticleIO.C @@ -48,8 +48,8 @@ Foam::DTRMParticle::DTRMParticle ) : particle(mesh, is, readFields, newFormat), - p0_(point::zero), - p1_(point::zero), + p0_(Zero), + p1_(Zero), I0_(0), I_(0), dA_(0), diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/reflectionModel/noReflection/noReflection.C b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/reflectionModel/noReflection/noReflection.C index 0586da9bcea6352965c88baa62d2ca508d6b6464..3be097fd3152fd8cbc697aa4270067a9bcb4d26e 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/reflectionModel/noReflection/noReflection.C +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/reflectionModel/noReflection/noReflection.C @@ -67,7 +67,7 @@ Foam::vector Foam::radiation::noReflection::R const vector& n ) const { - return (vector::zero); + return vector::zero; } diff --git a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/eEqn.H b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/eEqn.H index 386e4cdff9df88d45a901baa51032f300ae12c42..205cd0986840d93ff12cdb75bc8502613c7378db 100644 --- a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/eEqn.H +++ b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/eEqn.H @@ -4,7 +4,7 @@ kappaEff = thermo->kappa() + rho*cp*turbulence->nut()/Prt; - pDivU = dimensionedScalar("pDivU", p.dimensions()/dimTime, 0.0); + pDivU = dimensionedScalar("pDivU", p.dimensions()/dimTime, Zero); if (thermo->pDivU()) { diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C index c84f323e741bb52745524efc5a907882977c9a09..eefec50c7e1d7992efc216a323b9deddc1900896 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/fixedMultiPhaseHeatFlux/fixedMultiPhaseHeatFluxFvPatchScalarField.C @@ -44,7 +44,7 @@ fixedMultiPhaseHeatFluxFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF), - q_(p.size(), 0.0), + q_(p.size(), Zero), relax_(1.0) {} @@ -131,9 +131,9 @@ void Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::updateCoeffs() const scalarField& Tp = *this; - scalarField A(Tp.size(), scalar(0)); - scalarField B(Tp.size(), scalar(0)); - scalarField Q(Tp.size(), scalar(0)); + scalarField A(Tp.size(), Zero); + scalarField B(Tp.size(), Zero); + scalarField Q(Tp.size(), Zero); forAll(fluid.phases(), phasei) { diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/tractionDisplacement/tractionDisplacementFvPatchVectorField.C b/applications/solvers/stressAnalysis/solidDisplacementFoam/tractionDisplacement/tractionDisplacementFvPatchVectorField.C index d4ba30045917b34df2e41d96822266cbcb4efb7e..e1e0b6d1c1b501953d599c522783033a4032f9d6 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/tractionDisplacement/tractionDisplacementFvPatchVectorField.C +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/tractionDisplacement/tractionDisplacementFvPatchVectorField.C @@ -43,7 +43,7 @@ tractionDisplacementFvPatchVectorField : fixedGradientFvPatchVectorField(p, iF), traction_(p.size(), Zero), - pressure_(p.size(), 0.0) + pressure_(p.size(), Zero) { fvPatchVectorField::operator=(patchInternalField()); gradient() = Zero; diff --git a/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/tractionDisplacementCorrection/tractionDisplacementCorrectionFvPatchVectorField.C b/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/tractionDisplacementCorrection/tractionDisplacementCorrectionFvPatchVectorField.C index 2b90cacfdf47c035d63bd9974e31bf971b92e5ca..1ea25ca5f6319366ea612cdcf5019983619abfb7 100644 --- a/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/tractionDisplacementCorrection/tractionDisplacementCorrectionFvPatchVectorField.C +++ b/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/tractionDisplacementCorrection/tractionDisplacementCorrectionFvPatchVectorField.C @@ -43,7 +43,7 @@ tractionDisplacementCorrectionFvPatchVectorField : fixedGradientFvPatchVectorField(p, iF), traction_(p.size(), Zero), - pressure_(p.size(), 0.0) + pressure_(p.size(), Zero) { fvPatchVectorField::operator=(patchInternalField()); gradient() = Zero; diff --git a/applications/test/CompactListList/Test-CompactListList.C b/applications/test/CompactListList/Test-CompactListList.C index 587fa9df8208a8e3d279109f814e3ae6fc00b98b..15ed7cc090662b41cb866a75bea31ab31fb8fa15 100644 --- a/applications/test/CompactListList/Test-CompactListList.C +++ b/applications/test/CompactListList/Test-CompactListList.C @@ -47,7 +47,7 @@ int main(int argc, char *argv[]) Info<< "cll1:" << cll1 << endl; // Resize and assign row by row - labelList row0(2, label(0)); + labelList row0(2, Zero); labelList row1(3, label(1)); labelList rowSizes(2); diff --git a/applications/test/PatchFunction1/Test-PatchFunction1.C b/applications/test/PatchFunction1/Test-PatchFunction1.C index 59c6b7c378c5b1e087e4a192a26f351b3fd52a91..4c1579fc89e776a386f6f62d959e53652245b9a6 100644 --- a/applications/test/PatchFunction1/Test-PatchFunction1.C +++ b/applications/test/PatchFunction1/Test-PatchFunction1.C @@ -94,7 +94,7 @@ int main(int argc, char *argv[]) false ), mesh, - dimensionedVector(vector::zero) + dimensionedVector(Zero) ); fld.boundaryFieldRef()[0] == function1().value(x0); diff --git a/applications/test/parallel/Test-parallel.C b/applications/test/parallel/Test-parallel.C index 7a4e4deae6f78aac373bbe879ce94943e788070c..5ea80c2c36434ffe1ba9f85aefddbc3bbc245278 100644 --- a/applications/test/parallel/Test-parallel.C +++ b/applications/test/parallel/Test-parallel.C @@ -61,7 +61,7 @@ void testMapDistribute() // Send all ones to processor indicated by .first() // Count how many to send - labelList nSend(Pstream::nProcs(), 0); + labelList nSend(Pstream::nProcs(), Zero); forAll(complexData, i) { label procI = complexData[i].first(); diff --git a/applications/test/syncTools/Test-syncTools.C b/applications/test/syncTools/Test-syncTools.C index 5fca906370b88b16248e0dcacfeb44998a03c1e2..cfdaaed586f780b7cf838703eae34f3e4ea6eac1 100644 --- a/applications/test/syncTools/Test-syncTools.C +++ b/applications/test/syncTools/Test-syncTools.C @@ -404,7 +404,7 @@ void testPointSync(const polyMesh& mesh, Random& rndGen) // Test masterPoints { - labelList nMasters(mesh.nPoints(), 0); + labelList nMasters(mesh.nPoints(), Zero); bitSet isMasterPoint(syncTools::getMasterPoints(mesh)); @@ -480,7 +480,7 @@ void testEdgeSync(const polyMesh& mesh, Random& rndGen) // Test masterEdges { - labelList nMasters(edges.size(), 0); + labelList nMasters(edges.size(), Zero); bitSet isMasterEdge(syncTools::getMasterEdges(mesh)); @@ -549,7 +549,7 @@ void testFaceSync(const polyMesh& mesh, Random& rndGen) // Test masterFaces { - labelList nMasters(mesh.nFaces(), 0); + labelList nMasters(mesh.nFaces(), Zero); bitSet isMasterFace(syncTools::getMasterFaces(mesh)); diff --git a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C index 5323f25a97f6352d1b23ef1261dd40b6a3ede273..d9701eab1f71c6694f0a4e39854b9744048a103a 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C +++ b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C @@ -606,7 +606,7 @@ int main(int argc, char *argv[]) List<pointEdgeCollapse> allPointInfo; const globalIndex globalPoints(mesh.nPoints()); - labelList pointPriority(mesh.nPoints(), 0); + labelList pointPriority(mesh.nPoints(), Zero); cutter.consistentCollapse ( diff --git a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C index 1e3b1522c51665f314b675d0fdc2bdc29b464dba..acde047f4feb351bade44b232a714640b7ff1614 100644 --- a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C +++ b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C @@ -263,7 +263,7 @@ int main(int argc, char *argv[]) IOobject::NO_READ, IOobject::AUTO_WRITE ), - labelList(mesh.nCells(), 0) + labelList(mesh.nCells(), Zero) ); if (readLevel) diff --git a/applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMesh.C b/applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMesh.C index aac8ee79f16c5b24843f472fdec4f85db188f720..47328058b1f3af7d439081b9b556efd981598829 100644 --- a/applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMesh.C +++ b/applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMesh.C @@ -752,7 +752,7 @@ int main(int argc, char *argv[]) IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), - labelList(mesh.nCells(), 0) + labelList(mesh.nCells(), Zero) ); label maxLevel = max(refLevel); diff --git a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L index c275ecec35009501aee57804225c30f094c75099..904b35ae62305e467e584fa39f4e074be9205eab 100644 --- a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L +++ b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L @@ -542,7 +542,7 @@ int main(int argc, char *argv[]) // Now split the boundary faces into external and internal faces. All // faces go into faceZones and external faces go into patches. List<faceList> patchFaces(slPatchCells.size()); - labelList patchNFaces(slPatchCells.size(), 0); + labelList patchNFaces(slPatchCells.size(), Zero); forAll(boundary, patchi) { const faceList& bFaces = boundary[patchi]; diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L index f248a3771c2aa8329b5a580ca0fa83033639441b..bbadaee00735e187dc0c8418e0c22b3af25467bd 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L @@ -936,7 +936,7 @@ int main(int argc, char *argv[]) labelListList cellFaces(nCells); - labelList nFacesInCell(nCells, 0); + labelList nFacesInCell(nCells, Zero); forAll(cellFaces, celli) { diff --git a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C index 967ffb5234a77c5b68f2b3fdff6fd0cff3907d4a..02e18d2af926a1e9b2c8490586f69bcac7f43801 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C @@ -911,7 +911,7 @@ int main(int argc, char *argv[]) List<pointEdgeCollapse> allPointInfo; const globalIndex globalPoints(mesh.nPoints()); - labelList pointPriority(mesh.nPoints(), 0); + labelList pointPriority(mesh.nPoints(), Zero); collapser.consistentCollapse ( diff --git a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudedMesh/extrudedMeshTemplates.C b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudedMesh/extrudedMeshTemplates.C index 6cba917f6c50f623004a5b87458615b359c6c478..86c9c5bb45c7b6c725bd6cb661b551fcab1d8783 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudedMesh/extrudedMeshTemplates.C +++ b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudedMesh/extrudedMeshTemplates.C @@ -219,7 +219,7 @@ Foam::cellList Foam::extrudedMesh::extrudedCells } // Current face count per cell. - labelList nCellFaces(eCells.size(), 0); + labelList nCellFaces(eCells.size(), Zero); label facei = 0; diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C index 46108ce780afc0871ecff0124735e95786755294..0a085a442e548590b594d63eb87691aa80d495a1 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -2053,11 +2053,11 @@ int main(int argc, char *argv[]) // Count how many patches on special edges of extrudePatch are necessary // - zoneXXX_sides // - zoneXXX_zoneYYY - labelList zoneSidePatch(zoneNames.size(), 0); + labelList zoneSidePatch(zoneNames.size(), Zero); // Patch to use for minZone - labelList zoneZonePatch_min(zoneNames.size()*zoneNames.size(), 0); + labelList zoneZonePatch_min(zoneNames.size()*zoneNames.size(), Zero); // Patch to use for maxZone - labelList zoneZonePatch_max(zoneNames.size()*zoneNames.size(), 0); + labelList zoneZonePatch_max(zoneNames.size()*zoneNames.size(), Zero); countExtrudePatches ( diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C index 40f8f31c66fa98f9481744aa45b5506cfd151b47..ad99a84767beda78d7e6e542ead8cee5ee69589a 100644 --- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C +++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C @@ -285,7 +285,7 @@ int main(int argc, char *argv[]) List<pointEdgeCollapse> allPointInfo; const globalIndex globalPoints(mesh().nPoints()); - labelList pointPriority(mesh().nPoints(), 0); + labelList pointPriority(mesh().nPoints(), Zero); collapser.consistentCollapse ( diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C index f6e6c75aba4a998d124ddb81bfa7146b5a5c29ca..c060ae79834d999bb5961ba119b98a9c28a584b4 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C @@ -44,7 +44,7 @@ Foam::DistributedDelaunayMesh<Triangulation>::buildMap // ~~~~~~~~~~~~~~~~~~ // 1. Count - labelList nSend(Pstream::nProcs(), 0); + labelList nSend(Pstream::nProcs(), Zero); forAll(toProc, i) { diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/PrintTable/PrintTable.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/PrintTable/PrintTable.C index 11bcd4d3520e6047953f5eda23cea948fd58ac54..3aa76eedb2889d53331bb671b415bdcc3b1f92ee 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/PrintTable/PrintTable.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/PrintTable/PrintTable.C @@ -77,7 +77,7 @@ void Foam::PrintTable<KeyType, DataType>::print label largestKeyLength = 6; label largestDataLength = 0; - List<label> largestProcSize(Pstream::nProcs(), 0); + labelList largestProcSize(Pstream::nProcs(), Zero); forAll(procData, proci) { diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C index 3ab96dd6b05e7595de34f258f04ee6b12f15c74b..d957c699c9fed63f680a854e35badfbdd27d8bdd 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C @@ -51,7 +51,7 @@ Foam::autoPtr<Foam::mapDistribute> Foam::backgroundMeshDecomposition::buildMap // ~~~~~~~~~~~~~~~~~~ // 1. Count - labelList nSend(Pstream::nProcs(), 0); + labelList nSend(Pstream::nProcs(), Zero); forAll(toProc, i) { @@ -337,7 +337,7 @@ void Foam::backgroundMeshDecomposition::initialRefinement() ( cellsToRemove, exposedFaces, - labelList(exposedFaces.size(), 0), // patchID dummy + labelList(exposedFaces.size(), Zero), // patchID dummy meshMod ); @@ -793,8 +793,8 @@ Foam::backgroundMeshDecomposition::backgroundMeshDecomposition meshCutter_ ( mesh_, - labelList(mesh_.nCells(), 0), - labelList(mesh_.nPoints(), 0) + labelList(mesh_.nCells(), Zero), + labelList(mesh_.nPoints(), Zero) ), boundaryFacesPtr_(), bFTreePtr_(), diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C index d6f1256074a2fefa942e263a98a0f09237e27ab9..14f7a05b482c240289110e452b857b7736949f81 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C @@ -1063,7 +1063,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::checkPolyMeshQuality // Check for cells with one internal face only - labelList nInternalFaces(pMesh.nCells(), label(0)); + labelList nInternalFaces(pMesh.nCells(), Zero); for (label fI = 0; fI < pMesh.nInternalFaces(); fI++) { diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePoints.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePoints.C index 9a653df699c59890a155865d38782d92d22c3801..c80bf09ac76a4919591826b356bbf2bdcd5b44f9 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePoints.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePoints.C @@ -902,7 +902,7 @@ void Foam::conformalVoronoiMesh::createMultipleEdgePointGroup const List<extendedFeatureEdgeMesh::sideVolumeType>& normalVolumeTypes = feMesh.normalVolumeTypes(); - labelList nNormalTypes(4, label(0)); + labelList nNormalTypes(4, Zero); forAll(edNormalIs, edgeNormalI) { diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C index 5268583281e2d934155a07ac76cbf5d0d3d2e58f..318822e6c72ddc2ee5a31022f71830d1c07f1af5 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C @@ -210,7 +210,7 @@ void Foam::conformalVoronoiMesh::writeMesh(const fileName& instance) // // // From all Delaunay vertices to cell (positive index) // // or patch face (negative index) -// labelList vertexToDualAddressing(number_of_vertices(), 0); +// labelList vertexToDualAddressing(number_of_vertices(), Zero); // // forAll(cellToDelaunayVertex, celli) // { @@ -525,7 +525,7 @@ void Foam::conformalVoronoiMesh::reorderPoints Info<< incrIndent << indent << "Reordering points into internal/external" << endl; - labelList oldToNew(points.size(), label(0)); + labelList oldToNew(points.size(), Zero); // Find points that are internal for (label fI = nInternalFaces; fI < faces.size(); ++fI) @@ -611,7 +611,7 @@ void Foam::conformalVoronoiMesh::reorderProcessorPatches const fvMesh& sortMesh = sortMeshPtr(); // Rotation on new faces. - labelList rotation(faces.size(), label(0)); + labelList rotation(faces.size(), Zero); labelList faceMap(faces.size(), label(-1)); PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); @@ -660,7 +660,7 @@ void Foam::conformalVoronoiMesh::reorderProcessorPatches patchDicts[patchi].get<label>("startFace"); labelList patchFaceMap(nPatchFaces, label(-1)); - labelList patchFaceRotation(nPatchFaces, label(0)); + labelList patchFaceRotation(nPatchFaces, Zero); bool changed = refCast<const processorPolyPatch>(pp).order ( diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshTemplates.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshTemplates.C index 3edd639318beb89d3db5017e50d9d743d012759f..372ac9b445152268946a23e77e0302b5a6471763 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshTemplates.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshTemplates.C @@ -83,7 +83,7 @@ bool Foam::conformalVoronoiMesh::distributeBackground(const Triangulation& mesh) meshSearch cellSearch(bMesh, polyMesh::FACE_PLANES); - labelList cellVertices(bMesh.nCells(), label(0)); + labelList cellVertices(bMesh.nCells(), Zero); for ( diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C index 7334b9eaf21b9c06cc4c739879d1454572583d4e..7f02ebc4f15686c456712473e72d74af9d4554a7 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C @@ -613,7 +613,7 @@ Foam::Field<bool> Foam::conformationSurfaces::inside const pointField& samplePts ) const { - return wellInside(samplePts, scalarField(samplePts.size(), 0.0)); + return wellInside(samplePts, scalarField(samplePts.size(), Zero)); } @@ -622,7 +622,7 @@ bool Foam::conformationSurfaces::inside const point& samplePt ) const { - return wellInside(pointField(1, samplePt), scalarField(1, 0))[0]; + return wellInside(pointField(1, samplePt), scalarField(1, Zero))[0]; } @@ -631,7 +631,7 @@ Foam::Field<bool> Foam::conformationSurfaces::outside const pointField& samplePts ) const { - return wellOutside(samplePts, scalarField(samplePts.size(), 0.0)); + return wellOutside(samplePts, scalarField(samplePts.size(), Zero)); } @@ -640,7 +640,7 @@ bool Foam::conformationSurfaces::outside const point& samplePt ) const { - return wellOutside(pointField(1, samplePt), scalarField(1, 0))[0]; + return wellOutside(pointField(1, samplePt), scalarField(1, Zero))[0]; //return !inside(samplePt); } diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/autoDensity/autoDensity.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/autoDensity/autoDensity.C index 0a5eac65ea1bbe0e9b8ff19a887af3e532b6e689..3024190c2cb980bddbdcf987cc6090049409039c 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/autoDensity/autoDensity.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/autoDensity/autoDensity.C @@ -416,7 +416,7 @@ bool Foam::autoDensity::fillBox pointField linePoints(nLine, Zero); - scalarField lineSizes(nLine, 0.0); + scalarField lineSizes(nLine, Zero); for (label i = 0; i < surfRes_; i++) { diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableBoxFeatures.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableBoxFeatures.C index 407ed35d3c5e861d69f4eb4a53c203d3a10f4e89..6beec70fb35bede7d2a93f9b72e19acfb38202f2 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableBoxFeatures.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableBoxFeatures.C @@ -113,7 +113,7 @@ Foam::searchableBoxFeatures::features() const surfacePoints[treeBoundBox::edges[eI].end()] - surfacePoints[treeBoundBox::edges[eI].start()]; - normalDirections[eI] = labelList(2, label(0)); + normalDirections[eI] = labelList(2, Zero); for (label j = 0; j < 2; ++j) { const vector cross = diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchablePlateFeatures.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchablePlateFeatures.C index 05adb4afe9191c8e236df3049c016a48b74df83b..002e6bfe4460b03d8a21ea98ca44e22d2da38b67 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchablePlateFeatures.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchablePlateFeatures.C @@ -131,7 +131,7 @@ Foam::searchablePlateFeatures::features() const surface().points()()[edges[eI].end()] - surface().points()()[edges[eI].start()]; - normalDirections[eI] = labelList(2, label(0)); + normalDirections[eI] = labelList(2, Zero); for (label j = 0; j < 2; ++j) { const vector cross = diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C index ab355019c1ab509bca9e08719deaca5110edbf46..9544f4fb7d47dccfba2c010eb2a9dbda997eb4fe 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C @@ -108,9 +108,9 @@ autoPtr<refinementSurfaces> createRefinementSurfaces labelList regionOffset(surfi); - labelList globalMinLevel(surfi, 0); - labelList globalMaxLevel(surfi, 0); - labelList globalLevelIncr(surfi, 0); + labelList globalMinLevel(surfi, Zero); + labelList globalMaxLevel(surfi, Zero); + labelList globalLevelIncr(surfi, Zero); PtrList<dictionary> globalPatchInfo(surfi); List<Map<label>> regionMinLevel(surfi); List<Map<label>> regionMaxLevel(surfi); @@ -263,8 +263,8 @@ autoPtr<refinementSurfaces> createRefinementSurfaces } // Rework surface specific information into information per global region - labelList minLevel(nRegions, 0); - labelList maxLevel(nRegions, 0); + labelList minLevel(nRegions, Zero); + labelList maxLevel(nRegions, Zero); labelList gapLevel(nRegions, -1); PtrList<dictionary> patchInfo(nRegions); diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C index 5167124dfa27882b6e1db1ac1a66f2344706a0ca..19ca9d0806badebb41e90e108e576e079f598fdc 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C @@ -319,7 +319,7 @@ Foam::label Foam::checkTopology if (allTopology) { - labelList nInternalFaces(mesh.nCells(), 0); + labelList nInternalFaces(mesh.nCells(), Zero); for (label facei = 0; facei < mesh.nInternalFaces(); facei++) { diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C index 0bc75143f3bd02276ce8de2271bc99999ad3b256..ee4b9d0032993219a9f7626d8cc82ae4388786f3 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C +++ b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C @@ -577,7 +577,7 @@ int main(int argc, char *argv[]) } // Add faces to faceZones - labelList nFaces(mesh.faceZones().size(), 0); + labelList nFaces(mesh.faceZones().size(), Zero); forAll(faceToZoneID, facei) { label zoneID = faceToZoneID[facei]; diff --git a/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C b/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C index d6c7160f5d5b4ade04d1a7ad194e01d7d055bb25..531155407b3b4c4094688d298dccfcfc73946702 100644 --- a/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C +++ b/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C @@ -550,7 +550,7 @@ int main(int argc, char *argv[]) // Dump duplicated points (if any) const labelList& pointMap = map().pointMap(); - labelList nDupPerPoint(map().nOldPoints(), 0); + labelList nDupPerPoint(map().nOldPoints(), Zero); pointSet dupPoints(mesh, "duplicatedPoints", 100); diff --git a/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C b/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C index ed1d9e50ffcf5eab94526517c2d9d14ad64739de..aa84040a9bf839cffc5f56dd4ed83099af63fa94 100644 --- a/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C +++ b/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C @@ -271,7 +271,7 @@ Foam::mirrorFvMesh::mirrorFvMesh } // Mirror boundary faces patch by patch - labelList newPatchSizes(boundary().size(), 0); + labelList newPatchSizes(boundary().size(), Zero); labelList newPatchStarts(boundary().size(), -1); forAll(boundaryMesh(), patchi) diff --git a/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C b/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C index 71b4edddc52c08ac559b0d8dc00d6ff7f664cdc0..ca1fe21811f7e892cd6a7fbd3aafd128070d7a6b 100644 --- a/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C +++ b/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C @@ -130,7 +130,7 @@ int main(int argc, char *argv[]) } { // Number of (master)faces per edge - labelList nMasterFaces(patch.nEdges(), 0); + labelList nMasterFaces(patch.nEdges(), Zero); forAll(faceLabels, facei) { diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C index a9770456e35f1950e026f0c940cc885a99e3017a..e26145a8bc0ca98a00311c846156a73b73a99dc4 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -130,8 +130,8 @@ void getBand scalar& sumSqrIntersect // scalar to avoid overflow ) { - labelList cellBandwidth(nCells, 0); - scalarField nIntersect(nCells, 0.0); + labelList cellBandwidth(nCells, Zero); + scalarField nIntersect(nCells, Zero); forAll(neighbour, facei) { diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C index 83f844fe821446946e654b17182002abbe86912f..af9d68d714c92341bb5c85ba2b22d750bbc36554 100644 --- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C +++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C @@ -1149,7 +1149,7 @@ label findCorrespondingRegion ) { // Per region the number of cells in zoneI - labelList cellsInZone(nCellRegions, 0); + labelList cellsInZone(nCellRegions, Zero); forAll(cellRegion, celli) { @@ -1267,7 +1267,7 @@ void matchRegions getZoneID(mesh, cellZones, zoneID, neiZoneID); // Sizes per cellzone - labelList zoneSizes(cellZones.size(), 0); + labelList zoneSizes(cellZones.size(), Zero); { List<wordList> zoneNames(Pstream::nProcs()); zoneNames[Pstream::myProcNo()] = cellZones.names(); @@ -1753,7 +1753,7 @@ int main(int argc, char *argv[]) // Sizes per region // ~~~~~~~~~~~~~~~~ - labelList regionSizes(nCellRegions, 0); + labelList regionSizes(nCellRegions, Zero); forAll(cellRegion, celli) { diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C index bc8a8f5b1a7396e7ff38ad9a2aa2b64da53fae04..ac0c8945632ae1a23fb11110a27606d9b2554226 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C @@ -244,7 +244,7 @@ void Foam::domainDecomposition::decomposeMesh() label nInterfaces = interPatchFaces[proci].size(); subPatchIDs[proci].setSize(nInterfaces, labelList(1, label(-1))); - subPatchStarts[proci].setSize(nInterfaces, labelList(1, label(0))); + subPatchStarts[proci].setSize(nInterfaces, labelList(1, Zero)); } diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionTemplates.C b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionTemplates.C index 2a3b27b357599e9856885ee77c730e3be0c3a210..2b10aba43aaad101c466158b165059ecbb765a03 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionTemplates.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionTemplates.C @@ -115,7 +115,7 @@ void Foam::domainDecomposition::processInterCyclics { label nIntfcs = interPatchFaces[proci].size(); subPatchIDs[proci].setSize(nIntfcs, labelList(1, patchi)); - subPatchStarts[proci].setSize(nIntfcs, labelList(1, label(0))); + subPatchStarts[proci].setSize(nIntfcs, labelList(1, Zero)); } } } diff --git a/applications/utilities/parallelProcessing/decomposePar/faMeshDecomposition.C b/applications/utilities/parallelProcessing/decomposePar/faMeshDecomposition.C index 01a913e3e2e4b9354d74bc55bd5ff0b726208e7a..da5cdb7cc58a2b1a2f2538d209263b9777f6cad9 100644 --- a/applications/utilities/parallelProcessing/decomposePar/faMeshDecomposition.C +++ b/applications/utilities/parallelProcessing/decomposePar/faMeshDecomposition.C @@ -180,7 +180,7 @@ Foam::faMeshDecomposition::faMeshDecomposition faceToProc_(nFaces()), procFaceLabels_(nProcs_), procMeshEdgesMap_(nProcs_), - procNInternalEdges_(nProcs_, 0), + procNInternalEdges_(nProcs_, Zero), procPatchEdgeLabels_(nProcs_), procPatchPointAddressing_(nProcs_), procPatchEdgeAddressing_(nProcs_), @@ -991,7 +991,7 @@ void Foam::faMeshDecomposition::decomposeMesh() // Memory management { - labelList pointsUsage(nPoints(), 0); + labelList pointsUsage(nPoints(), Zero); // Globally shared points are the ones used by more than 2 processors // Size the list approximately and gather the points diff --git a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C index 7e094408ec0a0c037437efd03ba0a469cfd213b7..902bec097336e2b255d2689dd1743c2dea017163 100644 --- a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C +++ b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C @@ -2671,7 +2671,7 @@ int main(int argc, char *argv[]) << endl; label nDestProcs = 1; - labelList finalDecomp = labelList(mesh.nCells(), 0); + labelList finalDecomp = labelList(mesh.nCells(), Zero); redistributeAndWrite ( diff --git a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoam.C b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoam.C index 1cf6e69aaf718c77be7f598239d47d94d0c4a38b..7603478537480fb4719de5c16af17281a76b4f90 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoam.C +++ b/applications/utilities/postProcessing/graphics/PVReaders/vtkPVFoam/vtkPVFoam.C @@ -819,7 +819,7 @@ void Foam::vtkPVFoam::renderPatchNames // Find the total number of zones // Each zone will take the patch name // Number of zones per patch ... zero zones should be skipped - labelList nZones(pbMesh.size(), 0); + labelList nZones(pbMesh.size(), Zero); // Per global zone number the average face centre position List<DynamicList<point>> zoneCentre(pbMesh.size()); @@ -862,7 +862,7 @@ void Foam::vtkPVFoam::renderPatchNames nZones[patchi] = pZones.nZones(); - labelList zoneNFaces(pZones.nZones(), 0); + labelList zoneNFaces(pZones.nZones(), Zero); // Create storage for additional zone centres forAll(zoneNFaces, zonei) diff --git a/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C b/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C index d61ba155f3309fda6507fe77fe9c22f19eb4447c..951046cf4045fffdf0ff11ce70b0bf4d3e68d85f 100644 --- a/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C +++ b/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C @@ -121,7 +121,7 @@ int main(int argc, char *argv[]) // Calculate starting ids for particles on each processor - List<label> startIds(numIds.size(), 0); + labelList startIds(numIds.size(), Zero); for (label i = 0; i < numIds.size()-1; i++) { startIds[i+1] += startIds[i] + numIds[i]; diff --git a/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracks.C b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracks.C index 9830ce3bdf6ecf180b43650306f111204cacf1c7..b9b9d120db701a42ace5f28df413d6a0ade4ce97 100644 --- a/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracks.C +++ b/applications/utilities/postProcessing/lagrangian/steadyParticleTracks/steadyParticleTracks.C @@ -204,7 +204,7 @@ int main(int argc, char *argv[]) Info<< "\n Generating " << nTracks << " tracks" << endl; // Determine length of each track - labelList trackLengths(nTracks, 0); + labelList trackLengths(nTracks, Zero); forAll(particleToTrack, i) { const label trackI = particleToTrack[i]; @@ -237,7 +237,7 @@ int main(int argc, char *argv[]) const scalarField& age = tage(); - List<label> trackSamples(nTracks, 0); + labelList trackSamples(nTracks, Zero); forAll(particleToTrack, i) { diff --git a/applications/utilities/postProcessing/miscellaneous/pdfPlot/createFields.H b/applications/utilities/postProcessing/miscellaneous/pdfPlot/createFields.H index 73d3807fffb99360b7498842d0c5271d6eeceb2f..1c7cec3b96d0b071252692ebc2b9956a01b9bae9 100644 --- a/applications/utilities/postProcessing/miscellaneous/pdfPlot/createFields.H +++ b/applications/utilities/postProcessing/miscellaneous/pdfPlot/createFields.H @@ -44,4 +44,4 @@ filePtr.reset(new OFstream(fName)); } - scalarField samples(nIntervals, 0); + scalarField samples(nIntervals, Zero); diff --git a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C index c80fec2be3407c6ac6f60fd01cd27327c74a21d1..1ce6c3a27c4f7f8b780b597ca53b92b4c73fc2f0 100644 --- a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C +++ b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C @@ -485,7 +485,7 @@ int main(int argc, char *argv[]) #include "shootRays.H" // Calculate number of visible faces from local index - labelList nVisibleFaceFaces(nCoarseFaces, 0); + labelList nVisibleFaceFaces(nCoarseFaces, Zero); forAll(rayStartFace, i) { @@ -628,7 +628,7 @@ int main(int argc, char *argv[]) 0.0 ); - scalarList patchArea(totalPatches, 0.0); + scalarList patchArea(totalPatches, Zero); if (Pstream::master()) { diff --git a/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/general/general.C b/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/general/general.C index 87df0faa8505f5f63a4a9673cba0ef4503437bb8..2e5f051edc1a38515068c49d3377aabec143b392 100644 --- a/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/general/general.C +++ b/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/general/general.C @@ -57,7 +57,7 @@ Foam::tabulatedWallFunctions::general::interpolationTypeNames_ void Foam::tabulatedWallFunctions::general::invertTable() { - scalarList Rey(uPlus_.size(), 0.0); + scalarList Rey(uPlus_.size(), Zero); // Calculate Reynolds number forAll(uPlus_, i) diff --git a/applications/utilities/surface/surfaceBooleanFeatures/surfaceBooleanFeatures.C b/applications/utilities/surface/surfaceBooleanFeatures/surfaceBooleanFeatures.C index 808f552ff45b461c33e4475e18b82fd91b780542..8224bc863260d9d99efc6df1afa0c387aa5c9393 100644 --- a/applications/utilities/surface/surfaceBooleanFeatures/surfaceBooleanFeatures.C +++ b/applications/utilities/surface/surfaceBooleanFeatures/surfaceBooleanFeatures.C @@ -1242,7 +1242,7 @@ autoPtr<extendedFeatureEdgeMesh> createEdgeMesh label nFeatEds = inter.cutEdges().size(); DynamicList<vector> normals(2*nFeatEds); - vectorField edgeDirections(nFeatEds, vector::zero); + vectorField edgeDirections(nFeatEds, Zero); DynamicList<extendedFeatureEdgeMesh::sideVolumeType> normalVolumeTypes ( 2*nFeatEds diff --git a/applications/utilities/surface/surfaceCheck/surfaceCheck.C b/applications/utilities/surface/surfaceCheck/surfaceCheck.C index a131d11c4c8571db8bffd0f5f715779171935ba3..182ddd66e4a5ebd4d7e4497ddea67b78252db1b5 100644 --- a/applications/utilities/surface/surfaceCheck/surfaceCheck.C +++ b/applications/utilities/surface/surfaceCheck/surfaceCheck.C @@ -80,7 +80,7 @@ labelList countBins { scalar dist = nBins/(max - min); - labelList binCount(nBins, 0); + labelList binCount(nBins, Zero); forAll(vals, i) { @@ -444,7 +444,7 @@ int main(int argc, char *argv[]) // ~~~~~~~~~~~~ { - labelList regionSize(surf.patches().size(), 0); + labelList regionSize(surf.patches().size(), Zero); forAll(surf, facei) { @@ -541,7 +541,7 @@ int main(int argc, char *argv[]) faces ), "illegal", - scalarField(subSurf.size(), 0.0), + scalarField(subSurf.size(), Zero), false // face based data ); } @@ -580,7 +580,7 @@ int main(int argc, char *argv[]) // ~~~~~~~~~~~~~~~~ { - scalarField triQ(surf.size(), 0); + scalarField triQ(surf.size(), Zero); forAll(surf, facei) { const labelledTri& f = surf[facei]; diff --git a/applications/utilities/surface/surfaceInflate/surfaceInflate.C b/applications/utilities/surface/surfaceInflate/surfaceInflate.C index 1036ff46c5958a54ff709582538e99d2bf6c3cd0..72aa401d354c8b097f829d097d6d4f767ca57753 100644 --- a/applications/utilities/surface/surfaceInflate/surfaceInflate.C +++ b/applications/utilities/surface/surfaceInflate/surfaceInflate.C @@ -141,7 +141,7 @@ tmp<vectorField> calcPointNormals { const labelListList& edgeFaces = s.edgeFaces(); - labelList nNormals(s.nPoints(), 0); + labelList nNormals(s.nPoints(), Zero); forAll(edgeStat, edgeI) { if (edgeStat[edgeI] != surfaceFeatures::NONE) @@ -355,10 +355,10 @@ tmp<scalarField> avg const scalarField& edgeWeights ) { - tmp<scalarField> tres(new scalarField(s.nPoints(), 0.0)); + tmp<scalarField> tres(new scalarField(s.nPoints(), Zero)); scalarField& res = tres.ref(); - scalarField sumWeight(s.nPoints(), 0.0); + scalarField sumWeight(s.nPoints(), Zero); const edgeList& edges = s.edges(); @@ -499,7 +499,7 @@ void lloydsSmoothing const pointField& points = s.points(); vectorField pointSum(s.nPoints(), Zero); - labelList nPointSum(s.nPoints(), 0); + labelList nPointSum(s.nPoints(), Zero); forAll(edges, edgeI) { diff --git a/src/ODE/ODESolvers/SIBS/SIBS.C b/src/ODE/ODESolvers/SIBS/SIBS.C index 2bd63ece598c3739860a9007e57fbf19308e2ec3..7ae3a3b645f14482c9b0ad44c2d4096a5c7ec9d4 100644 --- a/src/ODE/ODESolvers/SIBS/SIBS.C +++ b/src/ODE/ODESolvers/SIBS/SIBS.C @@ -49,18 +49,18 @@ namespace Foam Foam::SIBS::SIBS(const ODESystem& ode, const dictionary& dict) : ODESolver(ode, dict), - a_(iMaxX_, 0.0), - alpha_(kMaxX_, 0.0), - d_p_(n_, kMaxX_, 0.0), - x_p_(kMaxX_, 0.0), - err_(kMaxX_, 0.0), - - yTemp_(n_, 0.0), - ySeq_(n_, 0.0), - yErr_(n_, 0.0), + a_(iMaxX_, Zero), + alpha_(kMaxX_, Zero), + d_p_(n_, kMaxX_, Zero), + x_p_(kMaxX_, Zero), + err_(kMaxX_, Zero), + + yTemp_(n_, Zero), + ySeq_(n_, Zero), + yErr_(n_, Zero), dydx0_(n_), - dfdx_(n_, 0.0), - dfdy_(n_, 0.0), + dfdx_(n_, Zero), + dfdy_(n_, Zero), first_(1), epsOld_(-1.0) {} diff --git a/src/OpenFOAM/containers/Lists/Distribution/Distribution.C b/src/OpenFOAM/containers/Lists/Distribution/Distribution.C index 8a7ae778c36b68c500d956f23a039283c8103f55..a4793c25f53a464ce0cb7e1f05a8f974aa19dd61 100644 --- a/src/OpenFOAM/containers/Lists/Distribution/Distribution.C +++ b/src/OpenFOAM/containers/Lists/Distribution/Distribution.C @@ -119,7 +119,7 @@ Foam::label Foam::Distribution<Type>::index // Underflow of this List, storage increase and remapping // required - List<scalar> newCmptDistribution(2*cmptDistribution.size(), 0.0); + List<scalar> newCmptDistribution(2*cmptDistribution.size(), Zero); label sOld = cmptDistribution.size(); diff --git a/src/OpenFOAM/containers/Lists/ListOps/ListOps.C b/src/OpenFOAM/containers/Lists/ListOps/ListOps.C index 58f95736bb920db080df4f5c2504cbfb43793881..4bca347959c2bcb30e7f4980eae9f36cd4fad685 100644 --- a/src/OpenFOAM/containers/Lists/ListOps/ListOps.C +++ b/src/OpenFOAM/containers/Lists/ListOps/ListOps.C @@ -70,7 +70,7 @@ Foam::labelListList Foam::invertOneToMany const labelUList& map ) { - labelList sizes(len, 0); + labelList sizes(len, Zero); for (const label newIdx : map) { diff --git a/src/OpenFOAM/containers/Lists/ListOps/ListOpsTemplates.C b/src/OpenFOAM/containers/Lists/ListOps/ListOpsTemplates.C index f6236a031ad8e04a3065785618f790a4f985b466..df023d3b288a5adf905f9a28acff4606d879cbf1 100644 --- a/src/OpenFOAM/containers/Lists/ListOps/ListOpsTemplates.C +++ b/src/OpenFOAM/containers/Lists/ListOps/ListOpsTemplates.C @@ -695,7 +695,7 @@ void Foam::invertManyToMany ) { // The output list sizes - labelList sizes(len, 0); + labelList sizes(len, Zero); for (const InputIntListType& sublist : input) { diff --git a/src/OpenFOAM/containers/Lists/SortableList/SortableList.C b/src/OpenFOAM/containers/Lists/SortableList/SortableList.C index e3c709649706d9ab8dd412421f17b541eb3e7d14..4db5c6e5f41ce65c66a2964fb38f5c55320ed136 100644 --- a/src/OpenFOAM/containers/Lists/SortableList/SortableList.C +++ b/src/OpenFOAM/containers/Lists/SortableList/SortableList.C @@ -42,6 +42,13 @@ inline Foam::SortableList<T>::SortableList(const label size) {} +template<class T> +inline Foam::SortableList<T>::SortableList(const label size, const zero) +: + List<T>(size, zero()) +{} + + template<class T> inline Foam::SortableList<T>::SortableList(const label size, const T& val) : diff --git a/src/OpenFOAM/containers/Lists/SortableList/SortableList.H b/src/OpenFOAM/containers/Lists/SortableList/SortableList.H index fe846ead3069f45d0093edb775406964e10b6f10..24d0251790ea518b4a3bccd98b2665ef83d77764 100644 --- a/src/OpenFOAM/containers/Lists/SortableList/SortableList.H +++ b/src/OpenFOAM/containers/Lists/SortableList/SortableList.H @@ -71,7 +71,11 @@ public: // The indices remain empty until the list is sorted inline explicit SortableList(const label size); - //- Construct given size and initial value. Sort later on + //- Construct zero-initialized with given size, sort later. + // The indices remain empty until the list is sorted + inline SortableList(const label size, const zero); + + //- Construct given size and initial value, sorting later. // The indices remain empty until the list is sorted inline SortableList(const label size, const T& val); diff --git a/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.C b/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.C index 92c2c0dd48c2a90c24384952e9eab790c7c3af47..6adc62ff440cb3a3cf16d5be46b6313e036385fd 100644 --- a/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.C +++ b/src/OpenFOAM/db/IOobjects/decomposedBlockData/decomposedBlockData.C @@ -796,7 +796,7 @@ Foam::label Foam::decomposedBlockData::calcNumProcs ( reinterpret_cast<const char*>(&nSendProcs), List<int>(nProcs, sizeof(nSendProcs)), - List<int>(nProcs, 0), + List<int>(nProcs, Zero), reinterpret_cast<char*>(&n), sizeof(n), comm diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C index e1842eb038b56f3f8c88dba6324cee0989b4d57a..99c454a4d4aad6f004cacd8f8e425e9da5f2a917 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C @@ -58,7 +58,7 @@ void Foam::UPstream::setParRun(const label nProcs, const bool haveThreads) haveThreads_ = haveThreads; freeCommunicator(UPstream::worldComm); - label comm = allocateCommunicator(-1, labelList(1, label(0)), false); + label comm = allocateCommunicator(-1, labelList(1, Zero), false); if (comm != UPstream::worldComm) { FatalErrorInFunction @@ -382,7 +382,7 @@ Foam::UPstream::treeCommunication_(10); Foam::UPstream::communicator serialComm ( -1, - Foam::labelList(1, Foam::label(0)), + Foam::labelList(1, Foam::Zero), false ); diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/exchange.C b/src/OpenFOAM/db/IOstreams/Pstreams/exchange.C index c9d3b47e0f6a21dce39f6ffa50b1e9e22dd14e44..71dbede1798263d26afadba2224977e09f428f0f 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/exchange.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/exchange.C @@ -275,9 +275,9 @@ void Foam::Pstream::exchange List<char*> charRecvBufs(sendBufs.size()); labelList nRecv(sendBufs.size()); - labelList startRecv(sendBufs.size(), 0); + labelList startRecv(sendBufs.size(), Zero); labelList nSend(sendBufs.size()); - labelList startSend(sendBufs.size(), 0); + labelList startSend(sendBufs.size(), Zero); for (label iter = 0; iter < nIter; iter++) { diff --git a/src/OpenFOAM/fields/GeometricFields/geometricZeroField/geometricZeroField.H b/src/OpenFOAM/fields/GeometricFields/geometricZeroField/geometricZeroField.H index 2a9b4fe591a84ff83c9dea70acd8e6d47e101222..c029e5952e209ebc1601b857a37123f0e55c7837 100644 --- a/src/OpenFOAM/fields/GeometricFields/geometricZeroField/geometricZeroField.H +++ b/src/OpenFOAM/fields/GeometricFields/geometricZeroField/geometricZeroField.H @@ -25,7 +25,7 @@ Class Foam::geometricZeroField Description - A class representing the concept of a GeometricField of 1 used to avoid + A class representing the concept of a GeometricField of 0 used to avoid unnecessary manipulations for objects which are known to be zero at compile-time. @@ -57,6 +57,14 @@ class geometricZeroField public: + // Public typedefs + + typedef zeroField Internal; + typedef zeroField Patch; + typedef zeroFieldField Boundary; + typedef zero cmptType; + + // Constructors //- Construct null diff --git a/src/OpenFOAM/graph/curve/curve.C b/src/OpenFOAM/graph/curve/curve.C index 87260649760ffb16a39a500d67f5c1b98e256132..f42e36d3b83b2603144fd50ea2f957546625c4f9 100644 --- a/src/OpenFOAM/graph/curve/curve.C +++ b/src/OpenFOAM/graph/curve/curve.C @@ -35,7 +35,7 @@ Foam::curve::curve const label l ) : - scalarField(l, 0.0), + scalarField(l, Zero), name_(name), style_(style) {} diff --git a/src/OpenFOAM/interpolations/uniformInterpolationTable/uniformInterpolationTable.C b/src/OpenFOAM/interpolations/uniformInterpolationTable/uniformInterpolationTable.C index 8a48fffb7311a397f82276dea9d2dba202042a6a..37a2e9137670bf2962ed9a829620968816ae02a2 100644 --- a/src/OpenFOAM/interpolations/uniformInterpolationTable/uniformInterpolationTable.C +++ b/src/OpenFOAM/interpolations/uniformInterpolationTable/uniformInterpolationTable.C @@ -54,7 +54,7 @@ Foam::uniformInterpolationTable<Type>::uniformInterpolationTable ) : IOobject(io), - List<scalar>(2, 0.0), + List<scalar>(2, Zero), x0_(0.0), dx_(1.0), log10_(false), @@ -93,7 +93,7 @@ Foam::uniformInterpolationTable<Type>::uniformInterpolationTable IOobject::NO_WRITE, false // if used in BCs, could be used by multiple patches ), - List<scalar>(2, 0.0), + List<scalar>(2, Zero), x0_(dict.get<scalar>("x0")), dx_(dict.get<scalar>("dx")), log10_(dict.lookupOrDefault<Switch>("log10", false)), diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduAddressing.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduAddressing.C index 02bbd1a39396d771252bdfe98ca56f451fbc92a3..1abd05c8765561a23ef652aebfc70b224b778fa8 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduAddressing.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduAddressing.C @@ -41,7 +41,7 @@ void Foam::lduAddressing::calcLosort() const // Scan the neighbour list to find out how many times the cell // appears as a neighbour of the face. Done this way to avoid guessing // and resizing list - labelList nNbrOfFace(size(), 0); + labelList nNbrOfFace(size(), Zero); const labelUList& nbr = upperAddr(); @@ -136,7 +136,7 @@ void Foam::lduAddressing::calcLosortStart() const << abort(FatalError); } - losortStartPtr_ = new labelList(size() + 1, 0); + losortStartPtr_ = new labelList(size() + 1, Zero); labelList& lsrtStart = *losortStartPtr_; @@ -259,7 +259,7 @@ Foam::Tuple2<Foam::label, Foam::scalar> Foam::lduAddressing::band() const const labelUList& owner = lowerAddr(); const labelUList& neighbour = upperAddr(); - labelList cellBandwidth(size(), 0); + labelList cellBandwidth(size(), Zero); forAll(neighbour, facei) { diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C index 63f51c4d31b5dcbf88719225c90a412bf725f541..20f7d973a2a7950b9c0ca3fc4d2bbe29de139bec 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C @@ -178,7 +178,7 @@ Foam::scalarField& Foam::lduMatrix::lower() } else { - lowerPtr_ = new scalarField(lduAddr().lowerAddr().size(), 0.0); + lowerPtr_ = new scalarField(lduAddr().lowerAddr().size(), Zero); } } @@ -190,7 +190,7 @@ Foam::scalarField& Foam::lduMatrix::diag() { if (!diagPtr_) { - diagPtr_ = new scalarField(lduAddr().size(), 0.0); + diagPtr_ = new scalarField(lduAddr().size(), Zero); } return *diagPtr_; @@ -207,7 +207,7 @@ Foam::scalarField& Foam::lduMatrix::upper() } else { - upperPtr_ = new scalarField(lduAddr().lowerAddr().size(), 0.0); + upperPtr_ = new scalarField(lduAddr().lowerAddr().size(), Zero); } } @@ -225,7 +225,7 @@ Foam::scalarField& Foam::lduMatrix::lower(const label nCoeffs) } else { - lowerPtr_ = new scalarField(nCoeffs, 0.0); + lowerPtr_ = new scalarField(nCoeffs, Zero); } } @@ -237,7 +237,7 @@ Foam::scalarField& Foam::lduMatrix::diag(const label size) { if (!diagPtr_) { - diagPtr_ = new scalarField(size, 0.0); + diagPtr_ = new scalarField(size, Zero); } return *diagPtr_; @@ -254,7 +254,7 @@ Foam::scalarField& Foam::lduMatrix::upper(const label nCoeffs) } else { - upperPtr_ = new scalarField(nCoeffs, 0.0); + upperPtr_ = new scalarField(nCoeffs, Zero); } } diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixATmul.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixATmul.C index ac3404185142d22ceb13fdbee5eeb46d47ae76c8..df2324502555474383533a3b3d2d3e485010f186 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixATmul.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixATmul.C @@ -295,7 +295,7 @@ Foam::tmp<Foam::scalarField > Foam::lduMatrix::H1() const { tmp<scalarField > tH1 ( - new scalarField(lduAddr().size(), 0.0) + new scalarField(lduAddr().size(), Zero) ); if (lowerPtr_ || upperPtr_) diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C index 4e402464c31c9025301f6316c91068b108fda45d..36aaef59fb3e5880154f4bef987116c5b3032984 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C @@ -70,7 +70,7 @@ void Foam::GAMGAgglomeration::agglomerateLduAddressing label maxNnbrs = 10; // Number of faces for each coarse-cell - labelList cCellnFaces(nCoarseCells, 0); + labelList cCellnFaces(nCoarseCells, Zero); // Setup initial packed storage for coarse-cell faces labelList cCellFaces(maxNnbrs*nCoarseCells); @@ -260,7 +260,11 @@ void Foam::GAMGAgglomeration::agglomerateLduAddressing // Get reference to fine-level interfaces const lduInterfacePtrsList& fineInterfaces = interfaceLevel(fineLevelIndex); - nPatchFaces_.set(fineLevelIndex, new labelList(fineInterfaces.size(), 0)); + nPatchFaces_.set + ( + fineLevelIndex, + new labelList(fineInterfaces.size(), Zero) + ); labelList& nPatchFaces = nPatchFaces_[fineLevelIndex]; patchFaceRestrictAddressing_.set diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerate.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerate.C index 42133e69d0a42d62856fc59a75e6b7130c25f53c..5354c6fe1e556d9af79d4ee62133b79e3d41da6a 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerate.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerate.C @@ -135,7 +135,7 @@ Foam::tmp<Foam::labelField> Foam::pairGAMGAgglomeration::agglomerate // memory management { - labelList nNbrs(nFineCells, 0); + labelList nNbrs(nFineCells, Zero); forAll(upperAddr, facei) { diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/masterCoarsestGAMGProcAgglomeration/masterCoarsestGAMGProcAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/masterCoarsestGAMGProcAgglomeration/masterCoarsestGAMGProcAgglomeration.C index 273e78377a2b533af37f349f79aad3746463f5a3..3d5b0aa293701a3648d4f44004008ed4b7183e38 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/masterCoarsestGAMGProcAgglomeration/masterCoarsestGAMGProcAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/masterCoarsestGAMGProcAgglomeration/masterCoarsestGAMGProcAgglomeration.C @@ -95,7 +95,7 @@ bool Foam::masterCoarsestGAMGProcAgglomeration::agglomerate() if (nProcs > 1) { // Processor restriction map: per processor the coarse processor - labelList procAgglomMap(nProcs, 0); + labelList procAgglomMap(nProcs, Zero); // Master processor labelList masterProcs; diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/procFacesGAMGProcAgglomeration/procFacesGAMGProcAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/procFacesGAMGProcAgglomeration/procFacesGAMGProcAgglomeration.C index 484289bedc6f9ff0caf2bd2ae80663e1a4e022f3..23573d1cc65555e23aea03a02fd3ec95d38254ca 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/procFacesGAMGProcAgglomeration/procFacesGAMGProcAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/procFacesGAMGProcAgglomeration/procFacesGAMGProcAgglomeration.C @@ -150,7 +150,7 @@ Foam::procFacesGAMGProcAgglomeration::processorAgglomeration label singleCellMeshComm = UPstream::allocateCommunicator ( mesh.comm(), - labelList(1, label(0)) // only processor 0 + labelList(1, Zero) // only processor 0 ); scalarField faceWeights; diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C index 36f34f2af151557fd3fa13e4cdaca15be7d160ae..faf2cd699f245dc2cbf7a28fe9c066fdb8bce360 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C @@ -253,7 +253,7 @@ void Foam::GAMGSolver::agglomerateInterfaceCoefficients coarseInterfaceBouCoeffs.set ( inti, - new scalarField(nPatchFaces[inti], 0.0) + new scalarField(nPatchFaces[inti], Zero) ); agglomeration_.restrictField ( @@ -265,7 +265,7 @@ void Foam::GAMGSolver::agglomerateInterfaceCoefficients coarseInterfaceIntCoeffs.set ( inti, - new scalarField(nPatchFaces[inti], 0.0) + new scalarField(nPatchFaces[inti], Zero) ); agglomeration_.restrictField ( diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterface.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterface.C index 2151fa3005cdb0e1f004c205507454ad39ce70b0..3fef086ee2f792555588a17e68be8180792b52e8 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterface.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterface.C @@ -80,7 +80,7 @@ Foam::tmp<Foam::scalarField> Foam::GAMGInterface::agglomerateCoeffs const scalarField& fineCoeffs ) const { - tmp<scalarField> tcoarseCoeffs(new scalarField(size(), 0.0)); + tmp<scalarField> tcoarseCoeffs(new scalarField(size(), Zero)); scalarField& coarseCoeffs = tcoarseCoeffs.ref(); if (fineCoeffs.size() != faceRestrictAddressing_.size()) diff --git a/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.C b/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.C index bbdb5118f12720d762cc3f8e7ce4d6e87e245df9..c91d4cf3be44e35d953ba5ff6ebe223419a97a35 100644 --- a/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.C +++ b/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.C @@ -221,7 +221,7 @@ void Foam::multiply << abort(FatalError); } - ans = scalarRectangularMatrix(A.m(), C.n(), scalar(0)); + ans = scalarRectangularMatrix(A.m(), C.n(), Zero); for (label i=0; i<A.m(); i++) { @@ -265,7 +265,7 @@ void Foam::multiply << abort(FatalError); } - ans = scalarRectangularMatrix(A.m(), C.n(), scalar(0)); + ans = scalarRectangularMatrix(A.m(), C.n(), Zero); for (label i=0; i<A.m(); i++) { diff --git a/src/OpenFOAM/matrices/scalarMatrices/scalarMatricesTemplates.C b/src/OpenFOAM/matrices/scalarMatrices/scalarMatricesTemplates.C index 5ad55e6a554cecd10a4c5618b98051c7b25e3bf4..31fd37b20f60cc77e502de75013981817526136b 100644 --- a/src/OpenFOAM/matrices/scalarMatrices/scalarMatricesTemplates.C +++ b/src/OpenFOAM/matrices/scalarMatrices/scalarMatricesTemplates.C @@ -249,7 +249,7 @@ void Foam::multiply << abort(FatalError); } - ans = Matrix<Form, Type>(A.m(), B.n(), scalar(0)); + ans = Matrix<Form, Type>(A.m(), B.n(), Zero); for (label i=0; i<A.m(); i++) { diff --git a/src/OpenFOAM/meshes/ProcessorTopology/commSchedule.C b/src/OpenFOAM/meshes/ProcessorTopology/commSchedule.C index aeec9a354378cff2588a06af777a3e734803db5a..8581e05633af471fc5c620d168fc90385107a149 100644 --- a/src/OpenFOAM/meshes/ProcessorTopology/commSchedule.C +++ b/src/OpenFOAM/meshes/ProcessorTopology/commSchedule.C @@ -242,7 +242,7 @@ Foam::commSchedule::commSchedule // Sort schedule_ by processor - labelList nProcScheduled(nProcs, 0); + labelList nProcScheduled(nProcs, Zero); // Count forAll(schedule_, i) diff --git a/src/OpenFOAM/meshes/bandCompression/bandCompression.C b/src/OpenFOAM/meshes/bandCompression/bandCompression.C index d144288867fe1647c564afbf6aaa0a2e2ef54c12..4ec7c973dd0ea030684cfc376aac695801a8f065 100644 --- a/src/OpenFOAM/meshes/bandCompression/bandCompression.C +++ b/src/OpenFOAM/meshes/bandCompression/bandCompression.C @@ -152,7 +152,7 @@ Foam::labelList Foam::bandCompression ) { // Count number of neighbours - labelList numNbrs(offsets.size()-1, 0); + labelList numNbrs(offsets.size()-1, Zero); forAll(numNbrs, celli) { label start = offsets[celli]; diff --git a/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C b/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C index 9a2d5c50d68b14cdf9367ac5b0ad16acbefc7712..69fb3e8fb0542b6d90e53908d84f96f3efa03131 100644 --- a/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C +++ b/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C @@ -132,7 +132,7 @@ Foam::labelList Foam::lduPrimitiveMesh::upperTriOrder const labelUList& upper ) { - labelList nNbrs(nCells, 0); + labelList nNbrs(nCells, Zero); // Count number of upper neighbours forAll(lower, facei) @@ -377,7 +377,7 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh label nOtherInterfaces = 0; - labelList nCoupledFaces(nMeshes, 0); + labelList nCoupledFaces(nMeshes, Zero); for (label procMeshI = 0; procMeshI < nMeshes; procMeshI++) { diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.C index 90df5d52b4e4f9a5f479b3f5872ead43b8dae202..9cd3dc5424458b8242b26d383b074e0a426ad1a3 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.C @@ -84,9 +84,9 @@ Foam::cellShape Foam::degenerateMatcher::match(const faceList& faces) return match ( faces, - labelList(faces.size(), 0), // cell 0 is owner of all faces - 0, // cell 0 - identity(faces.size()) // cell 0 consists of all faces + labelList(faces.size(), Zero), // cell 0 is owner of all faces + 0, // cell 0 + identity(faces.size()) // cell 0 consists of all faces ); } diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.C index ae0e7b99318389af26b29655453a3e475598ed1e..4fcf806ea9ee555b762daf0460ca1bcbd348e155 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.C @@ -287,10 +287,10 @@ bool Foam::hexMatcher::isA(const faceList& faces) return matchShape ( true, - faces, // all faces in mesh - labelList(faces.size(), 0), // cell 0 is owner of all faces - 0, // cell label - identity(faces.size()) // faces of cell 0 + faces, // all faces in mesh + labelList(faces.size(), Zero), // cell 0 is owner of all faces + 0, // cell label + identity(faces.size()) // faces of cell 0 ); } diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.C index 9ff2ec7fdcd8f1471e78adfb712f96b270fd16f2..c93a11db871718999206de329b5269aabe94fb58 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.C @@ -346,10 +346,10 @@ bool Foam::prismMatcher::isA(const faceList& faces) return matchShape ( true, - faces, // all faces in mesh - labelList(faces.size(), 0), // cell 0 is owner of all faces - 0, // cell label - identity(faces.size()) // faces of cell 0 + faces, // all faces in mesh + labelList(faces.size(), Zero), // cell 0 is owner of all faces + 0, // cell label + identity(faces.size()) // faces of cell 0 ); } diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C index 4ecda6ea0c9395443082a9cd69396a1e13cea725..a80d3f671eea4b4560c2e7f219e0d1acc6541445 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C @@ -268,10 +268,10 @@ bool Foam::pyrMatcher::isA(const faceList& faces) return matchShape ( true, - faces, // all faces in mesh - labelList(faces.size(), 0), // cell 0 is owner of all faces - 0, // cell label - identity(faces.size()) // faces of cell 0 + faces, // all faces in mesh + labelList(faces.size(), Zero), // cell 0 is owner of all faces + 0, // cell label + identity(faces.size()) // faces of cell 0 ); } diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.C index 3a2e594a746fcc495e58841b0c5df7c06ae1b2d2..4709d3d33ae98acff79ba6347aa8512e792e2262 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.C @@ -227,10 +227,10 @@ bool Foam::tetMatcher::isA(const faceList& faces) return matchShape ( true, - faces, // all faces in mesh - labelList(faces.size(), 0), // cell 0 is owner of all faces - 0, // cell label - identity(faces.size()) // faces of cell 0 + faces, // all faces in mesh + labelList(faces.size(), Zero), // cell 0 is owner of all faces + 0, // cell label + identity(faces.size()) // faces of cell 0 ); } diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C index fa45433468e0e2d5c5bad9a4902b2d19d5650843..3e05c861a623064e3e20f423af23f18729a62ea1 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C @@ -273,10 +273,10 @@ bool Foam::tetWedgeMatcher::isA(const faceList& faces) return matchShape ( true, - faces, // all faces in mesh - labelList(faces.size(), 0), // cell 0 is owner of all faces - 0, // cell label - identity(faces.size()) // faces of cell 0 + faces, // all faces in mesh + labelList(faces.size(), Zero), // cell 0 is owner of all faces + 0, // cell label + identity(faces.size()) // faces of cell 0 ); } diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C index b230486a142b5ecdff6766bc8fe84eb7bfe2612f..0004645aab3f493f5503d683e172a14ff37d7f4f 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C @@ -373,10 +373,10 @@ bool Foam::wedgeMatcher::isA(const faceList& faces) return matchShape ( true, - faces, // all faces in mesh - labelList(faces.size(), 0), // cell 0 is owner of all faces - 0, // cell label - identity(faces.size()) // faces of cell 0 + faces, // all faces in mesh + labelList(faces.size(), Zero), // cell 0 is owner of all faces + 0, // cell label + identity(faces.size()) // faces of cell 0 ); } diff --git a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMapper.C b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMapper.C index 947a2f5d0f96673a1416de24ca1fba8aeb48fc3b..c8a0d465e9b470e835ed3106eac5400fa1c95532 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMapper.C +++ b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointMapper.C @@ -118,7 +118,7 @@ void Foam::pointMapper::calcAddressing() const { // Mapped from a single point addr[pointi] = labelList(1, cm[pointi]); - w[pointi] = scalarList(1, 1.0); + w[pointi] = scalarList(1, scalar(1)); } } @@ -134,8 +134,8 @@ void Foam::pointMapper::calcAddressing() const if (addr[pointi].empty()) { // Mapped from a dummy point. Take point 0 with weight 1. - addr[pointi] = labelList(1, label(0)); - w[pointi] = scalarList(1, 1.0); + addr[pointi] = labelList(1, Zero); + w[pointi] = scalarList(1, scalar(1)); insertedPoints[nInsertedPoints] = pointi; nInsertedPoints++; diff --git a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C index cd281f6ec0fc7055e8eb101fd988c074dc7611b2..1cb921069cf0612b83de9e423d8ce5bd0608c0cc 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C +++ b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointPatchMapper.C @@ -83,14 +83,14 @@ void Foam::pointPatchMapper::calcAddressing() const if (ppm[i] >= 0) { addr[i] = labelList(1, ppm[i]); - w[i] = scalarList(1, 1.0); + w[i] = scalarList(1, scalar(1)); } else { // Inserted point. ///// Map from point0 (arbitrary choice) - //addr[i] = labelList(1, label(0)); - //w[i] = scalarList(1, 1.0); + //addr[i] = labelList(1, Zero); + //w[i] = scalarList(1, scalar(1)); hasUnmapped_ = true; } } diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C index 9810cb6cfb46ca5c5a8af0446fcfbe7a4b0165c9..f9e966699ed95a5457d145be0b181f36e5e7b399 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C @@ -1234,7 +1234,7 @@ void Foam::globalMeshData::calcPointBoundaryFaces // 1. Count - labelList nPointFaces(coupledPatch().nPoints(), 0); + labelList nPointFaces(coupledPatch().nPoints(), Zero); forAll(bMesh, patchi) { diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.C index 6e4045b48e67e0e1b125e46da7e1c36dfeec4f01..434fdc974ef934f90e9bf987584d07dad046a1b5 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.C @@ -262,8 +262,8 @@ void Foam::cellMapper::calcAddressing() const if (addr[celli].empty()) { // Mapped from a dummy cell - addr[celli] = labelList(1, label(0)); - w[celli] = scalarList(1, 1.0); + addr[celli] = labelList(1, Zero); + w[celli] = scalarList(1, scalar(1)); insertedCells[nInsertedCells] = celli; nInsertedCells++; diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.C index b81b4d23f9080bbafb49e97e27d8533ffca4373f..601b32b16ab93d4623a75c47983fcd5042c737fa 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.C @@ -177,8 +177,8 @@ void Foam::faceMapper::calcAddressing() const if (addr[facei].empty()) { // Mapped from a dummy face - addr[facei] = labelList(1, label(0)); - w[facei] = scalarList(1, 1.0); + addr[facei] = labelList(1, Zero); + w[facei] = scalarList(1, scalar(1)); insertedFaces[nInsertedFaces] = facei; nInsertedFaces++; diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C index f5789cb4b2ce43ccf3c0c28d8893bc3693f98412..167d8b1edec62a4925ed68f8e36f4cd86ca24e66 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C @@ -311,7 +311,7 @@ Foam::mapDistribute::mapDistribute // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Count per transformIndex label nTrafo = globalTransforms.transformPermutations().size(); - labelList nPerTransform(nTrafo, 0); + labelList nPerTransform(nTrafo, Zero); forAll(transformedElements, i) { labelPair elem = transformedElements[i]; @@ -420,7 +420,7 @@ Foam::mapDistribute::mapDistribute // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Count per transformIndex label nTrafo = globalTransforms.transformPermutations().size(); - labelList nPerTransform(nTrafo, 0); + labelList nPerTransform(nTrafo, Zero); forAll(transformedElements, celli) { const labelPairList& elems = transformedElements[celli]; diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.C index 3c3ee41a712c6916ccd5d805832552541d8b02c5..ca20487371b25dbdede4e5913bc9abdb3c3ee028 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributeBase.C @@ -289,7 +289,7 @@ void Foam::mapDistributeBase::calcCompactAddressing compactMap.setSize(Pstream::nProcs()); // Count all (non-local) elements needed. Just for presizing map. - labelList nNonLocal(Pstream::nProcs(), 0); + labelList nNonLocal(Pstream::nProcs(), Zero); forAll(elements, i) { @@ -338,7 +338,7 @@ void Foam::mapDistributeBase::calcCompactAddressing compactMap.setSize(Pstream::nProcs()); // Count all (non-local) elements needed. Just for presizing map. - labelList nNonLocal(Pstream::nProcs(), 0); + labelList nNonLocal(Pstream::nProcs(), Zero); forAll(cellCells, cellI) { @@ -616,8 +616,8 @@ Foam::mapDistributeBase::mapDistributeBase } // Per processor the number of samples we have to send/receive. - labelList nSend(Pstream::nProcs(), 0); - labelList nRecv(Pstream::nProcs(), 0); + labelList nSend(Pstream::nProcs(), Zero); + labelList nRecv(Pstream::nProcs(), Zero); forAll(sendProcs, sampleI) { diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C b/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C index a84f56d5d7dcff89b17f5d38b377c1fb5efec6cb..14a870a22e2316fcd9b2303074643f2e08963d52 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C @@ -55,7 +55,7 @@ Foam::label Foam::polyMeshTetDecomposition::findSharedBasePoint const point& oCc = pC[oCI]; - List<scalar> tetQualities(2, 0.0); + List<scalar> tetQualities(2, Zero); forAll(f, faceBasePtI) { diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellCells.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellCells.C index 7203f638059490b2bf687e76e83641e304d337a0..537dd3997bc5403e1c1263bda8beb9a025f5121f 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellCells.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellCells.C @@ -58,7 +58,7 @@ void Foam::primitiveMesh::calcCellCells() const { // 1. Count number of internal faces per cell - labelList ncc(nCells(), 0); + labelList ncc(nCells(), Zero); const labelList& own = faceOwner(); const labelList& nei = faceNeighbour(); diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellCentresAndVols.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellCentresAndVols.C index fec99b0e52f0a0aaa0949d86c66578cef9312b1c..53d53c1189c03e68d5d3f6678cdb3a8823ad91d4 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellCentresAndVols.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellCentresAndVols.C @@ -88,18 +88,18 @@ void Foam::primitiveMesh::makeCellCentresAndVols // face centres vectorField cEst(nCells(), Zero); - labelField nCellFaces(nCells(), 0); + labelField nCellFaces(nCells(), Zero); forAll(own, facei) { cEst[own[facei]] += fCtrs[facei]; - nCellFaces[own[facei]] += 1; + ++nCellFaces[own[facei]]; } forAll(nei, facei) { cEst[nei[facei]] += fCtrs[facei]; - nCellFaces[nei[facei]] += 1; + ++nCellFaces[nei[facei]]; } forAll(cEst, celli) diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCells.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCells.C index feb44e13da1b81ed24b001bca993b57606b7b3f9..9a29dc4e39ce31905255a13e01486ab7a2243ba7 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCells.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCells.C @@ -50,7 +50,7 @@ void Foam::primitiveMesh::calcCells // 1. Count number of faces per cell - labelList ncf(nCells, 0); + labelList ncf(nCells, Zero); forAll(own, facei) { diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C index 830914c56ad59ed82fdc034fe9f1546ec3738ce6..4f60a40a5c60d5b5e5575cb2c917d195fed24b47 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C @@ -1147,7 +1147,7 @@ bool Foam::primitiveMesh::checkCellsZipUp const edgeList cellEdges = c[celli].edges(f); - labelList edgeUsage(cellEdges.size(), 0); + labelList edgeUsage(cellEdges.size(), Zero); forAll(curFaces, facei) { diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshPointCells.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshPointCells.C index 79d442522ffdadfd6ba1ad6a08bded244e04668a..5685739058528ffbff5bd5ef41ad31523bafb51f 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshPointCells.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshPointCells.C @@ -61,7 +61,7 @@ void Foam::primitiveMesh::calcPointCells() const // Count number of cells per point - labelList npc(nPoints(), 0); + labelList npc(nPoints(), Zero); forAll(cf, celli) { diff --git a/src/OpenFOAM/primitives/functions/Function1/Table/TableBase.C b/src/OpenFOAM/primitives/functions/Function1/Table/TableBase.C index cf21e6ecc0836618e9aceadf6be07cb307def8bb..742caa0b00e25ced9d9c555a3187204e34227f84 100644 --- a/src/OpenFOAM/primitives/functions/Function1/Table/TableBase.C +++ b/src/OpenFOAM/primitives/functions/Function1/Table/TableBase.C @@ -316,7 +316,7 @@ Type Foam::Function1Types::TableBase<Type>::integrate template<class Type> Foam::tmp<Foam::scalarField> Foam::Function1Types::TableBase<Type>::x() const { - tmp<scalarField> tfld(new scalarField(table_.size(), 0.0)); + tmp<scalarField> tfld(new scalarField(table_.size(), Zero)); scalarField& fld = tfld.ref(); forAll(table_, i) diff --git a/src/OpenFOAM/primitives/functions/Polynomial/polynomialFunction.C b/src/OpenFOAM/primitives/functions/Polynomial/polynomialFunction.C index c93c1d125644c1d898036827a066869c8f0f13fd..071468f8cf4d35f22cec4fe106afa079f55dd641 100644 --- a/src/OpenFOAM/primitives/functions/Polynomial/polynomialFunction.C +++ b/src/OpenFOAM/primitives/functions/Polynomial/polynomialFunction.C @@ -83,7 +83,7 @@ Foam::polynomialFunction Foam::polynomialFunction::cloneIntegralMinus1 Foam::polynomialFunction::polynomialFunction(const label order) : - scalarList(order, 0.0), + scalarList(order, Zero), logActive_(false), logCoeff_(0.0) { diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C index 67a285f3d7ce639158450328eff023792ae8bf7b..64a82f26381a4f91c9a3f39b0576c5ddba8e5705 100644 --- a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C +++ b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C @@ -306,7 +306,7 @@ void Foam::globalIndexAndTransform::determineTransformPermutations() // Encode index for 0 sign - labelList permutationIndices(nIndependentTransforms(), 0); + labelList permutationIndices(nIndependentTransforms(), Zero); nullTransformIndex_ = encodeTransformIndex(permutationIndices); } diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransformI.H b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransformI.H index f47f7dffdc947626f84dd81a79d2c4b63ddf28f1..338d96c3758070562e706b32b874bd4ac627d5da 100644 --- a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransformI.H +++ b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransformI.H @@ -111,7 +111,7 @@ Foam::labelList Foam::globalIndexAndTransform::decodeTransformIndex const label transformIndex ) const { - labelList permutation(transforms_.size(), 0); + labelList permutation(transforms_.size(), Zero); label t = transformIndex; forAll(permutation, i) @@ -415,7 +415,7 @@ Foam::labelList Foam::globalIndexAndTransform::transformIndicesForPatches const labelHashSet& patchis ) const { - labelList permutation(transforms_.size(), 0); + labelList permutation(transforms_.size(), Zero); labelList selectedTransformIs(0); diff --git a/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.C b/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.C index 28db75565efae43813bdbfaf7f993c0ad9a85bdc..e780345461c5248d01b56882ea2e7b44aad36c46 100644 --- a/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.C +++ b/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.C @@ -143,7 +143,7 @@ Foam::ThermalDiffusivity<BasicTurbulenceModel>::alphat { return tmp<scalarField> ( - new scalarField(this->mesh_.boundary()[patchi].size(), 0.0) + new scalarField(this->mesh_.boundary()[patchi].size(), Zero) ); } diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C index cdc526810f6bd3ed875e9bde5b47831fccdc4491..22cb653028c88e256e8606f0af51c191d679ad03 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C @@ -350,7 +350,7 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs() const scalarField& Tp(*this); - scalarField qr(Tp.size(), 0); + scalarField qr(Tp.size(), Zero); if (qrName_ != "none") { qr = diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/fixedIncidentRadiation/fixedIncidentRadiationFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/fixedIncidentRadiation/fixedIncidentRadiationFvPatchScalarField.C index ccd9cc3b5efa7b487f3d89fd0b7ff22099a8ff19..bb8427b12ede89f994c450acdb52877db9a4ed85 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/fixedIncidentRadiation/fixedIncidentRadiationFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/fixedIncidentRadiation/fixedIncidentRadiationFvPatchScalarField.C @@ -45,7 +45,7 @@ fixedIncidentRadiationFvPatchScalarField : fixedGradientFvPatchScalarField(p, iF), temperatureCoupledBase(patch(), "undefined", "undefined", "undefined-K"), - qrIncident_(p.size(), 0.0) + qrIncident_(p.size(), Zero) {} diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMachNumberPressure/outletMachNumberPressureFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMachNumberPressure/outletMachNumberPressureFvPatchScalarField.C index 21cf6dddf647a6093f447a4ab58af8aea45703eb..aa002e77836ab4c7629050874e5413e5a93232ca 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMachNumberPressure/outletMachNumberPressureFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/outletMachNumberPressure/outletMachNumberPressureFvPatchScalarField.C @@ -62,10 +62,10 @@ outletMachNumberPressureFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), - M_(dict.lookupOrDefault<scalar>("M", 0.0)), + M_(dict.lookupOrDefault<scalar>("M", 0)), pBack_(dict.get<scalar>("pBack")), - c1_(dict.lookupOrDefault<scalar>("c1", 0.0)), - A1_(dict.lookupOrDefault<scalar>("A1", 0.0)), + c1_(dict.lookupOrDefault<scalar>("c1", 0)), + A1_(dict.lookupOrDefault<scalar>("A1", 0)), phiName_(dict.lookupOrDefault<word>("phi", "phi")), rhoName_(dict.lookupOrDefault<word>("rho", "rho")), UName_(dict.lookupOrDefault<word>("U", "U")), diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C index 4040dc4fbefcff4f54ea586ab946e4c5bb834b7a..202de4582c59d3a0fb1ca47d4aabc0e3186448ff 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C @@ -100,7 +100,7 @@ thermalBaffle1DFvPatchScalarField qs_(p.size(), 0), solidDict_(dict), solidPtr_(), - qrPrevious_(p.size(), 0.0), + qrPrevious_(p.size(), Zero), qrRelaxation_ ( dict.lookupOrDefaultCompat("qrRelaxation", {{"relaxation", 1712}}, 1) @@ -365,7 +365,7 @@ void thermalBaffle1DFvPatchScalarField<solidType>::updateCoeffs() patch().template lookupPatchField<volScalarField, scalar>(TName_); - scalarField qr(Tp.size(), 0.0); + scalarField qr(Tp.size(), Zero); if (qrName_ != "none") { @@ -386,7 +386,7 @@ void thermalBaffle1DFvPatchScalarField<solidType>::updateCoeffs() mapDist.distribute(nbrTp); // solid properties - scalarField kappas(patch().size(), 0.0); + scalarField kappas(patch().size(), Zero); forAll(kappas, i) { kappas[i] = solid().kappa(0.0, (Tp[i] + nbrTp[i])/2.0); diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C index e48bdf7f42a14f6bf7028fae4759cc3a9e2322b4..f0c00d369a9132d72df65b14dc87c27669424daf 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C @@ -189,8 +189,8 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs() ); // Swap to obtain full local values of neighbour internal field - tmp<scalarField> nbrIntFld(new scalarField(nbrField.size(), 0.0)); - tmp<scalarField> nbrKDelta(new scalarField(nbrField.size(), 0.0)); + tmp<scalarField> nbrIntFld(new scalarField(nbrField.size(), Zero)); + tmp<scalarField> nbrKDelta(new scalarField(nbrField.size(), Zero)); if (contactRes_ == 0.0) { diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C index 2fa1e33b8161e8b9244c4500136795e06a560504..114655656c47e9a44ea780dc5c77afea282804c5 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C @@ -219,13 +219,13 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs() scalarField KDelta(kappa(Tp)*patch().deltaCoeffs()); - scalarField qr(Tp.size(), 0.0); + scalarField qr(Tp.size(), Zero); if (qrName_ != "none") { qr = patch().lookupPatchField<volScalarField, scalar>(qrName_); } - scalarField qrNbr(Tp.size(), 0.0); + scalarField qrNbr(Tp.size(), Zero); if (qrNbrName_ != "none") { qrNbr = nbrPatch.lookupPatchField<volScalarField, scalar>(qrNbrName_); @@ -260,7 +260,7 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs() } else { - mCpDtNbr.setSize(Tp.size(), 0.0); + mCpDtNbr.setSize(Tp.size(), Zero); } } @@ -285,7 +285,7 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs() else { // Issue warning? - mCpDt.setSize(Tp.size(), 0.0); + mCpDt.setSize(Tp.size(), Zero); } } diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C index f8e515e3ad35fc040ce9b1d62d0914f4dbc360ab..390fc02c6a0c767420fdeb072d3fe4361f279a81 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C @@ -37,8 +37,8 @@ Foam::wallHeatTransferFvPatchScalarField::wallHeatTransferFvPatchScalarField ) : mixedFvPatchScalarField(p, iF), - Tinf_(p.size(), 0.0), - alphaWall_(p.size(), 0.0) + Tinf_(p.size(), Zero), + alphaWall_(p.size(), Zero) { refValue() = 0.0; refGrad() = 0.0; diff --git a/src/TurbulenceModels/turbulenceModels/LES/dynamicLagrangian/dynamicLagrangian.C b/src/TurbulenceModels/turbulenceModels/LES/dynamicLagrangian/dynamicLagrangian.C index e5e6907b01e6fc2e6cd7cc879295cc923905623a..5d220583565428d39c27326a7d608b767c54effb 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/dynamicLagrangian/dynamicLagrangian.C +++ b/src/TurbulenceModels/turbulenceModels/LES/dynamicLagrangian/dynamicLagrangian.C @@ -121,7 +121,7 @@ dynamicLagrangian<BasicTurbulenceModel>::dynamicLagrangian filterPtr_(LESfilter::New(U.mesh(), this->coeffDict())), filter_(filterPtr_()), - flm0_("flm0", flm_.dimensions(), 0.0), + flm0_("flm0", flm_.dimensions(), Zero), fmm0_("fmm0", fmm_.dimensions(), VSMALL) { if (type == typeName) diff --git a/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C b/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C index 0c6fe242a3a1409f129e5378d9cc82bc1257512d..f67f97af1fe04f1e1c86df0582e55aa81ef1f736 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C @@ -262,7 +262,7 @@ v2f<BasicTurbulenceModel>::v2f this->mesh_ ), v2Min_(dimensionedScalar("v2Min", v2_.dimensions(), SMALL)), - fMin_(dimensionedScalar("fMin", f_.dimensions(), 0.0)) + fMin_(dimensionedScalar("fMin", f_.dimensions(), Zero)) { bound(k_, this->kMin_); bound(epsilon_, this->epsilonMin_); diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index f5ccaf54f0de8d03705b47fa63cfb13c19c929a8..b33348eba9d75968a8453f61dba5369f751e0b58 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -145,8 +145,8 @@ void Foam::epsilonWallFunctionFvPatchScalarField::createAveragingWeights() cornerWeights_[patchi] = 1.0/wf.patchInternalField(); } - G_.setSize(internalField().size(), 0.0); - epsilon_.setSize(internalField().size(), 0.0); + G_.setSize(internalField().size(), Zero); + epsilon_.setSize(internalField().size(), Zero); initialised_ = true; } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUBlendedWallFunction/nutUBlendedWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUBlendedWallFunction/nutUBlendedWallFunctionFvPatchScalarField.C index 47f25c6f0dede368c9e048dde978e260229d728e..9bbb5ae89835a382c04cb6bc923942e9a8e120a3 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUBlendedWallFunction/nutUBlendedWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUBlendedWallFunction/nutUBlendedWallFunctionFvPatchScalarField.C @@ -85,7 +85,7 @@ Foam::nutUBlendedWallFunctionFvPatchScalarField::calcUTau Up -= n*(n & Up); const scalarField magUp(mag(Up)); - tmp<scalarField> tuTaup(new scalarField(patch().size(), 0.0)); + tmp<scalarField> tuTaup(new scalarField(patch().size(), Zero)); scalarField& uTaup = tuTaup.ref(); const scalarField& nutw = *this; diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C index 5e256b515b798bdc54ad26bdc60d0efe70f11e24..64f76879fc57be467622774015700182b25d96f1 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C @@ -59,7 +59,7 @@ tmp<scalarField> nutURoughWallFunctionFvPatchScalarField::calcNut() const tmp<scalarField> tyPlus = calcYPlus(magUp); scalarField& yPlus = tyPlus.ref(); - tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0)); + tmp<scalarField> tnutw(new scalarField(patch().size(), Zero)); scalarField& nutw = tnutw.ref(); forAll(yPlus, facei) @@ -94,7 +94,7 @@ tmp<scalarField> nutURoughWallFunctionFvPatchScalarField::calcYPlus const tmp<scalarField> tnuw = turbModel.nu(patchi); const scalarField& nuw = tnuw(); - tmp<scalarField> tyPlus(new scalarField(patch().size(), 0.0)); + tmp<scalarField> tyPlus(new scalarField(patch().size(), Zero)); scalarField& yPlus = tyPlus.ref(); if (roughnessHeight_ > 0.0) diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C index 3b32e3faea0c3da7b9def2a6f9d687a59f43ffa5..10b46848fffe6413db624893b04e219894c3be6a 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C @@ -86,7 +86,7 @@ tmp<scalarField> nutUSpaldingWallFunctionFvPatchScalarField::calcUTau const scalarField& nutw = *this; - tmp<scalarField> tuTau(new scalarField(patch().size(), 0.0)); + tmp<scalarField> tuTau(new scalarField(patch().size(), Zero)); scalarField& uTau = tuTau.ref(); forAll(uTau, facei) diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C index 72a133198e1cfffa3fd540d45d4ec6249dcd9630..513f8fcb2c85c7d49572bc01c2a06ee67724e0bd 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C @@ -71,7 +71,7 @@ tmp<scalarField> nutUTabulatedWallFunctionFvPatchScalarField::calcUPlus const scalarField& Rey ) const { - tmp<scalarField> tuPlus(new scalarField(patch().size(), 0.0)); + tmp<scalarField> tuPlus(new scalarField(patch().size(), Zero)); scalarField& uPlus = tuPlus.ref(); forAll(uPlus, facei) diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C index fb67a8560ad3a07f5c1a16f4d87420bfdc044f7a..7cc7c0f9a4505769e24fff8ac06a2e1fd00f87a8 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C @@ -56,7 +56,7 @@ tmp<scalarField> nutUWallFunctionFvPatchScalarField::calcNut() const tmp<scalarField> tyPlus = calcYPlus(magUp); const scalarField& yPlus = tyPlus(); - tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0)); + tmp<scalarField> tnutw(new scalarField(patch().size(), Zero)); scalarField& nutw = tnutw.ref(); forAll(yPlus, facei) @@ -91,7 +91,7 @@ tmp<scalarField> nutUWallFunctionFvPatchScalarField::calcYPlus const tmp<scalarField> tnuw = turbModel.nu(patchi); const scalarField& nuw = tnuw(); - tmp<scalarField> tyPlus(new scalarField(patch().size(), 0.0)); + tmp<scalarField> tyPlus(new scalarField(patch().size(), Zero)); scalarField& yPlus = tyPlus.ref(); forAll(yPlus, facei) diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C index fba57e6b3c1946403d43fc8584318199abfc7f05..b160b8ea4f8c43f66a4023570cb45151f3078027 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C @@ -134,8 +134,8 @@ nutkRoughWallFunctionFvPatchScalarField::nutkRoughWallFunctionFvPatchScalarField ) : nutkWallFunctionFvPatchScalarField(p, iF), - Ks_(p.size(), 0.0), - Cs_(p.size(), 0.0) + Ks_(p.size(), Zero), + Cs_(p.size(), Zero) {} diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C index 7716c669086d19337f845c0c25560b272e77e239..db2885124df285acecb17141a0c6857ac10c34c0 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C @@ -58,7 +58,7 @@ tmp<scalarField> nutkWallFunctionFvPatchScalarField::calcNut() const const scalar Cmu25 = pow025(Cmu_); - tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0)); + tmp<scalarField> tnutw(new scalarField(patch().size(), Zero)); scalarField& nutw = tnutw.ref(); forAll(nutw, facei) diff --git a/src/TurbulenceModels/turbulenceModels/laminar/Stokes/Stokes.C b/src/TurbulenceModels/turbulenceModels/laminar/Stokes/Stokes.C index 7da73f5246ca2866f796c35f86b1742647b057ad..5f539fc4d1f0818de4c610bf604adb68cc72cac0 100644 --- a/src/TurbulenceModels/turbulenceModels/laminar/Stokes/Stokes.C +++ b/src/TurbulenceModels/turbulenceModels/laminar/Stokes/Stokes.C @@ -112,7 +112,7 @@ Stokes<BasicTurbulenceModel>::nut { return tmp<scalarField> ( - new scalarField(this->mesh_.boundary()[patchi].size(), 0.0) + new scalarField(this->mesh_.boundary()[patchi].size(), Zero) ); } diff --git a/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C b/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C index 4900c690213493205bee3261584e35131bea9427..29e967598be265289251e6fbb63b87e2ab5821f9 100644 --- a/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C +++ b/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C @@ -210,7 +210,7 @@ Foam::laminarModel<BasicTurbulenceModel>::nut { return tmp<scalarField> ( - new scalarField(this->mesh_.boundary()[patchi].size(), 0.0) + new scalarField(this->mesh_.boundary()[patchi].size(), Zero) ); } diff --git a/src/atmosphericModels/derivedFvPatchFields/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C b/src/atmosphericModels/derivedFvPatchFields/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C index 7bf60ee50d34f4dff6d49af7a2ed5b8a7e25e619..d8a3dbcf2becee31c0106bd97b2954c9bcf78361 100644 --- a/src/atmosphericModels/derivedFvPatchFields/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C +++ b/src/atmosphericModels/derivedFvPatchFields/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C @@ -94,7 +94,7 @@ nutkAtmRoughWallFunctionFvPatchScalarField ) : nutkWallFunctionFvPatchScalarField(p, iF), - z0_(p.size(), 0.0) + z0_(p.size(), Zero) {} diff --git a/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.C b/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.C index d4867e22d75ad1af9cc4d4131cad97b6c518aa61..a6dee949ab40aeab7d1f78786b2d3031ccfac0c3 100644 --- a/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.C +++ b/src/atmosphericModels/porosityModels/powerLawLopesdaCosta/powerLawLopesdaCosta.C @@ -338,7 +338,7 @@ void Foam::porosityModels::powerLawLopesdaCosta::calcForce vectorField& force ) const { - scalarField Udiag(U.size(), 0.0); + scalarField Udiag(U.size(), Zero); const scalarField& V = mesh_.V(); apply(Udiag, V, rho, U); diff --git a/src/combustionModels/EDC/EDC.C b/src/combustionModels/EDC/EDC.C index f1b6546ead1aa0e85004bda74088999fe65a4562..419638436d90a428b9436e0d4c822158211a91dd 100644 --- a/src/combustionModels/EDC/EDC.C +++ b/src/combustionModels/EDC/EDC.C @@ -94,7 +94,7 @@ void Foam::combustionModels::EDC<ReactionThermo>::correct() tmp<volScalarField> trho(this->rho()); const volScalarField& rho = trho(); - scalarField tauStar(epsilon.size(), 0); + scalarField tauStar(epsilon.size(), Zero); if (version_ == EDCversions::v2016) { diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C b/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C index f3d23c6a787c1859838a226d3a81eb97b6f3febe..f242e6e61fb1788c9b8cc604456ed4b7ae5cc5cb 100644 --- a/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/relaxation/relaxation.C @@ -113,7 +113,7 @@ void Foam::reactionRateFlameAreaModels::relaxation::correct const volScalarField omegaInf(correlation_.omega0Sigma(sigmaTotal)); - dimensionedScalar sigma0("sigma0", sigma.dimensions(), 0.0); + dimensionedScalar sigma0("sigma0", sigma.dimensions(), Zero); const volScalarField tau(C_*mag(sigmaTotal)); diff --git a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C index 5be2f9e7c3d01c45f36626f1ba707eddc0e03b53..ff873fce5ffaf5edab6b5a6e17f030ae6a0ddff7 100644 --- a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C +++ b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C @@ -158,7 +158,7 @@ diffusionMulticomponent YfStream_(reactions_.size(), 1.0), sigma_(reactions_.size(), 0.02), oxidantRes_(this->coeffs().lookup("oxidantRes")), - ftCorr_(reactions_.size(), 0.0), + ftCorr_(reactions_.size(), Zero), alpha_(1), laminarIgn_(false) { diff --git a/src/combustionModels/zoneCombustion/zoneCombustion.C b/src/combustionModels/zoneCombustion/zoneCombustion.C index 262c2589b2fded3771529b527a6ab47db0f3391e..cd4a6dfd99f94f4d70b3b004298f8aab11fdb867 100644 --- a/src/combustionModels/zoneCombustion/zoneCombustion.C +++ b/src/combustionModels/zoneCombustion/zoneCombustion.C @@ -36,7 +36,7 @@ Foam::combustionModels::zoneCombustion<ReactionThermo>::filter { fvScalarMatrix& R = tR.ref(); scalarField& Su = R.source(); - scalarField filteredField(Su.size(), 0); + scalarField filteredField(Su.size(), Zero); forAll(zoneNames_, zonei) { @@ -80,7 +80,7 @@ Foam::combustionModels::zoneCombustion<ReactionThermo>::filter ) const { scalarField& S = tS.ref(); - scalarField filteredField(S.size(), 0); + scalarField filteredField(S.size(), Zero); forAll(zoneNames_, zonei) { diff --git a/src/conversion/ccm/reader/ccmReaderMesh.C b/src/conversion/ccm/reader/ccmReaderMesh.C index 41042c612f4ad10141b0a01c6567fa8d48f75d16..cea792027f30f63e54c0cab67ce613f4b0e84e98 100644 --- a/src/conversion/ccm/reader/ccmReaderMesh.C +++ b/src/conversion/ccm/reader/ccmReaderMesh.C @@ -1285,7 +1285,7 @@ void Foam::ccm::reader::removeUnwanted() // Remove all faces where the owner corresponds to a removed cell // Adjust the nInternalFaces and patch sizes accordingly label adjustInternal = 0; - labelList adjustPatchSize(patchSizes_.size(), 0); + labelList adjustPatchSize(patchSizes_.size(), Zero); label newFaceI = 0; label oldFaceI = nFaces_ - 1; @@ -1515,8 +1515,8 @@ void Foam::ccm::reader::cleanupInterfaces() // The patch sizes (and the start) will definitely change const labelList origPatchStarts(patchStartList(nInternalFaces_)); - labelList adjustPatchSize(patchSizes_.size(), 0); - labelList bafflePatchCount(patchSizes_.size(), 0); + labelList adjustPatchSize(patchSizes_.size(), Zero); + labelList bafflePatchCount(patchSizes_.size(), Zero); // The new dimensions after merging the domain interfaces: nInternalFaces_ += domInterfaces_.size(); @@ -2018,7 +2018,7 @@ void Foam::ccm::reader::mergeInplaceInterfaces() Info<< "interface merge faces:" << endl; nMergedTotal = 0; - labelList adjustPatchSize(patchSizes_.size(), 0); + labelList adjustPatchSize(patchSizes_.size(), Zero); forAll(interfacesToMerge, mergeI) { const label patch0 = interfacePatches[interfacesToMerge[mergeI]][0]; diff --git a/src/conversion/common/reader/calcPointCells.C b/src/conversion/common/reader/calcPointCells.C index 83753bc6f8bd70f90c77a75dcc49cf81b874a041..1fdc2b75a43464bb194e7f7780861cf257aa28ce 100644 --- a/src/conversion/common/reader/calcPointCells.C +++ b/src/conversion/common/reader/calcPointCells.C @@ -54,7 +54,7 @@ void Foam::meshReader::calcPointCells() const // Initialize the list of labels which will hold the count of the // actual number of cells per point during the analysis - labelList cellCount(nPoints, 0); + labelList cellCount(nPoints, Zero); // Note. Unlike the standard point-cell algorithm, which asks the cell for // the supporting point labels, we need to work based on the cell faces. diff --git a/src/conversion/common/reader/createPolyBoundary.C b/src/conversion/common/reader/createPolyBoundary.C index 645c90f6b5a7abed22eef3509d3ccc19b8395dec..dfa41789a3e39258d21a25048ccabb7075636e81 100644 --- a/src/conversion/common/reader/createPolyBoundary.C +++ b/src/conversion/common/reader/createPolyBoundary.C @@ -320,7 +320,7 @@ void Foam::meshReader::createPolyBoundary() // check the mesh for face mismatch // (faces addressed once or more than twice) - labelList markupFaces(meshFaces_.size(), 0); + labelList markupFaces(meshFaces_.size(), Zero); forAll(cellPolys_, celli) { diff --git a/src/conversion/polyDualMesh/polyDualMesh.C b/src/conversion/polyDualMesh/polyDualMesh.C index 382ae4d4451f5d6ffc34780f566619a278107cad..e22f2e646c7497d067373f47d5ddd00f2cdae79d 100644 --- a/src/conversion/polyDualMesh/polyDualMesh.C +++ b/src/conversion/polyDualMesh/polyDualMesh.C @@ -593,7 +593,7 @@ void Foam::polyDualMesh::dualPatch // 1 : done e.start() // 2 : done e.end() // 3 : done both - labelList doneEdgeSide(meshEdges.size(), 0); + labelList doneEdgeSide(meshEdges.size(), Zero); bitSet donePoint(patch.nPoints(), false); @@ -1283,7 +1283,7 @@ void Foam::polyDualMesh::calcDual // Create patches - labelList patchSizes(patches.size(), 0); + labelList patchSizes(patches.size(), Zero); forAll(dualRegion, facei) { @@ -1293,7 +1293,7 @@ void Foam::polyDualMesh::calcDual } } - labelList patchStarts(patches.size(), 0); + labelList patchStarts(patches.size(), Zero); label facei = nInternalFaces; diff --git a/src/conversion/starcd/STARCDMeshReader.C b/src/conversion/starcd/STARCDMeshReader.C index 68b3b22b3c3a252de8bb038a30122f4a00834724..f43e46418e204525245e4a379907470165496d1e 100644 --- a/src/conversion/starcd/STARCDMeshReader.C +++ b/src/conversion/starcd/STARCDMeshReader.C @@ -621,8 +621,8 @@ void Foam::fileFormats::STARCDMeshReader::readBoundary word patchType; labelList mapToFoamPatchId(1000, label(-1)); - labelList nPatchFaces(1000, label(0)); - labelList origRegion(1000, label(0)); + labelList nPatchFaces(1000, Zero); + labelList origRegion(1000, Zero); patchTypes_.setSize(1000); // diff --git a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMeshTemplates.C b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMeshTemplates.C index 6bf655a7ec36c7dca235a428bf164c47a2b3beb6..b0058bdd37537a60f9284c0e67c0b51cf541abf8 100644 --- a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMeshTemplates.C +++ b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMeshTemplates.C @@ -37,7 +37,7 @@ void Foam::dynamicRefineFvMesh::mapNewInternalFaces typedef GeometricField<T, fvsPatchField, surfaceMesh> GeoField; //- Make flat field for ease of looping - Field<T> tsFld(this->nFaces(), pTraits<T>::zero); + Field<T> tsFld(this->nFaces(), Zero); SubField<T>(tsFld, this->nInternalFaces()) = sFld.internalField(); const typename GeoField::Boundary& bFld = sFld.boundaryField(); @@ -64,7 +64,7 @@ void Foam::dynamicRefineFvMesh::mapNewInternalFaces { // Loop over all owner/neighbour cell faces // and find already mapped ones (master-faces): - T tmpValue = pTraits<T>::zero; + T tmpValue(pTraits<T>::zero); label counter = 0; const cell& ownFaces = cells[owner[facei]]; diff --git a/src/dynamicMesh/boundaryMesh/boundaryMesh.C b/src/dynamicMesh/boundaryMesh/boundaryMesh.C index 1d3a1ec3805081be041df707b26a4b4ee2b3fbd3..9bc37e6b73e8d0a2944cbe7116e098709d953621 100644 --- a/src/dynamicMesh/boundaryMesh/boundaryMesh.C +++ b/src/dynamicMesh/boundaryMesh/boundaryMesh.C @@ -1725,7 +1725,7 @@ void Foam::boundaryMesh::changeFaces // Count number of faces for each patch - labelList nFaces(patches_.size(), 0); + labelList nFaces(patches_.size(), Zero); forAll(patchIDs, facei) { diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C index b7180c770d53eced0b2ba79ab2cc533d0e92c392..db863f3b4c0a3d3d74d5045cd2275b1908113de3 100644 --- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C +++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C @@ -1437,7 +1437,7 @@ void Foam::fvMeshDistribute::sendMesh { const pointZoneMesh& pointZones = mesh.pointZones(); - labelList rowSizes(pointZoneNames.size(), 0); + labelList rowSizes(pointZoneNames.size(), Zero); forAll(pointZoneNames, nameI) { @@ -1467,7 +1467,7 @@ void Foam::fvMeshDistribute::sendMesh { const faceZoneMesh& faceZones = mesh.faceZones(); - labelList rowSizes(faceZoneNames.size(), 0); + labelList rowSizes(faceZoneNames.size(), Zero); forAll(faceZoneNames, nameI) { @@ -1499,7 +1499,7 @@ void Foam::fvMeshDistribute::sendMesh { const cellZoneMesh& cellZones = mesh.cellZones(); - labelList rowSizes(cellZoneNames.size(), 0); + labelList rowSizes(cellZoneNames.size(), Zero); forAll(cellZoneNames, nameI) { @@ -1693,7 +1693,7 @@ Foam::labelList Foam::fvMeshDistribute::countCells const labelList& distribution ) { - labelList nCells(Pstream::nProcs(), 0); + labelList nCells(Pstream::nProcs(), Zero); forAll(distribution, celli) { label newProc = distribution[celli]; diff --git a/src/dynamicMesh/fvMeshSubset/fvMeshSubset.C b/src/dynamicMesh/fvMeshSubset/fvMeshSubset.C index dbadbabc21e851f225a8974fc6cfcb206fdb1fb5..7059229ad5a4c182afe185ead2ed89be3b8ee4b1 100644 --- a/src/dynamicMesh/fvMeshSubset/fvMeshSubset.C +++ b/src/dynamicMesh/fvMeshSubset/fvMeshSubset.C @@ -357,7 +357,7 @@ void Foam::fvMeshSubset::subsetZones() // +1 : part of faceZone, flipped // -1 : ,, , unflipped // 0 : not part of faceZone - labelList zone(baseMesh().nFaces(), 0); + labelList zone(baseMesh().nFaces(), Zero); forAll(fz, j) { if (fz.flipMap()[j]) @@ -619,7 +619,7 @@ void Foam::fvMeshSubset::setCellSubset // Note that this is not really necessary - but means we can size things // correctly. Also makes handling coupled faces much easier. - labelList nCellsUsingFace(oldFaces.size(), 0); + labelList nCellsUsingFace(oldFaces.size(), Zero); label nFacesInSet = 0; forAll(oldFaces, oldFacei) @@ -707,7 +707,7 @@ void Foam::fvMeshSubset::setCellSubset globalPatchMap = identity(oldPatches.size()); } - labelList boundaryPatchSizes(nbSize, 0); + labelList boundaryPatchSizes(nbSize, Zero); // Make a global-to-local point map diff --git a/src/dynamicMesh/meshCut/cellCuts/cellCuts.C b/src/dynamicMesh/meshCut/cellCuts/cellCuts.C index 97b23b8bf79c0ee44545e1c512334d580b0975d1..52679ee06c5d8d6595522b3769e5729627662f9f 100644 --- a/src/dynamicMesh/meshCut/cellCuts/cellCuts.C +++ b/src/dynamicMesh/meshCut/cellCuts/cellCuts.C @@ -1138,7 +1138,7 @@ void Foam::cellCuts::calcCellLoops(const labelList& cutCells) // Per cell the number of faces with valid cuts. Is used as quick // rejection to see if cell can be cut. - labelList nCutFaces(mesh().nCells(), 0); + labelList nCutFaces(mesh().nCells(), Zero); forAll(allFaceCuts, facei) { diff --git a/src/dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C b/src/dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C index 814cdeffc67e141b3b0daf8fbf4b95959dd8f091..33d50bcdec1d4731ce335f36eca7d0e5b975c923 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C +++ b/src/dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C @@ -238,8 +238,8 @@ void Foam::multiDirRefinement::refineHex8 hexRef8 hexRefiner ( mesh, - labelList(mesh.nCells(), 0), // cellLevel - labelList(mesh.nPoints(), 0), // pointLevel + labelList(mesh.nCells(), Zero), // cellLevel + labelList(mesh.nPoints(), Zero), // pointLevel refinementHistory ( IOobject @@ -342,7 +342,7 @@ void Foam::multiDirRefinement::refineHex8 { addedCells_[consistentCells[i]].setSize(8); } - labelList nAddedCells(addedCells_.size(), 0); + labelList nAddedCells(addedCells_.size(), Zero); const labelList& cellMap = morphMap.cellMap(); diff --git a/src/dynamicMesh/meshCut/wallLayerCells/wallLayerCells.C b/src/dynamicMesh/meshCut/wallLayerCells/wallLayerCells.C index a4ad646e2a86482d9ae621d0014390f729c7838e..cdef0009da9a6c852d3f591e73da997555201485 100644 --- a/src/dynamicMesh/meshCut/wallLayerCells/wallLayerCells.C +++ b/src/dynamicMesh/meshCut/wallLayerCells/wallLayerCells.C @@ -170,7 +170,7 @@ Foam::wallLayerCells::wallLayerCells { const face& f = mesh.faces()[facei]; - point mid(0.0, 0.0, 0.0); + point mid(Zero); forAll(f, fp) { diff --git a/src/dynamicMesh/motionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.C b/src/dynamicMesh/motionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.C index 43703684f7d7b2d5e68d698b814be293b80ba3d7..5853f6e9517d96ed61a0164932b6792912459743 100644 --- a/src/dynamicMesh/motionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.C +++ b/src/dynamicMesh/motionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.C @@ -239,7 +239,7 @@ void Foam::displacementInterpolationMotionSolver::calcInterpolation() // ~~~~~~~~~~~~~~~ // Count all the points inbetween rangeI and rangeI+1 - labelList nRangePoints(rangeToCoord.size(), 0); + labelList nRangePoints(rangeToCoord.size(), Zero); forAll(meshCoords, pointi) { diff --git a/src/dynamicMesh/polyMeshAdder/polyMeshAdder.C b/src/dynamicMesh/polyMeshAdder/polyMeshAdder.C index 0540f5ee8d1cb3fe3eb0c23ad71aad7c5f82f8fa..96675a10127d5408d4ed6ce3addedcdc52ebb001 100644 --- a/src/dynamicMesh/polyMeshAdder/polyMeshAdder.C +++ b/src/dynamicMesh/polyMeshAdder/polyMeshAdder.C @@ -949,7 +949,7 @@ void Foam::polyMeshAdder::mergePointZones // Extract back into zones // 1. Count - labelList nPoints(zoneNames.size(), 0); + labelList nPoints(zoneNames.size(), Zero); forAll(pointToZone, allPointi) { label zoneI = pointToZone[allPointi]; @@ -1127,7 +1127,7 @@ void Foam::polyMeshAdder::mergeFaceZones // Extract back into zones // 1. Count - labelList nFaces(zoneNames.size(), 0); + labelList nFaces(zoneNames.size(), Zero); forAll(faceToZone, allFacei) { label zoneI = faceToZone[allFacei]; @@ -1271,7 +1271,7 @@ void Foam::polyMeshAdder::mergeCellZones // Extract back into zones // 1. Count - labelList nCells(zoneNames.size(), 0); + labelList nCells(zoneNames.size(), Zero); forAll(cellToZone, allCelli) { label zoneI = cellToZone[allCelli]; @@ -1506,7 +1506,7 @@ Foam::autoPtr<Foam::polyMesh> Foam::polyMeshAdder::add label nCells; // Sizes per patch - labelList nFaces(allPatchNames.size(), 0); + labelList nFaces(allPatchNames.size(), Zero); // Maps labelList from0ToAllFaces(mesh0.nFaces(), -1); @@ -1720,7 +1720,7 @@ Foam::autoPtr<Foam::mapAddedPolyMesh> Foam::polyMeshAdder::add labelList allNeighbour; label nInternalFaces; // Sizes per patch - labelList nFaces(allPatchNames.size(), 0); + labelList nFaces(allPatchNames.size(), Zero); label nCells; // Maps diff --git a/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C b/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C index 519d11c34c4b869cff58913e6a05bcc9fbb3e569..0c336d4d7069d100bcb42ab39eca20036130d4da 100644 --- a/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C +++ b/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C @@ -108,7 +108,7 @@ Foam::label Foam::polyMeshFilter::filterFacesLoop(const label nOriginalBadFaces) label nOuterIterations = 0; // Maintain the number of times a point has been part of a bad face - labelList pointErrorCount(mesh_.nPoints(), 0); + labelList pointErrorCount(mesh_.nPoints(), Zero); bitSet newErrorPoint(mesh_.nPoints()); edgeCollapser::checkMeshQuality @@ -1011,7 +1011,7 @@ Foam::label Foam::polyMeshFilter::filterEdges minEdgeLen_.resize(mesh_.nEdges(), minLen()); faceFilterFactor_.resize(0); - labelList pointErrorCount(mesh_.nPoints(), 0); + labelList pointErrorCount(mesh_.nPoints(), Zero); // Main loop // ~~~~~~~~~ diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C index 50e10cf9997a891c9d27a1fe85848d22d65b0c18..f26611918834b9e8afcaa1e192bfbb7ef1c30536 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C @@ -1112,7 +1112,7 @@ void Foam::addPatchCellLayer::setRefinement // ~~~~~~~~~~~~~~~~~~~~~ { - labelList n(mesh_.nPoints(), 0); + labelList n(mesh_.nPoints(), Zero); labelUIndList(n, meshPoints) = nPointLayers; syncTools::syncPointList(mesh_, n, maxEqOp<label>(), label(0)); @@ -1136,7 +1136,7 @@ void Foam::addPatchCellLayer::setRefinement // Check that nPointLayers equals the max layers of connected faces // (or 0). Anything else makes no sense. - labelList nFromFace(mesh_.nPoints(), 0); + labelList nFromFace(mesh_.nPoints(), Zero); forAll(nFaceLayers, i) { const face& f = pp[i]; diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.C index 34ad10fde8e215160c94a61548e906b609599215..5532092b7061bda92af98e5375a510e6bb50aa41 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.C @@ -558,7 +558,7 @@ void Foam::combineFaces::setRefinement } // Running count of number of faces using a point - labelList nPointFaces(mesh_.nPoints(), 0); + labelList nPointFaces(mesh_.nPoints(), Zero); const labelListList& pointFaces = mesh_.pointFaces(); diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C index f535a71cd4a438ee53555e343d41190b11e9dec8..b536f41de0a73a938f6349f7d216760e8fc79aa9 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C @@ -1939,7 +1939,7 @@ Foam::hexRef8::hexRef8(const polyMesh& mesh, const bool readHistory) IOobject::READ_IF_PRESENT, IOobject::NO_WRITE ), - labelList(mesh_.nCells(), 0) + labelList(mesh_.nCells(), Zero) ), pointLevel_ ( @@ -1952,7 +1952,7 @@ Foam::hexRef8::hexRef8(const polyMesh& mesh, const bool readHistory) IOobject::READ_IF_PRESENT, IOobject::NO_WRITE ), - labelList(mesh_.nPoints(), 0) + labelList(mesh_.nPoints(), Zero) ), level0Edge_ ( @@ -2553,7 +2553,7 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement // Determine per point the max cell level. (done as count, not // as cell level purely for ease) - labelList maxPointCount(mesh_.nPoints(), 0); + labelList maxPointCount(mesh_.nPoints(), Zero); forAll(maxPointCount, pointi) { @@ -3624,7 +3624,7 @@ Foam::labelListList Foam::hexRef8::setRefinement labelListList cellAnchorPoints(mesh_.nCells()); { - labelList nAnchorPoints(mesh_.nCells(), 0); + labelList nAnchorPoints(mesh_.nCells(), Zero); forAll(cellMidPoint, celli) { @@ -4882,7 +4882,7 @@ void Foam::hexRef8::checkRefinementLevels if (maxPointDiff != -1) { // Determine per point the max cell level. - labelList maxPointLevel(mesh_.nPoints(), 0); + labelList maxPointLevel(mesh_.nPoints(), Zero); forAll(maxPointLevel, pointi) { @@ -5091,7 +5091,7 @@ Foam::labelList Foam::hexRef8::getSplitPoints() const // -2 certainly not split point // >= label of master cell labelList splitMaster(mesh_.nPoints(), -1); - labelList splitMasterLevel(mesh_.nPoints(), 0); + labelList splitMasterLevel(mesh_.nPoints(), Zero); // Unmark all with not 8 cells //const labelListList& pointCells = mesh_.pointCells(); diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8Data.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8Data.C index b05d58a6c77624cfa20fb3316e1bd0c8f1169803..9c1d1cfd0160bf4cc58f524857c287b476c9f13f 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8Data.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8Data.C @@ -261,7 +261,10 @@ void Foam::hexRef8Data::sync(const IOobject& io) IOobject rio(io); rio.rename("cellLevel"); rio.readOpt() = IOobject::NO_READ; - cellLevelPtr_.reset(new labelIOList(rio, labelList(mesh.nCells(), 0))); + cellLevelPtr_.reset + ( + new labelIOList(rio, labelList(mesh.nCells(), Zero)) + ); } bool hasPointLevel = returnReduce(pointLevelPtr_.valid(), orOp<bool>()); @@ -272,7 +275,7 @@ void Foam::hexRef8Data::sync(const IOobject& io) rio.readOpt() = IOobject::NO_READ; pointLevelPtr_.reset ( - new labelIOList(rio, labelList(mesh.nPoints(), 0)) + new labelIOList(rio, labelList(mesh.nPoints(), Zero)) ); } diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C index 7cd1614e68ddce73e48b3096a76d8c36bee395a8..9e1d3d55d7568d57dfb9928bc7a8278e4e29f6e1 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C @@ -1028,7 +1028,7 @@ Foam::autoPtr<Foam::refinementHistory> Foam::refinementHistory::clone if (active_) { // Mark selected cells with '1' - labelList decomposition(visibleCells_.size(), 0); + labelList decomposition(visibleCells_.size(), Zero); forAll(cellMap, i) { decomposition[cellMap[i]] = 1; @@ -1039,7 +1039,7 @@ Foam::autoPtr<Foam::refinementHistory> Foam::refinementHistory::clone labelList splitCellProc(splitCells_.size(), -1); // Per splitCell entry the number of live cells that move to that // processor - labelList splitCellNum(splitCells_.size(), 0); + labelList splitCellNum(splitCells_.size(), Zero); forAll(visibleCells_, cellI) { @@ -1283,7 +1283,7 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map) // Per splitCell entry the processor it moves to labelList splitCellProc(splitCells_.size(), -1); // Per splitCell entry the number of live cells that move to that processor - labelList splitCellNum(splitCells_.size(), 0); + labelList splitCellNum(splitCells_.size(), Zero); forAll(visibleCells_, celli) { diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C index 3a3942120fe1e835fc5c8b476d5b9df950417dc5..c689ba3d252c8316d7651311097babb441abf210 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C @@ -456,7 +456,7 @@ void Foam::polyTopoChange::makeCells cellFaceOffsets.setSize(cellMap_.size() + 1); // Faces per cell - labelList nNbrs(cellMap_.size(), 0); + labelList nNbrs(cellMap_.size(), Zero); // 1. Count faces per cell @@ -539,7 +539,7 @@ void Foam::polyTopoChange::makeCellCells ) const { // Neighbours per cell - labelList nNbrs(cellMap_.size(), 0); + labelList nNbrs(cellMap_.size(), Zero); // 1. Count neighbours (through internal faces) per cell @@ -1543,7 +1543,7 @@ void Foam::polyTopoChange::resetZones // Count points per zone - labelList nPoints(pointZones.size(), 0); + labelList nPoints(pointZones.size(), Zero); forAllConstIters(pointZone_, iter) { @@ -1629,7 +1629,7 @@ void Foam::polyTopoChange::resetZones { const faceZoneMesh& faceZones = mesh.faceZones(); - labelList nFaces(faceZones.size(), 0); + labelList nFaces(faceZones.size(), Zero); forAllConstIters(faceZone_, iter) { @@ -1744,7 +1744,7 @@ void Foam::polyTopoChange::resetZones { const cellZoneMesh& cellZones = mesh.cellZones(); - labelList nCells(cellZones.size(), 0); + labelList nCells(cellZones.size(), Zero); forAll(cellZone_, celli) { @@ -1885,7 +1885,7 @@ void Foam::polyTopoChange::reorderCoupledFaces labelList oldToNew(identity(faces_.size())); // Rotation on new faces. - labelList rotation(faces_.size(), 0); + labelList rotation(faces_.size(), Zero); PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking); @@ -1925,7 +1925,7 @@ void Foam::polyTopoChange::reorderCoupledFaces if (syncParallel || !isA<processorPolyPatch>(boundary[patchi])) { labelList patchFaceMap(patchSizes[patchi], -1); - labelList patchFaceRotation(patchSizes[patchi], 0); + labelList patchFaceRotation(patchSizes[patchi], Zero); const bool changed = boundary[patchi].order ( diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.C index 2e6244fe371e161ae1383ed884f6e44b4fb784c9..7fee1204f4f03ba455d133291cb861c3afb711c6 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.C @@ -99,7 +99,7 @@ Foam::labelList Foam::removeCells::getExposedFaces const labelList& faceNeighbour = mesh_.faceNeighbour(); // Count cells using face. - labelList nCellsUsingFace(mesh_.nFaces(), 0); + labelList nCellsUsingFace(mesh_.nFaces(), Zero); for (label facei = 0; facei < mesh_.nInternalFaces(); ++facei) { @@ -264,7 +264,7 @@ void Foam::removeCells::setRefinement // Count starting number of faces using each point. // Update whenever removing a face. - labelList nFacesUsingPoint(mesh_.nPoints(), 0); + labelList nFacesUsingPoint(mesh_.nPoints(), Zero); for (const face& f : faces) { diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.C index 496188b2ad98c68ee816a4d68212b4733168f4a8..9131c6234c1623d064209db0b45cd9d46b4f905e 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.C @@ -689,7 +689,7 @@ Foam::label Foam::removeFaces::compatibleRemoves // - master is lowest numbered in any region // - regions have more than 1 cell { - labelList nCells(regionMaster.size(), 0); + labelList nCells(regionMaster.size(), Zero); forAll(cellRegion, celli) { diff --git a/src/engine/engineMesh/fvMotionSolverEngineMesh/fvMotionSolverEngineMesh.C b/src/engine/engineMesh/fvMotionSolverEngineMesh/fvMotionSolverEngineMesh.C index 7a9100e3cc9b8a4e70b16bfea9cfe496337fa39a..60de98d0e2e2933b842fa9aec62f5e0040f2192b 100644 --- a/src/engine/engineMesh/fvMotionSolverEngineMesh/fvMotionSolverEngineMesh.C +++ b/src/engine/engineMesh/fvMotionSolverEngineMesh/fvMotionSolverEngineMesh.C @@ -42,7 +42,7 @@ namespace Foam Foam::fvMotionSolverEngineMesh::fvMotionSolverEngineMesh(const IOobject& io) : engineMesh(io), - pistonLayers_("pistonLayers", dimLength, 0.0), + pistonLayers_("pistonLayers", dimLength, Zero), motionSolver_ ( *this, diff --git a/src/engine/engineMesh/layeredEngineMesh/layeredEngineMesh.C b/src/engine/engineMesh/layeredEngineMesh/layeredEngineMesh.C index cd09b47d42ef8eee732b46fb03f453a6fca20746..2824b1339ccc5ec345aa74d830069f99f99b041b 100644 --- a/src/engine/engineMesh/layeredEngineMesh/layeredEngineMesh.C +++ b/src/engine/engineMesh/layeredEngineMesh/layeredEngineMesh.C @@ -42,7 +42,7 @@ namespace Foam Foam::layeredEngineMesh::layeredEngineMesh(const IOobject& io) : engineMesh(io), - pistonLayers_("pistonLayers", dimLength, 0.0) + pistonLayers_("pistonLayers", dimLength, Zero) { engineDB_.engineDict().readIfPresent("pistonLayers", pistonLayers_); } diff --git a/src/finiteArea/faMatrices/faMatrix/faMatrix.C b/src/finiteArea/faMatrices/faMatrix/faMatrix.C index af6493cce3282a6fdf32f277d1a637feb8cf027b..3e6b77dc2a7808d2fd00431dcfaf13d9b06a17c3 100644 --- a/src/finiteArea/faMatrices/faMatrix/faMatrix.C +++ b/src/finiteArea/faMatrices/faMatrix/faMatrix.C @@ -185,7 +185,7 @@ Foam::faMatrix<Type>::faMatrix lduMatrix(psi.mesh()), psi_(psi), dimensions_(ds), - source_(psi.size(), pTraits<Type>::zero), + source_(psi.size(), Zero), internalCoeffs_(psi.mesh().boundary().size()), boundaryCoeffs_(psi.mesh().boundary().size()), faceFluxCorrectionPtr_(nullptr) @@ -203,7 +203,7 @@ Foam::faMatrix<Type>::faMatrix new Field<Type> ( psi.mesh().boundary()[patchI].size(), - pTraits<Type>::zero + Zero ) ); @@ -213,7 +213,7 @@ Foam::faMatrix<Type>::faMatrix new Field<Type> ( psi.mesh().boundary()[patchI].size(), - pTraits<Type>::zero + Zero ) ); } @@ -283,7 +283,7 @@ Foam::faMatrix<Type>::faMatrix new Field<Type> ( psi.mesh().boundary()[patchI].size(), - pTraits<Type>::zero + Zero ) ); @@ -293,7 +293,7 @@ Foam::faMatrix<Type>::faMatrix new Field<Type> ( psi.mesh().boundary()[patchI].size(), - pTraits<Type>::zero + Zero ) ); } @@ -454,7 +454,7 @@ void Foam::faMatrix<Type>::relax(const scalar alpha) scalarField D0(D); // Calculate the sum-mag off-diagonal from the interior faces - scalarField sumOff(D.size(), 0.0); + scalarField sumOff(D.size(), Zero); sumMagOffDiag(sumOff); // Handle the boundary contributions to the diagonal @@ -606,7 +606,7 @@ Foam::faMatrix<Type>::H() const { scalarField psiCmpt(psi_.primitiveField().component(cmpt)); - scalarField boundaryDiagCmpt(psi_.size(), 0.0); + scalarField boundaryDiagCmpt(psi_.size(), Zero); addBoundaryDiag(boundaryDiagCmpt, cmpt); boundaryDiagCmpt.negate(); addCmptAvBoundaryDiag(boundaryDiagCmpt); diff --git a/src/finiteArea/faMatrices/faMatrix/faMatrixSolve.C b/src/finiteArea/faMatrices/faMatrix/faMatrixSolve.C index 1a1e0f697911e590f4bb8c7b380a9cd72ea6fe14..574227b89e0e774a950ecc69400299c526861cfc 100644 --- a/src/finiteArea/faMatrices/faMatrix/faMatrixSolve.C +++ b/src/finiteArea/faMatrices/faMatrix/faMatrixSolve.C @@ -179,7 +179,7 @@ Foam::tmp<Foam::Field<Type>> Foam::faMatrix<Type>::residual() const { scalarField psiCmpt(psi_.internalField().component(cmpt)); - scalarField boundaryDiagCmpt(psi_.size(), 0.0); + scalarField boundaryDiagCmpt(psi_.size(), Zero); addBoundaryDiag(boundaryDiagCmpt, cmpt); FieldField<Field, scalar> bouCoeffsCmpt diff --git a/src/finiteArea/faMatrices/faScalarMatrix/faScalarMatrix.C b/src/finiteArea/faMatrices/faScalarMatrix/faScalarMatrix.C index 8b30c3a5d29225a4662e335f1066016146615935..df469cc1e12ad81d598ed7a8d6167d48d11181b2 100644 --- a/src/finiteArea/faMatrices/faScalarMatrix/faScalarMatrix.C +++ b/src/finiteArea/faMatrices/faScalarMatrix/faScalarMatrix.C @@ -98,7 +98,7 @@ Foam::solverPerformance Foam::faMatrix<Foam::scalar>::solve template<> Foam::tmp<Foam::scalarField> Foam::faMatrix<Foam::scalar>::residual() const { - scalarField boundaryDiag(psi_.size(), 0.0); + scalarField boundaryDiag(psi_.size(), Zero); addBoundaryDiag(boundaryDiag, 0); tmp<scalarField> tres diff --git a/src/finiteArea/faMesh/faGlobalMeshData/faGlobalMeshData.C b/src/finiteArea/faMesh/faGlobalMeshData/faGlobalMeshData.C index e78e5d6be9fa42b93b57de416a45ff13e2e610f1..fb2d47508025242716e17cbd477e63fdca79651f 100644 --- a/src/finiteArea/faMesh/faGlobalMeshData/faGlobalMeshData.C +++ b/src/finiteArea/faMesh/faGlobalMeshData/faGlobalMeshData.C @@ -75,7 +75,7 @@ void Foam::faGlobalMeshData::updateMesh() labelHashSet sharedPointLabels; - labelField globalList(polyMeshNGlobalPoints, 0); + labelField globalList(polyMeshNGlobalPoints, Zero); forAll(mesh_.boundary(), patchI) { diff --git a/src/finiteArea/faMesh/faMeshDemandDrivenData.C b/src/finiteArea/faMesh/faMeshDemandDrivenData.C index 4ca4942cf132a51ff9bb3c776e726173606416af..9a0122ea393846a04e651c414dd4c9d29e248a88 100644 --- a/src/finiteArea/faMesh/faMeshDemandDrivenData.C +++ b/src/finiteArea/faMesh/faMeshDemandDrivenData.C @@ -487,7 +487,7 @@ void Foam::faMesh::calcEdgeAreaNormals() const // // Primitive patch edge normals // const labelListList& patchPointEdges = patch().pointEdges(); -// vectorField patchEdgeNormals(nEdges(), vector::zero); +// vectorField patchEdgeNormals(nEdges(), Zero); // forAll(pointNormals, pointI) // { @@ -920,7 +920,7 @@ void Foam::faMesh::calcPointAreaNormals() const } - pointAreaNormalsPtr_ = new vectorField(nPoints(), vector::zero); + pointAreaNormalsPtr_ = new vectorField(nPoints(), Zero); vectorField& result = *pointAreaNormalsPtr_; @@ -1075,7 +1075,7 @@ void Foam::faMesh::calcPointAreaNormals() const vectorField patchPointNormals ( patchPointLabels.size(), - vector::zero + Zero ); forAll(patchPointNormals, pointI) @@ -1096,7 +1096,7 @@ void Foam::faMesh::calcPointAreaNormals() const vectorField ngbPatchPointNormals ( procPatch.neighbPoints().size(), - vector::zero + Zero ); { @@ -1126,7 +1126,7 @@ void Foam::faMesh::calcPointAreaNormals() const { const labelList& spLabels(globalData().sharedPointLabels()); - vectorField spNormals(spLabels.size(), vector::zero); + vectorField spNormals(spLabels.size(), Zero); forAll(spNormals, pointI) { spNormals[pointI] = result[spLabels[pointI]]; @@ -1137,7 +1137,7 @@ void Foam::faMesh::calcPointAreaNormals() const vectorField gpNormals ( globalData().nGlobalPoints(), - vector::zero + Zero ); forAll(addr, i) @@ -1308,7 +1308,7 @@ void Foam::faMesh::calcPointAreaNormalsByQuadricsFit() const M[i][4] = allPoints[i].y(); } - scalarSquareMatrix MtM(5, 0.0); + scalarSquareMatrix MtM(5, Zero); for (label i = 0; i < MtM.n(); ++i) { @@ -1321,7 +1321,7 @@ void Foam::faMesh::calcPointAreaNormalsByQuadricsFit() const } } - scalarField MtR(5, 0); + scalarField MtR(5, Zero); for (label i=0; i<MtR.size(); ++i) { @@ -1354,11 +1354,11 @@ void Foam::faMesh::calcPointAreaNormalsByQuadricsFit() const const labelList& patchPointLabels = procPatch.pointLabels(); - labelList toNgbProcLsPointStarts(patchPointLabels.size(), 0); + labelList toNgbProcLsPointStarts(patchPointLabels.size(), Zero); vectorField toNgbProcLsPoints ( 10*patchPointLabels.size(), - vector::zero + Zero ); label nPoints = 0; @@ -1422,7 +1422,7 @@ void Foam::faMesh::calcPointAreaNormalsByQuadricsFit() const const labelList& patchPointLabels = procPatch.pointLabels(); - labelList fromNgbProcLsPointStarts(patchPointLabels.size(), 0); + labelList fromNgbProcLsPointStarts(patchPointLabels.size(), Zero); vectorField fromNgbProcLsPoints; { @@ -1520,7 +1520,7 @@ void Foam::faMesh::calcPointAreaNormalsByQuadricsFit() const } // Remove duplicate points - vectorField allPoints(nAllPoints, vector::zero); + vectorField allPoints(nAllPoints, Zero); boundBox bb(allPointsExt, false); scalar tol = 0.001*mag(bb.max() - bb.min()); @@ -1595,7 +1595,7 @@ void Foam::faMesh::calcPointAreaNormalsByQuadricsFit() const M[i][4] = allPoints[i].y(); } - scalarSquareMatrix MtM(5, 0.0); + scalarSquareMatrix MtM(5, Zero); for (label i = 0; i < MtM.n(); ++i) { @@ -1608,7 +1608,7 @@ void Foam::faMesh::calcPointAreaNormalsByQuadricsFit() const } } - scalarField MtR(5, 0); + scalarField MtR(5, Zero); for (label i = 0; i < MtR.size(); ++i) { @@ -1690,7 +1690,7 @@ void Foam::faMesh::calcPointAreaNormalsByQuadricsFit() const nAllPoints += procLsPoints[procI].size(); } - vectorField allPoints(nAllPoints, vector::zero); + vectorField allPoints(nAllPoints, Zero); nAllPoints = 0; forAll(procLsPoints, procI) @@ -1768,7 +1768,7 @@ void Foam::faMesh::calcPointAreaNormalsByQuadricsFit() const M[i][4] = allPoints[i].y(); } - scalarSquareMatrix MtM(5, 0.0); + scalarSquareMatrix MtM(5, Zero); for (label i = 0; i < MtM.n(); ++i) { for (label j = 0; j < MtM.m(); ++j) @@ -1780,7 +1780,7 @@ void Foam::faMesh::calcPointAreaNormalsByQuadricsFit() const } } - scalarField MtR(5, 0); + scalarField MtR(5, Zero); for (label i = 0; i < MtR.size(); ++i) { for (label j = 0; j < M.n(); ++j) diff --git a/src/finiteArea/faMesh/faMeshMapper/faEdgeMapper.C b/src/finiteArea/faMesh/faMeshMapper/faEdgeMapper.C index f0095149dbf0c429d6fb667d561fca53d42db94c..0cf1fec4504f1a0883067a95d593382ae580ea4e 100644 --- a/src/finiteArea/faMesh/faMeshMapper/faEdgeMapper.C +++ b/src/finiteArea/faMesh/faMeshMapper/faEdgeMapper.C @@ -45,7 +45,7 @@ void Foam::faEdgeMapper::calcAddressing() const hasUnmapped_ = false; // Dummy mapping: take value from edge 0 - directAddrPtr_ = new labelList(size(), 0); + directAddrPtr_ = new labelList(size(), Zero); } diff --git a/src/finiteArea/faMesh/faMeshMapper/faPatchMapper.C b/src/finiteArea/faMesh/faMeshMapper/faPatchMapper.C index f8028c4895530f8ddb5ea5e600d60560990857c4..5c536ffc9943f3e4c7b2c5526121644695c71705 100644 --- a/src/finiteArea/faMesh/faMeshMapper/faPatchMapper.C +++ b/src/finiteArea/faMesh/faMeshMapper/faPatchMapper.C @@ -46,7 +46,7 @@ void Foam::faPatchMapper::calcAddressing() const // Compatibility change HJ, 12/Aug/2017 hasUnmapped_ = false; - directAddrPtr_ = new labelList(patch_.size(), 0); + directAddrPtr_ = new labelList(patch_.size(), Zero); labelList& addr = *directAddrPtr_; // Make a map of old edgeFaces, giving edge index in patch given the new diff --git a/src/finiteArea/faMesh/faPatches/faPatch/faPatch.C b/src/finiteArea/faMesh/faPatches/faPatch/faPatch.C index 8c64de4c8a6012a7dffff4e4cf62ffdcab0997c9..33900b98ac73b568a977bf3fd638841d743a6451 100644 --- a/src/finiteArea/faMesh/faPatches/faPatch/faPatch.C +++ b/src/finiteArea/faMesh/faPatches/faPatch/faPatch.C @@ -341,7 +341,7 @@ Foam::tmp<Foam::vectorField> Foam::faPatch::ngbPolyPatchPointNormals() const const labelListList& pntEdges = pointEdges(); - tmp<vectorField> tpN(new vectorField(pntEdges.size(), vector::zero)); + tmp<vectorField> tpN(new vectorField(pntEdges.size(), Zero)); vectorField& pN = tpN.ref(); const vectorField faceNormals(ngbPolyPatchFaceNormals()); diff --git a/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchField.C b/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchField.C index 415ef4341737b88e23af44d554e2b4719aba3c45..ff2f4262a73f521ca30c428aeb78b5cc8ca5ce1e 100644 --- a/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchField.C +++ b/src/finiteArea/fields/faPatchFields/basic/fixedGradient/fixedGradientFaPatchField.C @@ -37,7 +37,7 @@ Foam::fixedGradientFaPatchField<Type>::fixedGradientFaPatchField ) : faPatchField<Type>(p, iF), - gradient_(p.size(), pTraits<Type>::zero) + gradient_(p.size(), Zero) {} @@ -165,7 +165,7 @@ template<class Type> Foam::tmp<Foam::Field<Type>> Foam::fixedGradientFaPatchField<Type>::gradientInternalCoeffs() const { - return tmp<Field<Type>>::New(this->size(), pTraits<Type>::zero); + return tmp<Field<Type>>::New(this->size(), Zero); } diff --git a/src/finiteArea/fields/faPatchFields/basic/fixedValue/fixedValueFaPatchField.C b/src/finiteArea/fields/faPatchFields/basic/fixedValue/fixedValueFaPatchField.C index a430aae81a285840d55f1157cb81c1769a8ebf05..0da603500b3d86e48ea1d26b266dd0af43387a34 100644 --- a/src/finiteArea/fields/faPatchFields/basic/fixedValue/fixedValueFaPatchField.C +++ b/src/finiteArea/fields/faPatchFields/basic/fixedValue/fixedValueFaPatchField.C @@ -97,7 +97,7 @@ Foam::fixedValueFaPatchField<Type>::valueInternalCoeffs { return tmp<Field<Type>> ( - new Field<Type>(this->size(), pTraits<Type>::zero) + new Field<Type>(this->size(), Zero) ); } diff --git a/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchField.C b/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchField.C index a792decf19f04dd04f8e2eec0060b4c5500d3fa7..15bda7ceffe1e37a49078f6cddbcc6b14e9aecf3 100644 --- a/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchField.C +++ b/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchField.C @@ -113,7 +113,7 @@ Foam::zeroGradientFaPatchField<Type>::valueInternalCoeffs { return tmp<Field<Type>> ( - new Field<Type>(this->size(), pTraits<Type>::one) + new Field<Type>(this->size(), Zero) ); } @@ -127,7 +127,7 @@ Foam::zeroGradientFaPatchField<Type>::valueBoundaryCoeffs { return tmp<Field<Type>> ( - new Field<Type>(this->size(), pTraits<Type>::zero) + new Field<Type>(this->size(), Zero) ); } @@ -138,7 +138,7 @@ Foam::zeroGradientFaPatchField<Type>::gradientInternalCoeffs() const { return tmp<Field<Type>> ( - new Field<Type>(this->size(), pTraits<Type>::zero) + new Field<Type>(this->size(), Zero) ); } @@ -149,7 +149,7 @@ Foam::zeroGradientFaPatchField<Type>::gradientBoundaryCoeffs() const { return tmp<Field<Type>> ( - new Field<Type>(this->size(), pTraits<Type>::zero) + new Field<Type>(this->size(), Zero) ); } diff --git a/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchField.H b/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchField.H index 5130a94875906e4f29780965ad7d1de0030b8c66..9860fb1f057ba5df834691f296a4e3de44b16496 100644 --- a/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchField.H +++ b/src/finiteArea/fields/faPatchFields/basic/zeroGradient/zeroGradientFaPatchField.H @@ -139,7 +139,7 @@ public: { return tmp<Field<Type>> ( - new Field<Type>(this->size(), pTraits<Type>::zero) + new Field<Type>(this->size(), Zero) ); } diff --git a/src/finiteArea/finiteArea/d2dt2Schemes/EulerFaD2dt2Scheme/EulerFaD2dt2Scheme.C b/src/finiteArea/finiteArea/d2dt2Schemes/EulerFaD2dt2Scheme/EulerFaD2dt2Scheme.C index a7425ea7f6f8464ced75db139d1bd634f087fee7..48bbee530d0042d6fc86e674d5bc140aa2924782 100644 --- a/src/finiteArea/finiteArea/d2dt2Schemes/EulerFaD2dt2Scheme/EulerFaD2dt2Scheme.C +++ b/src/finiteArea/finiteArea/d2dt2Schemes/EulerFaD2dt2Scheme/EulerFaD2dt2Scheme.C @@ -95,12 +95,7 @@ EulerFaD2dt2Scheme<Type>::facD2dt2 ( d2dt2IOobject, mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime/dimTime, - pTraits<Type>::zero - ) + dimensioned<Type>(dt.dimensions()/dimTime/dimTime, Zero) ) ); @@ -119,12 +114,7 @@ EulerFaD2dt2Scheme<Type>::facD2dt2 ( d2dt2IOobject, mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime/dimTime, - pTraits<Type>::zero - ), + dimensioned<Type>(dt.dimensions()/dimTime/dimTime, Zero), calculatedFaPatchField<Type>::typeName ) ); diff --git a/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.C b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.C index 2fc9005811dc2c0b296fbe47792b7282c229c7ae..f9bed1821c8cc121e3de64674a6b837cbcd334eb 100644 --- a/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.C +++ b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.C @@ -109,7 +109,7 @@ void Foam::leastSquaresFaVectors::makeLeastSquaresVectors() const // Set up temporary storage for the dd tensor (before inversion) - symmTensorField dd(mesh().nFaces(), symmTensor::zero); + symmTensorField dd(mesh().nFaces(), Zero); forAll(owner, facei) { diff --git a/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolation.C b/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolation.C index 692d6f79f971b0b08fb9602f9b1b49a1522eac56..8b8e862253b0d8bb7a4e58a7cc4185e20e94d432 100644 --- a/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolation.C +++ b/src/finiteArea/interpolation/edgeInterpolation/edgeInterpolation.C @@ -237,7 +237,7 @@ void Foam::edgeInterpolation::makeLPN() const forAll(owner, edgeI) { - vector curSkewCorrVec = vector::zero; + vector curSkewCorrVec(Zero); if (skew()) { @@ -315,7 +315,7 @@ void Foam::edgeInterpolation::makeWeights() const forAll(owner, edgeI) { - vector curSkewCorrVec = vector::zero; + vector curSkewCorrVec(Zero); if (skew()) { @@ -417,7 +417,7 @@ void Foam::edgeInterpolation::makeDeltaCoeffs() const // Calc PN arc length - vector curSkewCorrVec = vector::zero; + vector curSkewCorrVec(Zero); if (skew()) { diff --git a/src/finiteArea/interpolation/edgeInterpolation/schemes/NVDscheme/faNVDscheme.C b/src/finiteArea/interpolation/edgeInterpolation/schemes/NVDscheme/faNVDscheme.C index 5b457ccdd1103eb3bd17e20256a53d759576ad1a..a9cbcb93def6b46c9519730110c47e0c50e1f331 100644 --- a/src/finiteArea/interpolation/edgeInterpolation/schemes/NVDscheme/faNVDscheme.C +++ b/src/finiteArea/interpolation/edgeInterpolation/schemes/NVDscheme/faNVDscheme.C @@ -94,7 +94,7 @@ Foam::tmp<Foam::edgeScalarField> Foam::faNVDscheme<Type,NVDweight>::weights forAll(weights, edge) { - vector d = vector::zero; + vector d(Zero); if (edgeFlux_[edge] > 0) { @@ -178,7 +178,7 @@ Foam::tmp<Foam::edgeScalarField> Foam::faNVDscheme<Type,NVDweight>::weights forAll(pWeights, edgeI) { - vector d = vector::zero; + vector d(Zero); if (pEdgeFlux[edgeI] > 0) { diff --git a/src/finiteArea/interpolation/volSurfaceMapping/volSurfaceMapping.C b/src/finiteArea/interpolation/volSurfaceMapping/volSurfaceMapping.C index 14b13ed61053895a51b70535215706d6785e1d94..c40b9470ded65fbe74c459f31675d47f85b4ea6d 100644 --- a/src/finiteArea/interpolation/volSurfaceMapping/volSurfaceMapping.C +++ b/src/finiteArea/interpolation/volSurfaceMapping/volSurfaceMapping.C @@ -40,11 +40,7 @@ Foam::tmp<Foam::Field<Type>> Foam::volSurfaceMapping::mapToSurface tmp<Field<Type>> tresult ( - new Field<Type> - ( - faceLabels.size(), - pTraits<Type>::zero - ) + new Field<Type>(faceLabels.size(), Zero) ); Field<Type>& result = tresult.ref(); diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZone.C b/src/finiteVolume/cfdTools/general/MRF/MRFZone.C index 69bb43ebe8ebd99e6607507f77534cd673715cd7..8ed903e3093ddbcb3f0a213bb3defdb177626a61 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZone.C +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZone.C @@ -50,7 +50,7 @@ void Foam::MRFZone::setMRFFaces() // 0:not in zone // 1:moving with frame // 2:other - labelList faceType(mesh_.nFaces(), 0); + labelList faceType(mesh_.nFaces(), Zero); // Determine faces in cell zone // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -140,8 +140,8 @@ void Foam::MRFZone::setMRFFaces() } internalFaces_.setSize(nInternal); - labelList nIncludedFaces(patches.size(), 0); - labelList nExcludedFaces(patches.size(), 0); + labelList nIncludedFaces(patches.size(), Zero); + labelList nExcludedFaces(patches.size(), Zero); forAll(patches, patchi) { diff --git a/src/finiteVolume/cfdTools/general/levelSet/levelSet.C b/src/finiteVolume/cfdTools/general/levelSet/levelSet.C index 61baa44536e7c1d621cd6dcd6ece7efc4933c99b..dc2dd1c27f97fa147047f33f8e6420e9cb04a00b 100644 --- a/src/finiteVolume/cfdTools/general/levelSet/levelSet.C +++ b/src/finiteVolume/cfdTools/general/levelSet/levelSet.C @@ -110,14 +110,15 @@ Foam::tmp<Foam::scalarField> Foam::levelSetFraction const bool above ) { - tmp<scalarField> tResult(new scalarField(patch.size(), 0)); + tmp<scalarField> tResult(new scalarField(patch.size(), Zero)); scalarField& result = tResult.ref(); forAll(result, fI) { const face& f = patch.patch().localFaces()[fI]; - vector a = vector::zero, r = vector::zero; + vector a(Zero); + vector r(Zero); for (label eI = 0; eI < f.size(); ++eI) { diff --git a/src/finiteVolume/cfdTools/general/levelSet/levelSetTemplates.C b/src/finiteVolume/cfdTools/general/levelSet/levelSetTemplates.C index a3e7972fdf63b5c920f4d54475972d6be9860e01..479e3f43f4d843760ee88d487a0b2ee0683e15ad 100644 --- a/src/finiteVolume/cfdTools/general/levelSet/levelSetTemplates.C +++ b/src/finiteVolume/cfdTools/general/levelSet/levelSetTemplates.C @@ -136,10 +136,10 @@ Foam::tmp<Foam::Field<Type>> Foam::levelSetAverage { const face& f = patch.patch().localFaces()[fI]; - vector a = vector::zero; + vector a(Zero); sumType r = Zero; - for(label eI = 0; eI < f.size(); ++ eI) + for (label eI = 0; eI < f.size(); ++eI) { const edge e = f.faceEdge(eI); diff --git a/src/finiteVolume/cfdTools/general/porosityModel/fixedCoeff/fixedCoeff.C b/src/finiteVolume/cfdTools/general/porosityModel/fixedCoeff/fixedCoeff.C index cc7fb9d43f1cecf2706260d88107032652ae9f9f..1b01df5138172ed7d98c333dbc438e72da148988 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/fixedCoeff/fixedCoeff.C +++ b/src/finiteVolume/cfdTools/general/porosityModel/fixedCoeff/fixedCoeff.C @@ -175,7 +175,7 @@ void Foam::porosityModels::fixedCoeff::calcForce vectorField& force ) const { - scalarField Udiag(U.size(), 0.0); + scalarField Udiag(U.size(), Zero); vectorField Usource(U.size(), Zero); const scalarField& V = mesh_.V(); const scalar rhoRef = coeffs_.get<scalar>("rhoRef"); diff --git a/src/finiteVolume/cfdTools/general/porosityModel/powerLaw/powerLaw.C b/src/finiteVolume/cfdTools/general/porosityModel/powerLaw/powerLaw.C index d50e9bb8a6da1132bf6bd8bc4e1c2b9f1f5a7b71..6c9883bda683b83aebf93a811d9df70ec61b09d1 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/powerLaw/powerLaw.C +++ b/src/finiteVolume/cfdTools/general/porosityModel/powerLaw/powerLaw.C @@ -74,7 +74,7 @@ void Foam::porosityModels::powerLaw::calcForce vectorField& force ) const { - scalarField Udiag(U.size(), 0.0); + scalarField Udiag(U.size(), Zero); const scalarField& V = mesh_.V(); apply(Udiag, V, rho, U); diff --git a/src/finiteVolume/cfdTools/general/porosityModel/solidification/solidification.C b/src/finiteVolume/cfdTools/general/porosityModel/solidification/solidification.C index 737521805e7707723fccf58a288964ebd04ae11e..2c0a38faee625fc7c1097cc7091d416a87a4e4b2 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/solidification/solidification.C +++ b/src/finiteVolume/cfdTools/general/porosityModel/solidification/solidification.C @@ -79,7 +79,7 @@ void Foam::porosityModels::solidification::calcForce vectorField& force ) const { - scalarField Udiag(U.size(), 0.0); + scalarField Udiag(U.size(), Zero); const scalarField& V = mesh_.V(); apply(Udiag, V, rho, U); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C index 463dbda48a8d5076c028aa7801f89c9803ed4236..3ea5845fafec9071f92521a5ff5f4b117a96ff1c 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/inletOutletTotalTemperature/inletOutletTotalTemperatureFvPatchScalarField.C @@ -42,7 +42,7 @@ inletOutletTotalTemperatureFvPatchScalarField UName_("U"), psiName_("psi"), gamma_(0.0), - T0_(p.size(), 0.0) + T0_(p.size(), Zero) { this->refValue() = Zero; this->refGrad() = Zero; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C index 7c9154c0a00d14b7b3196e28d556c0af2889bbfb..c61100fc2e447a429c74b28c4a4238f05979d1ec 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C @@ -168,7 +168,7 @@ void Foam::mappedVelocityFluxFixedValueFvPatchField::updateCoeffs() case mappedPolyPatch::NEARESTFACE: { vectorField allUValues(nbrMesh.nFaces(), Zero); - scalarField allPhiValues(nbrMesh.nFaces(), 0.0); + scalarField allPhiValues(nbrMesh.nFaces(), Zero); forAll(UField.boundaryField(), patchi) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.C index 0e2d114de7ec21bf710f7868b518999d0398da41..8cca114af9768b33a13fccf881b0d8088d69bd29 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/partialSlip/partialSlipFvPatchField.C @@ -65,7 +65,7 @@ Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField ) : transformFvPatchField<Type>(p, iF), - refValue_(p.size(), pTraits<Type>::zero), + refValue_(p.size(), Zero), valueFraction_("valueFraction", dict, p.size()) { this->patchType() = dict.lookupOrDefault<word>("patchType", word::null); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C index 76521a761090c907f55e879c5f1e5b43454ba25e..9333b06adbdcb1b2168575963928cb5acebfb807 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/plenumPressure/plenumPressureFvPatchScalarField.C @@ -77,7 +77,7 @@ Foam::plenumPressureFvPatchScalarField::plenumPressureFvPatchScalarField hasRho_(false), inletAreaRatio_(dict.get<scalar>("inletAreaRatio")), inletDischargeCoefficient_(dict.get<scalar>("inletDischargeCoefficient")), - timeScale_(dict.lookupOrDefault<scalar>("timeScale", 0.0)), + timeScale_(dict.lookupOrDefault<scalar>("timeScale", 0)), phiName_(dict.lookupOrDefault<word>("phi", "phi")), UName_(dict.lookupOrDefault<word>("U", "U")) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.C index b5c8d41456edf703efb94c9e95aa913674850b90..d8303d272b2a2a3b865907cce36a6b5bdb5d9e6c 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/prghPressure/prghPressureFvPatchScalarField.C @@ -40,7 +40,7 @@ prghPressureFvPatchScalarField : fixedValueFvPatchScalarField(p, iF), rhoName_("rho"), - p_(p.size(), 0.0) + p_(p.size(), Zero) {} diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C index 3c8d1623ea1e383ef31c70d495f67ec60a952cee..6f0c39dfde071f6970160a6b74d03b6f86ed8189 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.C @@ -42,7 +42,7 @@ Foam::prghTotalPressureFvPatchScalarField::prghTotalPressureFvPatchScalarField UName_("U"), phiName_("phi"), rhoName_("rho"), - p0_(p.size(), 0.0) + p0_(p.size(), Zero) {} diff --git a/src/finiteVolume/fields/fvPatchFields/derived/swirlFanVelocity/swirlFanVelocityFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/swirlFanVelocity/swirlFanVelocityFvPatchField.C index 7275d53d9ce3fe4ff399f6c00943b01f72850cfd..253541ae394dcdfc9d4f8f1474d3224748e974a0 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/swirlFanVelocity/swirlFanVelocityFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/swirlFanVelocity/swirlFanVelocityFvPatchField.C @@ -67,7 +67,7 @@ void Foam::swirlFanVelocityFvPatchField::calcFanJump() tanDir /= (mag(tanDir) + SMALL); - scalarField magTangU(patch().size(), 0.0); + scalarField magTangU(patch().size(), Zero); if (useRealRadius_) { @@ -149,12 +149,12 @@ Foam::swirlFanVelocityFvPatchField::swirlFanVelocityFvPatchField : Zero ) ), - rpm_(dict.lookupOrDefault<scalar>("rpm", 0.0)), - rEff_(dict.lookupOrDefault<scalar>("rEff", 0.0)), - fanEff_(dict.lookupOrDefault<scalar>("fanEff", 1.0)), + rpm_(dict.lookupOrDefault<scalar>("rpm", 0)), + rEff_(dict.lookupOrDefault<scalar>("rEff", 0)), + fanEff_(dict.lookupOrDefault<scalar>("fanEff", 1)), useRealRadius_(dict.lookupOrDefault("useRealRadius", false)), - rInner_(dict.lookupOrDefault<scalar>("rInner", 0.0)), - rOuter_(dict.lookupOrDefault<scalar>("rOuter", 0.0)) + rInner_(dict.lookupOrDefault<scalar>("rInner", 0)), + rOuter_(dict.lookupOrDefault<scalar>("rOuter", 0)) {} diff --git a/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C index 38bd2597677efce2d307bd3df7c32d65205c1914..d93b4df4636669345b4605423e08ffb904dc3bfa 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/totalPressure/totalPressureFvPatchScalarField.C @@ -44,7 +44,7 @@ Foam::totalPressureFvPatchScalarField::totalPressureFvPatchScalarField rhoName_("rho"), psiName_("none"), gamma_(0.0), - p0_(p.size(), 0.0) + p0_(p.size(), Zero) {} diff --git a/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C index 6f8f3bfb3c6ba822f7396e6fbd722c4d3763ea83..ed06e0ec9cec596a0a91ba377be29e447f3a1db0 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/totalTemperature/totalTemperatureFvPatchScalarField.C @@ -42,7 +42,7 @@ Foam::totalTemperatureFvPatchScalarField::totalTemperatureFvPatchScalarField phiName_("phi"), psiName_("thermo:psi"), gamma_(0.0), - T0_(p.size(), 0.0) + T0_(p.size(), Zero) {} diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/eddy/eddy.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/eddy/eddy.C index 1883fac2787fc315b1430d1c0afd486743398861..2e6536d222d535bacdbf784bc8796c14462169dd 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/eddy/eddy.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/eddy/eddy.C @@ -112,10 +112,10 @@ bool Foam::eddy::setScales Foam::eddy::eddy() : patchFaceI_(-1), - position0_(vector::zero), + position0_(Zero), x_(0), - sigma_(vector::zero), - alpha_(vector::zero), + sigma_(Zero), + alpha_(Zero), Rpg_(tensor::I), c1_(-1), dir1_(0) @@ -135,8 +135,8 @@ Foam::eddy::eddy patchFaceI_(patchFaceI), position0_(position0), x_(x), - sigma_(vector::zero), - alpha_(vector::zero), + sigma_(Zero), + alpha_(Zero), Rpg_(tensor::I), c1_(-1), dir1_(0) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C index e22a8958330cf91d30336224d0d90f6fc80a525f..54b5bf879d3584598eef1f9d15083c5f7e356f24 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C @@ -584,7 +584,7 @@ Foam::vector Foam::turbulentDFSEMInletFvPatchVectorField::uDashEddy const point& patchFaceCf ) const { - vector uDash(vector::zero); + vector uDash(Zero); forAll(eddies, k) { @@ -740,17 +740,17 @@ turbulentDFSEMInletFvPatchVectorField L_(), interpolateU_(false), U_(), - UMean_(vector::zero), + UMean_(Zero), patchArea_(-1), triFace_(), triToFace_(), triCumulativeMagSf_(), - sumTriMagSf_(Pstream::nProcs() + 1, 0.0), + sumTriMagSf_(Pstream::nProcs() + 1, Zero), eddies_(0), nCellPerEddy_(5), - patchNormal_(vector::zero), + patchNormal_(Zero), v0_(0), rndGen_(Pstream::myProcNo()), sigmax_(size(), 0), @@ -831,20 +831,20 @@ turbulentDFSEMInletFvPatchVectorField L_(interpolateOrRead<scalar>("L", dict, interpolateL_)), interpolateU_(false), U_(interpolateOrRead<vector>("U", dict, interpolateU_)), - UMean_(vector::zero), + UMean_(Zero), patchArea_(-1), triFace_(), triToFace_(), triCumulativeMagSf_(), - sumTriMagSf_(Pstream::nProcs() + 1, 0.0), + sumTriMagSf_(Pstream::nProcs() + 1, Zero), eddies_(), nCellPerEddy_(dict.lookupOrDefault<label>("nCellPerEddy", 5)), - patchNormal_(vector::zero), + patchNormal_(Zero), v0_(0), rndGen_(0, -1), - sigmax_(size(), 0), + sigmax_(size(), Zero), maxSigmaX_(0), nEddy_(0), curTimeIndex_(-1), diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C index 73bda9c99d26b5d5bbd328d0c9e96e98337c46cc..ef46ffc2d8be49ba4daf422c7108c222444c18c4 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C @@ -48,7 +48,7 @@ void SLTSDdtScheme<Type>::relaxedDiag { const labelUList& owner = mesh().owner(); const labelUList& neighbour = mesh().neighbour(); - scalarField diag(rD.size(), 0.0); + scalarField diag(rD.size(), Zero); forAll(owner, facei) { diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/CentredFitSnGrad/CentredFitSnGradData.C b/src/finiteVolume/finiteVolume/snGradSchemes/CentredFitSnGrad/CentredFitSnGradData.C index 5c5980d9b2bb326565c7b8bd866e0ceb4cb99441..350394c16c51cdc29d82bab1e1095a7a1f0cc17e 100644 --- a/src/finiteVolume/finiteVolume/snGradSchemes/CentredFitSnGrad/CentredFitSnGradData.C +++ b/src/finiteVolume/finiteVolume/snGradSchemes/CentredFitSnGrad/CentredFitSnGradData.C @@ -97,7 +97,7 @@ void Foam::CentredFitSnGradData<Polynomial>::calcFit scalar scale = 1; // Matrix of the polynomial components - scalarRectangularMatrix B(C.size(), this->minSize(), scalar(0)); + scalarRectangularMatrix B(C.size(), this->minSize(), Zero); forAll(C, ip) { diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index 6fc6924690862000f1debee82417cfad6d074553..aaf2e09d40ee81971a0c19fa44de34a3b537ce36 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -590,7 +590,7 @@ void Foam::fvMatrix<Type>::relax(const scalar alpha) scalarField D0(D); // Calculate the sum-mag off-diagonal from the interior faces - scalarField sumOff(D.size(), 0.0); + scalarField sumOff(D.size(), Zero); sumMagOffDiag(sumOff); // Handle the boundary contributions to the diagonal @@ -839,7 +839,7 @@ Foam::fvMatrix<Type>::H() const { scalarField psiCmpt(psi_.primitiveField().component(cmpt)); - scalarField boundaryDiagCmpt(psi_.size(), 0.0); + scalarField boundaryDiagCmpt(psi_.size(), Zero); addBoundaryDiag(boundaryDiagCmpt, cmpt); boundaryDiagCmpt.negate(); addCmptAvBoundaryDiag(boundaryDiagCmpt); diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C index 2c6fc5943382082fa0b307f9420835ced528713e..4f76e338057def7efedf0cc7358622fe61d32fcf 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C @@ -329,7 +329,7 @@ Foam::tmp<Foam::Field<Type>> Foam::fvMatrix<Type>::residual() const { scalarField psiCmpt(psi_.primitiveField().component(cmpt)); - scalarField boundaryDiagCmpt(psi_.size(), 0.0); + scalarField boundaryDiagCmpt(psi_.size(), Zero); addBoundaryDiag(boundaryDiagCmpt, cmpt); FieldField<Field, scalar> bouCoeffsCmpt diff --git a/src/finiteVolume/fvMatrices/fvScalarMatrix/fvScalarMatrix.C b/src/finiteVolume/fvMatrices/fvScalarMatrix/fvScalarMatrix.C index c5b1637478836916bef4b15676217c5c1c460b95..2f1387a56d20d1acd5a4621a126d277409bd423c 100644 --- a/src/finiteVolume/fvMatrices/fvScalarMatrix/fvScalarMatrix.C +++ b/src/finiteVolume/fvMatrices/fvScalarMatrix/fvScalarMatrix.C @@ -194,7 +194,7 @@ Foam::solverPerformance Foam::fvMatrix<Foam::scalar>::solveSegregated template<> Foam::tmp<Foam::scalarField> Foam::fvMatrix<Foam::scalar>::residual() const { - scalarField boundaryDiag(psi_.size(), 0.0); + scalarField boundaryDiag(psi_.size(), Zero); addBoundaryDiag(boundaryDiag, 0); tmp<scalarField> tres diff --git a/src/finiteVolume/fvMatrices/solvers/MULES/CMULESTemplates.C b/src/finiteVolume/fvMatrices/solvers/MULES/CMULESTemplates.C index 8642df377b6fbfa8394d5ad2c569d16853751db0..ac1f09264fe3c68a3582bf114770a7c9012a8d37 100644 --- a/src/finiteVolume/fvMatrices/solvers/MULES/CMULESTemplates.C +++ b/src/finiteVolume/fvMatrices/solvers/MULES/CMULESTemplates.C @@ -48,7 +48,7 @@ void Foam::MULES::correct const fvMesh& mesh = psi.mesh(); - scalarField psiIf(psi.size(), 0); + scalarField psiIf(psi.size(), Zero); fvc::surfaceIntegrate(psiIf, phiCorr); if (mesh.moving()) @@ -202,8 +202,8 @@ void Foam::MULES::limiterCorr scalarField psiMaxn(psiIf.size(), psiMin); scalarField psiMinn(psiIf.size(), psiMax); - scalarField sumPhip(psiIf.size(), 0.0); - scalarField mSumPhim(psiIf.size(), 0.0); + scalarField sumPhip(psiIf.size(), Zero); + scalarField mSumPhim(psiIf.size(), Zero); forAll(phiCorrIf, facei) { diff --git a/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C b/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C index 8470e0f694ea2e9fdf19bc54bdc82fc1bc44e423..e0c1e66dd15c383fc9cb78ed31d7a55a6a4e20e2 100644 --- a/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C +++ b/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C @@ -238,10 +238,10 @@ void Foam::MULES::limiter scalarField psiMaxn(psiIf.size(), psiMin); scalarField psiMinn(psiIf.size(), psiMax); - scalarField sumPhiBD(psiIf.size(), 0.0); + scalarField sumPhiBD(psiIf.size(), Zero); - scalarField sumPhip(psiIf.size(), 0.0); - scalarField mSumPhim(psiIf.size(), 0.0); + scalarField sumPhip(psiIf.size(), Zero); + scalarField mSumPhim(psiIf.size(), Zero); forAll(phiCorrIf, facei) { diff --git a/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C b/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C index 91b8cf92a48e28eb5190dc737864e4ee3405ac8f..ac7667e663b4363d757f8dd985daa0e84ec449fa 100644 --- a/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C +++ b/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C @@ -413,14 +413,14 @@ void Foam::isoAdvection::normaliseAndSmooth vectorField& cellNIn = cellN.primitiveFieldRef(); cellNIn /= (mag(cellNIn) + SMALL); - vectorField vertexN(mesh_.nPoints(), vector::zero); + vectorField vertexN(mesh_.nPoints(), Zero); vertexN = volPointInterpolation::New(mesh_).interpolate(cellN); vertexN /= (mag(vertexN) + SMALL); // Interpolate vertex normals back to cells forAll(cellNIn, celli) { const labelList& cp = cellPoints[celli]; - vector cellNi = vector::zero; + vector cellNi(Zero); const point& cellCentre = cellCentres[celli]; forAll(cp, pointI) { diff --git a/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoCutCell/isoCutCell.C b/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoCutCell/isoCutCell.C index 7bd47b8991960bdb7d748b77aea8e0acc4068e27..a17779efc07f100fcc3ca4cdaa8ca6a4ddf0ba0b 100644 --- a/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoCutCell/isoCutCell.C +++ b/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoCutCell/isoCutCell.C @@ -51,9 +51,9 @@ Foam::isoCutCell::isoCutCell(const fvMesh& mesh, scalarField& f) isoCutFaceAreas_(10), isoFaceEdges_(10), isoFacePoints_(10), - isoFaceCentre_(vector::zero), - isoFaceArea_(vector::zero), - subCellCentre_(vector::zero), + isoFaceCentre_(Zero), + isoFaceArea_(Zero), + subCellCentre_(Zero), subCellVolume_(-10), VOF_(-10), fullySubFaces_(10), @@ -190,8 +190,8 @@ void Foam::isoCutCell::calcSubCellCentreAndVolume() void Foam::isoCutCell::calcIsoFaceCentreAndArea() { // Initial guess of face centre from edge points - point fCentre = vector::zero; - label nEdgePoints = 0; + point fCentre(Zero); + label nEdgePoints(0); forAll(isoFaceEdges_, ei) { DynamicList<point>& edgePoints = isoFaceEdges_[ei]; @@ -211,9 +211,9 @@ void Foam::isoCutCell::calcIsoFaceCentreAndArea() DebugPout << "Warning: nEdgePoints = 0 for cell " << cellI_ << endl; } - vector sumN = vector::zero; - scalar sumA = 0; - vector sumAc = vector::zero; + vector sumN(Zero); + scalar sumA(0); + vector sumAc(Zero); forAll(isoFaceEdges_, ei) { diff --git a/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoCutFace/isoCutFace.C b/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoCutFace/isoCutFace.C index 62a6ed602a60478b2c39ab310cb340955bbba915..9bca4c3f63501a5459691680d868e711a9e1d37e 100644 --- a/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoCutFace/isoCutFace.C +++ b/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoCutFace/isoCutFace.C @@ -47,8 +47,8 @@ Foam::isoCutFace::isoCutFace lastEdgeCut_(-1), firstFullySubmergedPoint_(-1), nFullySubmergedPoints_(0), - subFaceCentre_(vector::zero), - subFaceArea_(vector::zero), + subFaceCentre_(Zero), + subFaceArea_(Zero), subFacePoints_(10), surfacePoints_(4), subFaceCentreAndAreaIsCalculated_(false) @@ -77,9 +77,9 @@ void Foam::isoCutFace::calcSubFaceCentreAndArea() } else if (nPoints > 0) { - vector sumN = vector::zero; - scalar sumA = 0.0; - vector sumAc = vector::zero; + vector sumN(Zero); + scalar sumA(0.0); + vector sumAc(Zero); const point fCentre = sum(subFacePoints_)/scalar(nPoints); for (label pi = 0; pi < nPoints; pi++) @@ -731,7 +731,7 @@ void Foam::isoCutFace::quadAreaCoeffs const scalar Bx = mag(B - A); - vector xhat(vector::zero); + vector xhat(Zero); if (Bx > 10*SMALL) { // If |AB| > 0 ABCD we use AB to define xhat diff --git a/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.C b/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.C index 0872af5dc979b0a4871e7a39c155bd33db71a268..0551f8f97105d2ee8f89072ef2e51c168884319d 100644 --- a/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.C +++ b/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.C @@ -94,8 +94,8 @@ void Foam::fvSurfaceMapper::calcAddressing() const { if (max(addr[facei]) >= oldNInternal) { - addr[facei] = labelList(1, label(0)); - w[facei] = scalarList(1, 1.0); + addr[facei] = labelList(1, Zero); + w[facei] = scalarList(1, scalar(1)); } } } diff --git a/src/finiteVolume/fvMesh/simplifiedFvMesh/columnFvMesh/columnFvMesh.C b/src/finiteVolume/fvMesh/simplifiedFvMesh/columnFvMesh/columnFvMesh.C index 67cc8c22f13c8106d3c6c1c8f0cf411cc5d68c34..6af42518bcbff57adfae44706c7bd494412c8cd3 100644 --- a/src/finiteVolume/fvMesh/simplifiedFvMesh/columnFvMesh/columnFvMesh.C +++ b/src/finiteVolume/fvMesh/simplifiedFvMesh/columnFvMesh/columnFvMesh.C @@ -211,7 +211,7 @@ void Foam::simplifiedMeshes::columnFvMeshInfo::initialise(const Time& runTime) scalar dxi = 0; scalar dyi = 0; scalar dzi = 0; - point origin(point::zero); + point origin(Zero); if (pointsIO.typeHeaderOk<vectorIOField>(true)) { diff --git a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C index d8d5b72fa5641532b4914cb528365972063f30e3..eb008b47c573f51a91d28339000245388c20dcdd 100644 --- a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C +++ b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C @@ -43,7 +43,7 @@ void Foam::singleCellFvMesh::agglomerateMesh const polyBoundaryMesh& oldPatches = mesh.boundaryMesh(); // Check agglomeration within patch face range and continuous - labelList nAgglom(oldPatches.size(), 0); + labelList nAgglom(oldPatches.size(), Zero); forAll(oldPatches, patchi) { diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C index d157e4478c8c8838b12f2d6a21f80367f761b6cf..89a5de3e4c16ef3d7a9dc6526e0cf16b4940277c 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C @@ -161,7 +161,7 @@ void Foam::FitData<FitDataType, ExtendedStencil, Polynomial>::calcFit scalar scale = 1; // Matrix of the polynomial components - scalarRectangularMatrix B(C.size(), minSize_, scalar(0)); + scalarRectangularMatrix B(C.size(), minSize_, Zero); forAll(C, ip) { diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C index 0139613742f7e3a0e7a4871e63c9a6bd77c9dd32..5711d9803cf5e37337d508d08896d2ffb85baeb3 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C @@ -187,7 +187,7 @@ void Foam::volPointInterpolation::interpolateDimensionedInternalField // then saves on space. // Multiply volField by weighting factor matrix to create pointField - scalarField sumW(points.size(), 0.0); + scalarField sumW(points.size(), Zero); forAll(pointCells, pointi) { const labelList& ppc = pointCells[pointi]; diff --git a/src/functionObjects/field/extractEulerianParticles/eulerianParticle/eulerianParticle.C b/src/functionObjects/field/extractEulerianParticles/eulerianParticle/eulerianParticle.C index 49c2b61433fddbb8a738f170d28a25c61e24de69..83100e7d303b6cbde7ec40dec4350a4fef0bdddb 100644 --- a/src/functionObjects/field/extractEulerianParticles/eulerianParticle/eulerianParticle.C +++ b/src/functionObjects/field/extractEulerianParticles/eulerianParticle/eulerianParticle.C @@ -33,8 +33,8 @@ using namespace Foam::constant; Foam::functionObjects::eulerianParticle::eulerianParticle() : faceIHit(-1), - VC(vector::zero), - VU(vector::zero), + VC(Zero), + VU(Zero), V(0), time(0) {} diff --git a/src/functionObjects/field/fluxSummary/fluxSummary.C b/src/functionObjects/field/fluxSummary/fluxSummary.C index 9de8b634dddf3ce504363aa17df0657df8fbffd6..48c8bc6bfab7d579c13ef9e15061897a06c082aa 100644 --- a/src/functionObjects/field/fluxSummary/fluxSummary.C +++ b/src/functionObjects/field/fluxSummary/fluxSummary.C @@ -721,8 +721,8 @@ bool Foam::functionObjects::fluxSummary::surfaceModeWrite() const boolList& flips = faceFlip_[surfi]; - scalar phiPos = scalar(0); - scalar phiNeg = scalar(0); + scalar phiPos(0); + scalar phiNeg(0); tmp<scalarField> tphis = phi & s.Sf(); const scalarField& phis = tphis(); @@ -1047,9 +1047,9 @@ bool Foam::functionObjects::fluxSummary::write() const labelList& facePatchID = facePatchID_[zonei]; const boolList& faceFlips = faceFlip_[zonei]; - scalar phiPos = scalar(0); - scalar phiNeg = scalar(0); - scalar phif = scalar(0); + scalar phiPos(0); + scalar phiNeg(0); + scalar phif(0); forAll(faceID, i) { diff --git a/src/functionObjects/field/heatTransferCoeff/heatTransferCoeffModels/ReynoldsAnalogy/ReynoldsAnalogy.C b/src/functionObjects/field/heatTransferCoeff/heatTransferCoeffModels/ReynoldsAnalogy/ReynoldsAnalogy.C index 2c5de30fbe43116259c774db57992e7484d51f23..cb96e187ccb8d102b95a2ee9b8e64ee5786282f2 100644 --- a/src/functionObjects/field/heatTransferCoeff/heatTransferCoeffModels/ReynoldsAnalogy/ReynoldsAnalogy.C +++ b/src/functionObjects/field/heatTransferCoeff/heatTransferCoeffModels/ReynoldsAnalogy/ReynoldsAnalogy.C @@ -169,7 +169,7 @@ Foam::heatTransferCoeffModels::ReynoldsAnalogy::Cf() const forAll(Cf, patchi) { - Cf.set(patchi, new Field<scalar>(Ubf[patchi].size(), 0)); + Cf.set(patchi, new Field<scalar>(Ubf[patchi].size(), Zero)); } const volSymmTensorField R(devReff()); @@ -203,7 +203,7 @@ Foam::heatTransferCoeffModels::ReynoldsAnalogy::ReynoldsAnalogy : heatTransferCoeffModel(dict, mesh, TName), UName_("U"), - URef_(vector::zero), + URef_(Zero), rhoName_("rho"), rhoRef_(0.0), CpName_("Cp"), diff --git a/src/functionObjects/field/histogram/histogram.C b/src/functionObjects/field/histogram/histogram.C index 1f2ad880b3d3d1f451af7fc21f4d4bf408ece165..5043fb2c2799c3477dfa5311038f32247d620883 100644 --- a/src/functionObjects/field/histogram/histogram.C +++ b/src/functionObjects/field/histogram/histogram.C @@ -193,8 +193,8 @@ bool Foam::functionObjects::histogram::write() x += delta; } - scalarField dataNormalized(nBins_, 0); - labelField dataCount(nBins_, 0); + scalarField dataNormalized(nBins_, Zero); + labelField dataCount(nBins_, Zero); const scalarField& V = mesh_.V(); forAll(field, celli) diff --git a/src/functionObjects/field/pressure/pressure.C b/src/functionObjects/field/pressure/pressure.C index d25391cb54c00e7ffcc92139dd2d5b52be98c704..316deefd686c9646187f4d0b4700eaf7e46418a6 100644 --- a/src/functionObjects/field/pressure/pressure.C +++ b/src/functionObjects/field/pressure/pressure.C @@ -255,7 +255,7 @@ bool Foam::functionObjects::pressure::read(const dictionary& dict) dict.readEntry("calcTotal", calcTotal_); if (calcTotal_) { - pRef_ = dict.lookupOrDefault<scalar>("pRef", 0.0); + pRef_ = dict.lookupOrDefault<scalar>("pRef", 0); } dict.readEntry("calcCoeff", calcCoeff_); diff --git a/src/functionObjects/field/reference/reference.C b/src/functionObjects/field/reference/reference.C index de343b37a20c3cba027119dadf6121a586b1fcaf..31105f7c1837011b54916c6b9468c33f93cde06a 100644 --- a/src/functionObjects/field/reference/reference.C +++ b/src/functionObjects/field/reference/reference.C @@ -74,7 +74,7 @@ Foam::functionObjects::reference::reference : fieldExpression(name, runTime, dict), localDict_(dict), - position_(point::zero), + position_(Zero), positionIsSet_(false), celli_(-1), interpolationScheme_("cell"), diff --git a/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C b/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C index ef509267b87ad9fd7c6a5a148b35df3c602ca989..c3b91b925dc6dfe1d86d024d20bf34bc8bed6566 100644 --- a/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C +++ b/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C @@ -239,7 +239,7 @@ void Foam::functionObjects::regionSizeDistribution::writeGraphs if (Pstream::master()) { // Calculate per-bin average - scalarField binSum(nBins_, 0.0); + scalarField binSum(nBins_, Zero); forAll(sortedField, i) { binSum[indices[i]] += sortedField[i]; @@ -248,7 +248,7 @@ void Foam::functionObjects::regionSizeDistribution::writeGraphs scalarField binAvg(divide(binSum, binCount)); // Per bin deviation - scalarField binSqrSum(nBins_, 0.0); + scalarField binSqrSum(nBins_, Zero); forAll(sortedField, i) { binSqrSum[indices[i]] += Foam::sqr(sortedField[i]); @@ -694,7 +694,7 @@ bool Foam::functionObjects::regionSizeDistribution::write() ) ); - vectorField centroids(sortedVols.size(), vector::zero); + vectorField centroids(sortedVols.size(), Zero); // Check if downstream bins are calculated if (isoPlanes_) @@ -748,7 +748,7 @@ bool Foam::functionObjects::regionSizeDistribution::write() } } - scalarField binDownCount(nDownstreamBins_, 0.0); + scalarField binDownCount(nDownstreamBins_, Zero); forAll(distToPlane, i) { if (downstreamIndices[i] != -1) @@ -815,7 +815,7 @@ bool Foam::functionObjects::regionSizeDistribution::write() } // Calculate the counts per diameter bin - scalarField binCount(nBins_, 0.0); + scalarField binCount(nBins_, Zero); forAll(sortedDiameters, i) { binCount[indices[i]] += 1.0; diff --git a/src/functionObjects/field/setFlow/setFlow.C b/src/functionObjects/field/setFlow/setFlow.C index c294d216fb9e86e606d8044c9e3bf9b6a329c119..c9e3e2649648f6f1fca9274da2c11a78062fb6ca 100644 --- a/src/functionObjects/field/setFlow/setFlow.C +++ b/src/functionObjects/field/setFlow/setFlow.C @@ -115,7 +115,7 @@ Foam::functionObjects::setFlow::setFlow mode_(modeType::FUNCTION), reverseTime_(VGREAT), scalePtr_(nullptr), - origin_(vector::zero), + origin_(Zero), R_(tensor::I), omegaPtr_(nullptr), velocityPtr_(nullptr) diff --git a/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C b/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C index 1e0967cdb10a8c503c5fe025723acd13147ffb49..e1f83601808254e2da81643d4d3f00bf3347ffeb 100644 --- a/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C +++ b/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C @@ -492,10 +492,10 @@ Foam::functionObjects::stabilityBlendingFactor::stabilityBlendingFactor ), tolerance_(0.001), - error_(mesh_.nCells(), 0.0), - errorIntegral_(mesh_.nCells(), 0.0), - oldError_(mesh_.nCells(), 0.0), - oldErrorIntegral_(mesh_.nCells(), 0.0), + error_(mesh_.nCells(), Zero), + errorIntegral_(mesh_.nCells(), Zero), + oldError_(mesh_.nCells(), Zero), + oldErrorIntegral_(mesh_.nCells(), Zero), P_(dict.lookupOrDefault<scalar>("P", 3)), I_(dict.lookupOrDefault<scalar>("I", 0.0)), D_(dict.lookupOrDefault<scalar>("D", 0.25)) diff --git a/src/functionObjects/forces/forces/forces.C b/src/functionObjects/forces/forces/forces.C index ece9acc17ddab5b88ce9ea46074f0cec709d360a..1fea138af46525847b53a51616f693bde2b15462 100644 --- a/src/functionObjects/forces/forces/forces.C +++ b/src/functionObjects/forces/forces/forces.C @@ -847,7 +847,7 @@ bool Foam::functionObjects::forces::read(const dictionary& dict) } // Reference pressure, 0 by default - pRef_ = dict.lookupOrDefault<scalar>("pRef", 0.0); + pRef_ = dict.lookupOrDefault<scalar>("pRef", 0); } coordSys_.clear(); diff --git a/src/functionObjects/randomProcesses/energySpectrum/energySpectrum.C b/src/functionObjects/randomProcesses/energySpectrum/energySpectrum.C index 7c19426a6e998906e4f62f40f96cc99f05bce937..3264cfd318258bcbcb6c05abf60b62c39b8c19f4 100644 --- a/src/functionObjects/randomProcesses/energySpectrum/energySpectrum.C +++ b/src/functionObjects/randomProcesses/energySpectrum/energySpectrum.C @@ -87,7 +87,7 @@ void Foam::functionObjects::energySpectrum::calcAndWriteSpectrum } Log << "Computing energy spectrum" << endl; - scalarField E(nMax, 0); + scalarField E(nMax, Zero); const scalarField Ec(0.5*magSqr(Uf)); forAll(C, celli) { diff --git a/src/functionObjects/utilities/residuals/residuals.C b/src/functionObjects/utilities/residuals/residuals.C index a4aa02c51e5247c0be1f248bfa3cc1cd22eda715..bc435c2a41ac6aab81024ed0914e9d5031b6801a 100644 --- a/src/functionObjects/utilities/residuals/residuals.C +++ b/src/functionObjects/utilities/residuals/residuals.C @@ -101,7 +101,7 @@ void Foam::functionObjects::residuals::createField(const word& fieldName) IOobject::NO_READ, IOobject::NO_WRITE ), - Field<scalar>(mesh_.nCells(), scalar(0)) + Field<scalar>(mesh_.nCells(), Zero) ); fieldPtr->store(); diff --git a/src/functionObjects/utilities/thermoCoupleProbes/thermoCoupleProbes.C b/src/functionObjects/utilities/thermoCoupleProbes/thermoCoupleProbes.C index 6b7a1e709dc0b8f148de167c273e04a50fa0563b..457660fb3602b0157e29ea2bfd219ad38a8e54ac 100644 --- a/src/functionObjects/utilities/thermoCoupleProbes/thermoCoupleProbes.C +++ b/src/functionObjects/utilities/thermoCoupleProbes/thermoCoupleProbes.C @@ -103,13 +103,13 @@ void Foam::functionObjects::thermoCoupleProbes::derivatives scalarField& dydx ) const { - scalarField G(y.size(), 0.0); - scalarField Tc(y.size(), 0.0); - scalarField Uc(y.size(), 0.0); - scalarField rhoc(y.size(), 0.0); - scalarField muc(y.size(), 0.0); - scalarField Cpc(y.size(), 0.0); - scalarField kappac(y.size(), 0.0); + scalarField G(y.size(), Zero); + scalarField Tc(y.size(), Zero); + scalarField Uc(y.size(), Zero); + scalarField rhoc(y.size(), Zero); + scalarField muc(y.size(), Zero); + scalarField Cpc(y.size(), Zero); + scalarField kappac(y.size(), Zero); if (radiationFieldName_ != "none") { diff --git a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomerate.C b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomerate.C index 479af608a58fb1de69901b726ac752a14abf9853..8c52ae182f2faa7d009c018e9664ece26e55f1b2 100644 --- a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomerate.C +++ b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomerate.C @@ -49,7 +49,7 @@ makeCompactCellFaceAddressingAndFaceWeights const labelUList& lowerAddr = fineAddressing.lowerAddr(); // Number of neighbours for each cell - labelList nNbrs(nFineCells, 0); + labelList nNbrs(nFineCells, Zero); forAll(upperAddr, facei) { @@ -124,7 +124,7 @@ Foam::tmp<Foam::labelField> Foam::MGridGenGAMGAgglomeration::agglomerate ); // agglomeration options. - List<int> options(4, 0); + List<int> options(4, Zero); options[0] = 4; // globular agglom options[1] = 6; // objective F3 and F2 options[2] = 128; // debugging output level diff --git a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C index 643bd0df19cd1613a4d362d1b6c51fddb0572778..d7183b20b840364753123406fe859f696ffa6ec5 100644 --- a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C +++ b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C @@ -192,7 +192,7 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration ); // Create the boundary area cell field - scalarField* magSbPtr(new scalarField(fvMesh_.nCells(), 0)); + scalarField* magSbPtr(new scalarField(fvMesh_.nCells(), Zero)); { scalarField& magSb = *magSbPtr; diff --git a/src/fvMotionSolver/motionInterpolation/patchTransformed/patchTransformedInterpolation.C b/src/fvMotionSolver/motionInterpolation/patchTransformed/patchTransformedInterpolation.C index 331c73c858886cfdb0de46fa743f0d14dee7b76b..3b691f36d4736acb09e9034343be9304c4d25549 100644 --- a/src/fvMotionSolver/motionInterpolation/patchTransformed/patchTransformedInterpolation.C +++ b/src/fvMotionSolver/motionInterpolation/patchTransformed/patchTransformedInterpolation.C @@ -124,9 +124,9 @@ void Foam::patchTransformedInterpolation::interpolate pointDisplacement.correctBoundaryConditions(); vectorField pointRotation(nPoints, Zero); - scalarField pointExpansion(nPoints, scalar(0)); + scalarField pointExpansion(nPoints, Zero); - labelList pointDisplacementNSum(nPoints, 0); + labelList pointDisplacementNSum(nPoints, Zero); vectorField pointDisplacementSum(nPoints, Zero); forAll(patches_, patchI) diff --git a/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C index 8924c5b5efbfe09132ce3d10144ee5187f92f319..d5bfd10ea765012c879d3d741ceed3b609a9a435 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C @@ -167,7 +167,7 @@ void Foam::surfaceDisplacementPointPatchVectorField::calcProjection } // Knock out any wedge component - scalarField offset(start.size(), 0.0); + scalarField offset(start.size(), Zero); if (wedgePlane_ >= 0 && wedgePlane_ <= vector::nComponents) { forAll(offset, i) diff --git a/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C index 89100524c35a84686e19bd9328d49e52aa092f74..e5a4c29dfb609af6dd59055a942358084bee6287 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C @@ -167,7 +167,7 @@ void Foam::surfaceSlipDisplacementPointPatchVectorField::calcProjection } // Knock out any wedge component - scalarField offset(start.size(), 0.0); + scalarField offset(start.size(), Zero); if (wedgePlane_ >= 0 && wedgePlane_ < vector::nComponents) { forAll(offset, i) diff --git a/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C b/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C index 91a3e495a1a2075d7c814ddccf35aad649daf523..593612ed90a6ed3aaca8c866102d13976a27cb5d 100644 --- a/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C +++ b/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C @@ -375,7 +375,7 @@ void Foam::fv::directionalPressureGradientExplicitSource::correct // Accumulate 'upstream' velocity into cells vectorField UfCells(cells_.size(), Zero); - scalarField UfCellWeights(cells_.size(), 0.0); + scalarField UfCellWeights(cells_.size(), Zero); const polyBoundaryMesh& pbm = mesh_.boundaryMesh(); diff --git a/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.C b/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.C index 27f4bc0e0c36418964794eed645ea90ca61326b5..cc9da89fe18430849e7afeebae2e88a61f960dfc 100644 --- a/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.C +++ b/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.C @@ -256,7 +256,7 @@ void Foam::fv::effectivenessHeatExchangerSource::addSup const scalarField TCells(T, cells_); scalar Tref = 0; - scalarField deltaTCells(cells_.size(), 0); + scalarField deltaTCells(cells_.size(), Zero); if (Qt > 0) { Tref = gMax(TCells); diff --git a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C index 1a3d43b0b376ec8e8dc2e76b0d1c796514d9945b..8cc78a096799cfe8c681b2ad85a142a364085dae 100644 --- a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C +++ b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C @@ -374,28 +374,16 @@ void Foam::DSMCCloud<ParcelType>::collisions() template<class ParcelType> void Foam::DSMCCloud<ParcelType>::resetFields() { - q_ = dimensionedScalar("zero", dimensionSet(1, 0, -3, 0, 0), 0.0); - - fD_ = dimensionedVector - ( - "zero", - dimensionSet(1, -1, -2, 0, 0), - Zero - ); - - rhoN_ = dimensionedScalar("zero", dimensionSet(0, -3, 0, 0, 0), VSMALL); - rhoM_ = dimensionedScalar("zero", dimensionSet(1, -3, 0, 0, 0), VSMALL); - dsmcRhoN_ = dimensionedScalar("zero", dimensionSet(0, -3, 0, 0, 0), 0.0); - linearKE_ = dimensionedScalar("zero", dimensionSet(1, -1, -2, 0, 0), 0.0); - internalE_ = dimensionedScalar("zero", dimensionSet(1, -1, -2, 0, 0), 0.0); - iDof_ = dimensionedScalar("zero", dimensionSet(0, -3, 0, 0, 0), VSMALL); - - momentum_ = dimensionedVector - ( - "zero", - dimensionSet(1, -2, -1, 0, 0), - Zero - ); + q_ = dimensionedScalar("0", dimensionSet(1, 0, -3, 0, 0), Zero); + fD_ = dimensionedVector("0", dimensionSet(1, -1, -2, 0, 0), Zero); + + rhoN_ = dimensionedScalar("0", dimensionSet(0, -3, 0, 0, 0), VSMALL); + rhoM_ = dimensionedScalar("0", dimensionSet(1, -3, 0, 0, 0), VSMALL); + dsmcRhoN_ = dimensionedScalar("0", dimensionSet(0, -3, 0, 0, 0), Zero); + linearKE_ = dimensionedScalar("0", dimensionSet(1, -1, -2, 0, 0), Zero); + internalE_ = dimensionedScalar("0", dimensionSet(1, -1, -2, 0, 0), Zero); + iDof_ = dimensionedScalar("0", dimensionSet(0, -3, 0, 0, 0), VSMALL); + momentum_ = dimensionedVector("0", dimensionSet(1, -2, -1, 0, 0), Zero); } @@ -783,7 +771,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimensionSet(0, -3, 0, 0, 0), VSMALL) + dimensionedScalar("0", dimensionSet(0, -3, 0, 0, 0), VSMALL) ), rhoM_ ( @@ -796,7 +784,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimensionSet(1, -3, 0, 0, 0), VSMALL) + dimensionedScalar("0", dimensionSet(1, -3, 0, 0, 0), VSMALL) ), dsmcRhoN_ ( @@ -848,7 +836,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimensionSet(0, -3, 0, 0, 0), VSMALL) + dimensionedScalar("0", dimensionSet(0, -3, 0, 0, 0), VSMALL) ), momentum_ ( diff --git a/src/lagrangian/DSMC/submodels/InflowBoundaryModel/FreeStream/FreeStream.C b/src/lagrangian/DSMC/submodels/InflowBoundaryModel/FreeStream/FreeStream.C index 12594a53abad4e89edce75f8236e67c6f20e38f6..714563bda9447128b9ba42cbf2d93df917a1819c 100644 --- a/src/lagrangian/DSMC/submodels/InflowBoundaryModel/FreeStream/FreeStream.C +++ b/src/lagrangian/DSMC/submodels/InflowBoundaryModel/FreeStream/FreeStream.C @@ -241,7 +241,7 @@ void Foam::FreeStream<CloudType>::inflow() ); // Cumulative triangle area fractions - List<scalar> cTriAFracs(faceTets.size(), 0.0); + List<scalar> cTriAFracs(faceTets.size(), Zero); scalar previousCummulativeSum = 0.0; diff --git a/src/lagrangian/basic/Cloud/CloudIO.C b/src/lagrangian/basic/Cloud/CloudIO.C index 9f600de03690fd3ff3b19c4d4be9c925ced006ef..769ecae1f10f1913676169536bc375cb149bdd82 100644 --- a/src/lagrangian/basic/Cloud/CloudIO.C +++ b/src/lagrangian/basic/Cloud/CloudIO.C @@ -95,7 +95,7 @@ void Foam::Cloud<ParticleType>::writeCloudUniformProperties() const ) ); - labelList np(Pstream::nProcs(), 0); + labelList np(Pstream::nProcs(), Zero); np[Pstream::myProcNo()] = ParticleType::particleCount_; Pstream::listCombineGather(np, maxEqOp<label>()); diff --git a/src/lagrangian/basic/InteractionLists/InteractionLists.C b/src/lagrangian/basic/InteractionLists/InteractionLists.C index 360f2a3cbc403aaf1d3601ebd2959f7b0607cf3c..ca8bca6f31d9d1a5754ff75d58a8ffbe1b916bad 100644 --- a/src/lagrangian/basic/InteractionLists/InteractionLists.C +++ b/src/lagrangian/basic/InteractionLists/InteractionLists.C @@ -665,7 +665,7 @@ void Foam::InteractionLists<ParticleType>::findExtendedProcBbsInRange forAll(allExtendedProcBbs, proci) { - List<label> permutationIndices(nTrans, 0); + labelList permutationIndices(nTrans, Zero); if (nTrans == 0 && proci != Pstream::myProcNo()) { @@ -845,7 +845,7 @@ void Foam::InteractionLists<ParticleType>::buildMap // ~~~~~~~~~~~~~~~~~~ // 1. Count - labelList nSend(Pstream::nProcs(), 0); + labelList nSend(Pstream::nProcs(), Zero); forAll(toProc, i) { diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C index ed8318074cc891f47c2623e1bd818f2fb14a5a90..f316e47a685b6aee8da891d62f0843c80400b384 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C @@ -229,7 +229,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Mass transfer due to phase change - scalarField dMassPC(YLiquid_.size(), 0.0); + scalarField dMassPC(YLiquid_.size(), Zero); // Molar flux of species emitted from the particle (kmol/m^2/s) scalar Ne = 0.0; @@ -238,7 +238,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc scalar NCpW = 0.0; // Surface concentrations of emitted species - scalarField Cs(composition.carrier().species().size(), 0.0); + scalarField Cs(composition.carrier().species().size(), Zero); // Calc mass and enthalpy transfer due to phase change this->calcPhaseChange @@ -268,7 +268,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc // ~~~~~~~~~~~~~~~~ // Mass transfer due to devolatilisation - scalarField dMassDV(YGas_.size(), 0.0); + scalarField dMassDV(YGas_.size(), Zero); // Calc mass and enthalpy transfer due to devolatilisation calcDevolatilisation @@ -297,10 +297,10 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc // ~~~~~~~~~~~~~~~~~ // Change in carrier phase composition due to surface reactions - scalarField dMassSRGas(YGas_.size(), 0.0); - scalarField dMassSRLiquid(YLiquid_.size(), 0.0); - scalarField dMassSRSolid(YSolid_.size(), 0.0); - scalarField dMassSRCarrier(composition.carrier().species().size(), 0.0); + scalarField dMassSRGas(YGas_.size(), Zero); + scalarField dMassSRLiquid(YLiquid_.size(), Zero); + scalarField dMassSRSolid(YSolid_.size(), Zero); + scalarField dMassSRCarrier(composition.carrier().species().size(), Zero); // Calc mass and enthalpy transfer due to surface reactions calcSurfaceReactions diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C index 99a8679d73fb92d27030b04be707d1694db96ca7..f2b6b85ed6651f72a753359560a919fc02debf4b 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C @@ -429,7 +429,7 @@ void Foam::ReactingParcel<ParcelType>::calc // ~~~~~~~~~~~~ // Mass transfer due to phase change - scalarField dMassPC(Y_.size(), 0.0); + scalarField dMassPC(Y_.size(), Zero); // Molar flux of species emitted from the particle (kmol/m^2/s) scalar Ne = 0.0; @@ -438,7 +438,7 @@ void Foam::ReactingParcel<ParcelType>::calc scalar NCpW = 0.0; // Surface concentrations of emitted species - scalarField Cs(composition.carrier().species().size(), 0.0); + scalarField Cs(composition.carrier().species().size(), Zero); // Calc mass and enthalpy transfer due to phase change calcPhaseChange diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchCollisionDensity/PatchCollisionDensity.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchCollisionDensity/PatchCollisionDensity.C index 111ffcbedf4e19ae3d0897dc1041af7d4814d6bf..70d0b1cbd114abfddbb9bceae4eb521bbecf8ad9 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchCollisionDensity/PatchCollisionDensity.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchCollisionDensity/PatchCollisionDensity.C @@ -34,7 +34,7 @@ License template<class CloudType> void Foam::PatchCollisionDensity<CloudType>::write() { - const scalarField z(this->owner().mesh().nCells(), 0); + const scalarField z(this->owner().mesh().nCells(), Zero); volScalarField ( diff --git a/src/lagrangian/intermediate/submodels/ForceTypes/ParticleForceList/ParticleForceList.C b/src/lagrangian/intermediate/submodels/ForceTypes/ParticleForceList/ParticleForceList.C index 861428c0007b666c49daa20c275bf4cd36a4cbe3..c32de6d4183f37ce1f13e72675d77a3e20abfb8b 100644 --- a/src/lagrangian/intermediate/submodels/ForceTypes/ParticleForceList/ParticleForceList.C +++ b/src/lagrangian/intermediate/submodels/ForceTypes/ParticleForceList/ParticleForceList.C @@ -153,7 +153,7 @@ Foam::forceSuSp Foam::ParticleForceList<CloudType>::calcCoupled const scalar muc ) const { - forceSuSp value(Zero, 0.0); + forceSuSp value(Zero); if (calcCoupled_) { @@ -178,7 +178,7 @@ Foam::forceSuSp Foam::ParticleForceList<CloudType>::calcNonCoupled const scalar muc ) const { - forceSuSp value(Zero, 0.0); + forceSuSp value(Zero); if (calcNonCoupled_) { diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C index c2e998c6f5b84ffdef03819be5972ac7dbb2befd..d64b8f283844852276ef9f04c24d7fc303f68f11 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C @@ -73,7 +73,7 @@ void Foam::CellZoneInjection<CloudType>::setPositions polyMeshTetDecomposition::cellTetIndices(mesh, celli); // Construct cell tet volume fractions - scalarList cTetVFrac(cellTetIs.size(), 0.0); + scalarList cTetVFrac(cellTetIs.size(), Zero); for (label tetI = 1; tetI < cellTetIs.size() - 1; tetI++) { cTetVFrac[tetI] = diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C index c3e53ca67ce726d0ace1817ed7975d026ed860b9..60fd81c6c5373da86ebb3447cc1e4c0779f75d5d 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C @@ -136,7 +136,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection innerDiameter_(this->coeffDict().getScalar("innerDiameter")), duration_(this->coeffDict().getScalar("duration")), positionVsTime_(owner.db().time(), "position"), - position_(vector::zero), + position_(Zero), injectorCell_(-1), tetFacei_(-1), tetPti_(-1), diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/patchInjectionBase.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/patchInjectionBase.C index 8a8a1ab11f9515c3000895f2200862fd88cacab9..bf849cc25efa25779f02244180b49e0f2b21a96f 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/patchInjectionBase.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/patchInjectionBase.C @@ -47,7 +47,7 @@ Foam::patchInjectionBase::patchInjectionBase triFace_(), triToFace_(), triCumulativeMagSf_(), - sumTriMagSf_(Pstream::nProcs() + 1, 0.0) + sumTriMagSf_(Pstream::nProcs() + 1, Zero) { if (patchId_ < 0) { @@ -222,7 +222,7 @@ void Foam::patchInjectionBase::setPositionAndCell polyMeshTetDecomposition::cellTetIndices(mesh, cellOwner); // Construct cell tet volume fractions - scalarList cTetVFrac(cellTetIs.size(), 0.0); + scalarList cTetVFrac(cellTetIs.size(), Zero); for (label teti=1; teti<cellTetIs.size()-1; teti++) { cTetVFrac[teti] = diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/DistortedSphereDrag/DistortedSphereDragForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/DistortedSphereDrag/DistortedSphereDragForce.C index fc0e07454bdbb287b981fd5b071d86835b7260de..57ce2a277bef61a5b18a4a4fc9ec916079c7d95d 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/DistortedSphereDrag/DistortedSphereDragForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/DistortedSphereDrag/DistortedSphereDragForce.C @@ -88,7 +88,7 @@ Foam::forceSuSp Foam::DistortedSphereDragForce<CloudType>::calcCoupled const scalar muc ) const { - forceSuSp value(Zero, 0.0); + forceSuSp value(Zero); // Limit the drop distortion to y=0 (sphere) and y=1 (disk) scalar y = min(max(p.y(), 0), 1); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/NonSphereDrag/NonSphereDragForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/NonSphereDrag/NonSphereDragForce.C index bc6ee8c4029946bf27a363b96731dd611535c931..52bafcbda4069ecad8319d6bb10c74b515d554e0 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/NonSphereDrag/NonSphereDragForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/NonSphereDrag/NonSphereDragForce.C @@ -96,7 +96,7 @@ Foam::forceSuSp Foam::NonSphereDragForce<CloudType>::calcCoupled const scalar muc ) const { - forceSuSp value(Zero, 0.0); + forceSuSp value(Zero); value.Sp() = mass*0.75*muc*CdRe(Re)/(p.rho()*sqr(p.d())); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/SphereDrag/SphereDragForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/SphereDrag/SphereDragForce.C index 00f0b621b13041dbd54b9b9bdf5b802e5a9a6170..c0fef0bcf2ecf9234740a5faebbff417ded6946d 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/SphereDrag/SphereDragForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Drag/SphereDrag/SphereDragForce.C @@ -85,7 +85,7 @@ Foam::forceSuSp Foam::SphereDragForce<CloudType>::calcCoupled const scalar muc ) const { - forceSuSp value(Zero, 0.0); + forceSuSp value(Zero); value.Sp() = mass*0.75*muc*CdRe(Re)/(p.rho()*sqr(p.d())); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Gravity/GravityForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Gravity/GravityForce.C index d73a78b249565369ff215c0dc0a770823c8266e4..680c37819990963e4d9ec2637e635c94c9a00e6b 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Gravity/GravityForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Gravity/GravityForce.C @@ -68,7 +68,7 @@ Foam::forceSuSp Foam::GravityForce<CloudType>::calcNonCoupled const scalar muc ) const { - forceSuSp value(Zero, 0.0); + forceSuSp value(Zero); value.Su() = mass*g_*(1.0 - td.rhoc()/p.rho()); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Interface/InterfaceForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Interface/InterfaceForce.C index 64bf5dcfb8b58c4d6f0494f5efc5c92c07f0d4db..240a3c2f03ac6b7550b52ac39a24ffd8221a1e65 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Interface/InterfaceForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Interface/InterfaceForce.C @@ -121,7 +121,7 @@ Foam::forceSuSp Foam::InterfaceForce<CloudType>::calcNonCoupled const scalar muc ) const { - forceSuSp value(vector::zero, 0.0); + forceSuSp value(Zero); const interpolation<vector>& interp = gradInterForceInterpPtr_(); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/LiftForce/LiftForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/LiftForce/LiftForce.C index ed757e32d62a3ba6ef30a85ed3d4f647e2a99295..f03839b060d362d88c4e713e32877eb0e15ff38f 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/LiftForce/LiftForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Lift/LiftForce/LiftForce.C @@ -136,7 +136,7 @@ Foam::forceSuSp Foam::LiftForce<CloudType>::calcCoupled const scalar muc ) const { - forceSuSp value(Zero, 0.0); + forceSuSp value(Zero); vector curlUc = curlUcInterp().interpolate(p.coordinates(), p.currentTetIndices()); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/NonInertialFrame/NonInertialFrameForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/NonInertialFrame/NonInertialFrameForce.C index dec9a7166348bf0399e147e64cc76939968adbdb..603d8bcf381babb3a475ddd53e1e87618a65007d 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/NonInertialFrame/NonInertialFrameForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/NonInertialFrame/NonInertialFrameForce.C @@ -188,7 +188,7 @@ Foam::forceSuSp Foam::NonInertialFrameForce<CloudType>::calcNonCoupled const scalar muc ) const { - forceSuSp value(Zero, 0.0); + forceSuSp value(Zero); const vector r = p.position() - centreOfRotation_; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.C index 584d798f61f5feb3ba7dff1102aa7c46726c8fdf..702a74b943f252ad97abb48694521c90bcf41ef0 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/Paramagnetic/ParamagneticForce.C @@ -104,7 +104,7 @@ Foam::forceSuSp Foam::ParamagneticForce<CloudType>::calcNonCoupled const scalar muc ) const { - forceSuSp value(Zero, 0.0); + forceSuSp value(Zero); const interpolation<vector>& HdotGradHInterp = *HdotGradHInterpPtr_; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.C index b84811e98e7437c11abbe2a96aa56266dda1e1ee..ff0c0b7cfdb69a5cb06e032614094b772b68ddac 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/PressureGradient/PressureGradientForce.C @@ -126,7 +126,7 @@ Foam::forceSuSp Foam::PressureGradientForce<CloudType>::calcCoupled const scalar muc ) const { - forceSuSp value(Zero, 0.0); + forceSuSp value(Zero); vector DUcDt = DUcDtInterp().interpolate(p.coordinates(), p.currentTetIndices()); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/SRF/SRFForce.C b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/SRF/SRFForce.C index 6ffa34dd696f47b38ab3a54b9d57421a9d544692..f3912c1a303eea5c94f1bf39207ba2a0e53f1212 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/SRF/SRFForce.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/SRF/SRFForce.C @@ -87,7 +87,7 @@ Foam::forceSuSp Foam::SRFForce<CloudType>::calcNonCoupled const scalar muc ) const { - forceSuSp value(Zero, 0.0); + forceSuSp value(Zero); const typename SRF::SRFModel& srf = *srfPtr_; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSp.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSp.H index df57b2ff4fe2608272b0ee0a425fc27cc0ca0155..44f5f8fe85f3d6943f932567acfb1f0ebaa1e27f 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSp.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSp.H @@ -41,14 +41,14 @@ SourceFiles #define forceSuSp_H #include "Tuple2.H" +#include "vector.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -// Forward declaration of friend functions - +// Forward declarations class forceSuSp; inline forceSuSp operator+(const forceSuSp& susp1, const forceSuSp& susp2); @@ -71,6 +71,9 @@ public: //- Construct null inline forceSuSp(); + //- Construct zero-initialized content + inline forceSuSp(const zero); + //- Construct given Tuple2 inline forceSuSp(const Tuple2<vector, scalar>& susp); @@ -78,7 +81,7 @@ public: inline forceSuSp(const vector& Su, const scalar Sp); //- Construct from Istream - inline forceSuSp(Istream&); + inline forceSuSp(Istream& is); // Member Functions diff --git a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSpI.H b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSpI.H index e9919fde4d0df2a103020f4f4637006430f64cfe..99f449c7128d1c002b9e82feb8b13c5c8f9e6cb7 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSpI.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/ParticleForces/forceSuSp/forceSuSpI.H @@ -29,6 +29,12 @@ inline Foam::forceSuSp::forceSuSp() {} +inline Foam::forceSuSp::forceSuSp(const zero) +: + Tuple2<vector, scalar>(vector::zero, 0.0) +{} + + inline Foam::forceSuSp::forceSuSp ( const Tuple2<vector, scalar>& fs diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C index a0833769ce5dbc70a51a2a4c19643d502f59fc16..86c0f26bf93d5c5f0ed927d1d6314797f3e37d10 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C @@ -139,7 +139,7 @@ bool Foam::AveragingMethod<Type>::write(const bool valid) const const pointMesh pointMesh_(mesh_); // point volumes - Field<scalar> pointVolume(mesh_.nPoints(), 0); + Field<scalar> pointVolume(mesh_.nPoints(), Zero); // output fields GeometricField<Type, fvPatchField, volMesh> cellValue diff --git a/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.C b/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.C index e616619dddbe51ef58a57aacfbc3b5640423a70b..d9d10bf729ba4acf1aaa257acb7dbeb0a6ddab42 100644 --- a/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.C +++ b/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.C @@ -140,7 +140,7 @@ void Foam::correlationFunction<Type>::calculateCorrelationFunction << abort(FatalError); } - List<scalar> cFSums(nBuffers(),0.0); + List<scalar> cFSums(nBuffers(), Zero); forAll(tZeroBuffers_, tZB) { diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/averageMDFields.H b/src/lagrangian/molecularDynamics/molecule/mdTools/averageMDFields.H index 0546f3025990e3a1ae82fe3a886a48ef9f504ef5..72a2545f07900f08156c2239e487ccc0aa7e7db6 100644 --- a/src/lagrangian/molecularDynamics/molecule/mdTools/averageMDFields.H +++ b/src/lagrangian/molecularDynamics/molecule/mdTools/averageMDFields.H @@ -4,7 +4,7 @@ if (runTime.writeTime()) Number density \*-----------------------------------------------------------------------*/ - scalarField totalRhoN_sum(mesh.nCells(), 0.0); + scalarField totalRhoN_sum(mesh.nCells(), Zero); forAll(allSpeciesRhoN, rN) { @@ -23,7 +23,7 @@ if (runTime.writeTime()) Mass density \*-----------------------------------------------------------------------*/ - scalarField totalRhoM_sum(mesh.nCells(), 0.0); + scalarField totalRhoM_sum(mesh.nCells(), Zero); forAll(allSpeciesRhoM, rM) { @@ -43,7 +43,7 @@ if (runTime.writeTime()) vectorField totalMomentum_sum(mesh.nCells(), Zero); - scalarField totalMass_sum(mesh.nCells(), 0.0); + scalarField totalMass_sum(mesh.nCells(), Zero); forAll(allSpeciesVelocity, v) { @@ -94,9 +94,9 @@ if (runTime.writeTime()) Kinetic temperature \*-----------------------------------------------------------------------*/ - scalarField totalTemperatureVTerms_sum(mesh.nCells(), 0.0); + scalarField totalTemperatureVTerms_sum(mesh.nCells(), Zero); - scalarField totalN_sum(mesh.nCells(), 0.0); + scalarField totalN_sum(mesh.nCells(), Zero); forAll(allSpeciesTemperature, t) { @@ -170,7 +170,7 @@ if (runTime.writeTime()) Mean kinetic energy \*-----------------------------------------------------------------------*/ - scalarField totalKE_sum(mesh.nCells(), 0.0); + scalarField totalKE_sum(mesh.nCells(), Zero); forAll(allSpeciesMeanKE, mKE) { diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H b/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H index 4078838e21d644d4cefb85a87f2c00811035e1ba..d33c360937aae13c0ae5f037ab843ac2780e18fc 100644 --- a/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H +++ b/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H @@ -3,13 +3,13 @@ List<scalarField> allSpeciesN_RU ( molecules.potential().nIds(), - scalarField(mesh.nCells(), 0.0) + scalarField(mesh.nCells(), Zero) ); List<scalarField> allSpeciesM_RU ( molecules.potential().nIds(), - scalarField(mesh.nCells(), 0.0) + scalarField(mesh.nCells(), Zero) ); List<vectorField> allSpeciesVelocitySum_RU @@ -21,7 +21,7 @@ List<vectorField> allSpeciesVelocitySum_RU List<scalarField> allSpeciesVelocityMagSquaredSum_RU ( molecules.potential().nIds(), - scalarField(mesh.nCells(), 0.0) + scalarField(mesh.nCells(), Zero) ); // Geometric Fields for IO diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/resetMDFields.H b/src/lagrangian/molecularDynamics/molecule/mdTools/resetMDFields.H index 53aaa8f7a3177d64348185d1d959066358542429..6fdcf40b2464d062519c787b66291a664053ef46 100644 --- a/src/lagrangian/molecularDynamics/molecule/mdTools/resetMDFields.H +++ b/src/lagrangian/molecularDynamics/molecule/mdTools/resetMDFields.H @@ -3,13 +3,13 @@ if (runTime.writeTime()) allSpeciesN_RU = List<scalarField> ( molecules.potential().nIds(), - scalarField(mesh.nCells(), 0.0) + scalarField(mesh.nCells(), Zero) ); allSpeciesM_RU = List<scalarField> ( molecules.potential().nIds(), - scalarField(mesh.nCells(), 0.0) + scalarField(mesh.nCells(), Zero) ); allSpeciesVelocitySum_RU = List<vectorField> @@ -21,6 +21,6 @@ if (runTime.writeTime()) allSpeciesVelocityMagSquaredSum_RU = List<scalarField> ( molecules.potential().nIds(), - scalarField(mesh.nCells(), 0.0) + scalarField(mesh.nCells(), Zero) ); } diff --git a/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloudI.H b/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloudI.H index 077e50bf9d4419ad87664258b1c72af2cee5f6a5..0c10abf48a01e8bd6b3215bbe37404b53465b919 100644 --- a/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloudI.H +++ b/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloudI.H @@ -129,8 +129,8 @@ inline Foam::scalar Foam::SprayCloud<CloudType>::penetration if (Pstream::master()) { // flatten the mass lists - List<scalar> allMass(nParcelSum, 0.0); - SortableList<scalar> allDist(nParcelSum, 0.0); + List<scalar> allMass(nParcelSum, Zero); + SortableList<scalar> allDist(nParcelSum, Zero); for (label proci = 0; proci < Pstream::nProcs(); proci++) { SubList<scalar> diff --git a/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModel.C b/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModel.C index 35a34085c6f27c078fe43974c32e91d6d1f6f935..af82c8b213d91d3b082b0ffad6f53d83a8740ac9 100644 --- a/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModel.C +++ b/src/lagrangian/spray/submodels/BreakupModel/BreakupModel/BreakupModel.C @@ -70,8 +70,8 @@ Foam::BreakupModel<CloudType>::BreakupModel : CloudSubModelBase<CloudType>(owner, dict, typeName, type), solveOscillationEq_(solveOscillationEq), - y0_(this->coeffDict().template lookupOrDefault<scalar>("y0", 0.0)), - yDot0_(this->coeffDict().template lookupOrDefault<scalar>("yDot0", 0.0)), + y0_(this->coeffDict().template lookupOrDefault<scalar>("y0", 0)), + yDot0_(this->coeffDict().template lookupOrDefault<scalar>("yDot0", 0)), TABComega_(8), TABCmu_(5), TABtwoWeCrit_(12) diff --git a/src/lagrangian/spray/submodels/StochasticCollision/ORourkeCollision/ORourkeCollision.C b/src/lagrangian/spray/submodels/StochasticCollision/ORourkeCollision/ORourkeCollision.C index 558404cff1bd10b1c8acf8a76e49676beee78f74..f1241f427774ac9e5a8d22c8a9aac02ed247fc5d 100644 --- a/src/lagrangian/spray/submodels/StochasticCollision/ORourkeCollision/ORourkeCollision.C +++ b/src/lagrangian/spray/submodels/StochasticCollision/ORourkeCollision/ORourkeCollision.C @@ -40,7 +40,7 @@ void Foam::ORourkeCollision<CloudType>::collide ) { // Create the occupancy list for the cells - labelList occupancy(this->owner().mesh().nCells(), 0); + labelList occupancy(this->owner().mesh().nCells(), Zero); forAllIter(typename CloudType, this->owner(), iter) { occupancy[iter().cell()]++; diff --git a/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C b/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C index 2718f36e0ee843d0d175f77797b5eea81a79096b..473539ddb53829adde604359552c57b4bbbcf87f 100644 --- a/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C +++ b/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C @@ -165,7 +165,7 @@ Foam::forceSuSp Foam::BrownianMotionForce<CloudType>::calcCoupled const scalar muc ) const { - forceSuSp value(Zero, 0.0); + forceSuSp value(Zero); const scalar dp = p.d(); const scalar Tc = td.Tc(); diff --git a/src/lumpedPointMotion/lumpedPointMovement.C b/src/lumpedPointMotion/lumpedPointMovement.C index 99fc9bc980477c4105835ad3f357e330902a076f..a04cd7b142e1e4d6eca42631c80c9af358b658e4 100644 --- a/src/lumpedPointMotion/lumpedPointMovement.C +++ b/src/lumpedPointMotion/lumpedPointMovement.C @@ -387,7 +387,7 @@ void Foam::lumpedPointMovement::setMapping labelList faceToZoneID(mesh.nFaces() - firstFace, -1); // Number of faces per zone - labelList nFaces(thresholds().size(), 0); + labelList nFaces(thresholds().size(), Zero); const polyBoundaryMesh& patches = mesh.boundaryMesh(); diff --git a/src/mesh/blockMesh/blockEdges/projectCurveEdge/projectCurveEdge.C b/src/mesh/blockMesh/blockEdges/projectCurveEdge/projectCurveEdge.C index cf49d9ce5997c6370cc316407c3bc8a0a2e83437..99a3418335ca688d52ad647d5b9c2fb1e7c778cf 100644 --- a/src/mesh/blockMesh/blockEdges/projectCurveEdge/projectCurveEdge.C +++ b/src/mesh/blockMesh/blockEdges/projectCurveEdge/projectCurveEdge.C @@ -202,14 +202,14 @@ Foam::projectCurveEdge::position(const scalarList& lambdas) const // Compare actual distances and move points (along straight line; // not along surface) - vectorField residual(points.size(), vector::zero); + vectorField residual(points.size(), Zero); labelList indices; scalarField weights; for (label i = 1; i < points.size() - 1; i++) { interpolator.valueWeights(lambdas[i], indices, weights); - point predicted = vector::zero; + point predicted(Zero); forAll(indices, indexi) { predicted += weights[indexi]*points[indices[indexi]]; diff --git a/src/mesh/blockMesh/blockEdges/projectEdge/projectEdge.C b/src/mesh/blockMesh/blockEdges/projectEdge/projectEdge.C index 4af420d1880334f1457f7fc4738e685258d31ff9..0db2a2f093af0dc0aa40fea212281e95bcf77bd3 100644 --- a/src/mesh/blockMesh/blockEdges/projectEdge/projectEdge.C +++ b/src/mesh/blockMesh/blockEdges/projectEdge/projectEdge.C @@ -214,14 +214,14 @@ Foam::projectEdge::position(const scalarList& lambdas) const // Compare actual distances and move points (along straight line; // not along surface) - vectorField residual(points.size(), vector::zero); + vectorField residual(points.size(), Zero); labelList indices; scalarField weights; for (label i = 1; i < points.size() - 1; i++) { interpolator.valueWeights(lambdas[i], indices, weights); - point predicted = vector::zero; + point predicted(Zero); forAll(indices, indexi) { predicted += weights[indexi]*points[indices[indexi]]; diff --git a/src/mesh/blockMesh/blockFaces/projectFace/projectFace.C b/src/mesh/blockMesh/blockFaces/projectFace/projectFace.C index 36129e6c8ac981b1f907ce66a348b35e3370a927..205819f0af442f3a63208d1c83df9d2ee07147b5 100644 --- a/src/mesh/blockMesh/blockFaces/projectFace/projectFace.C +++ b/src/mesh/blockMesh/blockFaces/projectFace/projectFace.C @@ -197,8 +197,8 @@ void Foam::blockFaces::projectFace::project // Calculate initial normalised edge lengths (= u,v coordinates) - scalarField lambdaI(points.size(), 0.0); - scalarField lambdaJ(points.size(), 0.0); + scalarField lambdaI(points.size(), Zero); + scalarField lambdaJ(points.size(), Zero); calcLambdas(n, points, lambdaI, lambdaJ); @@ -251,7 +251,7 @@ void Foam::blockFaces::projectFace::project // Predict along i - vectorField residual(points.size(), vector::zero); + vectorField residual(points.size(), Zero); // Work arrays for interpolation labelList indices; @@ -279,7 +279,7 @@ void Foam::blockFaces::projectFace::project interpolator.valueWeights(lambdaI[ij], indices, weights); - point predicted = vector::zero; + point predicted(Zero); forAll(indices, indexi) { label ptIndex = index(n, labelPair(indices[indexi], j)); @@ -331,7 +331,7 @@ void Foam::blockFaces::projectFace::project interpolator.valueWeights(lambdaJ[ij], indices, weights); - point predicted = vector::zero; + point predicted(Zero); forAll(indices, indexi) { label ptIndex = index(n, labelPair(i, indices[indexi])); diff --git a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C index 1c665dc68cf3b6f7c16d0f6341df3741b90f6e15..523b2a8bc50799ecfd212a1603a18f0310d95e06 100644 --- a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C +++ b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C @@ -1131,7 +1131,7 @@ void Foam::medialAxisMeshMover::findIsolatedRegions // Count number of mesh edges using a point // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - labelList isolatedPoint(pp.nPoints(),0); + labelList isolatedPoint(pp.nPoints(), Zero); forAll(edges, edgeI) { @@ -1765,7 +1765,7 @@ bool Foam::medialAxisMeshMover::move scalarField zeroMinThickness; if (minThicknessName == "none") { - zeroMinThickness = scalarField(pp.nPoints(), 0.0); + zeroMinThickness = scalarField(pp.nPoints(), Zero); } const scalarField& minThickness = ( diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C index 117bcdb955a9de544a45dda4d36ce0d9e52abebf..97c8708a4a4049fe20d86f7497ddca589399c14f 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C @@ -2322,7 +2322,7 @@ Foam::label Foam::meshRefinement::findRegions } reduce(nSegments, maxOp<label>()); - labelList nElemsPerSegment(nSegments, 0); + labelList nElemsPerSegment(nSegments, Zero); for (label segmenti : leakPath.segments()) { nElemsPerSegment[segmenti]++; @@ -2915,7 +2915,7 @@ const { const labelList& cellLevel = meshCutter_.cellLevel(); - labelList nCells(gMax(cellLevel)+1, 0); + labelList nCells(gMax(cellLevel)+1, Zero); forAll(cellLevel, celli) { diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C index b4a800a9763acf6323fd4769b5708368cb9f231d..6ef60bb50f1d81aa06281f5c6c99ec61a2af56fc 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C @@ -730,7 +730,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createZoneBaffles labelList neiPatch(mesh_.nFaces(), -1); labelList faceZoneID(mesh_.nFaces(), -1); - labelList nBaffles(zoneIDs.size(), 0); + labelList nBaffles(zoneIDs.size(), Zero); forAll(zoneIDs, j) { @@ -893,7 +893,7 @@ Foam::List<Foam::labelPair> Foam::meshRefinement::freeStandingBaffles // All duplicate faces on edge of the patch are to be merged. // So we count for all edges of duplicate faces how many duplicate // faces use them. - labelList nBafflesPerEdge(mesh_.nEdges(), 0); + labelList nBafflesPerEdge(mesh_.nEdges(), Zero); // This algorithm is quite tricky. We don't want to use edgeFaces and @@ -2270,7 +2270,7 @@ void Foam::meshRefinement::getIntersections posOrientation = false; // Statistics: number of faces per faceZone - labelList nSurfFaces(surfaces_.surfZones().size(), 0); + labelList nSurfFaces(surfaces_.surfZones().size(), Zero); // Collect segments // ~~~~~~~~~~~~~~~~ @@ -2678,7 +2678,7 @@ void Foam::meshRefinement::zonify label nUnvisited = 0; label nBackgroundCells = 0; - labelList nZoneCells(nZones, 0); + labelList nZoneCells(nZones, Zero); forAll(cellToZone, cellI) { label zoneI = cellToZone[cellI]; @@ -4161,7 +4161,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::removeLimitShells ); - labelList cellRegion(mesh_.nCells(), 0); + labelList cellRegion(mesh_.nCells(), Zero); // Find any cells inside a limit shell with minLevel -1 labelList levelShell; limitShells_.findLevel diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementGapRefine.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementGapRefine.C index 5e76cd63cc513393a5c7799c33218efa7e4b302d..01da7090da445d7596a720b1015f1d0b01f325bc 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementGapRefine.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementGapRefine.C @@ -1535,7 +1535,7 @@ Foam::label Foam::meshRefinement::markSmallFeatureRefinement shells_.findHigherGapLevel ( ctrs, - labelList(ctrs.size(), 0), + labelList(ctrs.size(), Zero), shellGapInfo, shellGapMode ); diff --git a/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.C b/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.C index c6bd20e068cd3cb9dc832fa0a1642581d5713e31..c300ceaa408f6f4882f2d1b06d0b4f883826affc 100644 --- a/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.C +++ b/src/mesh/snappyHexMesh/refinementSurfaces/refinementSurfaces.C @@ -154,9 +154,9 @@ Foam::refinementSurfaces::refinementSurfaces surfZones_.setSize(surfI); regionOffset_.setSize(surfI); - labelList globalMinLevel(surfI, 0); - labelList globalMaxLevel(surfI, 0); - labelList globalLevelIncr(surfI, 0); + labelList globalMinLevel(surfI, Zero); + labelList globalMaxLevel(surfI, Zero); + labelList globalLevelIncr(surfI, Zero); FixedList<label, 3> nullGapLevel; nullGapLevel[0] = 0; @@ -507,7 +507,7 @@ Foam::refinementSurfaces::refinementSurfaces // { // const geometricSurfacePatchList& regions = s.patches(); // -// labelList nTris(regions.size(), 0); +// labelList nTris(regions.size(), Zero); // // forAll(s, triI) // { @@ -559,7 +559,7 @@ Foam::refinementSurfaces::refinementSurfaces Foam::labelList Foam::refinementSurfaces::maxGapLevel() const { - labelList surfaceMax(surfaces_.size(), 0); + labelList surfaceMax(surfaces_.size(), Zero); forAll(surfaces_, surfI) { @@ -596,7 +596,7 @@ void Foam::refinementSurfaces::setMinLevelFields(const shellSurfaces& shells) scalarField radiusSqr; geom.boundingSpheres(ctrs, radiusSqr); - labelList minLevelField(ctrs.size(), 0); + labelList minLevelField(ctrs.size(), Zero); { // Get the element index in a roundabout way. Problem is e.g. // distributed surface where local indices differ from global diff --git a/src/mesh/snappyHexMesh/shellSurfaces/shellSurfaces.C b/src/mesh/snappyHexMesh/shellSurfaces/shellSurfaces.C index 02e207f5e68eb64925ccc2daaf566514c618649f..5739217fe2b528c72d1dd6b4b3b8914cafe5665a 100644 --- a/src/mesh/snappyHexMesh/shellSurfaces/shellSurfaces.C +++ b/src/mesh/snappyHexMesh/shellSurfaces/shellSurfaces.C @@ -781,7 +781,7 @@ Foam::label Foam::shellSurfaces::maxLevel() const Foam::labelList Foam::shellSurfaces::maxGapLevel() const { - labelList surfaceMax(extendedGapLevel_.size(), 0); + labelList surfaceMax(extendedGapLevel_.size(), Zero); forAll(extendedGapLevel_, shelli) { diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C index 87bb6389d4cf01ed41999182bae4986c80d1f0ed..a9f6f827fc24036d0a12b2c61c8663c89c5b5538 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C @@ -110,7 +110,7 @@ Foam::tmp<Foam::scalarField> Foam::snappyLayerDriver::avgPointData const scalarField& pointFld ) { - tmp<scalarField> tfaceFld(new scalarField(pp.size(), 0.0)); + tmp<scalarField> tfaceFld(new scalarField(pp.size(), Zero)); scalarField& faceFld = tfaceFld.ref(); forAll(pp.localFaces(), facei) @@ -2376,7 +2376,7 @@ void Foam::snappyLayerDriver::setupLayerInfoTruncation else { // Determine max point layers per face. - labelList maxLevel(pp.size(), 0); + labelList maxLevel(pp.size(), Zero); forAll(pp.localFaces(), patchFacei) { @@ -3120,7 +3120,7 @@ bool Foam::snappyLayerDriver::writeLayerData ); // Convert patchReal to relative thickness - scalarField pfld(patchReal.size(), 0.0); + scalarField pfld(patchReal.size(), Zero); forAll(patchReal, i) { if (patchWanted[i] > VSMALL) @@ -3366,7 +3366,7 @@ void Foam::snappyLayerDriver::addLayers // avoid truncation in syncPatchDisplacement because of // minThickness. vectorField patchDisp(pp().nPoints(), vector(GREAT, GREAT, GREAT)); - labelList patchNLayers(pp().nPoints(), 0); + labelList patchNLayers(pp().nPoints(), Zero); label nIdealTotAddedCells = 0; List<extrudeMode> extrudeStatus(pp().nPoints(), EXTRUDE); // Get number of layers per point from number of layers per patch @@ -3387,7 +3387,7 @@ void Foam::snappyLayerDriver::addLayers syncPatchDisplacement ( *pp, - scalarField(patchDisp.size(), 0.0), //minThickness, + scalarField(patchDisp.size(), Zero), //minThickness, patchDisp, patchNLayers, extrudeStatus @@ -3618,7 +3618,7 @@ void Foam::snappyLayerDriver::addLayers // Number of layers for all pp.localPoints. Note: only valid if // extrudeStatus = EXTRUDE. - labelList patchNLayers(pp().nPoints(), 0); + labelList patchNLayers(pp().nPoints(), Zero); // Ideal number of cells added label nIdealTotAddedCells = 0; @@ -3782,7 +3782,7 @@ void Foam::snappyLayerDriver::addLayers // Per face actual overall layer thickness scalarField faceRealThickness; // Per face wanted overall layer thickness - scalarField faceWantedThickness(mesh.nFaces(), 0.0); + scalarField faceWantedThickness(mesh.nFaces(), Zero); { UIndirectList<scalar>(faceWantedThickness, pp->addressing()) = avgPointData(*pp, thickness); @@ -4470,8 +4470,8 @@ void Foam::snappyLayerDriver::addLayers // Make sure to keep the max since on two patches only one has // layers. - scalarField newFaceRealThickness(mesh.nFaces(), 0.0); - scalarField newFaceWantedThickness(mesh.nFaces(), 0.0); + scalarField newFaceRealThickness(mesh.nFaces(), Zero); + scalarField newFaceWantedThickness(mesh.nFaces(), Zero); forAll(newFaceRealThickness, facei) { label oldFacei = faceMap[facei]; diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C index 9ac074cef5163fa886b8b0585ad4e44d758f8a1d..7d4f171a8d33a55781b8628e619134a47622a2e2 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C @@ -1993,7 +1993,7 @@ Foam::label Foam::snappyRefineDriver::directionalSmooth geometry[surfi].bounds().min() & userDirection; - scalarField normalizedPosition(pointLabels.size(), 0); + scalarField normalizedPosition(pointLabels.size(), Zero); forAll(pointLabels, i) { label pointi = pointLabels[i]; @@ -2165,9 +2165,9 @@ Foam::label Foam::snappyRefineDriver::directionalSmooth pointField unsmoothedPoints(baseMeshPoints); - scalarField sumOther(baseMesh.nPoints(), 0.0); - labelList nSumOther(baseMesh.nPoints(), 0); - labelList nSumXEdges(baseMesh.nPoints(), 0); + scalarField sumOther(baseMesh.nPoints(), Zero); + labelList nSumOther(baseMesh.nPoints(), Zero); + labelList nSumXEdges(baseMesh.nPoints(), Zero); forAll(edges, edgei) { const edge& e = edges[edgei]; diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C index a2e7969f90805d33f0bf6856cf6464716e64339e..b90d4b33272c28a38487f720ab09adc406d75d6f 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C @@ -234,7 +234,7 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::smoothInternalDisplacement // Calculate average of connected cells - labelList nCells(mesh.nPoints(), 0); + labelList nCells(mesh.nPoints(), Zero); pointField sumLocation(mesh.nPoints(), Zero); forAll(isMovingPoint, pointi) @@ -356,7 +356,7 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::smoothPatchDisplacement // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vectorField avgBoundary(pointFaces.size(), Zero); - labelList nBoundary(pointFaces.size(), 0); + labelList nBoundary(pointFaces.size(), Zero); forAll(pointFaces, patchPointi) { @@ -404,7 +404,7 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::smoothPatchDisplacement labelList nInternal; { vectorField globalSum(mesh.nPoints(), Zero); - labelList globalNum(mesh.nPoints(), 0); + labelList globalNum(mesh.nPoints(), Zero); // Note: no use of pointFaces const faceList& faces = mesh.faces(); @@ -987,7 +987,7 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::avgCellCentres new pointField(pointFaces.size(), Zero) ); pointField& avgBoundary = tavgBoundary.ref(); - labelList nBoundary(pointFaces.size(), 0); + labelList nBoundary(pointFaces.size(), Zero); forAll(pointFaces, pointi) { diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverFeature.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverFeature.C index 24e02f5ebb0d2555d9f23fd453ca11b023640bd4..ba763939b77802395a4bf8abde604fac4116298e 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverFeature.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverFeature.C @@ -153,7 +153,7 @@ void Foam::snappySnapDriver::smoothAndConstrain // nearest feature point. vectorField dispSum(pp.nPoints(), Zero); - labelList dispCount(pp.nPoints(), 0); + labelList dispCount(pp.nPoints(), Zero); const labelListList& pointEdges = pp.pointEdges(); const edgeList& edges = pp.edges(); diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C index dc1b1559f7d8d857235095d482f542475ba0ab80..0e21ed424a6c8d9a79ca04405fb9eff5b4d8461d 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C @@ -41,7 +41,7 @@ Foam::label Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcDistribution if (Pstream::parRun()) { - List<label> facesPresentOnProc(Pstream::nProcs(), 0); + labelList facesPresentOnProc(Pstream::nProcs(), Zero); if ((srcPatch.size() > 0) || (tgtPatch.size() > 0)) { facesPresentOnProc[Pstream::myProcNo()] = 1; diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.C index 9b1659e4b9d70f4dacfb61d0a2b947ed5ebd3e20..7443a92c835d1e7fb35dd8fa2cbe9aa0017a8533 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.C @@ -257,7 +257,7 @@ void Foam::directAMI<SourcePatch, TargetPatch>::calculate // list to keep track of whether src face can be mapped // 1 = mapped, 0 = untested, -1 = cannot map - labelList mapFlag(srcAddr.size(), 0); + labelList mapFlag(srcAddr.size(), Zero); label nTested = 0; DynamicList<label> nonOverlapFaces; diff --git a/src/meshTools/cellQuality/cellQuality.C b/src/meshTools/cellQuality/cellQuality.C index 2ede0110c3e0f58e784921abb4f48e4e1cc074cb..d58945c83830bfbe2d4fab60d09847ea66366d9d 100644 --- a/src/meshTools/cellQuality/cellQuality.C +++ b/src/meshTools/cellQuality/cellQuality.C @@ -49,7 +49,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::nonOrthogonality() const scalarField& result = tresult.ref(); - scalarField sumArea(mesh_.nCells(), 0.0); + scalarField sumArea(mesh_.nCells(), Zero); const vectorField& centres = mesh_.cellCentres(); const vectorField& areas = mesh_.faceAreas(); @@ -110,7 +110,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::skewness() const ); scalarField& result = tresult.ref(); - scalarField sumArea(mesh_.nCells(), 0.0); + scalarField sumArea(mesh_.nCells(), Zero); const vectorField& cellCtrs = mesh_.cellCentres(); const vectorField& faceCtrs = mesh_.faceCentres(); diff --git a/src/meshTools/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.C b/src/meshTools/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.C index cbde8cb0533a15c683df820945ab4fc100417c72..4d0d208f7da513041fcb2be37faece7510388408 100644 --- a/src/meshTools/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.C +++ b/src/meshTools/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.C @@ -1864,7 +1864,7 @@ bool Foam::extendedEdgeMesh::mergePointsAndSort } // Re-classify merged points - labelList nPoints(nNewPoints, 0); + labelList nPoints(nNewPoints, Zero); forAll(oldToMerged, oldPointI) { nPoints[oldToMerged[oldPointI]]++; diff --git a/src/meshTools/momentOfInertia/momentOfInertia.C b/src/meshTools/momentOfInertia/momentOfInertia.C index 91c2ab45d9ecdbc530ab932d4990a327b2d45cd9..9f758462383fa91f481c0e750ec97f6c34f08557 100644 --- a/src/meshTools/momentOfInertia/momentOfInertia.C +++ b/src/meshTools/momentOfInertia/momentOfInertia.C @@ -80,7 +80,7 @@ void Foam::momentOfInertia::massPropertiesSolid const scalar r120 = 1.0/120.0; // order: 1, x, y, z, x^2, y^2, z^2, xy, yz, zx - scalarField integrals(10, 0.0); + scalarField integrals(10, Zero); forAll(triFaces, i) { diff --git a/src/meshTools/polyMeshZipUpCells/polyMeshZipUpCells.C b/src/meshTools/polyMeshZipUpCells/polyMeshZipUpCells.C index 63a2ef7b226524cb63ee559bf5cdb3c3fdfe5cd4..43017e7275a21f0895179368361dfdc772b5d369 100644 --- a/src/meshTools/polyMeshZipUpCells/polyMeshZipUpCells.C +++ b/src/meshTools/polyMeshZipUpCells/polyMeshZipUpCells.C @@ -84,7 +84,7 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh) // Find the edges used only once in the cell - labelList edgeUsage(cellEdges.size(), 0); + labelList edgeUsage(cellEdges.size(), Zero); forAll(curFaces, facei) { @@ -177,7 +177,7 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh) // points marked twice are internal to edge; those marked more than // twice are corners - labelList pointUsage(cellPoints.size(), 0); + labelList pointUsage(cellPoints.size(), Zero); forAll(singleEdges, edgeI) { @@ -737,8 +737,8 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh) // (edge, point) addressing. // Collect the patch sizes - labelList patchSizes(bMesh.size(), 0); - labelList patchStarts(bMesh.size(), 0); + labelList patchSizes(bMesh.size(), Zero); + labelList patchStarts(bMesh.size(), Zero); forAll(bMesh, patchi) { diff --git a/src/meshTools/processorLOD/box/box.C b/src/meshTools/processorLOD/box/box.C index f176ab0fd068adb71241bdd0e64c2201c9138ee1..f7d1afbd9b1f90805c77b994400bad1a2b9e710d 100644 --- a/src/meshTools/processorLOD/box/box.C +++ b/src/meshTools/processorLOD/box/box.C @@ -444,7 +444,7 @@ Foam::autoPtr<Foam::mapDistribute> Foam::processorLODs::box::createMap { // Per processor refinement info List<labelList> refineFlags(Pstream::nProcs()); - labelList nElems(Pstream::nProcs(), 0); + labelList nElems(Pstream::nProcs(), Zero); // Assess how many target elements intersect the source bounding boxes // and use the info to flag how the source boxes should be refined diff --git a/src/meshTools/searchableSurfaces/searchableSurfaceCollection/searchableSurfaceCollection.C b/src/meshTools/searchableSurfaces/searchableSurfaceCollection/searchableSurfaceCollection.C index 8188f683dfc432ce89abc0f3ed925f9d8325755e..483e17e8dc7202cbd01670778954873f8b94015b 100644 --- a/src/meshTools/searchableSurfaces/searchableSurfaceCollection/searchableSurfaceCollection.C +++ b/src/meshTools/searchableSurfaces/searchableSurfaceCollection/searchableSurfaceCollection.C @@ -121,7 +121,7 @@ void Foam::searchableSurfaceCollection::sortHits ) const { // Count hits per surface. - labelList nHits(subGeom_.size(), 0); + labelList nHits(subGeom_.size(), Zero); forAll(info, pointi) { diff --git a/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C b/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C index 8491d6dee1a6a9b84d8b4cac1f6faa010a0b588e..00fbac4214a56618809026d3708c2f440643b804 100644 --- a/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C +++ b/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C @@ -76,7 +76,7 @@ void Foam::edgeSurface::calcPointEdges() { pointEdges_.setSize(points_.size()); - labelList pointNEdges(points_.size(), 0); + labelList pointNEdges(points_.size(), Zero); forAll(edges_, edgeI) { diff --git a/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C b/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C index 9cfed82774976f44eba2e859cb5ed6559e257f9b..8c002792873c915ddde8625fe2bc0ab1dcc70553 100644 --- a/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C +++ b/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C @@ -1102,7 +1102,7 @@ Foam::intersectedSurface::intersectedSurface DynamicList<labelledTri> newTris(eSurf.edges().size()/2); // Start in newTris for decomposed face. - labelList startTrii(surf.size(), 0); + labelList startTrii(surf.size(), Zero); forAll(surf, facei) { diff --git a/src/meshTools/triSurface/triSurfaceSearch/triSurfaceRegionSearch.C b/src/meshTools/triSurface/triSurfaceSearch/triSurfaceRegionSearch.C index 13ba83fb954dcdd74af21fdca06ec754ade8ec60..983e376c2f38cf106a81c5c1138e320df162294b 100644 --- a/src/meshTools/triSurface/triSurfaceSearch/triSurfaceRegionSearch.C +++ b/src/meshTools/triSurface/triSurfaceSearch/triSurfaceRegionSearch.C @@ -92,7 +92,7 @@ Foam::triSurfaceRegionSearch::treeByRegion() const regionsAddressing[regionI] = labelList(regionSizes[regionI], -1); } - labelList nFacesInRegions(nRegions, 0); + labelList nFacesInRegions(nRegions, Zero); forAll(surface(), fI) { diff --git a/src/meshTools/triSurface/triSurfaceTools/triSurfaceCurvature.C b/src/meshTools/triSurface/triSurfaceTools/triSurfaceCurvature.C index e179edd35b7be16b27e4806e8ee3cb301714c639..d0ce41baa75d96af165187dbc2a06f10735a7e24 100644 --- a/src/meshTools/triSurface/triSurfaceTools/triSurfaceCurvature.C +++ b/src/meshTools/triSurface/triSurfaceTools/triSurfaceCurvature.C @@ -160,7 +160,7 @@ Foam::triSurfaceTools::curvatures symmTensor2D::zero ); - scalarList accumulatedWeights(points.size(), 0.0); + scalarList accumulatedWeights(points.size(), Zero); forAll(surf, fI) { diff --git a/src/overset/cellCellStencil/cellCellStencil/cellCellStencil.C b/src/overset/cellCellStencil/cellCellStencil/cellCellStencil.C index 0a8954272a778ace3adfa5cb138fb9a32f72750b..d25311212ef529cb22a2038579779808a55cb75c 100644 --- a/src/overset/cellCellStencil/cellCellStencil/cellCellStencil.C +++ b/src/overset/cellCellStencil/cellCellStencil/cellCellStencil.C @@ -145,7 +145,7 @@ Foam::labelList Foam::cellCellStencil::count const labelUList& lst ) { - labelList count(size, 0); + labelList count(size, Zero); forAll(lst, i) { count[lst[i]]++; diff --git a/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C b/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C index 5396d5a727a487c9c0bc8c8ddfc7d1c7700f8b2f..0e048a8c266f4170aed089c441d0b0ec1c130e5a 100644 --- a/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C +++ b/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C @@ -270,7 +270,7 @@ void Foam::cellCellStencils::cellVolumeWeight::findHoles // 1 : borders blockage so is not ok (but can be overridden by real // patch) // 2 : has real patch in it so is reachable - labelList regionType(cellRegion.nRegions(), 0); + labelList regionType(cellRegion.nRegions(), Zero); // See if any regions borders blockage. Note: isBlockedFace is already @@ -745,7 +745,7 @@ bool Foam::cellCellStencils::cellVolumeWeight::update() const labelIOList& zoneID = this->zoneID(); label nZones = gMax(zoneID)+1; - labelList nCellsPerZone(nZones, 0); + labelList nCellsPerZone(nZones, Zero); forAll(zoneID, cellI) { nCellsPerZone[zoneID[cellI]]++; @@ -983,7 +983,7 @@ bool Foam::cellCellStencils::cellVolumeWeight::update() // Add buffer interpolation layer around holes - scalarField allWeight(mesh_.nCells(), 0.0); + scalarField allWeight(mesh_.nCells(), Zero); walkFront(layerRelax, allCellTypes, allWeight); diff --git a/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C b/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C index e6db3cfdef8ec8b3bd2017ccf17e483a055b961a..0d09a2330eb47d76a8a4bc3409eb35c4216d363d 100644 --- a/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C +++ b/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C @@ -784,7 +784,7 @@ void Foam::cellCellStencils::inverseDistance::markDonors // // so we'll need to compact // // // 4a: count per originating processor the number of regions -// labelList nOriginating(Pstream::nProcs(), 0); +// labelList nOriginating(Pstream::nProcs(), Zero); // { // labelHashSet haveRegion(mesh.nCells()/8); // @@ -1055,7 +1055,7 @@ void Foam::cellCellStencils::inverseDistance::findHoles // 1 : borders blockage so is not ok (but can be overridden by real // patch) // 2 : has real patch in it so is reachable - labelList regionType(nRegions, 0); + labelList regionType(nRegions, Zero); // See if any regions borders blockage. Note: isBlockedFace is already @@ -1326,7 +1326,7 @@ void Foam::cellCellStencils::inverseDistance::walkFront // Current interpolation fraction - scalarField fraction(mesh_.nFaces(), 0.0); + scalarField fraction(mesh_.nFaces(), Zero); forAll(isFront, faceI) { @@ -1658,7 +1658,7 @@ Foam::cellCellStencils::inverseDistance::inverseDistance : cellCellStencil(mesh), dict_(dict), - smallVec_(vector::zero), + smallVec_(Zero), cellTypes_(labelList(mesh.nCells(), CALCULATED)), interpolationCells_(0), cellInterpolationMap_(), @@ -1746,7 +1746,7 @@ bool Foam::cellCellStencils::inverseDistance::update() const labelIOList& zoneID = this->zoneID(); label nZones = gMax(zoneID)+1; - labelList nCellsPerZone(nZones, 0); + labelList nCellsPerZone(nZones, Zero); forAll(zoneID, cellI) { nCellsPerZone[zoneID[cellI]]++; @@ -2073,7 +2073,7 @@ bool Foam::cellCellStencils::inverseDistance::update() // Add buffer interpolation layer(s) around holes - scalarField allWeight(mesh_.nCells(), 0.0); + scalarField allWeight(mesh_.nCells(), Zero); walkFront(layerRelax, allStencil, allCellTypes, allWeight); if (debug) @@ -2201,7 +2201,7 @@ bool Foam::cellCellStencils::inverseDistance::update() // Dump max weight { - scalarField maxMagWeight(mesh_.nCells(), 0.0); + scalarField maxMagWeight(mesh_.nCells(), Zero); forAll(cellStencil_, celli) { const scalarList& wghts = cellInterpolationWeights_[celli]; diff --git a/src/overset/cellCellStencil/leastSquares/leastSquaresCellCellStencil.C b/src/overset/cellCellStencil/leastSquares/leastSquaresCellCellStencil.C index 8f2da7a0ba010e66b977be872121847797d8e5cd..199bc41a04c661cfc4c7e62cc0db31d53881adc2 100644 --- a/src/overset/cellCellStencil/leastSquares/leastSquaresCellCellStencil.C +++ b/src/overset/cellCellStencil/leastSquares/leastSquaresCellCellStencil.C @@ -61,7 +61,7 @@ void Foam::cellCellStencils::leastSquares::stencilWeights scalar W = 0; // Sum of weighted distance vectors - vector dw = vector::zero; + vector dw(Zero); RectangularMatrix<scalar> A(nD, 3); diff --git a/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C b/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C index 98d5df05257ef482b3a4546e1bb3386210ee5792..a30a601d306622c6789d9256e883516f2f715b97 100644 --- a/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C +++ b/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C @@ -451,7 +451,7 @@ Foam::cellCellStencils::trackingInverseDistance::trackingInverseDistance const labelIOList& zoneID = this->zoneID(); label nZones = gMax(zoneID)+1; - labelList nCellsPerZone(nZones, 0); + labelList nCellsPerZone(nZones, Zero); forAll(zoneID, celli) { nCellsPerZone[zoneID[celli]]++; @@ -758,7 +758,7 @@ bool Foam::cellCellStencils::trackingInverseDistance::update() DebugInfo<< FUNCTION_NAME << " : Flood-filled holes" << endl; // Add buffer interpolation layer(s) around holes - scalarField allWeight(mesh_.nCells(), 0.0); + scalarField allWeight(mesh_.nCells(), Zero); walkFront(layerRelax, allStencil, allCellTypes, allWeight); DebugInfo<< FUNCTION_NAME << " : Implemented layer relaxation" << endl; diff --git a/src/overset/dynamicOversetFvMesh/dynamicOversetFvMeshTemplates.C b/src/overset/dynamicOversetFvMesh/dynamicOversetFvMeshTemplates.C index bfb2288cf6cb1db9f95c8c184ff4c964d8513f42..190e05c06f32e210d969d5d1e573060ee58c352e 100644 --- a/src/overset/dynamicOversetFvMesh/dynamicOversetFvMeshTemplates.C +++ b/src/overset/dynamicOversetFvMesh/dynamicOversetFvMeshTemplates.C @@ -238,7 +238,7 @@ void Foam::dynamicOversetFvMesh::addInterpolation(fvMatrix<Type>& m) const // produces a non-zero source for interpolated cells. // The procedure below calculates this contribution 'correctionSource' // and subtracts it from the source later in order to compensate. - Field<Type> correctionSource(diag.size(), pTraits<Type>::zero); + Field<Type> correctionSource(diag.size(), Zero); if (pTraits<Type>::nComponents > 1) { diff --git a/src/overset/fvMeshPrimitiveLduAddressing/fvMeshPrimitiveLduAddressing.C b/src/overset/fvMeshPrimitiveLduAddressing/fvMeshPrimitiveLduAddressing.C index f963e6e5c116bc428bec360056e0c97c7ccb38b2..f04cc3e1d22599c30f8631e033dbdb0f1c727dba 100644 --- a/src/overset/fvMeshPrimitiveLduAddressing/fvMeshPrimitiveLduAddressing.C +++ b/src/overset/fvMeshPrimitiveLduAddressing/fvMeshPrimitiveLduAddressing.C @@ -119,7 +119,7 @@ Foam::labelList Foam::fvMeshPrimitiveLduAddressing::addAddressing { label nCells = addr.size(); label nFaces = addr.upperAddr().size(); - labelList nProcFaces(Pstream::nProcs(), 0); + labelList nProcFaces(Pstream::nProcs(), Zero); // Count additional faces nExtraFaces = 0; diff --git a/src/overset/oversetAdjustPhi/oversetAdjustPhi.C b/src/overset/oversetAdjustPhi/oversetAdjustPhi.C index d678e12664c46779d7822a9e53100c19ee222d6f..25878e0c17399fab9dec45fd0d62e24067f2523a 100644 --- a/src/overset/oversetAdjustPhi/oversetAdjustPhi.C +++ b/src/overset/oversetAdjustPhi/oversetAdjustPhi.C @@ -49,8 +49,8 @@ bool Foam::oversetAdjustPhi // Pass1: accumulate all fluxes, calculate correction factor - scalarField massIn(nZones, 0.0); - scalarField adjustableMassOut(nZones, 0.0); + scalarField massIn(nZones, Zero); + scalarField adjustableMassOut(nZones, Zero); surfaceScalarField::Boundary& bphi = phi.boundaryFieldRef(); diff --git a/src/overset/oversetPolyPatch/oversetGAMGInterface.C b/src/overset/oversetPolyPatch/oversetGAMGInterface.C index a70c7acf0c9b0277ff1518613949fafb235ff70e..74a166d64589ce8ed8ac2221bca23ed00e6da1a6 100644 --- a/src/overset/oversetPolyPatch/oversetGAMGInterface.C +++ b/src/overset/oversetPolyPatch/oversetGAMGInterface.C @@ -151,7 +151,7 @@ Foam::oversetGAMGInterface::oversetGAMGInterface // Accumulate the coarse level stencil // Number of fine cells contributing to the coarse cell - labelList nFineCells(nCoarseCells, 0); + labelList nFineCells(nCoarseCells, Zero); stencil_.setSize(nCoarseCells); cellInterpolationWeights_.setSize(nCoarseCells); diff --git a/src/overset/regionsToCell/findRefCells.C b/src/overset/regionsToCell/findRefCells.C index 67ac1ba0f8e9c30be77485c7823684e95737eb0e..6c73772103ccb002c4e6757d66bcd78cb9592f0c 100644 --- a/src/overset/regionsToCell/findRefCells.C +++ b/src/overset/regionsToCell/findRefCells.C @@ -92,7 +92,7 @@ void Foam::setRefCells // (per region!) does region have reference cell? - labelList hasRef(regionNeedReference.size(), 0); + labelList hasRef(regionNeedReference.size(), Zero); const labelList refValues(dict.lookup(refValueName)); @@ -158,7 +158,7 @@ void Foam::setRefCells << exit(FatalIOError); } - labelList hasRef(refPoints.size(), 0); + labelList hasRef(refPoints.size(), Zero); forAll(refPoints, i) { diff --git a/src/parallel/decompose/decompositionMethods/decompositionConstraints/singleProcessorFaceSets/singleProcessorFaceSetsConstraint.C b/src/parallel/decompose/decompositionMethods/decompositionConstraints/singleProcessorFaceSets/singleProcessorFaceSetsConstraint.C index 59a6a73860ccefdaa9887fe9c632441ee1a905ca..6ef3e608995f2a981114675d490d10a3cbe9cf1f 100644 --- a/src/parallel/decompose/decompositionMethods/decompositionConstraints/singleProcessorFaceSets/singleProcessorFaceSetsConstraint.C +++ b/src/parallel/decompose/decompositionMethods/decompositionConstraints/singleProcessorFaceSets/singleProcessorFaceSetsConstraint.C @@ -156,7 +156,7 @@ void Foam::decompositionConstraints::singleProcessorFaceSets::add const faceSet fz(mesh, setNameAndProcs_[setI].first()); // Check that it does not overlap with existing specifiedProcessorFaces - labelList nMatch(specifiedProcessorFaces.size(), 0); + labelList nMatch(specifiedProcessorFaces.size(), Zero); forAllConstIter(faceSet, fz, iter) { label seti = faceToSet[iter.key()]; diff --git a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C index 56d7a022c58234189d3c3f64065291d7b97055b6..ef1b16d35ae721820a000e19d0d5d59566a69638 100644 --- a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C +++ b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C @@ -320,7 +320,7 @@ void Foam::ptscotchDecomp::check(const int retVal, const char* str) // // // Number of cells to send to the next processor // // (is same as number of cells next processor has to receive) -// List<label> nSendCells(Pstream::nProcs(), 0); +// List<label> nSendCells(Pstream::nProcs(), Zero); // // for (label proci = nSendCells.size()-1; proci >=1; proci--) // { diff --git a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C index 665cf0ce85b8bdbe781a8a806787ef1e9cf046fc..57fe3e803ec7ee92efe202aedbe7bfe55dbe6427 100644 --- a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C +++ b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C @@ -550,7 +550,7 @@ Foam::distributedTriSurfaceMesh::calcLocalQueries // cheap we do a multi-pass algorithm to save some memory temporarily. // 1. Count - labelList nSend(Pstream::nProcs(), 0); + labelList nSend(Pstream::nProcs(), Zero); forAll(info, i) { diff --git a/src/randomProcesses/noise/noiseFFT/noiseFFT.C b/src/randomProcesses/noise/noiseFFT/noiseFFT.C index 3d5b77c4ca486c9df536fe9c779c5e85ed0f5025..6a8bc79cc469454e2592340ea482acaa20838b0d 100644 --- a/src/randomProcesses/noise/noiseFFT/noiseFFT.C +++ b/src/randomProcesses/noise/noiseFFT/noiseFFT.C @@ -322,7 +322,7 @@ Foam::graph Foam::noiseFFT::meanPf(const windowModel& window) const const label N = window.nSamples(); const label nWindow = window.nWindow(); - scalarField meanPf(N/2 + 1, 0.0); + scalarField meanPf(N/2 + 1, Zero); for (label windowI = 0; windowI < nWindow; ++windowI) { @@ -354,7 +354,7 @@ Foam::graph Foam::noiseFFT::RMSmeanPf(const windowModel& window) const const label N = window.nSamples(); const label nWindow = window.nWindow(); - scalarField RMSMeanPf(N/2 + 1, 0.0); + scalarField RMSMeanPf(N/2 + 1, Zero); for (label windowI = 0; windowI < nWindow; ++windowI) { RMSMeanPf += sqr(Pf(window.apply<scalar>(*this, windowI))); @@ -385,7 +385,7 @@ Foam::graph Foam::noiseFFT::PSDf(const windowModel& window) const const label N = window.nSamples(); const label nWindow = window.nWindow(); - scalarField psd(N/2 + 1, 0.0); + scalarField psd(N/2 + 1, Zero); for (label windowI = 0; windowI < nWindow; ++windowI) { @@ -465,8 +465,8 @@ Foam::graph Foam::noiseFFT::octaves const scalarField& f = g.x(); const scalarField& data = g.y(); - scalarField octData(freqBandIDs.size() - 1, 0.0); - scalarField fm(freqBandIDs.size() -1, 0.0); + scalarField octData(freqBandIDs.size() - 1, Zero); + scalarField fm(freqBandIDs.size() -1, Zero); for (label bandI = 0; bandI < freqBandIDs.size() - 1; ++bandI) { diff --git a/src/randomProcesses/noise/noiseModels/surfaceNoise/surfaceNoise.C b/src/randomProcesses/noise/noiseModels/surfaceNoise/surfaceNoise.C index d53c0c9b9f8ec48047d6301bd68d99c6ce0437fb..bf53217d1a19b6fdf33727067f204b5c913a481f 100644 --- a/src/randomProcesses/noise/noiseModels/surfaceNoise/surfaceNoise.C +++ b/src/randomProcesses/noise/noiseModels/surfaceNoise/surfaceNoise.C @@ -615,9 +615,9 @@ void surfaceNoise::calculate() label f1 = floor(fUpper_/deltaf/scalar(fftWriteInterval_)); label nFreq = f1 - f0; - scalarField PrmsfAve(nFreq, 0); - scalarField PSDfAve(nFreq, 0); - scalarField fOut(nFreq, 0); + scalarField PrmsfAve(nFreq, Zero); + scalarField PSDfAve(nFreq, Zero); + scalarField fOut(nFreq, Zero); if (nFreq == 0) { @@ -746,8 +746,8 @@ void surfaceNoise::calculate() { fileName outDir(outDirBase/"oneThirdOctave"); - scalarField PSDfAve(surfPSD13f.size(), 0); - scalarField Prms13f2Ave(surfPSD13f.size(), 0); + scalarField PSDfAve(surfPSD13f.size(), Zero); + scalarField Prms13f2Ave(surfPSD13f.size(), Zero); forAll(surfPSD13f, i) { diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C index 54fe25c512c849a8b558960970cdb7de996ff0db..52dc55ba4e5814480b25f5aa0744233368e02322 100644 --- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C +++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C @@ -261,15 +261,15 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs() scalarField myKDelta(K*patch().deltaCoeffs()); - scalarList Tfilm(patch().size(), 0.0); - scalarList htcwfilm(patch().size(), 0.0); - scalarList filmDelta(patch().size(), 0.0); + scalarList Tfilm(patch().size(), Zero); + scalarList htcwfilm(patch().size(), Zero); + scalarList filmDelta(patch().size(), Zero); const pyrolysisModelType& pyrolysis = pyrModel(); const filmModelType& film = filmModel(); // Obtain Rad heat (qr) - scalarField qr(patch().size(), 0.0); + scalarField qr(patch().size(), Zero); label coupledPatchi = -1; if (pyrolysisRegionName_ == mesh.name()) diff --git a/src/regionModels/regionModel/regionModel1D/regionModel1D.C b/src/regionModels/regionModel/regionModel1D/regionModel1D.C index 61d6283b14fc55ee97b5573bc2dbd649f4d20f7f..5c1d894656ad1c7711338de68b2da6971dc45299 100644 --- a/src/regionModels/regionModel/regionModel1D/regionModel1D.C +++ b/src/regionModels/regionModel/regionModel1D/regionModel1D.C @@ -198,7 +198,7 @@ Foam::tmp<Foam::labelField> Foam::regionModels::regionModel1D::moveMesh const scalar minDelta ) { - tmp<labelField> tcellMoveMap(new labelField(regionMesh().nCells(), 0)); + tmp<labelField> tcellMoveMap(new labelField(regionMesh().nCells(), Zero)); labelField& cellMoveMap = tcellMoveMap.ref(); if (!moveMesh_) @@ -226,7 +226,7 @@ Foam::tmp<Foam::labelField> Foam::regionModels::regionModel1D::moveMesh const vector n = pp.faceNormals()[patchFacei]; const vector sf = pp.faceAreas()[patchFacei]; - List<point> oldCf(faces.size() + 1, vector::zero); + List<point> oldCf(faces.size() + 1, Zero); List<bool> frozen(faces.size(), false); forAll(faces, i) @@ -247,7 +247,7 @@ Foam::tmp<Foam::labelField> Foam::regionModels::regionModel1D::moveMesh } } - vectorField newDelta(cells.size() + 1, vector::zero); + vectorField newDelta(cells.size() + 1, Zero); label j = 0; forAllReverse(cells, i) diff --git a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C index d3559b61f079194cd26878856983bc3104aef6d0..b4360ca9b31ea848ad383e35cfbd71de32e614aa 100644 --- a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C +++ b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C @@ -117,7 +117,7 @@ void Foam::regionModels::singleLayerRegion::initialise() << abort(FatalError); } - scalarField passiveMagSf(magSf.size(), 0.0); + scalarField passiveMagSf(magSf.size(), Zero); passivePatchIDs_.setSize(intCoupledPatchIDs_.size(), -1); forAll(intCoupledPatchIDs_, i) { diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C index 03635edb6efcb5921f252cc4b76f84635aa71b39..28b12a8b75c1d0afcaad4cf97a520bdf6cc3f0b8 100644 --- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C @@ -794,7 +794,7 @@ kinematicSingleLayer::kinematicSingleLayer filmThermo_(filmThermoModel::New(*this, coeffs_)), - availableMass_(regionMesh().nCells(), 0.0), + availableMass_(regionMesh().nCells(), Zero), injection_(*this, coeffs_), diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C index 5233f125040d0fe21e893d75220fb5e5fc43d477..6a053901e639722d6998382e9313ad40b316b81f 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C @@ -121,7 +121,7 @@ tmp<scalarField> curvatureSeparation::calcCosAngle const labelUList& nbr = mesh.neighbour(); scalarField phiMax(mesh.nCells(), -GREAT); - scalarField cosAngle(mesh.nCells(), 0.0); + scalarField cosAngle(mesh.nCells(), Zero); forAll(nbr, facei) { label cellO = own[facei]; @@ -226,7 +226,7 @@ curvatureSeparation::curvatureSeparation : injectionModel(type(), film, dict), gradNHat_(fvc::grad(film.nHat())), - deltaByR1Min_(coeffDict_.lookupOrDefault<scalar>("deltaByR1Min", 0.0)), + deltaByR1Min_(coeffDict_.lookupOrDefault<scalar>("deltaByR1Min", 0)), definedPatchRadii_(), magG_(mag(film.g().value())), gHat_(Zero) @@ -299,8 +299,8 @@ void curvatureSeparation::correct // calculate force balance const scalar Fthreshold = 1e-10; - scalarField Fnet(mesh.nCells(), 0.0); - scalarField separated(mesh.nCells(), 0.0); + scalarField Fnet(mesh.nCells(), Zero); + scalarField separated(mesh.nCells(), Zero); forAll(invR1, i) { if ((invR1[i] > 0) && (delta[i]*invR1[i] > deltaByR1Min_)) diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/drippingInjection/drippingInjection.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/drippingInjection/drippingInjection.C index 30b4ce185c1718eb0dcd618688315861f5cdaec1..168e6da0af22ca63f9a3741857973f460aaa35d1 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/drippingInjection/drippingInjection.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/drippingInjection/drippingInjection.C @@ -98,7 +98,7 @@ void drippingInjection::correct const scalarField& delta = film.delta(); const scalarField& rho = film.rho(); - scalarField massDrip(film.regionMesh().nCells(), 0.0); + scalarField massDrip(film.regionMesh().nCells(), Zero); forAll(gNorm, i) { diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModelList/injectionModelList.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModelList/injectionModelList.C index e9770089d27ce5a627e857ce759a7015e43c327c..b53a600b79a2071b03dfab0278ecdf1641b0933a 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModelList/injectionModelList.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModelList/injectionModelList.C @@ -58,7 +58,7 @@ injectionModelList::injectionModelList "injectionModelList", "injectionModelList" ), - massInjected_(film.intCoupledPatchIDs().size(), 0.0) + massInjected_(film.intCoupledPatchIDs().size(), Zero) { const wordList activeModels(dict.lookup("injectionModels")); @@ -149,7 +149,7 @@ void injectionModelList::info(Ostream& os) } } - scalarField mass0(massInjected_.size(), 0); + scalarField mass0(massInjected_.size(), Zero); this->getBaseProperty("massInjected", mass0); scalarField mass(massInjected_); diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/patchInjection/patchInjection.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/patchInjection/patchInjection.C index 3adb13a1f60c750f500dce50ba502cfd7ad69e28..e3101feaf63415396b67aed44492a09b09cc3c62 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/patchInjection/patchInjection.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/patchInjection/patchInjection.C @@ -49,7 +49,7 @@ patchInjection::patchInjection ) : injectionModel(type(), film, dict), - deltaStable_(coeffDict_.lookupOrDefault<scalar>("deltaStable", 0.0)) + deltaStable_(coeffDict_.lookupOrDefault<scalar>("deltaStable", 0)) { const polyBoundaryMesh& pbm = film.regionMesh().boundaryMesh(); patchIDs_.setSize @@ -180,7 +180,7 @@ void patchInjection::patchInjectedMassTotals(scalarField& patchMasses) const getModelProperty<scalarField> ( "patchInjectedMasses", - scalarField(patchInjectedMasses_.size(), 0) + scalarField(patchInjectedMasses_.size(), Zero) ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/transferModels/transferModel/transferModel.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/transferModels/transferModel/transferModel.C index b208718e42a41a062092c18949414f42ef41a0b1..3521b050902c30ce95acfb4f19e62c8e2193b366 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/transferModels/transferModel/transferModel.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/transferModels/transferModel/transferModel.C @@ -94,7 +94,7 @@ void transferModel::correct scalarField& energyToTransfer ) { - scalarField massToTransfer0(massToTransfer.size(), scalar(0)); + scalarField massToTransfer0(massToTransfer.size(), Zero); correct(availableMass, massToTransfer0); massToTransfer += massToTransfer0; energyToTransfer += massToTransfer0*film().hs(); diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/transferModels/transferModelList/transferModelList.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/transferModels/transferModelList/transferModelList.C index b3b0f9ef9c29bc8a3a6dd31c9203092e9f2b1a6d..15bb4eccb378dd20830dc7d636a3992e460c903f 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/transferModels/transferModelList/transferModelList.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/transferModels/transferModelList/transferModelList.C @@ -58,7 +58,7 @@ transferModelList::transferModelList "transferModelList", "transferModelList" ), - massTransferred_(film.intCoupledPatchIDs().size(), 0.0) + massTransferred_(film.intCoupledPatchIDs().size(), Zero) { const wordList activeModels ( @@ -177,7 +177,7 @@ void transferModelList::info(Ostream& os) } } - scalarField mass0(massTransferred_.size(), 0); + scalarField mass0(massTransferred_.size(), Zero); this->getBaseProperty("massTransferred", mass0); scalarField mass(massTransferred_); diff --git a/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C index 0551b52e42299109f141aeff3b94684038c9d579..6177cc7f3b6d7cdf392db1c99584f38ebee00592 100644 --- a/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C +++ b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C @@ -183,7 +183,7 @@ thermalBaffleModel::thermalBaffleModel(const fvMesh& mesh) : regionModel1D(mesh, "thermalBaffle"), thickness_(), - delta_("delta", dimLength, 0.0), + delta_("delta", dimLength, Zero), oneD_(false), constantThickness_(true) {} @@ -199,7 +199,7 @@ thermalBaffleModel::thermalBaffleModel : regionModel1D(mesh, "thermalBaffle", modelType, dict, true), thickness_(), - delta_("delta", dimLength, 0.0), + delta_("delta", dimLength, Zero), oneD_(false), constantThickness_(dict.lookupOrDefault("constantThickness", true)) { @@ -215,7 +215,7 @@ thermalBaffleModel::thermalBaffleModel : regionModel1D(mesh, "thermalBaffle", modelType), thickness_(), - delta_("delta", dimLength, 0.0), + delta_("delta", dimLength, Zero), oneD_(false), constantThickness_(lookupOrDefault("constantThickness", true)) { diff --git a/src/renumber/renumberMethods/springRenumber/springRenumber.C b/src/renumber/renumberMethods/springRenumber/springRenumber.C index 1a64c64809b99f3c6402f6eeea1ebe31ebd12cf5..5fbe56f024f1aaf24885e2118d58b50fe4b790e6 100644 --- a/src/renumber/renumberMethods/springRenumber/springRenumber.C +++ b/src/renumber/renumberMethods/springRenumber/springRenumber.C @@ -108,7 +108,7 @@ Foam::labelList Foam::springRenumber::renumber // << endl; // Sum force per cell. - scalarField sumForce(cellCells.size(), 0.0); + scalarField sumForce(cellCells.size(), Zero); forAll(cellCells, oldCelli) { const labelList& cCells = cellCells[oldCelli]; diff --git a/src/sampling/meshToMesh/meshToMeshParallelOps.C b/src/sampling/meshToMesh/meshToMeshParallelOps.C index d60b386ab6a32708c216d809f71e622df0f93812..e918f3c361d975be48608511cea526c95307e6e4 100644 --- a/src/sampling/meshToMesh/meshToMeshParallelOps.C +++ b/src/sampling/meshToMesh/meshToMeshParallelOps.C @@ -45,7 +45,7 @@ Foam::label Foam::meshToMesh::calcDistribution if (Pstream::parRun()) { - List<label> cellsPresentOnProc(Pstream::nProcs(), 0); + List<label> cellsPresentOnProc(Pstream::nProcs(), Zero); if ((src.nCells() > 0) || (tgt.nCells() > 0)) { cellsPresentOnProc[Pstream::myProcNo()] = 1; @@ -601,7 +601,7 @@ void Foam::meshToMesh::distributeAndMergeCells // Starting offset for points label nPoints = 0; - labelList pointOffset(Pstream::nProcs(), 0); + labelList pointOffset(Pstream::nProcs(), Zero); forAll(allPoints, proci) { pointOffset[proci] = nPoints; @@ -610,7 +610,7 @@ void Foam::meshToMesh::distributeAndMergeCells // Starting offset for cells label nCells = 0; - labelList cellOffset(Pstream::nProcs(), 0); + labelList cellOffset(Pstream::nProcs(), Zero); forAll(allTgtCellIDs, proci) { cellOffset[proci] = nCells; @@ -662,7 +662,7 @@ void Foam::meshToMesh::distributeAndMergeCells // Starting offset for internal faces label nIntFaces = 0; label nFacesTotal = 0; - labelList internalFaceOffset(Pstream::nProcs(), 0); + labelList internalFaceOffset(Pstream::nProcs(), Zero); forAll(allNIntCoupledFaces, proci) { label nCoupledFaces = diff --git a/src/sampling/sampledSet/cellCentre/cellCentreSet.C b/src/sampling/sampledSet/cellCentre/cellCentreSet.C index 1c7cc4a1828ab2b6cc710918f247eb0ff2c23b30..0fa42cf50e65e30be4833668ee30b233019a47ea 100644 --- a/src/sampling/sampledSet/cellCentre/cellCentreSet.C +++ b/src/sampling/sampledSet/cellCentre/cellCentreSet.C @@ -73,7 +73,7 @@ void Foam::cellCentreSet::genSamples() } labelList samplingFaces(selectedCells.size(), -1); - labelList samplingSegments(selectedCells.size(), 0); + labelList samplingSegments(selectedCells.size(), Zero); scalarList samplingCurveDist(selectedCells.size()); forAll(selectedCells, i) diff --git a/src/sampling/surface/isoSurface/isoSurfaceTemplates.C b/src/sampling/surface/isoSurface/isoSurfaceTemplates.C index c03a97de507f981fd1b66d35e0cc117aae32ae11..430733fff6d1f633e687203d94395b69c3ef22bc 100644 --- a/src/sampling/surface/isoSurface/isoSurfaceTemplates.C +++ b/src/sampling/surface/isoSurface/isoSurfaceTemplates.C @@ -758,7 +758,7 @@ Foam::isoSurface::interpolate // Pass1: unweighted average of merged point values { - labelList nValues(values.size(), 0); + labelList nValues(values.size(), Zero); forAll(unmergedValues, i) { diff --git a/src/sampling/surface/isoSurface/isoSurfaceTopo.C b/src/sampling/surface/isoSurface/isoSurfaceTopo.C index 122918466112f0847a647cdb7818b2711321b4fe..b2e841b08218dcf5f5b2384efac5a426d3372015 100644 --- a/src/sampling/surface/isoSurface/isoSurfaceTopo.C +++ b/src/sampling/surface/isoSurface/isoSurfaceTopo.C @@ -998,7 +998,7 @@ Foam::isoSurfaceTopo::isoSurfaceTopo DynamicList<label> cellLabels(5*nCutCells); - labelList startTri(mesh_.nCells()+1, 0); + labelList startTri(mesh_.nCells()+1, Zero); for (label celli = 0; celli < mesh_.nCells(); ++celli) { diff --git a/src/semiPermeableBaffle/derivedFvPatchFields/semiPermeableBaffleMassFraction/semiPermeableBaffleMassFractionFvPatchScalarField.C b/src/semiPermeableBaffle/derivedFvPatchFields/semiPermeableBaffleMassFraction/semiPermeableBaffleMassFractionFvPatchScalarField.C index 550b2952cb952f9c1986a7b2415f00666b7d5d46..ff575e38455fc6949c928de427034e797bdb75ae 100644 --- a/src/semiPermeableBaffle/derivedFvPatchFields/semiPermeableBaffleMassFraction/semiPermeableBaffleMassFractionFvPatchScalarField.C +++ b/src/semiPermeableBaffle/derivedFvPatchFields/semiPermeableBaffleMassFraction/semiPermeableBaffleMassFractionFvPatchScalarField.C @@ -60,7 +60,7 @@ semiPermeableBaffleMassFractionFvPatchScalarField : mappedPatchBase(p.patch(), NEARESTPATCHFACE, dict), mixedFvPatchScalarField(p, iF), - c_(dict.lookupOrDefault<scalar>("c", scalar(0))), + c_(dict.lookupOrDefault<scalar>("c", 0)), phiName_(dict.lookupOrDefault<word>("phi", "phi")) { fvPatchScalarField::operator=(scalarField("value", dict, p.size())); @@ -121,7 +121,7 @@ Foam::semiPermeableBaffleMassFractionFvPatchScalarField::phiY() const { if (c_ == scalar(0)) { - return tmp<scalarField>(new scalarField(patch().size(), Zero)); + return tmp<scalarField>::New(patch().size(), Zero); } const word& YName = internalField().name(); @@ -170,7 +170,7 @@ void Foam::semiPermeableBaffleMassFractionFvPatchScalarField::write { fvPatchScalarField::write(os); mappedPatchBase::write(os); - os.writeEntryIfDifferent<scalar>("c", scalar(0), c_); + os.writeEntryIfDifferent<scalar>("c", 0, c_); os.writeEntryIfDifferent<word>("phi", "phi", phiName_); writeEntry("value", os); } diff --git a/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.C b/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.C index a4b3d26587286c01713567e79c01435ea8a2cd3f..23989d3cbc1ce76467075e47e6869fd789ed38bd 100644 --- a/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.C @@ -95,7 +95,7 @@ bool Foam::fileFormats::AC3DsurfaceFormat<Face>::read DynamicList<point> dynPoints; DynamicList<Face> dynFaces; List<word> names(nZones); - List<label> sizes(nZones, 0); + List<label> sizes(nZones, Zero); for (label zoneI = 0; zoneI < nZones; ++zoneI) { diff --git a/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.C b/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.C index 582167ce938ac95b182fdd5437439d8ef3cc0219..f2ab8ce29d7b6b66299b02c95ac437425c795bdf 100644 --- a/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.C @@ -129,7 +129,7 @@ bool Foam::fileFormats::VTKsurfaceFormat<Face>::read const faceList& faces = reader.faces(); // Assume all faces in zone0 unless a region field is present - labelList zones(faces.size(), 0); + labelList zones(faces.size(), Zero); for (auto fieldName : { "region", "STLSolidLabeling" }) { @@ -202,7 +202,7 @@ bool Foam::fileFormats::VTKsurfaceFormat<Face>::read zones.clear(); // Count - labelList zoneSizes(nZones, 0); + labelList zoneSizes(nZones, Zero); for (const label zonei : dynZones) { zoneSizes[zonei]++; @@ -224,7 +224,7 @@ bool Foam::fileFormats::VTKsurfaceFormat<Face>::read } // Count - labelList zoneSizes(nZones, 0); + labelList zoneSizes(nZones, Zero); for (const label zonei : zones) { zoneSizes[zonei]++; diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DAC.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DAC.C index fa70b7ac031ace16067d4a121d3f84d389214e98..d643b636aeb6644db1f82d702390f6fb0966131f 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DAC.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DAC/DAC.C @@ -252,7 +252,7 @@ void Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::reduceMechanism ) { scalarField& completeC(this->chemistry_.completeC()); - scalarField c1(this->chemistry_.nEqns(), 0.0); + scalarField c1(this->chemistry_.nEqns(), Zero); for (label i=0; i<this->nSpecie_; i++) { c1[i] = c[i]; @@ -263,12 +263,12 @@ void Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::reduceMechanism c1[this->nSpecie_+1] = p; // Compute the rAB matrix - RectangularMatrix<scalar> rABNum(this->nSpecie_, this->nSpecie_, 0.0); - scalarField PA(this->nSpecie_, 0.0); - scalarField CA(this->nSpecie_, 0.0); + RectangularMatrix<scalar> rABNum(this->nSpecie_, this->nSpecie_, Zero); + scalarField PA(this->nSpecie_, Zero); + scalarField CA(this->nSpecie_, Zero); // Number of initialized rAB for each lines - Field<label> NbrABInit(this->nSpecie_,0); + Field<label> NbrABInit(this->nSpecie_, Zero); // Position of the initialized rAB, -1 when not initialized RectangularMatrix<label> rABPos(this->nSpecie_, this->nSpecie_, -1); // Index of the other species involved in the rABNum @@ -464,8 +464,8 @@ void Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::reduceMechanism label nElements = 4; // 4 main elements (C, H, O, N) // Total number of C, H and O (in this order) - scalarList Na(nElements, 0.0); - scalarList Nal(nElements, 0.0); // for large hydrocarbons + scalarList Na(nElements, Zero); + scalarList Nal(nElements, Zero); // for large hydrocarbons for (label i=0; i<this->nSpecie_; i++) { @@ -505,7 +505,7 @@ void Foam::chemistryReductionMethods::DAC<CompType, ThermoType>::reduceMechanism // Using the rAB matrix (numerator and denominator separated) // compute the R value according to the search initiating set - scalarField Rvalue(this->nSpecie_, 0.0); + scalarField Rvalue(this->nSpecie_, Zero); label speciesNumber = 0; // Set all species to inactive and activate them according diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRG/DRG.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRG/DRG.C index bb83e06d5a9a4678bce14309c8fd63c811ccebba..96df437c679d2c24d099a8f11e4eb52d82c56107 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRG/DRG.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRG/DRG.C @@ -74,7 +74,7 @@ void Foam::chemistryReductionMethods::DRG<CompType, ThermoType>::reduceMechanism const scalar p ) { - scalarField c1(this->nSpecie_+2, 0.0); + scalarField c1(this->nSpecie_+2, Zero); for(label i=0; i<this->nSpecie_; i++) { @@ -85,11 +85,11 @@ void Foam::chemistryReductionMethods::DRG<CompType, ThermoType>::reduceMechanism c1[this->nSpecie_+1] = p; // Compute the rAB matrix - RectangularMatrix<scalar> rABNum(this->nSpecie_,this->nSpecie_,0.0); - scalarField rABDen(this->nSpecie_,0.0); + RectangularMatrix<scalar> rABNum(this->nSpecie_, this->nSpecie_, Zero); + scalarField rABDen(this->nSpecie_, Zero); // Number of initialized rAB for each lines - Field<label> NbrABInit(this->nSpecie_,0); + Field<label> NbrABInit(this->nSpecie_, Zero); // Position of the initialized rAB, -1 when not initialized RectangularMatrix<label> rABPos(this->nSpecie_, this->nSpecie_, -1); diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRGEP/DRGEP.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRGEP/DRGEP.C index 8b4976db0c8501d5db9d28ab926a9c123fb9713c..0bf6acf37cff4d8ccd75cd326e216fc869606ed0 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRGEP/DRGEP.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/DRGEP/DRGEP.C @@ -117,7 +117,7 @@ reduceMechanism ) { scalarField& completeC(this->chemistry_.completeC()); - scalarField c1(this->chemistry_.nEqns(), 0.0); + scalarField c1(this->chemistry_.nEqns(), Zero); for (label i=0; i<this->nSpecie_; ++i) { @@ -129,12 +129,12 @@ reduceMechanism c1[this->nSpecie_+1] = p; // Compute the rAB matrix - RectangularMatrix<scalar> rABNum(this->nSpecie_, this->nSpecie_, 0.0); - scalarField PA(this->nSpecie_, 0.0); - scalarField CA(this->nSpecie_, 0.0); + RectangularMatrix<scalar> rABNum(this->nSpecie_, this->nSpecie_, Zero); + scalarField PA(this->nSpecie_, Zero); + scalarField CA(this->nSpecie_, Zero); // Number of initialized rAB for each lines - Field<label> NbrABInit(this->nSpecie_, 0); + Field<label> NbrABInit(this->nSpecie_, Zero); // Position of the initialized rAB, -1 when not initialized RectangularMatrix<label> rABPos(this->nSpecie_, this->nSpecie_, -1); // Index of the other species involved in the rABNum @@ -314,8 +314,8 @@ reduceMechanism // Compute the production rate of each element Pa label nElements = 4; // 4 main elements (C, H, O, N) - scalarList Pa(nElements,0.0); - scalarList Ca(nElements,0.0); + scalarList Pa(nElements, Zero); + scalarList Ca(nElements, Zero); // for (label q=0; q<SIS.size(); ++q) for (label i=0; i<this->nSpecie_; ++i) @@ -332,7 +332,7 @@ reduceMechanism // Using the rAB matrix (numerator and denominator separated) // compute the R value according to the search initiating set - scalarField Rvalue(this->nSpecie_, 0.0); + scalarField Rvalue(this->nSpecie_, Zero); label speciesNumber = 0; List<bool> disabledSpecies(this->nSpecie_, false); diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/EFA/EFA.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/EFA/EFA.C index acd3e3fa7939513c4b63a69c18898a1dbc937b6f..760c0d57616b5498d354ce31e73cf1e9648c792d 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/EFA/EFA.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/EFA/EFA.C @@ -36,10 +36,10 @@ Foam::chemistryReductionMethods::EFA<CompType, ThermoType>::EFA ) : chemistryReductionMethod<CompType, ThermoType>(dict, chemistry), - sC_(this->nSpecie_,0), - sH_(this->nSpecie_,0), - sO_(this->nSpecie_,0), - sN_(this->nSpecie_,0), + sC_(this->nSpecie_, Zero), + sH_(this->nSpecie_, Zero), + sO_(this->nSpecie_, Zero), + sN_(this->nSpecie_, Zero), sortPart_(0.05) { const List<List<specieElement>>& specieComposition = @@ -98,7 +98,7 @@ void Foam::chemistryReductionMethods::EFA<CompType, ThermoType>::reduceMechanism ) { scalarField& completeC(this->chemistry_.completeC()); - scalarField c1(this->chemistry_.nEqns(), 0.0); + scalarField c1(this->chemistry_.nEqns(), Zero); for (label i=0; i<this->nSpecie_; i++) { @@ -111,14 +111,14 @@ void Foam::chemistryReductionMethods::EFA<CompType, ThermoType>::reduceMechanism // Number of initialized rAB for each lines - Field<label> NbrABInit(this->nSpecie_,0); + Field<label> NbrABInit(this->nSpecie_, Zero); // Position of the initialized rAB, -1 when not initialized RectangularMatrix<label> rABPos(this->nSpecie_, this->nSpecie_, -1); - RectangularMatrix<scalar> CFluxAB(this->nSpecie_, this->nSpecie_, 0.0); - RectangularMatrix<scalar> HFluxAB(this->nSpecie_, this->nSpecie_, 0.0); - RectangularMatrix<scalar> OFluxAB(this->nSpecie_, this->nSpecie_, 0.0); - RectangularMatrix<scalar> NFluxAB(this->nSpecie_, this->nSpecie_, 0.0); + RectangularMatrix<scalar> CFluxAB(this->nSpecie_, this->nSpecie_, Zero); + RectangularMatrix<scalar> HFluxAB(this->nSpecie_, this->nSpecie_, Zero); + RectangularMatrix<scalar> OFluxAB(this->nSpecie_, this->nSpecie_, Zero); + RectangularMatrix<scalar> NFluxAB(this->nSpecie_, this->nSpecie_, Zero); scalar CFlux(0.0), HFlux(0.0), OFlux(0.0), NFlux(0.0); label nbPairs(0); diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/PFA/PFA.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/PFA/PFA.C index 58c8e434036b6ad5e0eda06c909718619ed88ce8..9631aae6d63cba26760af163c6e8ef8f04a1cc28 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/PFA/PFA.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/reduction/PFA/PFA.C @@ -78,7 +78,7 @@ void Foam::chemistryReductionMethods::PFA<CompType, ThermoType>::reduceMechanism ) { scalarField& completeC(this->chemistry_.completeC()); - scalarField c1(this->chemistry_.nEqns(), 0.0); + scalarField c1(this->chemistry_.nEqns(), Zero); for (label i=0; i<this->nSpecie_; i++) { @@ -90,13 +90,13 @@ void Foam::chemistryReductionMethods::PFA<CompType, ThermoType>::reduceMechanism c1[this->nSpecie_+1] = p; // Compute the rAB matrix - RectangularMatrix<scalar> PAB(this->nSpecie_,this->nSpecie_,0.0); - RectangularMatrix<scalar> CAB(this->nSpecie_,this->nSpecie_,0.0); - scalarField PA(this->nSpecie_,0.0); - scalarField CA(this->nSpecie_,0.0); + RectangularMatrix<scalar> PAB(this->nSpecie_, this->nSpecie_, Zero); + RectangularMatrix<scalar> CAB(this->nSpecie_, this->nSpecie_, Zero); + scalarField PA(this->nSpecie_, Zero); + scalarField CA(this->nSpecie_, Zero); // Number of initialized rAB for each lines - Field<label> NbrABInit(this->nSpecie_,0); + Field<label> NbrABInit(this->nSpecie_, Zero); // Position of the initialized rAB, -1 when not initialized RectangularMatrix<label> rABPos(this->nSpecie_, this->nSpecie_, -1); // Index of the other species involved in the rABNum @@ -253,11 +253,11 @@ void Foam::chemistryReductionMethods::PFA<CompType, ThermoType>::reduceMechanism // is a connection of second generation and it will be aggregated in the // final step to evaluate the total connection strength (or path flux). // Compute rsecond=rAri*rriB with A!=ri!=B - RectangularMatrix<scalar> PAB2nd(this->nSpecie_,this->nSpecie_,0.0); - RectangularMatrix<scalar> CAB2nd(this->nSpecie_,this->nSpecie_,0.0); + RectangularMatrix<scalar> PAB2nd(this->nSpecie_, this->nSpecie_, Zero); + RectangularMatrix<scalar> CAB2nd(this->nSpecie_, this->nSpecie_, Zero); // Number of initialized rAB for each lines - Field<label> NbrABInit2nd(this->nSpecie_, 0); + Field<label> NbrABInit2nd(this->nSpecie_, Zero); // Position of the initialized rAB, -1 when not initialized RectangularMatrix<label> rABPos2nd(this->nSpecie_, this->nSpecie_, -1); diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.C index 284302ef2661365dd3d3ef3b8d0e867e1790da47..6377288e0717db5a63980b2f3d269330f14f9750 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.C @@ -662,7 +662,7 @@ void Foam::binaryTree<CompType, ThermoType>::balance() //2) compute the mean composition label n = x->phi().size(); - scalarField mean(n, 0.0); + scalarField mean(n, Zero); while (x != nullptr) { const scalarField& phij = x->phi(); @@ -673,7 +673,7 @@ void Foam::binaryTree<CompType, ThermoType>::balance() mean /= size_; //3) compute the variance for each space direction - List<scalar> variance(n, 0.0); + List<scalar> variance(n, Zero); forAll(chemPoints, j) { const scalarField& phij = chemPoints[j]->phi(); @@ -699,7 +699,7 @@ void Foam::binaryTree<CompType, ThermoType>::balance() // in this direction if these extreme points were not deleted in the // cleaning that come before the balance function they are still important // and the tree should therefore take them into account - SortableList<scalar> phiMaxDir(chemPoints.size(), 0.0); + SortableList<scalar> phiMaxDir(chemPoints.size(), Zero); forAll(chemPoints, j) { phiMaxDir[j] = chemPoints[j]->phi()[maxDir]; diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.C index fe8693cbe9538a5fb7d6620e61d84963c617a1c9..5fde763188c6b0b6361f64148a20c215fe9eabdd 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.C @@ -379,7 +379,7 @@ bool Foam::chemPointISAT<CompType, ThermoType>::inEOA(const scalarField& phiq) } scalar epsTemp = 0; - List<scalar> propEps(completeSpaceSize(), scalar(0)); + List<scalar> propEps(completeSpaceSize(), Zero); for (label i=0; i<completeSpaceSize()-nAdditionalEqns_; ++i) { @@ -738,7 +738,7 @@ bool Foam::chemPointISAT<CompType, ThermoType>::grow(const scalarField& phiq) } // beginning of grow algorithm - scalarField phiTilde(dim, 0); + scalarField phiTilde(dim, Zero); scalar normPhiTilde = 0; // p' = L^T.(p-phi) @@ -770,7 +770,7 @@ bool Foam::chemPointISAT<CompType, ThermoType>::grow(const scalarField& phiq) // gamma = (1/|p'| - 1)/|p'|^2 scalar gamma = (1/normPhiTilde - 1)*invSqrNormPhiTilde; scalarField u(gamma*phiTilde); - scalarField v(dim, 0); + scalarField v(dim, Zero); for (label i=0; i<dim; ++i) { diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C index ac92af71dda0eceea6f27fac9ddb1c0f2b8b8b32..dd6d0449a07aad87be2643d2ec366ebd50297fbc 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C @@ -192,7 +192,7 @@ updateCoeffs() */ // Calculate Ir into the wall on the same lambdaId - scalarField Ir(patch().size(), 0.0); + scalarField Ir(patch().size(), Zero); forAll(Iw, facei) { for (label rayi=0; rayi < dom.nRay(); rayi++) diff --git a/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C b/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C index e938e35de916f540cf1f55ff064966d136c528d6..fa5526c6ea2912de4547ff96de3565997d614ffb 100644 --- a/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C +++ b/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C @@ -395,8 +395,8 @@ void Foam::radiation::solarLoad::calculateQdiff List<scalar> localCoarsePartialArea(nLocalVFCoarseFaces); List<vector> localCoarseNorm(nLocalVFCoarseFaces); - scalarField compactCoarseRave(map_->constructSize(), 0.0); - scalarField compactCoarsePartialArea(map_->constructSize(), 0.0); + scalarField compactCoarseRave(map_->constructSize(), Zero); + scalarField compactCoarsePartialArea(map_->constructSize(), Zero); vectorList compactCoarseNorm(map_->constructSize(), Zero); const boundaryRadiationProperties& boundaryRadiation = @@ -423,7 +423,7 @@ void Foam::radiation::solarLoad::calculateQdiff coarseToFine_[i] = invertOneToMany(nAgglom, agglom); } - scalarField r(pp.size(), 0.0); + scalarField r(pp.size(), Zero); for (label bandI = 0; bandI < nBands_; bandI++) { const tmp<scalarField> tr = @@ -432,8 +432,8 @@ void Foam::radiation::solarLoad::calculateQdiff r += tr(); } - scalarList Rave(cpp.size(), 0.0); - scalarList area(cpp.size(), 0.0); + scalarList Rave(cpp.size(), Zero); + scalarList area(cpp.size(), Zero); const scalarField& sf = mesh_.magSf().boundaryField()[patchID]; @@ -497,7 +497,7 @@ void Foam::radiation::solarLoad::calculateQdiff // Calculate coarse hitFaces and Sun direct hit heat fluxes - scalarList localqDiffusive(nLocalVFCoarseFaces, 0.0); + scalarList localqDiffusive(nLocalVFCoarseFaces, Zero); label locaFaceI = 0; forAll(includePatches_, i) @@ -509,7 +509,7 @@ void Foam::radiation::solarLoad::calculateQdiff const labelList& coarsePatchFace = coarseMesh_->patchFaceMap()[patchID]; const scalarField& sf = mesh_.magSf().boundaryField()[patchID]; - scalarField a(ppf.size(), 0.0); + scalarField a(ppf.size(), Zero); for (label bandI = 0; bandI < nBands_; bandI++) { const tmp<scalarField> ta = @@ -943,7 +943,7 @@ void Foam::radiation::solarLoad::calculate() if (facesChanged) { // Reset Ru and qr - Ru_ = dimensionedScalar("Ru", dimMass/dimLength/pow3(dimTime), 0.0); + Ru_ = dimensionedScalar("Ru", dimMass/dimLength/pow3(dimTime), Zero); qrBf = 0.0; // Add direct hit radiation diff --git a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C index 959a8f559308c49c9cee379ff551e53c8fe6d57a..cb90c0bede4a1f00622df97e28fd400814818968 100644 --- a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C +++ b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C @@ -133,7 +133,7 @@ void Foam::radiation::viewFactor::initialise() { Fmatrix_.reset ( - new scalarSquareMatrix(totalNCoarseFaces_, 0.0) + new scalarSquareMatrix(totalNCoarseFaces_, Zero) ); if (debug) @@ -184,7 +184,7 @@ void Foam::radiation::viewFactor::initialise() { CLU_.reset ( - new scalarSquareMatrix(totalNCoarseFaces_, 0.0) + new scalarSquareMatrix(totalNCoarseFaces_, Zero) ); pivotIndices_.setSize(CLU_().m()); @@ -386,9 +386,9 @@ void Foam::radiation::viewFactor::calculate() solarLoad_->calculate(); } - scalarField compactCoarseT4(map_->constructSize(), 0.0); - scalarField compactCoarseE(map_->constructSize(), 0.0); - scalarField compactCoarseHo(map_->constructSize(), 0.0); + scalarField compactCoarseT4(map_->constructSize(), Zero); + scalarField compactCoarseE(map_->constructSize(), Zero); + scalarField compactCoarseHo(map_->constructSize(), Zero); globalIndex globalNumbering(nLocalCoarseFaces_); @@ -426,9 +426,9 @@ void Foam::radiation::viewFactor::calculate() const polyPatch& pp = coarseMesh_.boundaryMesh()[patchID]; const labelList& coarsePatchFace = coarseMesh_.patchFaceMap()[patchID]; - scalarList T4ave(pp.size(), 0.0); - scalarList Eave(pp.size(), 0.0); - scalarList Hoiave(pp.size(), 0.0); + scalarList T4ave(pp.size(), Zero); + scalarList Eave(pp.size(), Zero); + scalarList Hoiave(pp.size(), Zero); if (pp.size() > 0) { @@ -487,9 +487,9 @@ void Foam::radiation::viewFactor::calculate() map_->distribute(compactGlobalIds); // Create global size vectors - scalarField T4(totalNCoarseFaces_, 0.0); - scalarField E(totalNCoarseFaces_, 0.0); - scalarField qrExt(totalNCoarseFaces_, 0.0); + scalarField T4(totalNCoarseFaces_, Zero); + scalarField E(totalNCoarseFaces_, Zero); + scalarField qrExt(totalNCoarseFaces_, Zero); // Fill lists from compact to global indexes. forAll(compactCoarseT4, i) @@ -508,14 +508,14 @@ void Foam::radiation::viewFactor::calculate() Pstream::listCombineScatter(qrExt); // Net radiation - scalarField q(totalNCoarseFaces_, 0.0); + scalarField q(totalNCoarseFaces_, Zero); if (Pstream::master()) { // Variable emissivity if (!constEmissivity_) { - scalarSquareMatrix C(totalNCoarseFaces_, 0.0); + scalarSquareMatrix C(totalNCoarseFaces_, Zero); for (label i=0; i<totalNCoarseFaces_; i++) { diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C index 7a305c4d53e8dab5858f5daeeea10e78b952f114..a5dc91ff2eb56d248f241f3fed0e43282a6ae10e 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C @@ -58,7 +58,7 @@ Foam::radiation::greyMeanAbsorptionEmission::greyMeanAbsorptionEmission absorptionEmissionModel(dict, mesh), coeffsDict_((dict.optionalSubDict(typeName + "Coeffs"))), speciesNames_(0), - specieIndex_(label(0)), + specieIndex_(Zero), lookUpTablePtr_(), thermo_(mesh.lookupObject<fluidThermo>(basicThermo::dictName)), EhrrCoeff_(coeffsDict_.get<scalar>("EhrrCoeff")), diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C index ce7c831682ce43b92fe0b2c3a0e79d153bd77f2d..300a1c75b1fd28a524f8eec1b7de53d8fec9ddff 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C @@ -53,10 +53,10 @@ greyMeanSolidAbsorptionEmission::X(const word specie) const const volScalarField& T = thermo_.T(); const volScalarField& p = thermo_.p(); - tmp<scalarField> tXj(new scalarField(T.primitiveField().size(), 0.0)); + tmp<scalarField> tXj(new scalarField(T.primitiveField().size(), Zero)); scalarField& Xj = tXj.ref(); - tmp<scalarField> tRhoInv(new scalarField(T.primitiveField().size(), 0.0)); + tmp<scalarField> tRhoInv(new scalarField(T.primitiveField().size(), Zero)); scalarField& rhoInv = tRhoInv.ref(); forAll(mixture_.Y(), specieI) diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C index a9e1768f25853b6f656d5ee2255ceb4b0381e5f5..e8b2f17a7099f32a0446fa16461aa8a3a4931129 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C @@ -57,7 +57,7 @@ Foam::radiation::wideBandAbsorptionEmission::wideBandAbsorptionEmission absorptionEmissionModel(dict, mesh), coeffsDict_((dict.optionalSubDict(typeName + "Coeffs"))), speciesNames_(0), - specieIndex_(label(0)), + specieIndex_(Zero), lookUpTablePtr_(), thermo_(mesh.lookupObject<fluidThermo>(basicThermo::dictName)), Yj_(nSpecies_), diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C index afe555a764139dc440f896e92df75776e3b3685f..70d7cb30e1169a14dc5aff20addd90678696431d 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C @@ -423,7 +423,7 @@ void Foam::chemkinReader::addReaction { checkCoeffs(ArrheniusCoeffs, "Arrhenius", 3); - scalarList nAtoms(elementNames_.size(), 0.0); + scalarList nAtoms(elementNames_.size(), Zero); forAll(lhs, i) { diff --git a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C index 91a426f1e74f2b15bcdd3c087eab67a7801d4e62..5dba8faba5e4ad259edacca2b6515f47d2b4f770 100644 --- a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C +++ b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C @@ -189,7 +189,7 @@ pyrolysisChemistryModel<CompType, SolidThermo, GasThermo>::omega const label celli = cellCounter_; - scalarField om(nEqns(), 0.0); + scalarField om(nEqns(), Zero); forAll(this->reactions_, i) { @@ -246,7 +246,7 @@ Foam::pyrolysisChemistryModel<CompType, SolidThermo, GasThermo>::omega label& rRef ) const { - scalarField c1(nSpecie_, 0.0); + scalarField c1(nSpecie_, Zero); label celli = cellCounter_; @@ -351,7 +351,7 @@ jacobian const scalar T = c[nSpecie_]; const scalar p = c[nSpecie_ + 1]; - scalarField c2(nSpecie_, 0.0); + scalarField c2(nSpecie_, Zero); for (label i=0; i<this->nSolids_; i++) { @@ -489,7 +489,7 @@ calculate() scalar Ti = this->solidThermo().T()[celli]; scalar pi = this->solidThermo().p()[celli]; - scalarField c(nSpecie_, 0.0); + scalarField c(nSpecie_, Zero); for (label i=0; i<this->nSolids_; i++) { c[i] = rhoi*this->Ys_[i][celli]*delta; @@ -551,9 +551,9 @@ Foam::pyrolysisChemistryModel<CompType, SolidThermo, GasThermo>::solve const scalarField& T = this->solidThermo().T(); const scalarField& p = this->solidThermo().p(); - scalarField c(nSpecie_, 0.0); - scalarField c0(nSpecie_, 0.0); - scalarField dc(nSpecie_, 0.0); + scalarField c(nSpecie_, Zero); + scalarField c0(nSpecie_, Zero); + scalarField dc(nSpecie_, Zero); scalarField delta(this->mesh().V()); forAll(rho, celli) diff --git a/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C b/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C index 0175bbc9415c41a6012bfcf4672b61f1628490e8..e790ccfa3da07e1b99c2df9cd96a0f6f40b0bb06 100644 --- a/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C @@ -140,17 +140,17 @@ humidityTemperatureCoupledMixedFvPatchScalarField specieName_("none"), liquid_(nullptr), liquidDict_(nullptr), - mass_(patch().size(), 0.0), + mass_(patch().size(), Zero), Tvap_(0.0), - myKDelta_(patch().size(), 0.0), - dmHfg_(patch().size(), 0.0), - mpCpTp_(patch().size(), 0.0), + myKDelta_(patch().size(), Zero), + dmHfg_(patch().size(), Zero), + mpCpTp_(patch().size(), Zero), Mcomp_(0.0), L_(0.0), fluid_(false), - cp_(patch().size(), 0.0), - thickness_(patch().size(), 0.0), - rho_(patch().size(), 0.0) + cp_(patch().size(), Zero), + thickness_(patch().size(), Zero), + rho_(patch().size(), Zero) { this->refValue() = 0.0; this->refGrad() = 0.0; @@ -215,17 +215,17 @@ humidityTemperatureCoupledMixedFvPatchScalarField specieName_(dict.lookupOrDefault<word>("specie", "none")), liquid_(nullptr), liquidDict_(), - mass_(patch().size(), 0.0), + mass_(patch().size(), Zero), Tvap_(0.0), - myKDelta_(patch().size(), 0.0), - dmHfg_(patch().size(), 0.0), - mpCpTp_(patch().size(), 0.0), + myKDelta_(patch().size(), Zero), + dmHfg_(patch().size(), Zero), + mpCpTp_(patch().size(), Zero), Mcomp_(0.0), L_(0.0), fluid_(false), - cp_(patch().size(), 0.0), - thickness_(patch().size(), 0.0), - rho_(patch().size(), 0.0) + cp_(patch().size(), Zero), + thickness_(patch().size(), Zero), + rho_(patch().size(), Zero) { if (!isA<mappedPatchBase>(this->patch().patch())) { @@ -459,22 +459,22 @@ void Foam::humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs() myKDelta_ = K*patch().deltaCoeffs(); - scalarField dm(patch().size(), 0.0); + scalarField dm(patch().size(), Zero); // Fluid Side if (fluid_) { - scalarField Yvp(patch().size(), 0.0); + scalarField Yvp(patch().size(), Zero); const scalar dt = mesh.time().deltaTValue(); const scalarField myDelta(patch().deltaCoeffs()); if (mode_ != mtConstantMass) { - scalarField cp(patch().size(), 0.0); - scalarField hfg(patch().size(), 0.0); + scalarField cp(patch().size(), Zero); + scalarField hfg(patch().size(), Zero); scalarField htc(patch().size(), GREAT); - scalarField liquidRho(patch().size(), 0.0); + scalarField liquidRho(patch().size(), Zero); fixedGradientFvPatchField<scalar>& Yp = const_cast<fixedGradientFvPatchField<scalar>&> @@ -648,8 +648,8 @@ void Foam::humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs() } } - scalarField mpCpTpNbr(patch().size(), 0.0); - scalarField dmHfgNbr(patch().size(), 0.0); + scalarField mpCpTpNbr(patch().size(), Zero); + scalarField dmHfgNbr(patch().size(), Zero); if (!fluid_) { @@ -661,13 +661,13 @@ void Foam::humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs() } // Obtain Rad heat (qr) - scalarField qr(Tp.size(), 0.0); + scalarField qr(Tp.size(), Zero); if (qrName_ != "none") { qr = patch().lookupPatchField<volScalarField, scalar>(qrName_); } - scalarField qrNbr(Tp.size(), 0.0); + scalarField qrNbr(Tp.size(), Zero); if (qrNbrName_ != "none") { qrNbr = nbrPatch.lookupPatchField<volScalarField, scalar>(qrNbrName_); diff --git a/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C b/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C index f127828a69f9a4d039638f6442dd77f4585f4e7a..50ce27074e988deb720cfb46a31886ba31dfe884 100644 --- a/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C +++ b/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C @@ -187,7 +187,7 @@ void Foam::mixerFvMesh::calcMovingMasks() const } // Set the point mask - movingPointsMaskPtr_ = new scalarField(points().size(), 0); + movingPointsMaskPtr_ = new scalarField(points().size(), Zero); scalarField& movingPointsMask = *movingPointsMaskPtr_; const cellList& c = cells(); diff --git a/src/transportModels/twoPhaseProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.C b/src/transportModels/twoPhaseProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.C index 71a4e94b61debf95092dda08e1486fab289c84db..4dd2ffe01dc54d7b2dde518a42d8b0f3c7f4eef8 100644 --- a/src/transportModels/twoPhaseProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.C +++ b/src/transportModels/twoPhaseProperties/alphaFixedPressure/alphaFixedPressureFvPatchScalarField.C @@ -40,7 +40,7 @@ alphaFixedPressureFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF), - p_(p.size(), 0.0) + p_(p.size(), Zero) {} diff --git a/src/waveModels/waveGenerationModels/derived/Boussinesq/BoussinesqWaveModel.C b/src/waveModels/waveGenerationModels/derived/Boussinesq/BoussinesqWaveModel.C index 0bb09af194078bbc4e29e3904eb1962d5acf48c9..3068399852b47ef76295b0b30b1d1de4a5dfe044 100644 --- a/src/waveModels/waveGenerationModels/derived/Boussinesq/BoussinesqWaveModel.C +++ b/src/waveModels/waveGenerationModels/derived/Boussinesq/BoussinesqWaveModel.C @@ -76,7 +76,7 @@ Foam::vector Foam::waveModels::Boussinesq::Deta const scalar X0 ) const { - vector deta(vector::zero); + vector deta(Zero); scalar C = sqrt(mag(g_)*(H + h)); scalar ts = 3.5*h/sqrt(H/h); diff --git a/src/waveModels/waveModel/waveModel.C b/src/waveModels/waveModel/waveModel.C index 0d2871acd0fceba84263c2adc72031a2ec954272..fa52645b758b4c1d725448634d4ac916147793a8 100644 --- a/src/waveModels/waveModel/waveModel.C +++ b/src/waveModels/waveModel/waveModel.C @@ -134,8 +134,8 @@ Foam::tmp<Foam::scalarField> Foam::waveModel::waterLevel() const const scalarField alphac(alphap.patchInternalField()); const scalarField& magSf = alphap.patch().magSf(); - scalarList paddleMagSf(nPaddle_, 0.0); - scalarList paddleWettedMagSf(nPaddle_, 0.0); + scalarList paddleMagSf(nPaddle_, Zero); + scalarList paddleWettedMagSf(nPaddle_, Zero); forAll(alphac, facei) { @@ -277,8 +277,8 @@ Foam::waveModel::waveModel initialDepth_(0), currTimeIndex_(-1), activeAbsorption_(false), - U_(patch.size(), vector::zero), - alpha_(patch.size(), 0) + U_(patch.size(), Zero), + alpha_(patch.size(), Zero) { if (readFields) { @@ -359,7 +359,7 @@ void Foam::waveModel::correct(const scalar t) alpha_ = 0; // Update the calculated water level field - scalarField calculatedLevel(nPaddle_, 0); + scalarField calculatedLevel(nPaddle_, Zero); if (patch_.size()) { diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/validation/WatersKing/WatersKing.C b/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/validation/WatersKing/WatersKing.C index c396a09bcf6704333baac2cbc15430bb14e60d04..212b966f632a3e9e633ac3c146dd02fe219199b8 100644 --- a/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/validation/WatersKing/WatersKing.C +++ b/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/validation/WatersKing/WatersKing.C @@ -83,10 +83,10 @@ int main(int argc, char *argv[]) label order = 8; - scalarField ak(order, 0); - scalarField bk(order, 0); - scalarField ck(order, 0); - scalarField B(order, 0); + scalarField ak(order, Zero); + scalarField bk(order, Zero); + scalarField ck(order, Zero); + scalarField B(order, Zero); forAll(ak, i) { @@ -98,7 +98,7 @@ int main(int argc, char *argv[]) ::cos((2*k - 1)*constant::mathematical::pi*y/2); } - scalarField A(order, 0); + scalarField A(order, Zero); OFstream file(runTime.path()/"WatersKing.dat"); const scalar LOGVGREAT = ::log(VGREAT); while (!runTime.end())