diff --git a/applications/solvers/combustion/PDRFoam/setDeltaT.H b/applications/solvers/combustion/PDRFoam/setDeltaT.H index 365126ce90ca961df6fa2135e4012a3b2bac30cc..ed37c01af298c72a67290fd2f183d65227eca107 100644 --- a/applications/solvers/combustion/PDRFoam/setDeltaT.H +++ b/applications/solvers/combustion/PDRFoam/setDeltaT.H @@ -36,11 +36,12 @@ Description if (adjustTimeStep) { scalar maxDeltaTFact = maxCo/(CoNum + StCoNum + SMALL); - scalar deltaTFact = min(min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2); + scalar deltaTFact = + Foam::min(Foam::min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2); runTime.setDeltaT ( - min + Foam::min ( deltaTFact*runTime.deltaTValue(), maxDeltaT diff --git a/applications/solvers/combustion/chemFoam/setDeltaT.H b/applications/solvers/combustion/chemFoam/setDeltaT.H index ef50a9702690309190df5c9b4efa9a64c5b6b2e9..bd09646c16cf7bddd8195aca419deed2af735632 100644 --- a/applications/solvers/combustion/chemFoam/setDeltaT.H +++ b/applications/solvers/combustion/chemFoam/setDeltaT.H @@ -1,5 +1,5 @@ if (adjustTimeStep) { - runTime.setDeltaT(min(dtChem, maxDeltaT)); + runTime.setDeltaT(Foam::min(dtChem, maxDeltaT)); Info<< "deltaT = " << runTime.deltaTValue() << endl; } diff --git a/applications/solvers/combustion/fireFoam/setMultiRegionDeltaT.H b/applications/solvers/combustion/fireFoam/setMultiRegionDeltaT.H index 31c9e675fcde15a9a1c4a0b878122acdc7654e21..a5ac0fcc9a686419ed02e99506dc0f042a9c6bf8 100644 --- a/applications/solvers/combustion/fireFoam/setMultiRegionDeltaT.H +++ b/applications/solvers/combustion/fireFoam/setMultiRegionDeltaT.H @@ -54,9 +54,18 @@ if (adjustTimeStep) runTime.setDeltaT ( - min + Foam::min ( - dt0*min(min(TFactorFluid, min(TFactorFilm, TFactorSolid)), 1.2), + dt0 + * Foam::min + ( + Foam::min + ( + TFactorFluid, + Foam::min(TFactorFilm, TFactorSolid) + ), + 1.2 + ), maxDeltaT ) ); diff --git a/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H b/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H index e818402eff6577330155820b75e43d0e3e713b57..a7c14b5a05cdc4514139a09e7605f5cfa7d5e23a 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H +++ b/applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H @@ -75,8 +75,10 @@ ) { rDeltaT = + ( rDeltaT0 - *max(rDeltaT/rDeltaT0, scalar(1) - rDeltaTDampingCoeff); + * Foam::max(rDeltaT/rDeltaT0, scalar(1) - rDeltaTDampingCoeff) + ); Info<< "Damped flow time scale min/max = " << gMin(1/rDeltaT.primitiveField()) diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/compressibleMultiRegionCourantNo.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/compressibleMultiRegionCourantNo.H index 3ca2f685819312306802794b946f5048e91e6e51..5ccc00d3ad4e1fbacc2b6237dd8fcfe04fe7b0d9 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/compressibleMultiRegionCourantNo.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/compressibleMultiRegionCourantNo.H @@ -1,7 +1,7 @@ scalar CoNum = -GREAT; forAll(fluidRegions, regionI) { - CoNum = max + CoNum = Foam::max ( compressibleCourantNo ( diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/fluid/compressibleMultiRegionCourantNo.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/fluid/compressibleMultiRegionCourantNo.H index 290bb596cf41103a7d20fe71d0a3aa9bfb2bfaf0..4a34642392f3d581aa91a0c31b7214ded65370d5 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/fluid/compressibleMultiRegionCourantNo.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionTwoPhaseEulerFoam/fluid/compressibleMultiRegionCourantNo.H @@ -31,7 +31,7 @@ ); - CoNum = + scalar maxPhiCoNum = 0.5*gMax ( sumPhi/fluidRegions[regioni].V().field() @@ -41,9 +41,9 @@ ( fvc::surfaceSum(mag(phi1 - phi2))().primitiveField() / fluidRegions[regioni].V().field() - )*runTime.deltaTValue(), + )*runTime.deltaTValue(); - CoNum = max(UrCoNum, CoNum); + CoNum = Foam::max(CoNum, Foam::max(maxPhiCoNum, UrCoNum)); } } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/compressibleMultiRegionCourantNo.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/compressibleMultiRegionCourantNo.H index dd129047dc35b706128fd3578381be78bb847806..d5b5c7ceaa4a2d9a8d1fd0eb4ffe2e64bec9c0a7 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/compressibleMultiRegionCourantNo.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/compressibleMultiRegionCourantNo.H @@ -2,7 +2,7 @@ forAll(fluidRegions, regioni) { - CoNum = max + CoNum = Foam::max ( compressibleCourantNo ( @@ -17,7 +17,7 @@ /* forAll(porousFluidRegions, porousi) { - CoNum = max + CoNum = Foam::max ( compressibleCourantNo ( diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/include/setInitialMultiRegionDeltaT.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/include/setInitialMultiRegionDeltaT.H index 09f4a717a9673ff0dc82d43df7e7ce5aae6d91e8..8be63457654746030b657a8c1ee6a573c19204e9 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/include/setInitialMultiRegionDeltaT.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/include/setInitialMultiRegionDeltaT.H @@ -47,10 +47,10 @@ if (adjustTimeStep) runTime.setDeltaT ( - min + Foam::min ( - min(maxCo/CoNum, maxDi/DiNum)*runTime.deltaTValue(), - min(runTime.deltaTValue(), maxDeltaT) + Foam::min(maxCo/CoNum, maxDi/DiNum)*runTime.deltaTValue(), + Foam::min(runTime.deltaTValue(), maxDeltaT) ) ); Info<< "deltaT = " << runTime.deltaTValue() << endl; diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/include/setMultiRegionDeltaT.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/include/setMultiRegionDeltaT.H index 8eed82dd5c82249ace6b9323149836508843cba5..ef94dcc4521abe0e4eee29ea64e6eef0123ac1d3 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/include/setMultiRegionDeltaT.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/include/setMultiRegionDeltaT.H @@ -49,17 +49,17 @@ if (adjustTimeStep) scalar maxDeltaTSolid = maxDi/(DiNum + SMALL); scalar deltaTFluid = - min + Foam::min ( - min(maxDeltaTFluid, 1.0 + 0.1*maxDeltaTFluid), + Foam::min(maxDeltaTFluid, 1.0 + 0.1*maxDeltaTFluid), 1.2 ); runTime.setDeltaT ( - min + Foam::min ( - min(deltaTFluid, maxDeltaTSolid)*runTime.deltaTValue(), + Foam::min(deltaTFluid, maxDeltaTSolid)*runTime.deltaTValue(), maxDeltaT ) ); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffusionNo.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffusionNo.H index 6e87fb92034ea9ec69234ae97651637117795afd..8c6111d27678aa4f9f4fd359ac14d39d40262cfb 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffusionNo.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffusionNo.H @@ -22,7 +22,7 @@ forAll(solidRegions, i) tmp<volScalarField> trho = thermo.rho(); const volScalarField& rho = trho(); - DiNum = max + DiNum = Foam::max ( solidRegionDiffNo ( diff --git a/applications/solvers/heatTransfer/solidFoam/solidDiffusionNo.H b/applications/solvers/heatTransfer/solidFoam/solidDiffusionNo.H index 90317f67c612fe56779a24b3a858362b377d78a3..3484c35b9fef2be86231aec06624c4e7d6b13e55 100644 --- a/applications/solvers/heatTransfer/solidFoam/solidDiffusionNo.H +++ b/applications/solvers/heatTransfer/solidFoam/solidDiffusionNo.H @@ -17,7 +17,7 @@ scalar DiNum = -GREAT; tmp<volScalarField> trho = thermo.rho(); const volScalarField& rho = trho(); - DiNum = max + DiNum = Foam::max ( solidRegionDiffNo ( diff --git a/applications/solvers/lagrangian/reactingParcelFoam/setMultiRegionDeltaT.H b/applications/solvers/lagrangian/reactingParcelFoam/setMultiRegionDeltaT.H index 70d55cb8c87b171d67c1990cff341cd98a2e1c31..f1e95e8b7e0ae333445dabc295d4de764062b094 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/setMultiRegionDeltaT.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/setMultiRegionDeltaT.H @@ -36,13 +36,16 @@ Description if (adjustTimeStep) { const scalar maxDeltaTFact = - min(maxCo/(CoNum + SMALL), maxCo/(surfaceFilm.CourantNumber() + SMALL)); + Foam::min + ( + maxCo/(CoNum + SMALL), maxCo/(surfaceFilm.CourantNumber() + SMALL) + ); const scalar deltaTFact = - min(min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2); + Foam::min(Foam::min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2); runTime.setDeltaT ( - min + Foam::min ( deltaTFact*runTime.deltaTValue(), maxDeltaT diff --git a/applications/solvers/multiphase/VoF/setDeltaT.H b/applications/solvers/multiphase/VoF/setDeltaT.H index ac59647e7e84d66600d81e06cefa8e5a9bd237e9..8edc723bb1d3fe33f7e522df37b444c54bb2244f 100644 --- a/applications/solvers/multiphase/VoF/setDeltaT.H +++ b/applications/solvers/multiphase/VoF/setDeltaT.H @@ -36,13 +36,14 @@ Description if (adjustTimeStep) { scalar maxDeltaTFact = - min(maxCo/(CoNum + SMALL), maxAlphaCo/(alphaCoNum + SMALL)); + Foam::min(maxCo/(CoNum + SMALL), maxAlphaCo/(alphaCoNum + SMALL)); - scalar deltaTFact = min(min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2); + scalar deltaTFact = + Foam::min(Foam::min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2); runTime.setDeltaT ( - min + Foam::min ( deltaTFact*runTime.deltaTValue(), maxDeltaT diff --git a/applications/solvers/multiphase/cavitatingFoam/setDeltaT.H b/applications/solvers/multiphase/cavitatingFoam/setDeltaT.H index e1e7427fe0d427b92a7e259696340081ffe7dc42..6c355002c26f9c99f0c10eebd5d68074cdf8c961 100644 --- a/applications/solvers/multiphase/cavitatingFoam/setDeltaT.H +++ b/applications/solvers/multiphase/cavitatingFoam/setDeltaT.H @@ -36,13 +36,14 @@ Description if (adjustTimeStep) { scalar maxDeltaTFact = - min(maxCo/(CoNum + SMALL), maxAcousticCo/(acousticCoNum + SMALL)); + Foam::min(maxCo/(CoNum + SMALL), maxAcousticCo/(acousticCoNum + SMALL)); - scalar deltaTFact = min(min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2); + scalar deltaTFact = + Foam::min(Foam::min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2); runTime.setDeltaT ( - min + Foam::min ( deltaTFact*runTime.deltaTValue(), maxDeltaT diff --git a/applications/solvers/multiphase/cavitatingFoam/setInitialDeltaT.H b/applications/solvers/multiphase/cavitatingFoam/setInitialDeltaT.H index 69fbe573338217e7311feac157e0a6ccb42be8dc..435b2e4b0b591d2acf812246d08c2ad46e8670e6 100644 --- a/applications/solvers/multiphase/cavitatingFoam/setInitialDeltaT.H +++ b/applications/solvers/multiphase/cavitatingFoam/setInitialDeltaT.H @@ -37,11 +37,15 @@ if (adjustTimeStep) if (CoNum > SMALL) { scalar maxDeltaTFact = - min(maxCo/(CoNum + SMALL), maxAcousticCo/(acousticCoNum + SMALL)); + Foam::min + ( + maxCo/(CoNum + SMALL), + maxAcousticCo/(acousticCoNum + SMALL) + ); runTime.setDeltaT ( - min + Foam::min ( maxDeltaTFact*runTime.deltaTValue(), maxDeltaT diff --git a/applications/solvers/multiphase/compressibleInterFoam/alphaSuSp.H b/applications/solvers/multiphase/compressibleInterFoam/alphaSuSp.H index ce2e5520015656a43b6923eafcf0879fe5a9b37e..cc698aefed8fc36d593ebbb709d7fd0be6faa919 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/alphaSuSp.H +++ b/applications/solvers/multiphase/compressibleInterFoam/alphaSuSp.H @@ -26,12 +26,12 @@ forAll(dgdt, celli) { if (dgdt[celli] > 0.0) { - Sp[celli] -= dgdt[celli]/max(1.0 - alpha1[celli], 1e-4); - Su[celli] += dgdt[celli]/max(1.0 - alpha1[celli], 1e-4); + Sp[celli] -= dgdt[celli]/Foam::max(1.0 - alpha1[celli], 1e-4); + Su[celli] += dgdt[celli]/Foam::max(1.0 - alpha1[celli], 1e-4); } else if (dgdt[celli] < 0.0) { - Sp[celli] += dgdt[celli]/max(alpha1[celli], 1e-4); + Sp[celli] += dgdt[celli]/Foam::max(alpha1[celli], 1e-4); } } diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterIsoFoam/alphaSuSp.H b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterIsoFoam/alphaSuSp.H index 65c5750ff94f1acf7549bd16e29b171ff6f308d4..457f40891aff00c92be9f414802b536f1199f245 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterIsoFoam/alphaSuSp.H +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterIsoFoam/alphaSuSp.H @@ -26,12 +26,12 @@ forAll(dgdt, celli) { if (dgdt[celli] > 0.0) { - Sp[celli] -= dgdt[celli]/max(1.0 - alpha1[celli], 1e-4); - Su[celli] += dgdt[celli]/max(1.0 - alpha1[celli], 1e-4); + Sp[celli] -= dgdt[celli]/Foam::max(1.0 - alpha1[celli], 1e-4); + Su[celli] += dgdt[celli]/Foam::max(1.0 - alpha1[celli], 1e-4); } else if (dgdt[celli] < 0.0) { - Sp[celli] += dgdt[celli]/max(alpha1[celli], 1e-4); + Sp[celli] += dgdt[celli]/Foam::max(alpha1[celli], 1e-4); } } diff --git a/applications/solvers/multiphase/compressibleInterFoam/overCompressibleInterDyMFoam/alphaSuSp.H b/applications/solvers/multiphase/compressibleInterFoam/overCompressibleInterDyMFoam/alphaSuSp.H index 65c5750ff94f1acf7549bd16e29b171ff6f308d4..457f40891aff00c92be9f414802b536f1199f245 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/overCompressibleInterDyMFoam/alphaSuSp.H +++ b/applications/solvers/multiphase/compressibleInterFoam/overCompressibleInterDyMFoam/alphaSuSp.H @@ -26,12 +26,12 @@ forAll(dgdt, celli) { if (dgdt[celli] > 0.0) { - Sp[celli] -= dgdt[celli]/max(1.0 - alpha1[celli], 1e-4); - Su[celli] += dgdt[celli]/max(1.0 - alpha1[celli], 1e-4); + Sp[celli] -= dgdt[celli]/Foam::max(1.0 - alpha1[celli], 1e-4); + Su[celli] += dgdt[celli]/Foam::max(1.0 - alpha1[celli], 1e-4); } else if (dgdt[celli] < 0.0) { - Sp[celli] += dgdt[celli]/max(alpha1[celli], 1e-4); + Sp[celli] += dgdt[celli]/Foam::max(alpha1[celli], 1e-4); } } diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/setDeltaT.H b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/setDeltaT.H index 026fb506bbc6fbb2517365e52b02d2e68ff518ca..f6662b9cbe55e6d1878dcf469cf841fff4cee5ab 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/setDeltaT.H +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/setDeltaT.H @@ -36,13 +36,13 @@ Description if (adjustTimeStep) { scalar maxDeltaTFact = - min + Foam::min ( maxCo/(CoNum + SMALL), - min + Foam::min ( maxAlphaCo/(alphaCoNum + SMALL), - min + Foam::min ( maxAlphaDdt/(ddtAlphaNum + SMALL), maxDi/(DiNum + SMALL) @@ -50,11 +50,12 @@ if (adjustTimeStep) ) ); - scalar deltaTFact = min(min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2); + scalar deltaTFact = + Foam::min(Foam::min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2); runTime.setDeltaT ( - min + Foam::min ( deltaTFact*runTime.deltaTValue(), maxDeltaT diff --git a/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/CourantNos.H b/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/CourantNos.H index 13c45ad51c10a476a20cf83a96906d59bed4520d..1bd1d9d036bc4c3709262b11980dcea76b070c3a 100644 --- a/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/CourantNos.H +++ b/applications/solvers/multiphase/reactingTwoPhaseEulerFoam/CourantNos.H @@ -8,5 +8,5 @@ Info<< "Max Ur Courant Number = " << UrCoNum << endl; - CoNum = max(CoNum, UrCoNum); + CoNum = Foam::max(CoNum, UrCoNum); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/CourantNos.H b/applications/solvers/multiphase/twoPhaseEulerFoam/CourantNos.H index d828f32769d327e41488135b48f78c1c1cfc4607..96e1ece1ac21bc09d449f2c878afee3900acf45a 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/CourantNos.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/CourantNos.H @@ -8,5 +8,5 @@ Info<< "Max Ur Courant Number = " << UrCoNum << endl; - CoNum = max(CoNum, UrCoNum); + CoNum = Foam::max(CoNum, UrCoNum); } diff --git a/applications/utilities/finiteArea/makeFaMesh/checkPatchTopology.H b/applications/utilities/finiteArea/makeFaMesh/checkPatchTopology.H index a38666a544f1205502ba4134c281ad72fe3fac27..6202b67cd86980c3a5abe9c36990b9aad950c304 100644 --- a/applications/utilities/finiteArea/makeFaMesh/checkPatchTopology.H +++ b/applications/utilities/finiteArea/makeFaMesh/checkPatchTopology.H @@ -108,13 +108,13 @@ Input if (numNbrs == 1) { //if (pointSetPtr) pointSetPtr->insert(mesh.edges()[meshEdgei]); - labelTyp = max(labelTyp, TopoType::OPEN); + labelTyp = Foam::max(labelTyp, TopoType::OPEN); } else if (numNbrs == 0 || numNbrs > 2) { if (pointSetPtr) pointSetPtr->insert(mesh.edges()[meshEdgei]); if (badEdgesPtr) badEdgesPtr->insert(edgei); - labelTyp = max(labelTyp, TopoType::ILLEGAL); + labelTyp = Foam::max(labelTyp, TopoType::ILLEGAL); } } reduce(labelTyp, maxOp<label>()); diff --git a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C index 645a5073d18c31b53680afc4492abc30a9910f83..f2e6a8be6d7cc7908c00e395f61e2e42a4527867 100644 --- a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C +++ b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C @@ -368,7 +368,8 @@ void subsetTopoSets Info<< "Subsetting " << set.type() << ' ' << set.name() << endl; - labelHashSet subset(2*min(set.size(), map.size())); + labelHashSet subset; + subset.reserve(Foam::min(set.size(), map.size())); // Map the data forAll(map, i) diff --git a/applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMesh.C b/applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMesh.C index 6aa76e6653ea319e9209d0355e15fcfca25a96bf..897585862d58e339aa6b3d01372c27df1ef7a4a8 100644 --- a/applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMesh.C +++ b/applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMesh.C @@ -142,26 +142,26 @@ scalar getEdgeStats(const primitiveMesh& mesh, const direction excludeCmpt) if (mag(eVec & x) > 1-edgeTol) { - minX = min(minX, eMag); - maxX = max(maxX, eMag); + minX = Foam::min(minX, eMag); + maxX = Foam::max(maxX, eMag); nX++; } else if (mag(eVec & y) > 1-edgeTol) { - minY = min(minY, eMag); - maxY = max(maxY, eMag); + minY = Foam::min(minY, eMag); + maxY = Foam::max(maxY, eMag); nY++; } else if (mag(eVec & z) > 1-edgeTol) { - minZ = min(minZ, eMag); - maxZ = max(maxZ, eMag); + minZ = Foam::min(minZ, eMag); + maxZ = Foam::max(maxZ, eMag); nZ++; } else { - minOther = min(minOther, eMag); - maxOther = max(maxOther, eMag); + minOther = Foam::min(minOther, eMag); + maxOther = Foam::max(maxOther, eMag); } } @@ -179,19 +179,19 @@ scalar getEdgeStats(const primitiveMesh& mesh, const direction excludeCmpt) if (excludeCmpt == 0) { - return min(minY, min(minZ, minOther)); + return Foam::min(minY, Foam::min(minZ, minOther)); } else if (excludeCmpt == 1) { - return min(minX, min(minZ, minOther)); + return Foam::min(minX, Foam::min(minZ, minOther)); } else if (excludeCmpt == 2) { - return min(minX, min(minY, minOther)); + return Foam::min(minX, Foam::min(minY, minOther)); } else { - return min(minX, min(minY, min(minZ, minOther))); + return Foam::min(minX, Foam::min(minY, Foam::min(minZ, minOther))); } } diff --git a/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C b/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C index c8294f55be99c0a70eee8872afd2683b2d7e39d8..c6388a0e5b92d3157ef112ff200f415e418d8a36 100644 --- a/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C +++ b/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C @@ -271,7 +271,7 @@ int main(int argc, char *argv[]) if (blockPFacePointi != blockPFacePointi2) { sqrMergeTol = - min + Foam::min ( sqrMergeTol, magSqr @@ -338,16 +338,16 @@ int main(int argc, char *argv[]) blockNFacePoints[blockNFacePointi] + blockOffsets[blockNlabel]; - label minPN = min(PpointLabel, NpointLabel); + label minPN = Foam::min(PpointLabel, NpointLabel); if (pointMergeList[PpointLabel] != -1) { - minPN = min(minPN, pointMergeList[PpointLabel]); + minPN = Foam::min(minPN, pointMergeList[PpointLabel]); } if (pointMergeList[NpointLabel] != -1) { - minPN = min(minPN, pointMergeList[NpointLabel]); + minPN = Foam::min(minPN, pointMergeList[NpointLabel]); } pointMergeList[PpointLabel] @@ -411,7 +411,7 @@ int main(int argc, char *argv[]) pointMergeList[PpointLabel] = pointMergeList[NpointLabel] - = min + = Foam::min ( pointMergeList[PpointLabel], pointMergeList[NpointLabel] diff --git a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L index c29bff53e584ae9ac6a2462c61461c6320fd7027..23739c02ca250aef98cba8ed068e6c05ec19ceeb 100644 --- a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L +++ b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L @@ -350,7 +350,7 @@ mtype {space}"MTYPE:"{space} // Find out how many labels are expected. If less or equal to // seven, read them all and finish with it. If there is more, // set read of the next line - label labelsToRead = min(8, nVertices); + label labelsToRead = Foam::min(8, nVertices); label labelI = 0; for (; labelI < labelsToRead; labelI++) { @@ -387,7 +387,7 @@ mtype {space}"MTYPE:"{space} labelList& curLabels = cellLabels[curNumberOfCells]; - label labelsToRead = min + label labelsToRead = Foam::min ( (nCellContinuationLines + 1)*7, curLabels.size() diff --git a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C index cfc923bcf30a7c5a60393e66f5266f42af53bc24..36f89a1814e21e8048eacddb4edb4d471d207cf5 100644 --- a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C +++ b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C @@ -269,7 +269,7 @@ void readCells label maxUnvPoint = 0; forAll(unvPointID, pointi) { - maxUnvPoint = max(maxUnvPoint, unvPointID[pointi]); + maxUnvPoint = Foam::max(maxUnvPoint, unvPointID[pointi]); } labelList unvToFoam(invert(maxUnvPoint+1, unvPointID)); @@ -784,7 +784,7 @@ int main(int argc, char *argv[]) label maxUnvPoint = 0; forAll(unvPointID, pointi) { - maxUnvPoint = max(maxUnvPoint, unvPointID[pointi]); + maxUnvPoint = Foam::max(maxUnvPoint, unvPointID[pointi]); } labelList unvToFoam(invert(maxUnvPoint+1, unvPointID)); diff --git a/applications/utilities/mesh/conversion/kivaToFoam/checkPatch.H b/applications/utilities/mesh/conversion/kivaToFoam/checkPatch.H index 6e9eaae3819a686fddf88412c006062188ac24a0..708b9664f534b3696d18286379aef297eb1fe1d2 100644 --- a/applications/utilities/mesh/conversion/kivaToFoam/checkPatch.H +++ b/applications/utilities/mesh/conversion/kivaToFoam/checkPatch.H @@ -8,10 +8,10 @@ { if (kivaVersion == kiva3v) { - regionIndex = max + regionIndex = Foam::max ( - max(idface[quadFace[0]], idface[quadFace[1]]), - max(idface[quadFace[2]], idface[quadFace[3]]) + Foam::max(idface[quadFace[0]], idface[quadFace[1]]), + Foam::max(idface[quadFace[2]], idface[quadFace[3]]) ); if (regionIndex > 0) diff --git a/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H b/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H index fa8c5548dd08b47fcce518fd7223c9f84890b0a1..e702c50053c8608e3809b64d98e6f58d251180b6 100644 --- a/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H +++ b/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H @@ -148,7 +148,7 @@ for (label i=0; i<nPoints; i++) end = pointMap[end]; } - label minLabel = min(start, end); + label minLabel = Foam::min(start, end); pointMap[start] = pointMap[end] = minLabel; } @@ -331,7 +331,7 @@ if { forAll(pf, pfi) { - minz = min(minz, points[pf[pfi]].z()); + minz = Foam::min(minz, points[pf[pfi]].z()); } } diff --git a/applications/utilities/mesh/conversion/netgenNeutralToFoam/netgenNeutralToFoam.C b/applications/utilities/mesh/conversion/netgenNeutralToFoam/netgenNeutralToFoam.C index c9cbabe10b5adc574df3959fedb888ee54019559..7c719aa8536605d5d105532ab7e29b4acb2cf5ec 100644 --- a/applications/utilities/mesh/conversion/netgenNeutralToFoam/netgenNeutralToFoam.C +++ b/applications/utilities/mesh/conversion/netgenNeutralToFoam/netgenNeutralToFoam.C @@ -188,7 +188,7 @@ int main(int argc, char *argv[]) } - maxPatch = max(maxPatch, patchi); + maxPatch = Foam::max(maxPatch, patchi); triFace tri(readLabel(str)-1, readLabel(str)-1, readLabel(str)-1); diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C index d1fb66a6056c4b48562672c70d9270bd2d116b9e..c536d2c840d8866f86ea16fbb76a98a1a7f95843 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -556,8 +556,8 @@ void calcEdgeMinMaxZone forAll(eFaces, i) { label zoneI = mappedZoneID[eFaces[i]]; - minZoneID[edgeI] = min(minZoneID[edgeI], zoneI); - maxZoneID[edgeI] = max(maxZoneID[edgeI], zoneI); + minZoneID[edgeI] = Foam::min(minZoneID[edgeI], zoneI); + maxZoneID[edgeI] = Foam::max(maxZoneID[edgeI], zoneI); } } } @@ -813,8 +813,8 @@ void addCoupledPatches forAll(eFaces, i) { label proci = procID[eFaces[i]]; - minProcID[edgeI] = min(minProcID[edgeI], proci); - maxProcID[edgeI] = max(maxProcID[edgeI], proci); + minProcID[edgeI] = Foam::min(minProcID[edgeI], proci); + maxProcID[edgeI] = Foam::max(maxProcID[edgeI], proci); } } } @@ -1291,7 +1291,7 @@ void extrudeGeometricProperties label celli = regionMesh.faceOwner()[facei]; if (regionMesh.isInternalFace(facei)) { - celli = max(celli, regionMesh.faceNeighbour()[facei]); + celli = Foam::max(celli, regionMesh.faceNeighbour()[facei]); } // Calculate layer from cell numbering (see createShellMesh) @@ -2210,8 +2210,8 @@ int main(int argc, char *argv[]) if (addSidePatches && (zone0 != zone1)) // || (cos(angle) > blabla)) { - label minZone = min(zone0,zone1); - label maxZone = max(zone0,zone1); + label minZone = Foam::min(zone0,zone1); + label maxZone = Foam::max(zone0,zone1); label index = minZone*zoneNames.size()+maxZone; ePatches.setSize(eFaces.size()); diff --git a/applications/utilities/mesh/manipulation/checkMesh/writeFields.C b/applications/utilities/mesh/manipulation/checkMesh/writeFields.C index c16334b9e3f81dcc73854af12db30167c8cb9d4d..d7fbba86ba14c0a70ab634f31f81c01c36ae8022 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/writeFields.C +++ b/applications/utilities/mesh/manipulation/checkMesh/writeFields.C @@ -26,7 +26,7 @@ void maxFaceToCell const cell& cFaces = cells[cellI]; forAll(cFaces, i) { - cellFld[cellI] = max(cellFld[cellI], faceData[cFaces[i]]); + cellFld[cellI] = Foam::max(cellFld[cellI], faceData[cFaces[i]]); } } @@ -56,7 +56,7 @@ void minFaceToCell const cell& cFaces = cells[cellI]; forAll(cFaces, i) { - cellFld[cellI] = min(cellFld[cellI], faceData[cFaces[i]]); + cellFld[cellI] = Foam::min(cellFld[cellI], faceData[cFaces[i]]); } } @@ -87,8 +87,8 @@ void minFaceToCell // Internal faces forAll(own, facei) { - cellFld[own[facei]] = min(cellFld[own[facei]], faceData[facei]); - cellFld[nei[facei]] = min(cellFld[nei[facei]], faceData[facei]); + cellFld[own[facei]] = Foam::min(cellFld[own[facei]], faceData[facei]); + cellFld[nei[facei]] = Foam::min(cellFld[nei[facei]], faceData[facei]); } // Patch faces @@ -99,7 +99,7 @@ void minFaceToCell forAll(fc, i) { - cellFld[fc[i]] = min(cellFld[fc[i]], fvp[i]); + cellFld[fc[i]] = Foam::min(cellFld[fc[i]], fvp[i]); } } @@ -178,7 +178,14 @@ void Foam::writeFields ( radToDeg ( - Foam::acos(min(scalar(1), max(scalar(-1), faceOrthogonality))) + Foam::acos + ( + Foam::min + ( + scalar(1), + Foam::max(scalar(-1), faceOrthogonality) + ) + ) ) ); @@ -534,7 +541,7 @@ void Foam::writeFields ownCc, fc ).quality(); - ownVol = min(ownVol, tetQual); + ownVol = Foam::min(ownVol, tetQual); } } if (mesh.isInternalFace(facei)) @@ -550,7 +557,7 @@ void Foam::writeFields fc, neiCc ).quality(); - neiVol = min(neiVol, tetQual); + neiVol = Foam::min(neiVol, tetQual); } } } @@ -602,8 +609,10 @@ void Foam::writeFields // Internal faces forAll(own, facei) { - cellFld[own[facei]] = min(cellFld[own[facei]], ownPyrVol[facei]); - cellFld[nei[facei]] = min(cellFld[nei[facei]], neiPyrVol[facei]); + cellFld[own[facei]] = + Foam::min(cellFld[own[facei]], ownPyrVol[facei]); + cellFld[nei[facei]] = + Foam::min(cellFld[nei[facei]], neiPyrVol[facei]); } // Patch faces @@ -614,7 +623,8 @@ void Foam::writeFields forAll(fc, i) { const label meshFacei = fvp.patch().start(); - cellFld[fc[i]] = min(cellFld[fc[i]], ownPyrVol[meshFacei]); + cellFld[fc[i]] = + Foam::min(cellFld[fc[i]], ownPyrVol[meshFacei]); } } @@ -625,7 +635,7 @@ void Foam::writeFields if (writeFaceFields) { scalarField minFacePyrVol(neiPyrVol); - minFacePyrVol = min + minFacePyrVol = Foam::min ( minFacePyrVol, SubField<scalar>(ownPyrVol, mesh.nInternalFaces()) diff --git a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C index 0076597534782210174645ea1d57086817476d4e..3d9113f96e1be20bc8c409f3b54d28a328dc9187 100644 --- a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C +++ b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C @@ -100,26 +100,26 @@ void printEdgeStats(const polyMesh& mesh) if (mag(eVec & x) > 1-edgeTol) { - minX = min(minX, eMag); - maxX = max(maxX, eMag); + minX = Foam::min(minX, eMag); + maxX = Foam::max(maxX, eMag); nX++; } else if (mag(eVec & y) > 1-edgeTol) { - minY = min(minY, eMag); - maxY = max(maxY, eMag); + minY = Foam::min(minY, eMag); + maxY = Foam::max(maxY, eMag); nY++; } else if (mag(eVec & z) > 1-edgeTol) { - minZ = min(minZ, eMag); - maxZ = max(maxZ, eMag); + minZ = Foam::min(minZ, eMag); + maxZ = Foam::max(maxZ, eMag); nZ++; } else { - minOther = min(minOther, eMag); - maxOther = max(maxOther, eMag); + minOther = Foam::min(minOther, eMag); + maxOther = Foam::max(maxOther, eMag); } } } diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C index 9a3eb426477e8bfca4be0825c52771451938f6ca..4ded5600565ff9138b54641f3d4caef5375caed7 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -465,7 +465,7 @@ labelList getRegionFaceOrder // Do region interfaces { - const label nRegions = max(cellToRegion)+1; + const label nRegions = Foam::max(cellToRegion)+1; // Sort in increasing region SortableList<label> sortKey(mesh.nInternalFaces(), labelMax); @@ -478,8 +478,10 @@ labelList getRegionFaceOrder if (ownRegion != neiRegion) { sortKey[facei] = - min(ownRegion, neiRegion)*nRegions - +max(ownRegion, neiRegion); + ( + Foam::min(ownRegion, neiRegion)*nRegions + + Foam::max(ownRegion, neiRegion) + ); } } diff --git a/applications/utilities/mesh/manipulation/setSet/setSet.C b/applications/utilities/mesh/manipulation/setSet/setSet.C index af462ed6d948ea594e88638663b53c17d2856f98..3ca4aedf7b70a6b1a7282ec6dd34059aa335b5de 100644 --- a/applications/utilities/mesh/manipulation/setSet/setSet.C +++ b/applications/utilities/mesh/manipulation/setSet/setSet.C @@ -320,10 +320,10 @@ bool doCommand const globalMeshData& parData = mesh.globalData(); label typSize = - max + Foam::max ( parData.nTotalCells(), - max + Foam::max ( parData.nTotalFaces(), parData.nTotalPoints() @@ -375,7 +375,7 @@ bool doCommand topoSet& currentSet = currentSetPtr(); // Presize it according to current mesh data. - currentSet.reserve(max(currentSet.size(), typSize)); + currentSet.reserve(Foam::max(currentSet.size(), typSize)); } } diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C index ae9d91f0b194b196630a4b467b9955b15393605d..5e5eaadc8f2c22a6e73c0261993262fc26d90bf2 100644 --- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C +++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C @@ -269,11 +269,7 @@ void addToInterface EdgeMap<Map<label>>& regionsToSize ) { - edge interface - ( - min(ownRegion, neiRegion), - max(ownRegion, neiRegion) - ); + const edge interface(ownRegion, neiRegion, true); // sort=true auto iter = regionsToSize.find(interface); @@ -509,11 +505,7 @@ void getInterfaceSizes zoneID = mesh.faceZones().whichZone(facei); } - edge interface - ( - min(ownRegion, neiRegion), - max(ownRegion, neiRegion) - ); + const edge interface(ownRegion, neiRegion, true); // sort=true faceToInterface[facei] = regionsToInterface[interface][zoneID]; } @@ -532,11 +524,7 @@ void getInterfaceSizes zoneID = mesh.faceZones().whichZone(facei); } - edge interface - ( - min(ownRegion, neiRegion), - max(ownRegion, neiRegion) - ); + const edge interface(ownRegion, neiRegion, true); // sort=true faceToInterface[facei] = regionsToInterface[interface][zoneID]; } diff --git a/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C b/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C index 1b195acc0322956076116ac4dd7f71335a82c787..22c781a7ad22bb0f787efe72cced1906462050d1 100644 --- a/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C +++ b/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C @@ -295,7 +295,8 @@ void subsetTopoSets Info<< "Subsetting " << set.type() << " " << set.name() << endl; - labelHashSet subset(2*min(set.size(), map.size())); + labelHashSet subset; + subset.reserve(Foam::min(set.size(), map.size())); // Map the data forAll(map, i) diff --git a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C index 56eaa1d4d9cf1a2255f5c9df66582806613a00a1..cab241ed8552150a9de08430bb24c5a4983c5b4d 100644 --- a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C +++ b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C @@ -1131,7 +1131,7 @@ int main(int argc, char *argv[]) for ( label addedI=next; - addedI<min(proci+step, nProcs); + addedI < Foam::min(proci+step, nProcs); addedI++ ) { diff --git a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C index 305ec95aca647db71b8c22fd6dd287d113b8b2d4..21fe3ee64fcf6d47a232a955175cbc79cb6f0b9c 100644 --- a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C +++ b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C @@ -403,11 +403,11 @@ void printMeshData(const polyMesh& mesh) << nBndFaces-nProcFaces << endl; } - maxProcCells = max(maxProcCells, nLocalCells); + maxProcCells = Foam::max(maxProcCells, nLocalCells); totProcFaces += nProcFaces; totProcPatches += nei.size(); - maxProcFaces = max(maxProcFaces, nProcFaces); - maxProcPatches = max(maxProcPatches, nei.size()); + maxProcFaces = Foam::max(maxProcFaces, nProcFaces); + maxProcPatches = Foam::max(maxProcPatches, nei.size()); } // Summary stats diff --git a/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C b/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C index 2202574ad88b3d3a4a62fc229fc6ad026d806e50..1e6af8563f92ccc3d877180c687ded4f830ceb22 100644 --- a/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C +++ b/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C @@ -131,7 +131,7 @@ int main(int argc, char *argv[]) args.readIfPresent("format", setFormat); args.readIfPresent("stride", sampleFrequency); - sampleFrequency = max(1, sampleFrequency); // sanity + sampleFrequency = Foam::max(1, sampleFrequency); // sanity // Setup the writer auto writerPtr = @@ -179,7 +179,7 @@ int main(int argc, char *argv[]) maxIds.resize(origProc+1, -1); } - maxIds[origProc] = max(maxIds[origProc], origId); + maxIds[origProc] = Foam::max(maxIds[origProc], origId); } } diff --git a/applications/utilities/preProcessing/PDR/pdrFields/PDRarraysCalc.C b/applications/utilities/preProcessing/PDR/pdrFields/PDRarraysCalc.C index 382086b80b41c1e60cc6eb1773ade2f3ac38b142..f25ede0b3e4d396e2d4353e5798635e9d2be4542 100644 --- a/applications/utilities/preProcessing/PDR/pdrFields/PDRarraysCalc.C +++ b/applications/utilities/preProcessing/PDR/pdrFields/PDRarraysCalc.C @@ -1056,7 +1056,7 @@ void calc_drag_etc const scalar expon = ( br > 0.0 - ? min(max((surr_br / br - 0.25) * 4.0 / 3.0, scalar(0)), scalar(1)) + ? Foam::clamp((surr_br / br - 0.25) * 4.0 / 3.0, Foam::zero_one{}) : 0.0 ); @@ -1114,16 +1114,16 @@ void Foam::PDRarrays::blockageSummary() const totVolBlock += v_block(ijk) * pdrBlock.V(ijk); totArea += surf(ijk); - totCount += max(0, obs_count(ijk)); + totCount += Foam::max(0, obs_count(ijk)); - totDrag.x() += max(0, drag_s(ijk).xx()); - totDrag.y() += max(0, drag_s(ijk).yy()); - totDrag.z() += max(0, drag_s(ijk).zz()); + totDrag.x() += Foam::max(0, drag_s(ijk).xx()); + totDrag.y() += Foam::max(0, drag_s(ijk).yy()); + totDrag.z() += Foam::max(0, drag_s(ijk).zz()); for (direction cmpt=0; cmpt < vector::nComponents; ++cmpt) { - totBlock[cmpt] += max(0, area_block_s(ijk)[cmpt]); - totBlock[cmpt] += max(0, area_block_r(ijk)[cmpt]); + totBlock[cmpt] += Foam::max(0, area_block_s(ijk)[cmpt]); + totBlock[cmpt] += Foam::max(0, area_block_r(ijk)[cmpt]); } } } diff --git a/applications/utilities/preProcessing/PDR/pdrFields/PDRutilsOverlap.C b/applications/utilities/preProcessing/PDR/pdrFields/PDRutilsOverlap.C index 1c27f536cfe2538b17e4f9ec83527679a6962581..b79311b49aed1bcea7d180e5dbc7ddf5ec703f97 100644 --- a/applications/utilities/preProcessing/PDR/pdrFields/PDRutilsOverlap.C +++ b/applications/utilities/preProcessing/PDR/pdrFields/PDRutilsOverlap.C @@ -302,7 +302,7 @@ void Foam::PDRutils::circle_overlap scalar da = ac - 0.5 * (a1 + a2); scalar db = bc - 0.5 * (b1 + b2); scalar dc = std::hypot(da, db); - scalar rat1 = min(max((dc / sqrt(area) - 0.3) * 1.4, 0), 1); + scalar rat1 = Foam::min(Foam::max((dc / sqrt(area) - 0.3) * 1.4, 0), 1); scalar drg0 = c_drag(ia,ib).xx(); scalar drg1 = c_drag(ia,ib).yy(); scalar drg = std::hypot(drg0, drg1); @@ -449,8 +449,8 @@ scalar block_overlap { PDRobstacle over; - over.pt = max(blk1.pt, blk2.pt); - over.span = min(max1, max2) - over.pt; + over.pt = Foam::max(blk1.pt, blk2.pt); + over.span = Foam::min(max1, max2) - over.pt; assert(cmptProduct(over.span) > 0.0); @@ -603,11 +603,11 @@ scalar block_cylinder_overlap over.x() = a_centre - 0.5 * a_lblk; over.y() = b_centre - 0.5 * b_lblk; - over.z() = max(blk1.z(), cyl2.z()); + over.z() = Foam::max(blk1.z(), cyl2.z()); over.span.x() = a_lblk; over.span.y() = b_lblk; - over.span.z() = min(max1.z(), cyl2.z() + cyl2.len()) - over.z(); + over.span.z() = Foam::min(max1.z(), cyl2.z() + cyl2.len()) - over.z(); assert(over.x() > -200.0); assert(over.x() < 2000.0); } @@ -668,11 +668,11 @@ scalar block_cylinder_overlap over.z() = a_centre - a_lblk * 0.5; over.x() = b_centre - b_lblk * 0.5; - over.y() = max(blk1.y(), cyl2.y()); + over.y() = Foam::max(blk1.y(), cyl2.y()); over.span.z() = a_lblk; over.span.x() = b_lblk; - over.span.y() = min(max1.y(), cyl2.y() + cyl2.len()) - over.y(); + over.span.y() = Foam::min(max1.y(), cyl2.y() + cyl2.len()) - over.y(); } break; @@ -734,11 +734,11 @@ scalar block_cylinder_overlap over.y() = a_centre - a_lblk * 0.5; over.z() = b_centre - b_lblk * 0.5; - over.x() = max(blk1.x(), cyl2.x()); + over.x() = Foam::max(blk1.x(), cyl2.x()); over.span.y() = a_lblk; over.span.z() = b_lblk; - over.span.x() = min(max1.x(), cyl2.x() + cyl2.len()) - over.x(); + over.span.x() = Foam::min(max1.x(), cyl2.x() + cyl2.len()) - over.x(); } break; } diff --git a/applications/utilities/preProcessing/engineSwirl/engineSwirl.C b/applications/utilities/preProcessing/engineSwirl/engineSwirl.C index cb50df548598185515aa4cc97e636a24f75a7ab4..9c1d70e96a49c9134b1b7159a60dee484761b92b 100644 --- a/applications/utilities/preProcessing/engineSwirl/engineSwirl.C +++ b/applications/utilities/preProcessing/engineSwirl/engineSwirl.C @@ -71,9 +71,9 @@ int main(int argc, char *argv[]) { scalar b = j1(swirlProfile*r/cylinderRadius).value(); scalar vEff = omega*b; - r = max(r, SMALL); + r = Foam::max(r, SMALL); U[celli] = ((vEff/r)*(c & yT))*xT + (-(vEff/r)*(c & xT))*yT; - Umax = max(Umax, mag(U[celli])); + Umax = Foam::max(Umax, mag(U[celli])); } } diff --git a/applications/utilities/surface/surfaceCheck/surfaceCheck.C b/applications/utilities/surface/surfaceCheck/surfaceCheck.C index 7c6be507e1786efa4e23089dc970c96b5e123675..15ec124430b3c818316b8ed53824fb4f36c27791 100644 --- a/applications/utilities/surface/surfaceCheck/surfaceCheck.C +++ b/applications/utilities/surface/surfaceCheck/surfaceCheck.C @@ -887,7 +887,7 @@ int main(int argc, char *argv[]) writeParts ( surf, - min(outputThreshold, numZones), + Foam::min(outputThreshold, numZones), faceZone, surfFilePath, surfFileStem @@ -953,7 +953,7 @@ int main(int argc, char *argv[]) writeParts ( surf, - min(outputThreshold, numNormalZones), + Foam::min(outputThreshold, numNormalZones), normalZone, surfFilePath, surfFileStem + "_normal" diff --git a/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C b/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C index 603f07b43fd8aba37d03b07b5f07de284768201a..ef0b74fdcf735a1608ae6f45f885adbe828b2822 100644 --- a/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C +++ b/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C @@ -280,7 +280,7 @@ int main(int argc, char *argv[]) const IOdictionary dict(dictIO); const scalar dist(args.get<scalar>(1)); - const scalar matchTolerance(max(1e-6*dist, SMALL)); + const scalar matchTolerance(Foam::max(1e-6*dist, SMALL)); const label maxIters = 100; Info<< "Hooking distance = " << dist << endl; diff --git a/applications/utilities/surface/surfaceInflate/surfaceInflate.C b/applications/utilities/surface/surfaceInflate/surfaceInflate.C index 3292780ef73fdc7a8d4132f602d821dcd639c9ad..4a16e37c8b542cc5194b78e2a3e51bf30f860851 100644 --- a/applications/utilities/surface/surfaceInflate/surfaceInflate.C +++ b/applications/utilities/surface/surfaceInflate/surfaceInflate.C @@ -276,7 +276,7 @@ label detectIntersectionPoints // 1. Extrusion offset vectors intersecting new surface location { - scalar tol = max(tolerance, 10*s.tolerance()); + scalar tol = Foam::max(tolerance, 10*s.tolerance()); // Collect all the edge vectors. Slightly shorten the edges to prevent // finding lots of intersections. The fast triangle intersection routine @@ -296,7 +296,7 @@ label detectIntersectionPoints && !localFaces[hits[pointI].index()].found(pointI) ) { - scale[pointI] = max(0.0, scale[pointI]-0.2); + scale[pointI] = Foam::max(0.0, scale[pointI]-0.2); isPointOnHitEdge.set(pointI); nHits++; @@ -330,7 +330,7 @@ label detectIntersectionPoints << pt << endl; - scale[e[0]] = max(0.0, scale[e[0]]-0.2); + scale[e[0]] = Foam::max(0.0, scale[e[0]]-0.2); nHits++; } if (isPointOnHitEdge.set(e[1])) @@ -342,7 +342,7 @@ label detectIntersectionPoints << pt << endl; - scale[e[1]] = max(0.0, scale[e[1]]-0.2); + scale[e[1]] = Foam::max(0.0, scale[e[1]]-0.2); nHits++; } } @@ -418,7 +418,7 @@ void minSmooth const edge& e = edges[edgeI]; scalar w = mag(points[mp[e[0]]]-points[mp[e[1]]]); - edgeWeights[edgeI] = 1.0/(max(w, SMALL)); + edgeWeights[edgeI] = 1.0/(Foam::max(w, SMALL)); } tmp<scalarField> tavgFld = avg(s, fld, edgeWeights); @@ -429,7 +429,7 @@ void minSmooth { if (isAffectedPoint.test(pointI)) { - newFld[pointI] = min + newFld[pointI] = Foam::min ( fld[pointI], 0.5*fld[pointI] + 0.5*avgFld[pointI] diff --git a/applications/utilities/surface/surfaceMeshExtract/surfaceMeshExtract.C b/applications/utilities/surface/surfaceMeshExtract/surfaceMeshExtract.C index 6f276914579981810a6e6fe31eb2ca43f0a6725d..fcd551ab61e4f76948f7e3d1e67db543a5932518 100644 --- a/applications/utilities/surface/surfaceMeshExtract/surfaceMeshExtract.C +++ b/applications/utilities/surface/surfaceMeshExtract/surfaceMeshExtract.C @@ -109,7 +109,7 @@ void writeOBJ const auto& constraints = ppp.constraints(); forAll(constraints, i) { - maxConstraint = max(maxConstraint, constraints[i].first()); + maxConstraint = Foam::max(maxConstraint, constraints[i].first()); } reduce(maxConstraint, maxOp<label>()); diff --git a/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C b/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C index 220a0da6ddbac025d5ab37ec8636299996be7a23..7345394f9c21b45df3d4e90f3abc816d5a72a4b6 100644 --- a/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C +++ b/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C @@ -180,8 +180,8 @@ int main(int argc, char *argv[]) scalar o2 = (1.0/equiv)*stoicO2; scalar n2 = (0.79/0.21)*o2; - scalar fres = max(1.0 - 1.0/equiv, 0.0); - scalar ores = max(1.0/equiv - 1.0, 0.0); + scalar fres = Foam::max(1.0 - 1.0/equiv, 0.0); + scalar ores = Foam::max(1.0/equiv - 1.0, 0.0); scalar fburnt = 1.0 - fres; thermo reactants diff --git a/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C b/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C index a6f2e4fb63fb8476784bf4338a36600d5fcfe8fb..89798b215212a27eb493bbd97112e9422a6b86ba 100644 --- a/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C +++ b/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C @@ -196,12 +196,12 @@ int main(int argc, char *argv[]) // Number of moles of species for one mole of fuel scalar o2 = (1.0/equiv)*stoicO2; scalar n2 = (0.79/0.21)*o2; - scalar fres = max(1.0 - 1.0/equiv, 0.0); + scalar fres = Foam::max(1.0 - 1.0/equiv, 0.0); scalar fburnt = 1.0 - fres; // Initial guess for number of moles of product species // ignoring product dissociation - scalar oresInit = max(1.0/equiv - 1.0, 0.0)*stoicO2; + scalar oresInit = Foam::max(1.0/equiv - 1.0, 0.0)*stoicO2; scalar co2Init = fburnt*stoicCO2; scalar h2oInit = fburnt*stoicH2O; @@ -231,18 +231,18 @@ int main(int argc, char *argv[]) if (j > 0) { co = co2* - min + Foam::min ( CO2BreakUp.Kn(P, equilibriumFlameTemperature, N) - /::sqrt(max(ores, 0.001)), + /::sqrt(Foam::max(ores, 0.001)), 1.0 ); h2 = h2o* - min + Foam::min ( H2OBreakUp.Kn(P, equilibriumFlameTemperature, N) - /::sqrt(max(ores, 0.001)), + /::sqrt(Foam::max(ores, 0.001)), 1.0 ); diff --git a/src/finiteVolume/cfdTools/general/include/setDeltaT.H b/src/finiteVolume/cfdTools/general/include/setDeltaT.H index 25ee3713ddf908198cfa32cefd29d7a972d8b33b..c218e9d90d0a89a953f90e62da4baa7fe5c7b196 100644 --- a/src/finiteVolume/cfdTools/general/include/setDeltaT.H +++ b/src/finiteVolume/cfdTools/general/include/setDeltaT.H @@ -36,11 +36,12 @@ Description if (adjustTimeStep) { scalar maxDeltaTFact = maxCo/(CoNum + SMALL); - scalar deltaTFact = min(min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2); + scalar deltaTFact = + Foam::min(Foam::min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2); runTime.setDeltaT ( - min + Foam::min ( deltaTFact*runTime.deltaTValue(), maxDeltaT diff --git a/src/finiteVolume/cfdTools/general/include/setInitialDeltaT.H b/src/finiteVolume/cfdTools/general/include/setInitialDeltaT.H index 55f23f13e1476a7e9858904b3e91844afc9bccf2..1f45166220d947bf7931b82675636d4ef5b206e6 100644 --- a/src/finiteVolume/cfdTools/general/include/setInitialDeltaT.H +++ b/src/finiteVolume/cfdTools/general/include/setInitialDeltaT.H @@ -38,10 +38,10 @@ if (adjustTimeStep) { runTime.setDeltaT ( - min + Foam::min ( maxCo*runTime.deltaTValue()/CoNum, - min(runTime.deltaTValue(), maxDeltaT) + Foam::min(runTime.deltaTValue(), maxDeltaT) ) ); } diff --git a/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModelCollection.C b/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModelCollection.C index 7559047023f61a69e3d841be525e491d06c7a1d7..dd9ca6401bd973b15338d356d5070e68cb20fd75 100644 --- a/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModelCollection.C +++ b/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModelCollection.C @@ -163,7 +163,8 @@ scalar pyrolysisModelCollection::maxDiff() const scalar maxDiff = 0.0; forAll(*this, i) { - maxDiff = max(maxDiff, this->operator[](i).maxDiff()); + maxDiff = + Foam::max(maxDiff, this->operator[](i).maxDiff()); } return maxDiff; @@ -175,7 +176,8 @@ scalar pyrolysisModelCollection::solidRegionDiffNo() const scalar totalDiNum = GREAT; forAll(*this, i) { - totalDiNum = min(totalDiNum, this->operator[](i).solidRegionDiffNo()); + totalDiNum = + Foam::min(totalDiNum, this->operator[](i).solidRegionDiffNo()); } return totalDiNum;