From 6c68c4fe139c02454a375b99516df03d76f9f9ca Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 13 Feb 2019 08:06:36 +0100 Subject: [PATCH] STYLE: reduced nesting on return branching --- .../turbulence/PDRkEpsilon/PDRkEpsilon.C | 8 +- .../liquidPropertiesSurfaceTension.C | 8 +- .../twoPhaseMixtureThermo.C | 8 +- ...incompressibleTwoPhaseInteractingMixture.C | 12 +- .../laserDTRM/laserDTRM.C | 8 +- .../temperaturePhaseChangeTwoPhaseMixture.C | 8 +- .../thermoIncompressibleTwoPhaseMixture.C | 9 +- .../incompressibleThreePhaseMixture.C | 12 +- .../phaseChangeTwoPhaseMixtures/Kunz/Kunz.C | 8 +- .../Merkle/Merkle.C | 8 +- .../SchnerrSauer/SchnerrSauer.C | 8 +- .../multiphaseMixture/phase/phase.C | 8 +- .../kineticTheoryModel/kineticTheoryModel.C | 8 +- .../kineticTheoryModel/kineticTheoryModel.C | 8 +- .../refinementLevel/refinementLevel.C | 8 +- .../snappyRefineMesh/snappyRefineMesh.C | 14 +- .../mesh/advanced/splitCells/splitCells.C | 6 +- .../conformalVoronoiMeshFeaturePoints.C | 12 +- .../foamyMesh/foamyQuadMesh/CV2DI.H | 8 +- .../foamyMesh/foamyQuadMesh/indexedVertexI.H | 20 +- .../insertBoundaryConformPointPairs.C | 8 +- .../manipulation/checkMesh/checkGeometry.C | 27 +- .../surface/surfaceClean/collapseBase.C | 6 +- .../surfaceSplitNonManifolds.C | 9 +- src/ODE/ODESolvers/Euler/Euler.C | 8 +- src/ODE/ODESolvers/EulerSI/EulerSI.C | 8 +- src/ODE/ODESolvers/ODESolver/ODESolver.C | 8 +- src/ODE/ODESolvers/RKCK45/RKCK45.C | 8 +- src/ODE/ODESolvers/RKDP45/RKDP45.C | 8 +- src/ODE/ODESolvers/RKF45/RKF45.C | 8 +- .../ODESolvers/Rosenbrock12/Rosenbrock12.C | 8 +- .../ODESolvers/Rosenbrock23/Rosenbrock23.C | 8 +- .../ODESolvers/Rosenbrock34/Rosenbrock34.C | 8 +- src/ODE/ODESolvers/SIBS/SIBS.C | 8 +- src/ODE/ODESolvers/Trapezoid/Trapezoid.C | 8 +- src/ODE/ODESolvers/rodas23/rodas23.C | 8 +- src/ODE/ODESolvers/rodas34/rodas34.C | 8 +- src/ODE/ODESolvers/seulex/seulex.C | 8 +- .../dynamicIndexedOctree.C | 32 +-- .../algorithms/indexedOctree/indexedOctree.C | 32 +-- .../algorithms/indexedOctree/treeDataCell.C | 10 +- .../Dictionaries/Dictionary/Dictionary.C | 14 +- src/OpenFOAM/db/Callback/Callback.C | 25 +- .../db/IOstreams/Pstreams/UOPstream.C | 8 +- .../functionEntries/ifeqEntry/ifeqEntry.C | 48 +--- .../regionFunctionObject.C | 6 +- src/OpenFOAM/db/regIOobject/regIOobject.C | 9 +- src/OpenFOAM/db/regIOobject/regIOobjectRead.C | 14 +- .../GeometricField/GeometricField.C | 6 +- .../fileOperation/fileOperation.C | 8 +- src/OpenFOAM/graph/curve/curveTools.C | 8 +- .../GAMGAgglomeration/GAMGAgglomeration.C | 8 +- src/OpenFOAM/meshes/polyMesh/polyMesh.C | 6 +- .../polyMesh/polyMeshCheck/polyMeshCheck.C | 69 ++--- .../polyMeshTetDecomposition.C | 14 +- .../constraint/cyclic/cyclicPolyPatch.C | 2 +- .../constraint/oldCyclic/oldCyclicPolyPatch.C | 8 +- .../primitiveMeshCheck/primitiveMeshCheck.C | 269 ++++++++---------- .../primitiveMeshCheckEdgeLength.C | 17 +- .../primitiveMeshCheckPointNearness.C | 8 +- src/OpenFOAM/primitives/enums/NamedEnum.C | 8 +- .../globalIndexAndTransform.C | 8 +- .../EddyDiffusivity/EddyDiffusivity.C | 8 +- .../RAS/buoyantKEpsilon/buoyantKEpsilon.C | 20 +- .../RAS/LamBremhorstKE/LamBremhorstKE.C | 6 +- .../RAS/LienCubicKE/LienCubicKE.C | 8 +- .../RAS/LienLeschziner/LienLeschziner.C | 8 +- .../RAS/ShihQuadraticKE/ShihQuadraticKE.C | 8 +- .../RAS/kkLOmega/kkLOmega.C | 8 +- .../RAS/qZeta/qZeta.C | 8 +- .../phaseCompressible/LES/Niceno/NicenoKEqn.C | 8 +- .../LES/SmagorinskyZhang/SmagorinskyZhang.C | 8 +- .../LES/continuousGasKEqn/continuousGasKEqn.C | 8 +- .../RAS/LaheyKEpsilon/LaheyKEpsilon.C | 8 +- .../continuousGasKEpsilon.C | 8 +- .../RAS/kOmegaSSTSato/kOmegaSSTSato.C | 9 +- .../Base/kOmegaSST/kOmegaSSTBase.C | 8 +- .../SpalartAllmarasDDES/SpalartAllmarasDDES.C | 8 +- .../SpalartAllmarasDES/SpalartAllmarasDES.C | 8 +- .../SpalartAllmarasIDDES.C | 8 +- .../DES/kOmegaSSTDDES/kOmegaSSTDDES.C | 8 +- .../DES/kOmegaSSTDES/kOmegaSSTDES.C | 8 +- .../DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C | 8 +- .../DeardorffDiffStress/DeardorffDiffStress.C | 8 +- .../turbulenceModels/LES/LESModel/LESModel.C | 8 +- .../smoothDelta/smoothDeltaDeltaDataI.H | 12 +- .../LES/LESeddyViscosity/LESeddyViscosity.C | 8 +- .../LES/Smagorinsky/Smagorinsky.C | 8 +- .../turbulenceModels/LES/WALE/WALE.C | 8 +- .../LES/dynamicKEqn/dynamicKEqn.C | 8 +- .../LES/dynamicLagrangian/dynamicLagrangian.C | 8 +- .../turbulenceModels/LES/kEqn/kEqn.C | 6 +- .../turbulenceModels/RAS/LRR/LRR.C | 8 +- .../RAS/LaunderSharmaKE/LaunderSharmaKE.C | 8 +- .../turbulenceModels/RAS/RASModel/RASModel.C | 8 +- .../RAS/RNGkEpsilon/RNGkEpsilon.C | 8 +- .../turbulenceModels/RAS/SSG/SSG.C | 8 +- .../RAS/SpalartAllmaras/SpalartAllmaras.C | 6 +- .../turbulenceModels/RAS/kEpsilon/kEpsilon.C | 8 +- .../turbulenceModels/RAS/kOmega/kOmega.C | 8 +- .../RAS/kOmegaSSTLM/kOmegaSSTLM.C | 8 +- .../RAS/kOmegaSSTSAS/kOmegaSSTSAS.C | 8 +- .../RAS/realizableKE/realizableKE.C | 8 +- .../turbulenceModels/RAS/v2f/v2f.C | 8 +- .../laminar/Maxwell/Maxwell.C | 8 +- .../laminar/laminarModel/laminarModel.C | 8 +- .../kEpsilonLopesdaCosta.C | 8 +- .../CombustionModel/CombustionModel.C | 8 +- src/combustionModels/EDC/EDC.C | 8 +- src/combustionModels/FSD/FSD.C | 8 +- src/combustionModels/PaSR/PaSR.C | 8 +- src/combustionModels/diffusion/diffusion.C | 8 +- .../eddyDissipationDiffusionModel.C | 8 +- .../eddyDissipationModelBase.C | 8 +- .../infinitelyFastChemistry.C | 8 +- src/combustionModels/laminar/laminar.C | 8 +- .../noCombustion/noCombustion.C | 11 +- .../singleStepCombustion.C | 14 +- .../zoneCombustion/zoneCombustion.C | 8 +- src/conversion/ccm/common/ccmBase.C | 8 +- .../meshCut/cellLooper/geomCellLooper.C | 8 +- .../meshCut/cellLooper/hexCellLooper.C | 8 +- .../polyMeshGeometry/polyMeshGeometry.C | 117 +++----- .../layeredSolver/pointEdgeStructuredWalkI.H | 26 +- .../polyMeshAdder/faceCoupleInfo.C | 3 +- .../hexRef8/refinementHistory.C | 8 +- .../pointEdgeCollapse/pointEdgeCollapseI.H | 8 +- .../polyTopoChange/refinementDistanceDataI.H | 23 +- src/engine/engineTime/engineTime/engineTime.C | 8 +- src/fileFormats/vtk/file/foamVtmWriter.C | 14 +- .../finiteArea/faSchemes/faSchemes.C | 16 +- .../cfdTools/general/MRF/IOMRFZoneList.C | 8 +- .../cfdTools/general/adjustPhi/adjustPhi.C | 8 +- .../cfdTools/general/fvOptions/fvOptions.C | 8 +- .../cyclicACMI/cyclicACMIFvsPatchField.C | 8 +- .../cyclicAMI/cyclicAMIFvsPatchField.C | 8 +- .../finiteVolume/fvSchemes/fvSchemes.C | 20 +- .../fvMesh/wallDist/wallDist/wallDist.C | 8 +- src/functionObjects/field/Lambda2/Lambda2.C | 8 +- src/functionObjects/field/MachNo/MachNo.C | 8 +- src/functionObjects/field/PecletNo/PecletNo.C | 8 +- src/functionObjects/field/Q/Q.C | 8 +- .../field/blendingFactor/blendingFactor.C | 8 +- .../columnAverage/columnAverageTemplates.C | 8 +- .../field/components/componentsTemplates.C | 8 +- src/functionObjects/field/ddt/ddtTemplates.C | 8 +- src/functionObjects/field/div/divTemplates.C | 8 +- src/functionObjects/field/flowType/flowType.C | 8 +- .../field/flux/fluxTemplates.C | 14 +- src/functionObjects/field/pressure/pressure.C | 24 +- .../stabilityBlendingFactor.C | 8 +- .../field/streamFunction/streamFunction.C | 8 +- .../WallLocalSpringSliderDashpot.C | 8 +- .../WallSpringSliderDashpot.C | 8 +- .../CellZoneInjection/CellZoneInjection.C | 14 +- .../ConeInjection/ConeInjection.C | 14 +- .../ConeNozzleInjection/ConeNozzleInjection.C | 14 +- .../FieldActivatedInjection.C | 14 +- .../InflationInjection/InflationInjection.C | 8 +- .../KinematicLookupTableInjection.C | 8 +- .../ManualInjection/ManualInjection.C | 12 +- .../PatchFlowRateInjection.C | 8 +- .../PatchInjection/PatchInjection.C | 14 +- .../ReactingLookupTableInjection.C | 8 +- .../ReactingMultiphaseLookupTableInjection.C | 8 +- .../ThermoLookupTableInjection.C | 8 +- .../pairPotentialList/pairPotentialList.C | 14 +- .../ORourkeCollision/ORourkeCollision.C | 6 +- .../medialAxisMeshMover.C | 14 +- .../meshRefinement/meshRefinement.C | 21 +- .../meshRefinement/meshRefinement.H | 4 +- .../PointIntegrateData/PointIntegrateDataI.H | 27 +- .../snappyHexMeshDriver/snappyLayerDriver.C | 13 +- .../algorithms/PointEdgeWave/PointDataI.H | 26 +- src/meshTools/cellFeatures/cellFeatures.C | 15 +- .../edgeFaceCirculator/edgeFaceCirculatorI.H | 8 +- src/meshTools/edgeMesh/edgeMeshIO.C | 8 +- .../extendedEdgeMesh/extendedEdgeMesh.C | 16 +- src/meshTools/indexedOctree/treeDataFace.C | 9 +- src/meshTools/indexedOctree/treeDataPoint.C | 10 +- .../indexedOctree/treeDataPrimitivePatch.C | 14 +- src/meshTools/meshSearch/meshSearch.C | 32 +-- .../meshStructure/pointTopoDistanceDataI.H | 31 +- .../meshStructure/topoDistanceDataI.H | 25 +- .../primitiveMeshGeometry.C | 84 +++--- src/meshTools/regionSplit/minDataI.H | 21 +- .../searchableSurfaces/searchableSurfaces.C | 12 +- .../triSurfaceTools/triSurfaceTools.C | 10 +- .../inverseDistance/meshToMeshDataI.H | 32 +-- .../dynamicOversetFvMesh.C | 8 +- .../pyrolysisModels/noPyrolysis/noPyrolysis.C | 24 +- .../pyrolysisModel/pyrolysisModel.C | 14 +- .../reactingOneDim/reactingOneDim.C | 14 +- .../pyrolysisModels/thermo/thermo.C | 14 +- .../regionModel/regionModel1D/regionModel1D.C | 14 +- .../kinematicSingleLayer.C | 8 +- .../surfaceFilmRegionModel.C | 8 +- .../rigidBodyMeshMotion/rigidBodyMeshMotion.C | 8 +- .../rigidBodyMeshMotionSolver.C | 8 +- .../sixDoFRigidBodyMotionSolver.C | 8 +- .../basic/heThermo/heThermo.C | 8 +- .../TDACChemistryModel/tabulation/ISAT/ISAT.C | 19 +- .../tabulation/ISAT/binaryTree/binaryTree.C | 99 +++---- .../ISAT/chemPointISAT/chemPointISAT.C | 14 +- .../radiation/radiationModels/P1/P1.C | 8 +- .../radiationModels/fvDOM/fvDOM/fvDOM.C | 8 +- .../radiationModels/solarLoad/solarLoad.C | 8 +- .../radiationModels/viewFactor/viewFactor.C | 8 +- 208 files changed, 1052 insertions(+), 1759 deletions(-) diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C index d1aac6bc5f..d83efc6523 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -96,10 +96,8 @@ bool PDRkEpsilon::read() C4_.readIfPresent(coeffDict_); return true; } - else - { - return false; - } + + return false; } diff --git a/applications/solvers/multiphase/compressibleInterFoam/surfaceTensionModels/liquidProperties/liquidPropertiesSurfaceTension.C b/applications/solvers/multiphase/compressibleInterFoam/surfaceTensionModels/liquidProperties/liquidPropertiesSurfaceTension.C index d0889e9cf5..ede2b170f3 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/surfaceTensionModels/liquidProperties/liquidPropertiesSurfaceTension.C +++ b/applications/solvers/multiphase/compressibleInterFoam/surfaceTensionModels/liquidProperties/liquidPropertiesSurfaceTension.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2017 OpenFOAM Foundation @@ -141,10 +141,8 @@ bool Foam::surfaceTensionModels::liquidProperties::writeData { return os.good(); } - else - { - return false; - } + + return false; } diff --git a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.C b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.C index 2476cc8ba7..fa837780ad 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.C +++ b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2013-2017 OpenFOAM Foundation @@ -382,10 +382,8 @@ bool Foam::twoPhaseMixtureThermo::read() { return interfaceProperties::read(); } - else - { - return false; - } + + return false; } diff --git a/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.C b/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.C index 23d7770507..a9e13e70fa 100644 --- a/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.C +++ b/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2014-2015 OpenFOAM Foundation @@ -143,15 +143,9 @@ bool Foam::incompressibleTwoPhaseInteractingMixture::read() return true; } - else - { - return false; - } - } - else - { - return false; } + + return false; } diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/laserDTRM.C b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/laserDTRM.C index e43b903749..8151498109 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/laserDTRM.C +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/laserDTRM/laserDTRM.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2017 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -541,10 +541,8 @@ bool Foam::radiation::laserDTRM::read() { return true; } - else - { - return false; - } + + return false; } diff --git a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixture.C b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixture.C index bc2cf7f2d1..7a13a958f6 100644 --- a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixture.C +++ b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixture.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -99,10 +99,8 @@ bool Foam::temperaturePhaseChangeTwoPhaseMixture::read() { return true; } - else - { - return false; - } + + return false; } diff --git a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/thermoIncompressibleTwoPhaseMixture/thermoIncompressibleTwoPhaseMixture.C b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/thermoIncompressibleTwoPhaseMixture/thermoIncompressibleTwoPhaseMixture.C index 3da54ffc15..ae8a6a9e12 100644 --- a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/thermoIncompressibleTwoPhaseMixture/thermoIncompressibleTwoPhaseMixture.C +++ b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/thermoIncompressibleTwoPhaseMixture/thermoIncompressibleTwoPhaseMixture.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -112,7 +112,6 @@ Foam::thermoIncompressibleTwoPhaseMixture::thermoIncompressibleTwoPhaseMixture // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // - bool Foam::thermoIncompressibleTwoPhaseMixture::read() { if (incompressibleTwoPhaseMixture::read()) @@ -131,10 +130,8 @@ bool Foam::thermoIncompressibleTwoPhaseMixture::read() return true; } - else - { - return false; - } + + return false; } diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C b/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C index 802db2e1eb..f58ce2ee4a 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -239,15 +239,9 @@ bool Foam::incompressibleThreePhaseMixture::read() return true; } - else - { - return false; - } - } - else - { - return false; } + + return false; } diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C index 924c7dfdcd..4bcf6c3e22 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -116,10 +116,8 @@ bool Foam::phaseChangeTwoPhaseMixtures::Kunz::read() return true; } - else - { - return false; - } + + return false; } diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C index 45f2ce2cfb..41dacb4301 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -111,10 +111,8 @@ bool Foam::phaseChangeTwoPhaseMixtures::Merkle::read() return true; } - else - { - return false; - } + + return false; } diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C index 9e887c8b29..ea892006ea 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -162,10 +162,8 @@ bool Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::read() return true; } - else - { - return false; - } + + return false; } diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/phase/phase.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/phase/phase.C index 4252138705..e84b26f472 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/phase/phase.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/phase/phase.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -90,10 +90,8 @@ bool Foam::phase::read(const dictionary& phaseDict) return true; } - else - { - return false; - } + + return false; } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C index ed46faddeb..0128c8f2ed 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -211,10 +211,8 @@ bool Foam::RASModels::kineticTheoryModel::read() return true; } - else - { - return false; - } + + return false; } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C index 2f650c2775..3067df13d6 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -211,10 +211,8 @@ bool Foam::RASModels::kineticTheoryModel::read() return true; } - else - { - return false; - } + + return false; } diff --git a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C index 95e2d0df24..bf1b27f1e9 100644 --- a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C +++ b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -93,10 +93,8 @@ bool limitRefinementLevel return true; } - else - { - return false; - } + + return false; } diff --git a/applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMesh.C b/applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMesh.C index 51ac88b0ed..7c07a0ae86 100644 --- a/applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMesh.C +++ b/applications/utilities/mesh/advanced/snappyRefineMesh/snappyRefineMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -417,14 +417,12 @@ bool limitRefinementLevel } return true; } - else - { - Info<< "Added no additional cells" - << " to satisfy 1:" << limitDiff << " refinement level" - << endl; - return false; - } + Info<< "Added no additional cells" + << " to satisfy 1:" << limitDiff << " refinement level" + << endl; + + return false; } diff --git a/applications/utilities/mesh/advanced/splitCells/splitCells.C b/applications/utilities/mesh/advanced/splitCells/splitCells.C index 95b0d85e1c..a47bcbe700 100644 --- a/applications/utilities/mesh/advanced/splitCells/splitCells.C +++ b/applications/utilities/mesh/advanced/splitCells/splitCells.C @@ -359,10 +359,8 @@ bool splitCell return true; } - else - { - return false; - } + + return false; } diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePoints.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePoints.C index cccde410f4..0d6d85adc3 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePoints.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePoints.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2012-2015 OpenFOAM Foundation @@ -149,14 +149,10 @@ bool Foam::conformalVoronoiMesh::regionIsInside { return meshableRegionA; } - else - { - WarningInFunction - << "" - << endl; - return false; - } + WarningInFunction << endl; + + return false; } diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DI.H b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DI.H index 2728a349fa..704bcc6f0e 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DI.H +++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2013-2016 OpenFOAM Foundation @@ -89,10 +89,8 @@ inline bool Foam::CV2D::insertMirrorPoint insertPoint(mirrorPoint, Vb::MIRROR_POINT); return true; } - else - { - return false; - } + + return false; } diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/indexedVertexI.H b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/indexedVertexI.H index 3242db7fcd..795b3aba2d 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/indexedVertexI.H +++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/indexedVertexI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2013-2015 OpenFOAM Foundation @@ -152,28 +152,14 @@ inline bool CGAL::indexedVertex::pairPoint() const template inline bool CGAL::indexedVertex::ppMaster() const { - if (type_ > index_) - { - return true; - } - else - { - return false; - } + return (type_ > index_); } template inline bool CGAL::indexedVertex::ppSlave() const { - if (type_ >= 0 && type_ < index_) - { - return true; - } - else - { - return false; - } + return (type_ >= 0 && type_ < index_); } diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertBoundaryConformPointPairs.C b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertBoundaryConformPointPairs.C index 5ec8e2ad49..a6a062b3ee 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertBoundaryConformPointPairs.C +++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/insertBoundaryConformPointPairs.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2013-2015 OpenFOAM Foundation @@ -147,10 +147,8 @@ bool Foam::CV2D::insertPointPairAtIntersection insertPointPair(vit, interPoint, interTri, interHitSurface); return true; } - else - { - return false; - } + + return false; } diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C index 76f9bbe690..5c8f4da2d7 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C @@ -253,15 +253,14 @@ bool Foam::checkWedges return true; } - else + + if (report) { - if (report) - { - Info<< " All edges aligned with or perpendicular to " - << "non-empty directions." << endl; - } - return false; + Info<< " All edges aligned with or perpendicular to " + << "non-empty directions." << endl; } + + return false; } @@ -468,16 +467,14 @@ bool Foam::checkCoupledPoints return true; } - else - { - if (report) - { - Info<< " Coupled point location match (average " - << avgMismatch << ") OK." << endl; - } - return false; + if (report) + { + Info<< " Coupled point location match (average " + << avgMismatch << ") OK." << endl; } + + return false; } diff --git a/applications/utilities/surface/surfaceClean/collapseBase.C b/applications/utilities/surface/surfaceClean/collapseBase.C index a6d3ab0256..7f2a4ef43c 100644 --- a/applications/utilities/surface/surfaceClean/collapseBase.C +++ b/applications/utilities/surface/surfaceClean/collapseBase.C @@ -324,10 +324,8 @@ bool isSliver return true; } - else - { - return false; - } + + return false; } diff --git a/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C b/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C index 361ae48e65..1f1dd17233 100644 --- a/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C +++ b/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -666,12 +666,9 @@ bool splitBorderEdges return true; } - else - { - Info<< "No edges to be split" <::getVolumeType // Content. Defer to shapes. return volumeType(shapes_.getVolumeType(*this, sample)); } - else - { - // Empty node. Cannot have 'mixed' as its type since not divided - // up and has no items inside it. - FatalErrorInFunction - << "Sample:" << sample << " node:" << nodeI - << " with bb:" << nodes_[nodeI].bb_ << nl - << "Empty subnode has invalid volume type MIXED." - << abort(FatalError); - return volumeType::UNKNOWN; - } - } - else - { + // Empty node. Cannot have 'mixed' as its type since not divided + // up and has no items inside it. FatalErrorInFunction - << "Sample:" << sample << " at node:" << nodeI - << " octant:" << octant - << " with bb:" << nod.bb_.subBbox(octant) << nl - << "Node has invalid volume type " << octantType + << "Sample:" << sample << " node:" << nodeI + << " with bb:" << nodes_[nodeI].bb_ << nl + << "Empty subnode has invalid volume type MIXED." << abort(FatalError); return volumeType::UNKNOWN; } + + FatalErrorInFunction + << "Sample:" << sample << " at node:" << nodeI + << " octant:" << octant + << " with bb:" << nod.bb_.subBbox(octant) << nl + << "Node has invalid volume type " << octantType + << abort(FatalError); + + return volumeType::UNKNOWN; } diff --git a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C index 65afcd52a8..2cc0dd03ac 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C +++ b/src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C @@ -441,30 +441,26 @@ Foam::volumeType Foam::indexedOctree::getVolumeType // Content. Defer to shapes. return volumeType(shapes_.getVolumeType(*this, sample)); } - else - { - // Empty node. Cannot have 'mixed' as its type since not divided - // up and has no items inside it. - FatalErrorInFunction - << "Sample:" << sample << " node:" << nodeI - << " with bb:" << nodes_[nodeI].bb_ << nl - << "Empty subnode has invalid volume type MIXED." - << abort(FatalError); - return volumeType::UNKNOWN; - } - } - else - { + // Empty node. Cannot have 'mixed' as its type since not divided + // up and has no items inside it. FatalErrorInFunction - << "Sample:" << sample << " at node:" << nodeI - << " octant:" << octant - << " with bb:" << nod.bb_.subBbox(octant) << nl - << "Node has invalid volume type " << octantType + << "Sample:" << sample << " node:" << nodeI + << " with bb:" << nodes_[nodeI].bb_ << nl + << "Empty subnode has invalid volume type MIXED." << abort(FatalError); return volumeType::UNKNOWN; } + + FatalErrorInFunction + << "Sample:" << sample << " at node:" << nodeI + << " octant:" << octant + << " with bb:" << nod.bb_.subBbox(octant) << nl + << "Node has invalid volume type " << octantType + << abort(FatalError); + + return volumeType::UNKNOWN; } diff --git a/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.C b/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.C index 13a5895381..79ad00320b 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.C +++ b/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -33,7 +33,7 @@ License namespace Foam { -defineTypeNameAndDebug(treeDataCell, 0); + defineTypeNameAndDebug(treeDataCell, 0); } @@ -178,10 +178,8 @@ bool Foam::treeDataCell::overlaps { return cubeBb.overlaps(bbs_[index]); } - else - { - return cubeBb.overlaps(calcCellBb(cellLabels_[index])); - } + + return cubeBb.overlaps(calcCellBb(cellLabels_[index])); } diff --git a/src/OpenFOAM/containers/Dictionaries/Dictionary/Dictionary.C b/src/OpenFOAM/containers/Dictionaries/Dictionary/Dictionary.C index 689e4b1ba5..48d420c085 100644 --- a/src/OpenFOAM/containers/Dictionaries/Dictionary/Dictionary.C +++ b/src/OpenFOAM/containers/Dictionaries/Dictionary/Dictionary.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2013 OpenFOAM Foundation @@ -48,17 +48,15 @@ Foam::Dictionary::Dictionary(const Dictionary& dict) template bool Foam::Dictionary::erase(const word& keyword) { - T* tPtr = this->remove(keyword); + T* ptr = this->remove(keyword); - if (tPtr) + if (ptr) { - delete tPtr; + delete ptr; return true; } - else - { - return false; - } + + return false; } diff --git a/src/OpenFOAM/db/Callback/Callback.C b/src/OpenFOAM/db/Callback/Callback.C index ce0f3f3817..6130ae39d7 100644 --- a/src/OpenFOAM/db/Callback/Callback.C +++ b/src/OpenFOAM/db/Callback/Callback.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011 OpenFOAM Foundation @@ -66,10 +66,8 @@ bool Foam::Callback::checkIn() cbr_.append(static_cast(this)); return true; } - else - { - return false; - } + + return false; } @@ -78,21 +76,12 @@ bool Foam::Callback::checkOut() { if (Callback::link::registered()) { - CallbackType* cbPtr = cbr_.remove(static_cast(this)); + CallbackType* ptr = cbr_.remove(static_cast(this)); - if (cbPtr) - { - return true; - } - else - { - return false; - } - } - else - { - return false; + return ptr; } + + return false; } diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UOPstream.C b/src/OpenFOAM/db/IOstreams/Pstreams/UOPstream.C index aacbff2bbd..ad2157ae4c 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/UOPstream.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UOPstream.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010, 2016-2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -248,10 +248,8 @@ Foam::Ostream& Foam::UOPstream::write(const char* str) { return write(nonWhiteChars); } - else - { - return *this; - } + + return *this; } diff --git a/src/OpenFOAM/db/dictionary/functionEntries/ifeqEntry/ifeqEntry.C b/src/OpenFOAM/db/dictionary/functionEntries/ifeqEntry/ifeqEntry.C index 501b950290..4d8f1c189f 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/ifeqEntry/ifeqEntry.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/ifeqEntry/ifeqEntry.C @@ -1,8 +1,8 @@ /*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | + \\ / O peration | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2018 OpenFOAM Foundation @@ -109,10 +109,8 @@ Foam::token Foam::functionEntries::ifeqEntry::expand // Re-form as a string token so we can compare to string return token(keyword, t.lineNumber()); } - else - { - return t; - } + + return t; } @@ -134,10 +132,8 @@ Foam::token Foam::functionEntries::ifeqEntry::expand { return expand(dict, t.stringToken(), t); } - else - { - return t; - } + + return t; } @@ -173,10 +169,7 @@ bool Foam::functionEntries::ifeqEntry::equalToken wordRe w2(t2.stringToken(), wordRe::DETECT); return w2.match(t1.wordToken(), false); } - else - { - return false; - } + return false; case token::STRING: if (eqType) @@ -190,11 +183,7 @@ bool Foam::functionEntries::ifeqEntry::equalToken const wordRe w1(t1.stringToken(), wordRe::DETECT); return w1.match(t2.wordToken(), false); } - else - { - return false; - } - + return false; case token::VARIABLE: case token::VERBATIMSTRING: @@ -206,10 +195,7 @@ bool Foam::functionEntries::ifeqEntry::equalToken { return t1.stringToken() == t2.wordToken(); } - else - { - return false; - } + return false; case token::LABEL: if (eqType) @@ -220,10 +206,7 @@ bool Foam::functionEntries::ifeqEntry::equalToken { return t1.labelToken() == t2.scalarToken(); } - else - { - return false; - } + return false; case token::FLOAT_SCALAR: if (eqType) @@ -234,10 +217,7 @@ bool Foam::functionEntries::ifeqEntry::equalToken { return t1.scalarToken() == t2.scalarToken(); } - else - { - return false; - } + return false; case token::DOUBLE_SCALAR: if (eqType) @@ -248,10 +228,7 @@ bool Foam::functionEntries::ifeqEntry::equalToken { return t1.scalarToken() == t2.scalarToken(); } - else - { - return false; - } + return false; case token::COMPOUND: return false; @@ -259,6 +236,7 @@ bool Foam::functionEntries::ifeqEntry::equalToken case token::ERROR: return eqType; } + return false; } diff --git a/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.C b/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.C index d1f9f6504d..8802cf2222 100644 --- a/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.C +++ b/src/OpenFOAM/db/functionObjects/regionFunctionObject/regionFunctionObject.C @@ -102,10 +102,8 @@ bool Foam::functionObjects::regionFunctionObject::clearObject return false; } } - else - { - return true; - } + + return true; } diff --git a/src/OpenFOAM/db/regIOobject/regIOobject.C b/src/OpenFOAM/db/regIOobject/regIOobject.C index 614d7b1335..ac52264f96 100644 --- a/src/OpenFOAM/db/regIOobject/regIOobject.C +++ b/src/OpenFOAM/db/regIOobject/regIOobject.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011, 2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011, 2018-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -247,6 +247,7 @@ Foam::label Foam::regIOobject::addWatch(const fileName& f) watchIndices_.append(fileHandler().addWatch(f)); } } + return index; } @@ -355,10 +356,8 @@ bool Foam::regIOobject::upToDate(const regIOobject& a) const // My event number higher than a return true; } - else - { - return false; - } + + return false; } diff --git a/src/OpenFOAM/db/regIOobject/regIOobjectRead.C b/src/OpenFOAM/db/regIOobject/regIOobjectRead.C index 7d6167034d..a3b9d96f32 100644 --- a/src/OpenFOAM/db/regIOobject/regIOobjectRead.C +++ b/src/OpenFOAM/db/regIOobject/regIOobjectRead.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011, 2015-2016 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011, 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2018 OpenFOAM Foundation @@ -78,10 +78,8 @@ bool Foam::regIOobject::readHeaderOk { return fileHandler().read(*this, masterOnly, format, typeName); } - else - { - return false; - } + + return false; } @@ -296,10 +294,8 @@ bool Foam::regIOobject::readIfModified() return read(); } - else - { - return false; - } + + return false; } diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C index 392a3bd0b1..c4b5b3fb7f 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C @@ -980,10 +980,8 @@ Foam::word Foam::GeometricField::select { return this->name() + "Final"; } - else - { - return this->name(); - } + + return this->name(); } diff --git a/src/OpenFOAM/global/fileOperations/fileOperation/fileOperation.C b/src/OpenFOAM/global/fileOperations/fileOperation/fileOperation.C index e89bcf57d0..31348a2b4a 100644 --- a/src/OpenFOAM/global/fileOperations/fileOperation/fileOperation.C +++ b/src/OpenFOAM/global/fileOperations/fileOperation/fileOperation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2017-2018 OpenFOAM Foundation @@ -1052,10 +1052,8 @@ Foam::fileName Foam::fileOperation::processorsPath return dir.path()/procsDir; } - else - { - return fileName::null; - } + + return fileName::null; } diff --git a/src/OpenFOAM/graph/curve/curveTools.C b/src/OpenFOAM/graph/curve/curveTools.C index 82e6ff7feb..55eb84461b 100644 --- a/src/OpenFOAM/graph/curve/curveTools.C +++ b/src/OpenFOAM/graph/curve/curveTools.C @@ -109,10 +109,8 @@ bool interpolate return true; } } - else - { - return true; - } + + return true; } @@ -170,8 +168,8 @@ bool Xinterpolate vector D = p2 - p1; scalar lamda = (n.x() - p1.x())/D.x(); n.y() = p1.y() + lamda*D.y(); - return false; + return false; } diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C index c126de8c20..a7c20c4500 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -688,10 +688,8 @@ bool Foam::GAMGAgglomeration::checkRestriction return false; } - else - { - return true; - } + + return true; } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C index 0c25cd62f9..0e3917f2df 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C @@ -800,10 +800,8 @@ const Foam::fileName& Foam::polyMesh::dbDir() const { return parent().dbDir(); } - else - { - return objectRegistry::dbDir(); - } + + return objectRegistry::dbDir(); } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C index 3639010c2a..03c7ffec55 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2012-2016 OpenFOAM Foundation @@ -157,15 +157,13 @@ bool Foam::polyMesh::checkFaceOrthogonality return true; } - else - { - if (debug || report) - { - Info<< " Non-orthogonality check OK." << endl; - } - return false; + if (debug || report) + { + Info<< " Non-orthogonality check OK." << endl; } + + return false; } @@ -259,15 +257,13 @@ bool Foam::polyMesh::checkFaceSkewness return true; } - else - { - if (debug || report) - { - Info<< " Max skewness = " << maxSkew << " OK." << endl; - } - return false; + if (debug || report) + { + Info<< " Max skewness = " << maxSkew << " OK." << endl; } + + return false; } @@ -395,15 +391,14 @@ bool Foam::polyMesh::checkEdgeAlignment return true; } - else + + if (debug || report) { - if (debug || report) - { - Info<< " All edges aligned with or perpendicular to " - << "non-empty directions." << endl; - } - return false; + Info<< " All edges aligned with or perpendicular to " + << "non-empty directions." << endl; } + + return false; } @@ -475,14 +470,10 @@ bool Foam::polyMesh::checkCellDeterminant return true; } - else - { - if (debug || report) - { - Info<< " Cell determinant check OK." << endl; - } - return false; + if (debug || report) + { + Info<< " Cell determinant check OK." << endl; } return false; @@ -570,14 +561,10 @@ bool Foam::polyMesh::checkFaceWeight return true; } - else - { - if (debug || report) - { - Info<< " Face interpolation weight check OK." << endl; - } - return false; + if (debug || report) + { + Info<< " Face interpolation weight check OK." << endl; } return false; @@ -657,14 +644,10 @@ bool Foam::polyMesh::checkVolRatio return true; } - else - { - if (debug || report) - { - Info<< " Face volume ratio check OK." << endl; - } - return false; + if (debug || report) + { + Info<< " Face volume ratio check OK." << endl; } return false; diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C b/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C index 6a0c967564..00cd128704 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2019 OpenFOAM Foundation @@ -488,15 +488,13 @@ bool Foam::polyMeshTetDecomposition::checkFaceTets return true; } - else - { - if (report) - { - Info<< " Face tets OK." << endl; - } - return false; + if (report) + { + Info<< " Face tets OK." << endl; } + + return false; } diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C index 7112fcc087..0b40bd166d 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C @@ -1380,7 +1380,7 @@ bool Foam::cyclicPolyPatch::order << " Continuing with incorrect face ordering from now on!" << endl; - return false; + return false; } diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C index 485a709a69..00b31ce8f3 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -278,10 +278,8 @@ bool Foam::oldCyclicPolyPatch::getGeometricHalves return false; } - else - { - return true; - } + + return true; } diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C index 933883e7b1..42127d26d1 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -88,16 +88,14 @@ bool Foam::primitiveMesh::checkClosedBoundary return true; } - else - { - if (debug || report) - { - Info<< " Boundary openness " << openness << " OK." - << endl; - } - return false; + if (debug || report) + { + Info<< " Boundary openness " << openness << " OK." + << endl; } + + return false; } @@ -297,17 +295,15 @@ bool Foam::primitiveMesh::checkFaceAreas return true; } - else - { - if (debug || report) - { - Info<< " Minimum face area = " << minArea - << ". Maximum face area = " << maxArea - << ". Face area magnitudes OK." << endl; - } - return false; + if (debug || report) + { + Info<< " Minimum face area = " << minArea + << ". Maximum face area = " << maxArea + << ". Face area magnitudes OK." << endl; } + + return false; } @@ -366,18 +362,16 @@ bool Foam::primitiveMesh::checkCellVolumes return true; } - else - { - if (debug || report) - { - Info<< " Min volume = " << minVolume - << ". Max volume = " << maxVolume - << ". Total volume = " << gSum(vols) - << ". Cell volumes OK." << endl; - } - return false; + if (debug || report) + { + Info<< " Min volume = " << minVolume + << ". Max volume = " << maxVolume + << ". Total volume = " << gSum(vols) + << ". Cell volumes OK." << endl; } + + return false; } @@ -479,15 +473,13 @@ bool Foam::primitiveMesh::checkFaceOrthogonality return true; } - else - { - if (debug || report) - { - Info<< " Non-orthogonality check OK." << endl; - } - return false; + if (debug || report) + { + Info<< " Non-orthogonality check OK." << endl; } + + return false; } @@ -581,15 +573,13 @@ bool Foam::primitiveMesh::checkFacePyramids return true; } - else - { - if (debug || report) - { - Info<< " Face pyramids OK." << endl; - } - return false; + if (debug || report) + { + Info<< " Face pyramids OK." << endl; } + + return false; } @@ -654,15 +644,13 @@ bool Foam::primitiveMesh::checkFaceSkewness return true; } - else - { - if (debug || report) - { - Info<< " Max skewness = " << maxSkew << " OK." << endl; - } - return false; + if (debug || report) + { + Info<< " Max skewness = " << maxSkew << " OK." << endl; } + + return false; } @@ -734,15 +722,13 @@ bool Foam::primitiveMesh::checkFaceAngles return true; } - else - { - if (debug || report) - { - Info<< " All angles in faces OK." << endl; - } - return false; + if (debug || report) + { + Info<< " All angles in faces OK." << endl; } + + return false; } @@ -839,15 +825,13 @@ bool Foam::primitiveMesh::checkFaceFlatness return true; } - else - { - if (debug || report) - { - Info<< " All face flatness OK." << endl; - } - return false; + if (debug || report) + { + Info<< " All face flatness OK." << endl; } + + return false; } @@ -950,14 +934,10 @@ bool Foam::primitiveMesh::checkConcaveCells return true; } - else - { - if (debug || report) - { - Info<< " Concave cell check OK." << endl; - } - return false; + if (debug || report) + { + Info<< " Concave cell check OK." << endl; } return false; @@ -1115,15 +1095,13 @@ bool Foam::primitiveMesh::checkUpperTriangular return true; } - else - { - if (debug || report) - { - Info<< " Upper triangular ordering OK." << endl; - } - return false; + if (debug || report) + { + Info<< " Upper triangular ordering OK." << endl; } + + return false; } @@ -1213,15 +1191,13 @@ bool Foam::primitiveMesh::checkCellsZipUp return true; } - else - { - if (debug || report) - { - Info<< " Topological cell zip-up check OK." << endl; - } - return false; + if (debug || report) + { + Info<< " Topological cell zip-up check OK." << endl; } + + return false; } @@ -1286,15 +1262,13 @@ bool Foam::primitiveMesh::checkFaceVertices return true; } - else - { - if (debug || report) - { - Info<< " Face vertices OK." << endl; - } - return false; + if (debug || report) + { + Info<< " Face vertices OK." << endl; } + + return false; } @@ -1358,15 +1332,13 @@ bool Foam::primitiveMesh::checkPoints return true; } - else - { - if (debug || report) - { - Info<< " Point usage OK." << endl; - } - return false; + if (debug || report) + { + Info<< " Point usage OK." << endl; } + + return false; } @@ -1670,15 +1642,13 @@ bool Foam::primitiveMesh::checkFaceFaces return false; //return true; } - else - { - if (debug || report) - { - Info<< " Face-face connectivity OK." << endl; - } - return false; + if (debug || report) + { + Info<< " Face-face connectivity OK." << endl; } + + return false; } @@ -1850,66 +1820,63 @@ bool Foam::primitiveMesh::checkConcaveCells bool Foam::primitiveMesh::checkTopology(const bool report) const { - label noFailedChecks = 0; + label nFailedChecks = 0; - if (checkPoints(report)) noFailedChecks++; - if (checkUpperTriangular(report)) noFailedChecks++; - if (checkCellsZipUp(report)) noFailedChecks++; - if (checkFaceVertices(report)) noFailedChecks++; - if (checkFaceFaces(report)) noFailedChecks++; + if (checkPoints(report)) ++nFailedChecks; + if (checkUpperTriangular(report)) ++nFailedChecks; + if (checkCellsZipUp(report)) ++nFailedChecks; + if (checkFaceVertices(report)) ++nFailedChecks; + if (checkFaceFaces(report)) ++nFailedChecks; - if (noFailedChecks == 0) + if (nFailedChecks) { if (debug || report) { - Info<< " Mesh topology OK." << endl; - } - - return false; - } - else - { - if (debug || report) - { - Info<< " Failed " << noFailedChecks + Info<< " Failed " << nFailedChecks << " mesh topology checks." << endl; } return true; } + + if (debug || report) + { + Info<< " Mesh topology OK." << endl; + } + + return false; } bool Foam::primitiveMesh::checkGeometry(const bool report) const { - label noFailedChecks = 0; + label nFailedChecks = 0; - if (checkClosedBoundary(report)) noFailedChecks++; - if (checkClosedCells(report)) noFailedChecks++; - if (checkFaceAreas(report)) noFailedChecks++; - if (checkCellVolumes(report)) noFailedChecks++; - if (checkFaceOrthogonality(report)) noFailedChecks++; - if (checkFacePyramids(report)) noFailedChecks++; - if (checkFaceSkewness(report)) noFailedChecks++; + if (checkClosedBoundary(report)) ++nFailedChecks; + if (checkClosedCells(report)) ++nFailedChecks; + if (checkFaceAreas(report)) ++nFailedChecks; + if (checkCellVolumes(report)) ++nFailedChecks; + if (checkFaceOrthogonality(report)) ++nFailedChecks; + if (checkFacePyramids(report)) ++nFailedChecks; + if (checkFaceSkewness(report)) ++nFailedChecks; - if (noFailedChecks == 0) + if (nFailedChecks) { if (debug || report) { - Info<< " Mesh geometry OK." << endl; - } - return false; - } - else - { - if (debug || report) - { - Info<< " Failed " << noFailedChecks + Info<< " Failed " << nFailedChecks << " mesh geometry checks." << endl; } return true; } + + if (debug || report) + { + Info<< " Mesh geometry OK." << endl; + } + + return false; } @@ -1920,27 +1887,25 @@ bool Foam::primitiveMesh::checkMesh(const bool report) const InfoInFunction << "Checking primitiveMesh" << endl; } - label noFailedChecks = checkTopology(report) + checkGeometry(report); + label nFailedChecks = checkTopology(report) + checkGeometry(report); - if (noFailedChecks == 0) + if (nFailedChecks) { if (debug || report) { - Info<< "Mesh OK." << endl; - } - - return false; - } - else - { - if (debug || report) - { - Info<< " Failed " << noFailedChecks + Info<< " Failed " << nFailedChecks << " mesh checks." << endl; } return true; } + + if (debug || report) + { + Info<< "Mesh OK." << endl; + } + + return false; } diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheckEdgeLength.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheckEdgeLength.C index eb9d0a1239..51ac3133bf 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheckEdgeLength.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheckEdgeLength.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -87,17 +87,14 @@ bool Foam::primitiveMesh::checkEdgeLength return true; } - else - { - if (report) - { - Info<< " Min/max edge length = " - << sqrt(minLenSqr) << " " << sqrt(maxLenSqr) - << " OK." << endl; - } - return false; + if (report) + { + Info<< " Min/max edge length = " + << sqrt(minLenSqr) << " " << sqrt(maxLenSqr) << " OK." << endl; } + + return false; } diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheckPointNearness.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheckPointNearness.C index f2bbd25143..97d0c5c2d9 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheckPointNearness.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheckPointNearness.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011 OpenFOAM Foundation @@ -101,10 +101,8 @@ bool Foam::primitiveMesh::checkPointNearness return true; } - else - { - return false; - } + + return false; } diff --git a/src/OpenFOAM/primitives/enums/NamedEnum.C b/src/OpenFOAM/primitives/enums/NamedEnum.C index eebbe33a33..384bf11944 100644 --- a/src/OpenFOAM/primitives/enums/NamedEnum.C +++ b/src/OpenFOAM/primitives/enums/NamedEnum.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010, 2017 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2017-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2015 OpenFOAM Foundation @@ -158,10 +158,8 @@ EnumType Foam::NamedEnum::lookupOrDefault { return lookup(key, dict); } - else - { - return deflt; - } + + return deflt; } diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C index 259ff9227c..0a3a370a60 100644 --- a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C +++ b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -445,10 +445,8 @@ bool Foam::globalIndexAndTransform::uniqueTransform return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/compressible/EddyDiffusivity/EddyDiffusivity.C b/src/TurbulenceModels/compressible/EddyDiffusivity/EddyDiffusivity.C index 3213ac5ad7..96199e53a0 100644 --- a/src/TurbulenceModels/compressible/EddyDiffusivity/EddyDiffusivity.C +++ b/src/TurbulenceModels/compressible/EddyDiffusivity/EddyDiffusivity.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2015-2017 OpenFOAM Foundation @@ -95,10 +95,8 @@ bool Foam::EddyDiffusivity::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/compressible/RAS/buoyantKEpsilon/buoyantKEpsilon.C b/src/TurbulenceModels/compressible/RAS/buoyantKEpsilon/buoyantKEpsilon.C index db453568a6..b5d05c673b 100644 --- a/src/TurbulenceModels/compressible/RAS/buoyantKEpsilon/buoyantKEpsilon.C +++ b/src/TurbulenceModels/compressible/RAS/buoyantKEpsilon/buoyantKEpsilon.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2014-2015 OpenFOAM Foundation @@ -92,10 +92,8 @@ bool buoyantKEpsilon::read() return true; } - else - { - return false; - } + + return false; } @@ -123,10 +121,8 @@ buoyantKEpsilon::kSource() const { return -fvm::SuSp(Gcoef(), this->k_); } - else - { - return kEpsilon::kSource(); - } + + return kEpsilon::kSource(); } @@ -150,10 +146,8 @@ buoyantKEpsilon::epsilonSource() const return -fvm::SuSp(this->C1_*tanh(mag(v)/u)*Gcoef(), this->epsilon_); } - else - { - return kEpsilon::epsilonSource(); - } + + return kEpsilon::epsilonSource(); } diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.C index 79037b8e2d..632221d40a 100644 --- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.C @@ -200,10 +200,8 @@ bool LamBremhorstKE::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKE/LienCubicKE.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKE/LienCubicKE.C index 335f68fe79..8e73e401b3 100644 --- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKE/LienCubicKE.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKE/LienCubicKE.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -363,10 +363,8 @@ bool LienCubicKE::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschziner/LienLeschziner.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschziner/LienLeschziner.C index 7b3a3f7f95..d79da15e0f 100644 --- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschziner/LienLeschziner.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschziner/LienLeschziner.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -249,10 +249,8 @@ bool LienLeschziner::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/ShihQuadraticKE/ShihQuadraticKE.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/ShihQuadraticKE/ShihQuadraticKE.C index b582470945..99b7d2a5d3 100644 --- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/ShihQuadraticKE/ShihQuadraticKE.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/ShihQuadraticKE/ShihQuadraticKE.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -248,10 +248,8 @@ bool ShihQuadraticKE::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.C index 01775d45ad..ea28f52c81 100644 --- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -588,10 +588,8 @@ bool kkLOmega::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/qZeta/qZeta.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/qZeta/qZeta.C index 6463d98d62..9bb2e9803d 100644 --- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/qZeta/qZeta.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/qZeta/qZeta.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -231,10 +231,8 @@ bool qZeta::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.C b/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.C index 0d90ba8b18..8e0061a0ef 100644 --- a/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.C +++ b/src/TurbulenceModels/phaseCompressible/LES/Niceno/NicenoKEqn.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2013-2016 OpenFOAM Foundation @@ -115,10 +115,8 @@ bool NicenoKEqn::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C b/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C index 671cfd950a..2eae4f3c0d 100644 --- a/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C +++ b/src/TurbulenceModels/phaseCompressible/LES/SmagorinskyZhang/SmagorinskyZhang.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2013-2016 OpenFOAM Foundation @@ -92,10 +92,8 @@ bool SmagorinskyZhang::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.C b/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.C index 3212ed4fa7..37c7332edd 100644 --- a/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.C +++ b/src/TurbulenceModels/phaseCompressible/LES/continuousGasKEqn/continuousGasKEqn.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2013-2016 OpenFOAM Foundation @@ -92,10 +92,8 @@ bool continuousGasKEqn::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C b/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C index f1656c66df..b0e1726dd1 100644 --- a/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C +++ b/src/TurbulenceModels/phaseCompressible/RAS/LaheyKEpsilon/LaheyKEpsilon.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2013-2016 OpenFOAM Foundation @@ -126,10 +126,8 @@ bool LaheyKEpsilon::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C b/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C index 3046bf4dfc..a2af9e81de 100644 --- a/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C +++ b/src/TurbulenceModels/phaseCompressible/RAS/continuousGasKEpsilon/continuousGasKEpsilon.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2013-2017 OpenFOAM Foundation @@ -107,10 +107,8 @@ bool continuousGasKEpsilon::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.C b/src/TurbulenceModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.C index 35fefffb6b..a12c137e51 100644 --- a/src/TurbulenceModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.C +++ b/src/TurbulenceModels/phaseCompressible/RAS/kOmegaSSTSato/kOmegaSSTSato.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2014-2017 OpenFOAM Foundation @@ -93,12 +93,11 @@ bool kOmegaSSTSato::read() return true; } - else - { - return false; - } + + return false; } + template const PhaseCompressibleTurbulenceModel < diff --git a/src/TurbulenceModels/turbulenceModels/Base/kOmegaSST/kOmegaSSTBase.C b/src/TurbulenceModels/turbulenceModels/Base/kOmegaSST/kOmegaSSTBase.C index b8146c5ebc..cd2129ea80 100644 --- a/src/TurbulenceModels/turbulenceModels/Base/kOmegaSST/kOmegaSSTBase.C +++ b/src/TurbulenceModels/turbulenceModels/Base/kOmegaSST/kOmegaSSTBase.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2016-2017, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2015 OpenFOAM Foundation @@ -473,10 +473,8 @@ bool kOmegaSSTBase::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.C b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.C index 2c0c588951..7d3745ee06 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010, 2015 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2010, 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -166,10 +166,8 @@ bool SpalartAllmarasDDES::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C index 72367775e1..71877b88f0 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -438,10 +438,8 @@ bool SpalartAllmarasDES::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C index fc6db9f974..6d32786788 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasIDDES/SpalartAllmarasIDDES.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2010, 2015-2016 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2010, 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2015 OpenFOAM Foundation @@ -245,10 +245,8 @@ bool SpalartAllmarasIDDES::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C index ab8016b030..1ea6144200 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2015 OpenFOAM Foundation @@ -168,10 +168,8 @@ bool kOmegaSSTDDES::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.C b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.C index 02b009fa5e..d582572037 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2015 OpenFOAM Foundation @@ -169,10 +169,8 @@ bool kOmegaSSTDES::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C index 864cd211bb..7ca9d5e075 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTIDDES/kOmegaSSTIDDES.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2015 OpenFOAM Foundation @@ -244,10 +244,8 @@ bool kOmegaSSTIDDES::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/LES/DeardorffDiffStress/DeardorffDiffStress.C b/src/TurbulenceModels/turbulenceModels/LES/DeardorffDiffStress/DeardorffDiffStress.C index dae89e6626..2441b247be 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/DeardorffDiffStress/DeardorffDiffStress.C +++ b/src/TurbulenceModels/turbulenceModels/LES/DeardorffDiffStress/DeardorffDiffStress.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -134,10 +134,8 @@ bool DeardorffDiffStress::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C b/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C index 3c18da7364..4da23366f6 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESModel/LESModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2013-2017 OpenFOAM Foundation @@ -192,10 +192,8 @@ bool Foam::LESModel::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDeltaDeltaDataI.H b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDeltaDeltaDataI.H index d72431431e..e6e4edf287 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDeltaDeltaDataI.H +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDeltaDeltaDataI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2015 OpenFOAM Foundation @@ -52,12 +52,10 @@ inline bool Foam::LESModels::smoothDelta::deltaData::update // Something changed. Let caller know. return true; } - else - { - // Neighbour is not too big for me or change is too small - // Nothing changed. - return false; - } + + // Neighbour is not too big for me or change is too small + // Nothing changed. + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESeddyViscosity/LESeddyViscosity.C b/src/TurbulenceModels/turbulenceModels/LES/LESeddyViscosity/LESeddyViscosity.C index 827c901987..24a81aaba2 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESeddyViscosity/LESeddyViscosity.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESeddyViscosity/LESeddyViscosity.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2013-2017 OpenFOAM Foundation @@ -85,10 +85,8 @@ bool LESeddyViscosity::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.C b/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.C index 1ae1bc2545..614571c6cf 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.C +++ b/src/TurbulenceModels/turbulenceModels/LES/Smagorinsky/Smagorinsky.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -133,10 +133,8 @@ bool Smagorinsky::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/LES/WALE/WALE.C b/src/TurbulenceModels/turbulenceModels/LES/WALE/WALE.C index 12abe4ac82..2a96c2907c 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/WALE/WALE.C +++ b/src/TurbulenceModels/turbulenceModels/LES/WALE/WALE.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2015-2017 OpenFOAM Foundation @@ -164,10 +164,8 @@ bool WALE::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.C b/src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.C index 87d6d4835e..e93dee37ad 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.C +++ b/src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -213,10 +213,8 @@ bool dynamicKEqn::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/LES/dynamicLagrangian/dynamicLagrangian.C b/src/TurbulenceModels/turbulenceModels/LES/dynamicLagrangian/dynamicLagrangian.C index 2bca99c701..37a34aa354 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/dynamicLagrangian/dynamicLagrangian.C +++ b/src/TurbulenceModels/turbulenceModels/LES/dynamicLagrangian/dynamicLagrangian.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -145,10 +145,8 @@ bool dynamicLagrangian::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.C b/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.C index 99ea6dc481..ea3927afd4 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.C +++ b/src/TurbulenceModels/turbulenceModels/LES/kEqn/kEqn.C @@ -133,10 +133,8 @@ bool kEqn::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.C b/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.C index cf18791be9..202766eb14 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -235,10 +235,8 @@ bool LRR::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.C b/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.C index db357233ac..bb1f7fa7ec 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -229,10 +229,8 @@ bool LaunderSharmaKE::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C b/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C index e2ebb7cd9a..298cc18daf 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/RASModel/RASModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2013-2017 OpenFOAM Foundation @@ -182,10 +182,8 @@ bool Foam::RASModel::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/RNGkEpsilon/RNGkEpsilon.C b/src/TurbulenceModels/turbulenceModels/RAS/RNGkEpsilon/RNGkEpsilon.C index 5c66497bbe..dd04ef76bf 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/RNGkEpsilon/RNGkEpsilon.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/RNGkEpsilon/RNGkEpsilon.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -232,10 +232,8 @@ bool RNGkEpsilon::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/SSG/SSG.C b/src/TurbulenceModels/turbulenceModels/RAS/SSG/SSG.C index 98b59cc2cc..2cb2b654e7 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/SSG/SSG.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/SSG/SSG.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2018 OpenCFD Ltd + \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2015-2016 OpenFOAM Foundation @@ -245,10 +245,8 @@ bool SSG::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C b/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C index 60e07b215f..d38c878811 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C @@ -284,10 +284,8 @@ bool SpalartAllmaras::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.C b/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.C index 24f07ca15e..7f13717aa6 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -212,10 +212,8 @@ bool kEpsilon::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kOmega/kOmega.C b/src/TurbulenceModels/turbulenceModels/RAS/kOmega/kOmega.C index 0885a9f371..1bacbf1f15 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/kOmega/kOmega.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/kOmega/kOmega.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -172,10 +172,8 @@ bool kOmega::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C index 025f2ce5c4..ef47b789cf 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2016-2017 OpenFOAM Foundation @@ -511,10 +511,8 @@ bool kOmegaSSTLM::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTSAS/kOmegaSSTSAS.C b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTSAS/kOmegaSSTSAS.C index 8fb5649ee4..b9c91e4d4d 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTSAS/kOmegaSSTSAS.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTSAS/kOmegaSSTSAS.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2015-2017 OpenFOAM Foundation @@ -198,10 +198,8 @@ bool kOmegaSSTSAS::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C b/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C index 6e29936fca..5685648c95 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -239,10 +239,8 @@ bool realizableKE::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C b/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C index 1de47ef81a..a00701035d 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2012-2017 OpenFOAM Foundation @@ -298,10 +298,8 @@ bool v2f::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/TurbulenceModels/turbulenceModels/laminar/Maxwell/Maxwell.C b/src/TurbulenceModels/turbulenceModels/laminar/Maxwell/Maxwell.C index 67e21cf09e..991e59c4ea 100644 --- a/src/TurbulenceModels/turbulenceModels/laminar/Maxwell/Maxwell.C +++ b/src/TurbulenceModels/turbulenceModels/laminar/Maxwell/Maxwell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2016-2017 OpenFOAM Foundation @@ -99,10 +99,8 @@ bool Maxwell::read() return true; } - else - { - return false; - } + + return false; } template diff --git a/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C b/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C index 2d94f6990f..150114677e 100644 --- a/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C +++ b/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2016-2017 OpenFOAM Foundation @@ -175,10 +175,8 @@ bool Foam::laminarModel::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.C b/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.C index a0cee24d95..e4a7466f41 100644 --- a/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.C +++ b/src/atmosphericModels/kEpsilonLopesdaCosta/kEpsilonLopesdaCosta.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2018 OpenFOAM Foundation @@ -382,10 +382,8 @@ bool kEpsilonLopesdaCosta::read() { return true; } - else - { - return false; - } + + return false; } diff --git a/src/combustionModels/CombustionModel/CombustionModel/CombustionModel.C b/src/combustionModels/CombustionModel/CombustionModel/CombustionModel.C index b24baecf50..952c92a55f 100644 --- a/src/combustionModels/CombustionModel/CombustionModel/CombustionModel.C +++ b/src/combustionModels/CombustionModel/CombustionModel/CombustionModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -79,10 +79,8 @@ bool Foam::CombustionModel::read() { return true; } - else - { - return false; - } + + return false; } diff --git a/src/combustionModels/EDC/EDC.C b/src/combustionModels/EDC/EDC.C index 6c09cadfe5..c31975b8c9 100644 --- a/src/combustionModels/EDC/EDC.C +++ b/src/combustionModels/EDC/EDC.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2017 OpenFOAM Foundation @@ -236,10 +236,8 @@ bool Foam::combustionModels::EDC::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/combustionModels/FSD/FSD.C b/src/combustionModels/FSD/FSD.C index 12587e0494..5c62f3f0b0 100644 --- a/src/combustionModels/FSD/FSD.C +++ b/src/combustionModels/FSD/FSD.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -354,10 +354,8 @@ bool FSD::read() reactionRateFlameArea_->read(this->coeffs()); return true; } - else - { - return false; - } + + return false; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/combustionModels/PaSR/PaSR.C b/src/combustionModels/PaSR/PaSR.C index 59bdfc45d0..296a934284 100644 --- a/src/combustionModels/PaSR/PaSR.C +++ b/src/combustionModels/PaSR/PaSR.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -133,10 +133,8 @@ bool Foam::combustionModels::PaSR::read() this->coeffs().readEntry("Cmix", Cmix_); return true; } - else - { - return false; - } + + return false; } diff --git a/src/combustionModels/diffusion/diffusion.C b/src/combustionModels/diffusion/diffusion.C index 694ace9895..6d9c5fbaf3 100644 --- a/src/combustionModels/diffusion/diffusion.C +++ b/src/combustionModels/diffusion/diffusion.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2012-2017 OpenFOAM Foundation @@ -102,10 +102,8 @@ bool diffusion::read() this->coeffs().readIfPresent("oxidant", oxidantName_); return true; } - else - { - return false; - } + + return false; } diff --git a/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C b/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C index 8de136c82d..7c006b0361 100644 --- a/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C +++ b/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd + \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -110,10 +110,8 @@ bool eddyDissipationDiffusionModel::read() this->coeffs().readEntry("Cd", Cd_); return true; } - else - { - return false; - } + + return false; } diff --git a/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.C b/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.C index cd7f45e7db..fa285d90bf 100644 --- a/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.C +++ b/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd + \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -119,10 +119,8 @@ bool eddyDissipationModelBase::read() this->coeffs().readEntry("CEDC", CEDC_); return true; } - else - { - return false; - } + + return false; } diff --git a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C index 7c746f52ab..f59f142586 100644 --- a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C +++ b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -99,10 +99,8 @@ bool infinitelyFastChemistry::read() this->coeffs().readEntry("C", C_); return true; } - else - { - return false; - } + + return false; } diff --git a/src/combustionModels/laminar/laminar.C b/src/combustionModels/laminar/laminar.C index 7bed66985b..f81be30bbc 100644 --- a/src/combustionModels/laminar/laminar.C +++ b/src/combustionModels/laminar/laminar.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2013-2017 OpenFOAM Foundation @@ -178,10 +178,8 @@ bool Foam::combustionModels::laminar::read() this->coeffs().lookupOrDefault("integrateReactionRate", true); return true; } - else - { - return false; - } + + return false; } diff --git a/src/combustionModels/noCombustion/noCombustion.C b/src/combustionModels/noCombustion/noCombustion.C index 2b9fe78f5b..eb834af304 100644 --- a/src/combustionModels/noCombustion/noCombustion.C +++ b/src/combustionModels/noCombustion/noCombustion.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -97,14 +97,7 @@ Foam::combustionModels::noCombustion::Qdot() const template bool Foam::combustionModels::noCombustion::read() { - if (ThermoCombustion::read()) - { - return true; - } - else - { - return false; - } + return ThermoCombustion::read(); } diff --git a/src/combustionModels/singleStepCombustion/singleStepCombustion.C b/src/combustionModels/singleStepCombustion/singleStepCombustion.C index 308ccd8942..5d2705f72b 100644 --- a/src/combustionModels/singleStepCombustion/singleStepCombustion.C +++ b/src/combustionModels/singleStepCombustion/singleStepCombustion.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -120,10 +120,8 @@ tmp singleStepCombustion::R return -fNorm*wSpecie*fres + scalar(fNorm)*fvm::Sp(wSpecie, Y); } - else - { - return wSpecie + fvm::Sp(0.0*wSpecie, Y); - } + + return wSpecie + fvm::Sp(0.0*wSpecie, Y); } @@ -146,10 +144,8 @@ bool singleStepCombustion::read() { return true; } - else - { - return false; - } + + return false; } diff --git a/src/combustionModels/zoneCombustion/zoneCombustion.C b/src/combustionModels/zoneCombustion/zoneCombustion.C index 416eab3fc5..2517c64b69 100644 --- a/src/combustionModels/zoneCombustion/zoneCombustion.C +++ b/src/combustionModels/zoneCombustion/zoneCombustion.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2016-2017 OpenFOAM Foundation @@ -189,10 +189,8 @@ bool Foam::combustionModels::zoneCombustion::read() combustionModelPtr_->read(); return true; } - else - { - return false; - } + + return false; } diff --git a/src/conversion/ccm/common/ccmBase.C b/src/conversion/ccm/common/ccmBase.C index 82768621d4..fae7c684c3 100644 --- a/src/conversion/ccm/common/ccmBase.C +++ b/src/conversion/ccm/common/ccmBase.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -92,10 +92,8 @@ bool Foam::ccm::base::close() return true; } - else - { - return false; - } + + return false; } diff --git a/src/dynamicMesh/meshCut/cellLooper/geomCellLooper.C b/src/dynamicMesh/meshCut/cellLooper/geomCellLooper.C index a58cbf5da5..581e8da26c 100644 --- a/src/dynamicMesh/meshCut/cellLooper/geomCellLooper.C +++ b/src/dynamicMesh/meshCut/cellLooper/geomCellLooper.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -126,10 +126,8 @@ Foam::label Foam::geomCellLooper::snapToVert { return e.end(); } - else - { - return -1; - } + + return -1; } diff --git a/src/dynamicMesh/meshCut/cellLooper/hexCellLooper.C b/src/dynamicMesh/meshCut/cellLooper/hexCellLooper.C index 01297be51d..d20ad1a8ee 100644 --- a/src/dynamicMesh/meshCut/cellLooper/hexCellLooper.C +++ b/src/dynamicMesh/meshCut/cellLooper/hexCellLooper.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -101,10 +101,8 @@ bool Foam::hexCellLooper::walkHex return false; } - else - { - return true; - } + + return true; } diff --git a/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C b/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C index 4ea52f0698..db7305a2db 100644 --- a/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C +++ b/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010, 2015-2017 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -316,6 +316,7 @@ bool Foam::polyMeshGeometry::checkFaceTet return true; } } + return false; } @@ -523,15 +524,13 @@ bool Foam::polyMeshGeometry::checkFaceDotProduct return true; } - else - { - if (report) - { - Info<< "Non-orthogonality check OK.\n" << endl; - } - return false; + if (report) + { + Info<< "Non-orthogonality check OK.\n" << endl; } + + return false; } @@ -696,15 +695,13 @@ bool Foam::polyMeshGeometry::checkFacePyramids return true; } - else - { - if (report) - { - Info<< "Face pyramids OK.\n" << endl; - } - return false; + if (report) + { + Info<< "Face pyramids OK.\n" << endl; } + + return false; } @@ -919,15 +916,13 @@ bool Foam::polyMeshGeometry::checkFaceTets return true; } - else - { - if (report) - { - Info<< "Face tets OK.\n" << endl; - } - return false; + if (report) + { + Info<< "Face tets OK.\n" << endl; } + + return false; } @@ -1125,16 +1120,14 @@ bool Foam::polyMeshGeometry::checkFaceSkewness return true; } - else - { - if (report) - { - Info<< "Max skewness = " << 100*maxSkew - << " percent. Face skewness OK.\n" << endl; - } - return false; + if (report) + { + Info<< "Max skewness = " << 100*maxSkew + << " percent. Face skewness OK.\n" << endl; } + + return false; } @@ -1275,16 +1268,14 @@ bool Foam::polyMeshGeometry::checkFaceWeights return true; } - else - { - if (report) - { - Info<< "Min weight = " << minWeight - << ". Weights OK.\n" << endl; - } - return false; + if (report) + { + Info<< "Min weight = " << minWeight + << ". Weights OK.\n" << endl; } + + return false; } @@ -1409,16 +1400,14 @@ bool Foam::polyMeshGeometry::checkVolRatio return true; } - else - { - if (report) - { - Info<< "Min ratio = " << minRatio - << ". Ratios OK.\n" << endl; - } - return false; + if (report) + { + Info<< "Min ratio = " << minRatio + << ". Ratios OK.\n" << endl; } + + return false; } @@ -1547,10 +1536,8 @@ bool Foam::polyMeshGeometry::checkFaceAngles return true; } - else - { - return false; - } + + return false; } @@ -1696,10 +1683,8 @@ bool Foam::polyMeshGeometry::checkFaceTwist return true; } - else - { - return false; - } + + return false; } @@ -1845,10 +1830,8 @@ bool Foam::polyMeshGeometry::checkTriangleTwist return true; } - else - { - return false; - } + + return false; } @@ -1940,10 +1923,8 @@ bool Foam::polyMeshGeometry::checkFaceFlatness return true; } - else - { - return false; - } + + return false; } @@ -1999,10 +1980,8 @@ bool Foam::polyMeshGeometry::checkFaceArea return true; } - else - { - return false; - } + + return false; } @@ -2093,10 +2072,8 @@ bool Foam::polyMeshGeometry::checkCellDeterminant return true; } - else - { - return false; - } + + return false; } diff --git a/src/dynamicMesh/motionSolvers/displacement/layeredSolver/pointEdgeStructuredWalkI.H b/src/dynamicMesh/motionSolvers/displacement/layeredSolver/pointEdgeStructuredWalkI.H index eac8e51e73..d7c0a18b9a 100644 --- a/src/dynamicMesh/motionSolvers/displacement/layeredSolver/pointEdgeStructuredWalkI.H +++ b/src/dynamicMesh/motionSolvers/displacement/layeredSolver/pointEdgeStructuredWalkI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -48,10 +48,8 @@ inline bool Foam::pointEdgeStructuredWalk::update return true; } - else - { - return false; - } + + return false; } @@ -201,10 +199,8 @@ inline bool Foam::pointEdgeStructuredWalk::updatePoint { return update(edgeInfo, tol, td); } - else - { - return false; - } + + return false; } @@ -223,10 +219,8 @@ inline bool Foam::pointEdgeStructuredWalk::updatePoint { return update(newPointInfo, tol, td); } - else - { - return false; - } + + return false; } @@ -259,10 +253,8 @@ inline bool Foam::pointEdgeStructuredWalk::updateEdge { return update(pointInfo, tol, td); } - else - { - return false; - } + + return false; } diff --git a/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C b/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C index 205d930d86..b226c54c0f 100644 --- a/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C +++ b/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C @@ -367,8 +367,9 @@ bool Foam::faceCoupleInfo::regionEdge return true; } } - return false; } + + return false; } diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C index a55d8b1212..b7b4c43eb2 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/refinementHistory.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011, 2015-2016 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011, 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -179,10 +179,8 @@ bool Foam::refinementHistory::splitCell8::operator==(const splitCell8& s) const { return addedCellsPtr_() == s.addedCellsPtr_(); } - else - { - return true; - } + + return true; } diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/pointEdgeCollapse/pointEdgeCollapseI.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/pointEdgeCollapse/pointEdgeCollapseI.H index be5d1a863a..717f725e27 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/pointEdgeCollapse/pointEdgeCollapseI.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/pointEdgeCollapse/pointEdgeCollapseI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2012-2016 OpenFOAM Foundation @@ -93,10 +93,8 @@ inline bool Foam::pointEdgeCollapse::update return nearer; } } - else - { - return false; - } + + return false; } diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementDistanceDataI.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementDistanceDataI.H index 05af4beb92..0d2b11ca4a 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementDistanceDataI.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementDistanceDataI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -114,10 +114,8 @@ inline bool Foam::refinementDistanceData::update return true; } } - else - { - return false; - } + + return false; } @@ -271,14 +269,7 @@ inline bool Foam::refinementDistanceData::equal { if (!valid(td)) { - if (!rhs.valid(td)) - { - return true; - } - else - { - return false; - } + return (!rhs.valid(td)); } else { @@ -292,8 +283,7 @@ inline bool Foam::refinementDistanceData::equal inline bool Foam::refinementDistanceData::operator== ( const Foam::refinementDistanceData& rhs -) - const +) const { return level0Size_ == rhs.level0Size_ @@ -305,8 +295,7 @@ inline bool Foam::refinementDistanceData::operator== inline bool Foam::refinementDistanceData::operator!= ( const Foam::refinementDistanceData& rhs -) - const +) const { return !(*this == rhs); } diff --git a/src/engine/engineTime/engineTime/engineTime.C b/src/engine/engineTime/engineTime/engineTime.C index f0ef4fec7c..36f9797e4f 100644 --- a/src/engine/engineTime/engineTime/engineTime.C +++ b/src/engine/engineTime/engineTime/engineTime.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -85,10 +85,8 @@ bool Foam::engineTime::read() { return true; } - else - { - return false; - } + + return false; } diff --git a/src/fileFormats/vtk/file/foamVtmWriter.C b/src/fileFormats/vtk/file/foamVtmWriter.C index 3a83eb00d5..b7939a79b9 100644 --- a/src/fileFormats/vtk/file/foamVtmWriter.C +++ b/src/fileFormats/vtk/file/foamVtmWriter.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -423,10 +423,8 @@ bool Foam::vtk::vtmWriter::append(const fileName& file) { return append(fileName::nameLessExt(file), file); } - else - { - return append(word::null, file); - } + + return append(word::null, file); } @@ -440,10 +438,8 @@ bool Foam::vtk::vtmWriter::append { return append(fileName::nameLessExt(file), file, contentType); } - else - { - return append(word::null, file, contentType); - } + + return append(word::null, file, contentType); } diff --git a/src/finiteArea/finiteArea/faSchemes/faSchemes.C b/src/finiteArea/finiteArea/faSchemes/faSchemes.C index ef38e9c632..a0ae3f0a3d 100644 --- a/src/finiteArea/finiteArea/faSchemes/faSchemes.C +++ b/src/finiteArea/finiteArea/faSchemes/faSchemes.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2016-2017 Wikki Ltd @@ -334,10 +334,8 @@ bool Foam::faSchemes::read() return true; } - else - { - return false; - } + + return false; } @@ -347,10 +345,8 @@ const Foam::dictionary& Foam::faSchemes::schemesDict() const { return subDict(word(lookup("select"))); } - else - { - return *this; - } + + return *this; } @@ -398,7 +394,7 @@ Foam::ITstream& Foam::faSchemes::interpolationScheme(const word& name) const { Info<< "Lookup interpolationScheme for " << name << endl; } - + if ( interpolationSchemes_.found(name) diff --git a/src/finiteVolume/cfdTools/general/MRF/IOMRFZoneList.C b/src/finiteVolume/cfdTools/general/MRF/IOMRFZoneList.C index d2feb94127..865f162692 100644 --- a/src/finiteVolume/cfdTools/general/MRF/IOMRFZoneList.C +++ b/src/finiteVolume/cfdTools/general/MRF/IOMRFZoneList.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2012-2017 OpenFOAM Foundation @@ -81,10 +81,8 @@ bool Foam::IOMRFZoneList::read() MRFZoneList::read(*this); return true; } - else - { - return false; - } + + return false; } diff --git a/src/finiteVolume/cfdTools/general/adjustPhi/adjustPhi.C b/src/finiteVolume/cfdTools/general/adjustPhi/adjustPhi.C index dea4b76ca5..976ff46776 100644 --- a/src/finiteVolume/cfdTools/general/adjustPhi/adjustPhi.C +++ b/src/finiteVolume/cfdTools/general/adjustPhi/adjustPhi.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -145,10 +145,8 @@ bool Foam::adjustPhi && mag(fixedMassOut)/totalFlux < SMALL && mag(adjustableMassOut)/totalFlux < SMALL; } - else - { - return false; - } + + return false; } diff --git a/src/finiteVolume/cfdTools/general/fvOptions/fvOptions.C b/src/finiteVolume/cfdTools/general/fvOptions/fvOptions.C index fdb2230457..e8732c42e6 100644 --- a/src/finiteVolume/cfdTools/general/fvOptions/fvOptions.C +++ b/src/finiteVolume/cfdTools/general/fvOptions/fvOptions.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -132,10 +132,8 @@ bool Foam::fv::options::read() optionList::read(*this); return true; } - else - { - return false; - } + + return false; } diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.C index 195392651d..2c84a1f7d1 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicACMI/cyclicACMIFvsPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2013-2015 OpenFOAM Foundation @@ -125,10 +125,8 @@ bool Foam::cyclicACMIFvsPatchField::coupled() const { return true; } - else - { - return false; - } + + return false; } diff --git a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchField.C index 17205b0e0f..830ae29f24 100644 --- a/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2015 OpenFOAM Foundation @@ -125,10 +125,8 @@ bool Foam::cyclicAMIFvsPatchField::coupled() const { return true; } - else - { - return false; - } + + return false; } diff --git a/src/finiteVolume/finiteVolume/fvSchemes/fvSchemes.C b/src/finiteVolume/finiteVolume/fvSchemes/fvSchemes.C index eb90d68787..97b12d755f 100644 --- a/src/finiteVolume/finiteVolume/fvSchemes/fvSchemes.C +++ b/src/finiteVolume/finiteVolume/fvSchemes/fvSchemes.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2015 OpenFOAM Foundation @@ -339,10 +339,8 @@ bool Foam::fvSchemes::read() return true; } - else - { - return false; - } + + return false; } @@ -352,10 +350,8 @@ const Foam::dictionary& Foam::fvSchemes::schemesDict() const { return subDict(word(lookup("select"))); } - else - { - return *this; - } + + return *this; } @@ -518,10 +514,8 @@ bool Foam::fvSchemes::fluxRequired(const word& name) const { return true; } - else - { - return defaultFluxRequired_; - } + + return defaultFluxRequired_; } diff --git a/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C b/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C index 0345ebbcec..33c24e7aef 100644 --- a/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C +++ b/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010, 2016-2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2015-2016 OpenFOAM Foundation @@ -238,10 +238,8 @@ bool Foam::wallDist::movePoints() return pdm_->correct(y_); } } - else - { - return false; - } + + return false; } diff --git a/src/functionObjects/field/Lambda2/Lambda2.C b/src/functionObjects/field/Lambda2/Lambda2.C index 2519d03f4a..9957777bfd 100644 --- a/src/functionObjects/field/Lambda2/Lambda2.C +++ b/src/functionObjects/field/Lambda2/Lambda2.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2013-2016 OpenFOAM Foundation @@ -69,10 +69,8 @@ bool Foam::functionObjects::Lambda2::calc() -eigenValues(SSplusWW)().component(vector::Y) ); } - else - { - return false; - } + + return false; } diff --git a/src/functionObjects/field/MachNo/MachNo.C b/src/functionObjects/field/MachNo/MachNo.C index 91ff787440..90eb438a65 100644 --- a/src/functionObjects/field/MachNo/MachNo.C +++ b/src/functionObjects/field/MachNo/MachNo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2016 OpenFOAM Foundation @@ -68,10 +68,8 @@ bool Foam::functionObjects::MachNo::calc() mag(U)/sqrt(thermo.gamma()*thermo.p()/thermo.rho()) ); } - else - { - return false; - } + + return false; } diff --git a/src/functionObjects/field/PecletNo/PecletNo.C b/src/functionObjects/field/PecletNo/PecletNo.C index 7df15852ed..6648af899c 100644 --- a/src/functionObjects/field/PecletNo/PecletNo.C +++ b/src/functionObjects/field/PecletNo/PecletNo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015-2016 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2013-2016 OpenFOAM Foundation @@ -120,10 +120,8 @@ bool Foam::functionObjects::PecletNo::calc() ) ); } - else - { - return false; - } + + return false; } diff --git a/src/functionObjects/field/Q/Q.C b/src/functionObjects/field/Q/Q.C index ad704ba86e..d3614ac096 100644 --- a/src/functionObjects/field/Q/Q.C +++ b/src/functionObjects/field/Q/Q.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2013-2016 OpenFOAM Foundation @@ -63,10 +63,8 @@ bool Foam::functionObjects::Q::calc() 0.5*(sqr(tr(gradU)) - tr(((gradU) & (gradU)))) ); } - else - { - return false; - } + + return false; } diff --git a/src/functionObjects/field/blendingFactor/blendingFactor.C b/src/functionObjects/field/blendingFactor/blendingFactor.C index aa63e53f83..fb94a37a70 100644 --- a/src/functionObjects/field/blendingFactor/blendingFactor.C +++ b/src/functionObjects/field/blendingFactor/blendingFactor.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015-2016 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2013-2016 OpenFOAM Foundation @@ -130,10 +130,8 @@ bool Foam::functionObjects::blendingFactor::read(const dictionary& dict) return true; } - else - { - return false; - } + + return false; } diff --git a/src/functionObjects/field/columnAverage/columnAverageTemplates.C b/src/functionObjects/field/columnAverage/columnAverageTemplates.C index 345307d051..5227dfb79b 100644 --- a/src/functionObjects/field/columnAverage/columnAverageTemplates.C +++ b/src/functionObjects/field/columnAverage/columnAverageTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -104,10 +104,8 @@ bool Foam::functionObjects::columnAverage::columnAverageField return true; } - else - { - return false; - } + + return false; } diff --git a/src/functionObjects/field/components/componentsTemplates.C b/src/functionObjects/field/components/componentsTemplates.C index 24d31d8404..c8ee76c047 100644 --- a/src/functionObjects/field/components/componentsTemplates.C +++ b/src/functionObjects/field/components/componentsTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2016 OpenFOAM Foundation @@ -67,10 +67,8 @@ bool Foam::functionObjects::components::calcComponents() { return calcFieldComponents(); } - else - { - return false; - } + + return false; } diff --git a/src/functionObjects/field/ddt/ddtTemplates.C b/src/functionObjects/field/ddt/ddtTemplates.C index 9e1c84d505..089679ecbc 100644 --- a/src/functionObjects/field/ddt/ddtTemplates.C +++ b/src/functionObjects/field/ddt/ddtTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2017 OpenFOAM Foundation @@ -42,10 +42,8 @@ bool Foam::functionObjects::ddt::calcDdt() fvc::ddt(lookupObject(fieldName_)) ); } - else - { - return false; - } + + return false; } diff --git a/src/functionObjects/field/div/divTemplates.C b/src/functionObjects/field/div/divTemplates.C index 29a2edfb35..c366bc7ada 100644 --- a/src/functionObjects/field/div/divTemplates.C +++ b/src/functionObjects/field/div/divTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2012-2016 OpenFOAM Foundation @@ -40,10 +40,8 @@ bool Foam::functionObjects::div::calcDiv() fvc::div(lookupObject(fieldName_)) ); } - else - { - return false; - } + + return false; } diff --git a/src/functionObjects/field/flowType/flowType.C b/src/functionObjects/field/flowType/flowType.C index c5092a666c..1958a2d232 100644 --- a/src/functionObjects/field/flowType/flowType.C +++ b/src/functionObjects/field/flowType/flowType.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -73,10 +73,8 @@ bool Foam::functionObjects::flowType::calc() (magD - magOmega)/(magD + magOmega + smallMagD) ); } - else - { - return false; - } + + return false; } diff --git a/src/functionObjects/field/flux/fluxTemplates.C b/src/functionObjects/field/flux/fluxTemplates.C index b9e948ac06..debb13c2c5 100644 --- a/src/functionObjects/field/flux/fluxTemplates.C +++ b/src/functionObjects/field/flux/fluxTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,10 +39,8 @@ bool Foam::functionObjects::flux::calcVolFlux(const RhoFieldType& rho) fvc::flux(rho*lookupObject(fieldName_)) ); } - else - { - return false; - } + + return false; } @@ -60,10 +58,8 @@ bool Foam::functionObjects::flux::calcSurFlux(const RhoFieldType& rho) ) & mesh_.Sf() ); } - else - { - return false; - } + + return false; } diff --git a/src/functionObjects/field/pressure/pressure.C b/src/functionObjects/field/pressure/pressure.C index 7c2e7f4f62..98d8233189 100644 --- a/src/functionObjects/field/pressure/pressure.C +++ b/src/functionObjects/field/pressure/pressure.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016-2017 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2012-2016 OpenFOAM Foundation @@ -87,20 +87,18 @@ Foam::tmp Foam::functionObjects::pressure::rhoScale fvPatchField::calculatedType() ); } - else - { - if (!rhoInfInitialised_) - { - FatalErrorInFunction - << type() << " " << name() << ": " - << "pressure identified as incompressible, but reference " - << "density is not set. Please set 'rho' to 'rhoInf', and " - << "set an appropriate value for 'rhoInf'" - << exit(FatalError); - } - return dimensionedScalar("rhoInf", dimDensity, rhoInf_)*p; + if (!rhoInfInitialised_) + { + FatalErrorInFunction + << type() << " " << name() << ": " + << "pressure identified as incompressible, but reference " + << "density is not set. Please set 'rho' to 'rhoInf', and " + << "set an appropriate value for 'rhoInf'" + << exit(FatalError); } + + return dimensionedScalar("rhoInf", dimDensity, rhoInf_)*p; } diff --git a/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C b/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C index c073821fc5..8bf214aaf5 100644 --- a/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C +++ b/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -710,10 +710,8 @@ bool Foam::functionObjects::stabilityBlendingFactor::read return true; } - else - { - return false; - } + + return false; } diff --git a/src/functionObjects/field/streamFunction/streamFunction.C b/src/functionObjects/field/streamFunction/streamFunction.C index f7a13b981b..b4a7b047c1 100644 --- a/src/functionObjects/field/streamFunction/streamFunction.C +++ b/src/functionObjects/field/streamFunction/streamFunction.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2016 OpenFOAM Foundation @@ -416,10 +416,8 @@ bool Foam::functionObjects::streamFunction::calc() return store(resultName_, calc(phi)); } - else - { - return false; - } + + return false; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallLocalSpringSliderDashpot/WallLocalSpringSliderDashpot.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallLocalSpringSliderDashpot/WallLocalSpringSliderDashpot.C index 38e2533ded..ba3c76d69f 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallLocalSpringSliderDashpot/WallLocalSpringSliderDashpot.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallLocalSpringSliderDashpot/WallLocalSpringSliderDashpot.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -290,10 +290,8 @@ Foam::scalar Foam::WallLocalSpringSliderDashpot::pREff { return p.d()/2*cbrt(p.nParticle()*volumeFactor_); } - else - { - return p.d()/2; - } + + return p.d()/2; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallSpringSliderDashpot/WallSpringSliderDashpot.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallSpringSliderDashpot/WallSpringSliderDashpot.C index e624fb6ba5..3e5532ac85 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallSpringSliderDashpot/WallSpringSliderDashpot.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallSpringSliderDashpot/WallSpringSliderDashpot.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -221,10 +221,8 @@ Foam::scalar Foam::WallSpringSliderDashpot::pREff { return p.d()/2*cbrt(p.nParticle()*volumeFactor_); } - else - { - return p.d()/2; - } + + return p.d()/2; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C index 056f05b85d..91f018d49f 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2011, 2015 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2011, 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -287,10 +287,8 @@ Foam::label Foam::CellZoneInjection::parcelsToInject { return positions_.size(); } - else - { - return 0; - } + + return 0; } @@ -306,10 +304,8 @@ Foam::scalar Foam::CellZoneInjection::volumeToInject { return this->volumeTotal_; } - else - { - return 0.0; - } + + return 0.0; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C index 4920d2da88..fa718b23bd 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2011, 2015 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011, 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -206,10 +206,8 @@ Foam::label Foam::ConeInjection::parcelsToInject return targetParcels - nInjected_; } - else - { - return 0; - } + + return 0; } @@ -224,10 +222,8 @@ Foam::scalar Foam::ConeInjection::volumeToInject { return flowRateProfile_.integrate(time0, time1); } - else - { - return 0.0; - } + + return 0.0; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C index 3e06997e4e..eb21534a77 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2011, 2015-2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011-2011, 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -314,10 +314,8 @@ Foam::label Foam::ConeNozzleInjection::parcelsToInject { return floor((time1 - time0)*parcelsPerSecond_); } - else - { - return 0; - } + + return 0; } @@ -332,10 +330,8 @@ Foam::scalar Foam::ConeNozzleInjection::volumeToInject { return flowRateProfile_.integrate(time0, time1); } - else - { - return 0.0; - } + + return 0.0; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C index 8d324f274f..d1908fd28a 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2011, 2015 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011, 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -172,10 +172,8 @@ Foam::label Foam::FieldActivatedInjection::parcelsToInject { return positions_.size(); } - else - { - return 0; - } + + return 0; } @@ -190,10 +188,8 @@ Foam::scalar Foam::FieldActivatedInjection::volumeToInject { return this->volumeTotal_/nParcelsPerInjector_; } - else - { - return 0; - } + + return 0.0; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C index 7526c44d92..a7242bb231 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2011, 2015 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011, 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -430,10 +430,8 @@ Foam::scalar Foam::InflationInjection::volumeToInject { return fraction_*flowRateProfile_.integrate(time0, time1); } - else - { - return 0.0; - } + + return 0.0; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.C index 1afe170c53..a02e53379d 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -139,10 +139,8 @@ Foam::label Foam::KinematicLookupTableInjection::parcelsToInject { return floor(injectorCells_.size()*(time1 - time0)*parcelsPerSecond_); } - else - { - return 0; - } + + return 0; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C index cfe500a2e6..b4efd55c55 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C @@ -173,10 +173,8 @@ Foam::label Foam::ManualInjection::parcelsToInject { return positions_.size(); } - else - { - return 0; - } + + return 0; } @@ -192,10 +190,8 @@ Foam::scalar Foam::ManualInjection::volumeToInject { return this->volumeTotal_; } - else - { - return 0.0; - } + + return 0.0; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.C index abfa8f82f8..6e4daf2e48 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -184,10 +184,8 @@ Foam::label Foam::PatchFlowRateInjection::parcelsToInject return nParcelsToInject; } - else - { - return 0; - } + + return 0; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.C index f8c1c26593..10fc32cec6 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2011, 2015 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011, 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -140,10 +140,8 @@ Foam::label Foam::PatchInjection::parcelsToInject return nParcelsToInject; } - else - { - return 0; - } + + return 0; } @@ -158,10 +156,8 @@ Foam::scalar Foam::PatchInjection::volumeToInject { return flowRateProfile_.integrate(time0, time1); } - else - { - return 0.0; - } + + return 0.0; } diff --git a/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.C b/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.C index f3f8f2cd7e..28fa4132f2 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.C +++ b/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -138,10 +138,8 @@ Foam::label Foam::ReactingLookupTableInjection::parcelsToInject { return floor(injectorCells_.size()*(time1 - time0)*parcelsPerSecond_); } - else - { - return 0; - } + + return 0; } diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/ReactingMultiphaseLookupTableInjection.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/ReactingMultiphaseLookupTableInjection.C index deba84537e..a94c51ecf9 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/ReactingMultiphaseLookupTableInjection.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/ReactingMultiphaseLookupTableInjection.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -143,10 +143,8 @@ Foam::ReactingMultiphaseLookupTableInjection::parcelsToInject { return floor(injectorCells_.size()*(time1 - time0)*parcelsPerSecond_); } - else - { - return 0; - } + + return 0; } diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.C b/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.C index b8032ed930..3d0f4ef0b8 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -139,10 +139,8 @@ Foam::label Foam::ThermoLookupTableInjection::parcelsToInject { return floor(injectorCells_.size()*(time1 - time0)*parcelsPerSecond_); } - else - { - return 0; - } + + return 0; } diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialList.C b/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialList.C index 2f10dd4983..bd08f8d7f3 100644 --- a/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialList.C +++ b/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialList.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -246,10 +246,8 @@ bool Foam::pairPotentialList::rCutMaxSqr(const scalar rIJMagSqr) const { return true; } - else - { - return false; - } + + return false; } @@ -264,10 +262,8 @@ bool Foam::pairPotentialList::rCutSqr { return true; } - else - { - return false; - } + + return false; } diff --git a/src/lagrangian/spray/submodels/StochasticCollision/ORourkeCollision/ORourkeCollision.C b/src/lagrangian/spray/submodels/StochasticCollision/ORourkeCollision/ORourkeCollision.C index 3ca0923f47..003283639a 100644 --- a/src/lagrangian/spray/submodels/StochasticCollision/ORourkeCollision/ORourkeCollision.C +++ b/src/lagrangian/spray/submodels/StochasticCollision/ORourkeCollision/ORourkeCollision.C @@ -161,10 +161,8 @@ bool Foam::ORourkeCollision::collideParcels return collideSorted(dt, p2, p1, m2, m1); } } - else - { - return false; - } + + return false; } diff --git a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C index e4ba4fd216..a70742cbf8 100644 --- a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C +++ b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015-2016 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2014-2015 OpenFOAM Foundation @@ -116,10 +116,8 @@ bool Foam::medialAxisMeshMover::isMaxEdge { return true; } - else - { - return false; - } + + return false; } @@ -700,10 +698,8 @@ bool Foam::medialAxisMeshMover::unmarkExtrusion patchDisp[patchPointI] = Zero; return true; } - else - { - return false; - } + + return false; } diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C index bd5999295e..9ebb8c1e4f 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011, 2015-2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011, 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -2981,17 +2981,14 @@ const } -//- Return either time().constant() or oldInstance Foam::word Foam::meshRefinement::timeName() const { if (overwrite_ && mesh_.time().timeIndex() == 0) { return oldInstance_; } - else - { - return mesh_.time().timeName(); - } + + return mesh_.time().timeName(); } @@ -3237,10 +3234,8 @@ const Foam::dictionary& Foam::meshRefinement::subDict return finder.dict(); } } - else - { - return dict.subDict(keyword); - } + + return dict.subDict(keyword); } @@ -3271,10 +3266,8 @@ Foam::ITstream& Foam::meshRefinement::lookup return finder.ref().stream(); } } - else - { - return dict.lookup(keyword); - } + + return dict.lookup(keyword); } diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.H b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.H index f3671eb3f0..25e22b9106 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.H +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.H @@ -1481,8 +1481,8 @@ public: //- Print some mesh stats. void printMeshInfo(const bool, const string&) const; - //- Replacement for Time::timeName() : return oldInstance (if - // overwrite_) + //- Replacement for Time::timeName() that returns oldInstance + //- (if overwrite_) word timeName() const; //- Set instance of all local IOobjects diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/PointIntegrateData/PointIntegrateDataI.H b/src/mesh/snappyHexMesh/snappyHexMeshDriver/PointIntegrateData/PointIntegrateDataI.H index c22cdac898..f33d764b1b 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/PointIntegrateData/PointIntegrateDataI.H +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/PointIntegrateData/PointIntegrateDataI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -127,10 +127,8 @@ inline bool Foam::PointIntegrateData::updatePoint this->operator=(edgeInfo); return true; } - else - { - return false; - } + + return false; } @@ -156,10 +154,8 @@ inline bool Foam::PointIntegrateData::updatePoint this->operator=(newPointInfo); return true; } - else - { - return false; - } + + return false; } @@ -182,10 +178,8 @@ inline bool Foam::PointIntegrateData::updatePoint this->operator=(newPointInfo); return true; } - else - { - return false; - } + + return false; } @@ -214,12 +208,11 @@ inline bool Foam::PointIntegrateData::updateEdge this->valid_ = true; return true; } - else - { - return false; - } + + return false; } + //- Same (like operator==) template template diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C index 4ff7ca5279..ff909641ae 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C @@ -234,10 +234,8 @@ bool Foam::snappyLayerDriver::unmarkExtrusion patchDisp[patchPointi] = Zero; return true; } - else - { - return false; - } + + return false; } @@ -1998,10 +1996,8 @@ bool Foam::snappyLayerDriver::sameEdgeNeighbour { return edge(myGlobalFacei, nbrGlobFacei) == edge(eFaces[0], eFaces[1]); } - else - { - return false; - } + + return false; } @@ -2619,6 +2615,7 @@ bool Foam::snappyLayerDriver::cellsUseFace } } } + return false; } diff --git a/src/meshTools/algorithms/PointEdgeWave/PointDataI.H b/src/meshTools/algorithms/PointEdgeWave/PointDataI.H index 77d98c8cba..b1bbceadf8 100644 --- a/src/meshTools/algorithms/PointEdgeWave/PointDataI.H +++ b/src/meshTools/algorithms/PointEdgeWave/PointDataI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2015 OpenFOAM Foundation @@ -109,10 +109,8 @@ inline bool Foam::PointData::updatePoint return true; } - else - { - return false; - } + + return false; } @@ -143,10 +141,8 @@ inline bool Foam::PointData::updatePoint return true; } - else - { - return false; - } + + return false; } @@ -165,10 +161,8 @@ inline bool Foam::PointData::updatePoint return true; } - else - { - return false; - } + + return false; } @@ -202,10 +196,8 @@ inline bool Foam::PointData::updateEdge return true; } - else - { - return false; - } + + return false; } diff --git a/src/meshTools/cellFeatures/cellFeatures.C b/src/meshTools/cellFeatures/cellFeatures.C index ffed44fd56..1236ada9c5 100644 --- a/src/meshTools/cellFeatures/cellFeatures.C +++ b/src/meshTools/cellFeatures/cellFeatures.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -465,15 +465,16 @@ bool Foam::cellFeatures::isFeaturePoint(const label edge0, const label edge1) // Angle larger than criterion return true; } - else - { - return false; - } + + return false; } -bool Foam::cellFeatures::isFeatureVertex(const label facei, const label vertI) - const +bool Foam::cellFeatures::isFeatureVertex +( + const label facei, + const label vertI +) const { if ( diff --git a/src/meshTools/edgeFaceCirculator/edgeFaceCirculatorI.H b/src/meshTools/edgeFaceCirculator/edgeFaceCirculatorI.H index 8d5f6ba2e5..f77ccba860 100644 --- a/src/meshTools/edgeFaceCirculator/edgeFaceCirculatorI.H +++ b/src/meshTools/edgeFaceCirculator/edgeFaceCirculatorI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -208,10 +208,8 @@ Foam::label Foam::edgeFaceCirculator::cellLabel() const { return mesh().faceNeighbour()[faceLabel_]; } - else - { - return -1; - } + + return -1; } diff --git a/src/meshTools/edgeMesh/edgeMeshIO.C b/src/meshTools/edgeMesh/edgeMeshIO.C index 71d05a0a6c..2ec92f2d96 100644 --- a/src/meshTools/edgeMesh/edgeMeshIO.C +++ b/src/meshTools/edgeMesh/edgeMeshIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -65,10 +65,8 @@ bool Foam::edgeMesh::read(const fileName& name) fileName unzipName = name.lessExt(); return read(unzipName, unzipName.ext()); } - else - { - return read(name, ext); - } + + return read(name, ext); } diff --git a/src/meshTools/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.C b/src/meshTools/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.C index 17d593eb40..6e3ab479b4 100644 --- a/src/meshTools/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.C +++ b/src/meshTools/edgeMesh/extendedEdgeMesh/extendedEdgeMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015-2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -190,10 +190,8 @@ Foam::extendedEdgeMesh::classifyFeaturePoint { return CONCAVE; } - else - { - return MIXED; - } + + return MIXED; } @@ -2135,11 +2133,9 @@ Foam::extendedEdgeMesh::classifyEdge { return MULTIPLE; } - else - { - // There is a problem - the edge has no normals - return NONE; - } + + // There is a problem - the edge has no normals + return NONE; } diff --git a/src/meshTools/indexedOctree/treeDataFace.C b/src/meshTools/indexedOctree/treeDataFace.C index bceb585306..bcd09eeb98 100644 --- a/src/meshTools/indexedOctree/treeDataFace.C +++ b/src/meshTools/indexedOctree/treeDataFace.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011, 2017 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011, 2017-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -462,6 +462,7 @@ bool Foam::treeDataFace::overlaps return true; } } + return false; } @@ -554,10 +555,8 @@ bool Foam::treeDataFace::findIntersectOp::operator() intersectionPoint = inter.hitPoint(); return true; } - else - { - return false; - } + + return false; } diff --git a/src/meshTools/indexedOctree/treeDataPoint.C b/src/meshTools/indexedOctree/treeDataPoint.C index 0b5e03737e..8bb8a0594a 100644 --- a/src/meshTools/indexedOctree/treeDataPoint.C +++ b/src/meshTools/indexedOctree/treeDataPoint.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -34,7 +34,7 @@ License namespace Foam { -defineTypeNameAndDebug(treeDataPoint, 0); + defineTypeNameAndDebug(treeDataPoint, 0); } @@ -83,10 +83,8 @@ Foam::pointField Foam::treeDataPoint::shapePoints() const { return pointField(points_, pointLabels_); } - else - { - return points_; - } + + return points_; } diff --git a/src/meshTools/indexedOctree/treeDataPrimitivePatch.C b/src/meshTools/indexedOctree/treeDataPrimitivePatch.C index 1f860ec349..2b25e93bbd 100644 --- a/src/meshTools/indexedOctree/treeDataPrimitivePatch.C +++ b/src/meshTools/indexedOctree/treeDataPrimitivePatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011, 2015-2017 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011, 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -567,10 +567,8 @@ bool Foam::treeDataPrimitivePatch::findSelfIntersectOp::operator() { return findIntersection(tree_, index, start, end, intersectionPoint); } - else - { - return false; - } + + return false; } @@ -637,10 +635,8 @@ bool Foam::treeDataPrimitivePatch::findIntersection return true; } - else - { - return false; - } + + return false; } diff --git a/src/meshTools/meshSearch/meshSearch.C b/src/meshTools/meshSearch/meshSearch.C index c1ed542af9..db1d5ca896 100644 --- a/src/meshTools/meshSearch/meshSearch.C +++ b/src/meshTools/meshSearch/meshSearch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011, \ / A nd | Copyright 2015-2018 OpenCFD Ltd. OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011, 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2018 OpenFOAM Foundation @@ -391,10 +391,8 @@ Foam::label Foam::meshSearch::findCellLinear(const point& location) const { return celli; } - else - { - return -1; - } + + return -1; } @@ -720,10 +718,8 @@ Foam::label Foam::meshSearch::findNearestCell return findNearestCellLinear(location); } } - else - { - return findNearestCellWalk(location, seedCelli); - } + + return findNearestCellWalk(location, seedCelli); } @@ -745,10 +741,8 @@ Foam::label Foam::meshSearch::findNearestFace return findNearestFaceLinear(location); } } - else - { - return findNearestFaceWalk(location, seedFacei); - } + + return findNearestFaceWalk(location, seedFacei); } @@ -771,10 +765,8 @@ Foam::label Foam::meshSearch::findCell return findCellLinear(location); } } - else - { - return findCellWalk(location, seedCelli); - } + + return findCellWalk(location, seedCelli); } @@ -839,10 +831,8 @@ Foam::label Foam::meshSearch::findNearestBoundaryFace return minFacei; } } - else - { - return findNearestBoundaryFaceWalk(location, seedFacei); - } + + return findNearestBoundaryFaceWalk(location, seedFacei); } diff --git a/src/meshTools/meshStructure/pointTopoDistanceDataI.H b/src/meshTools/meshStructure/pointTopoDistanceDataI.H index be97859167..cb21fa1b85 100644 --- a/src/meshTools/meshStructure/pointTopoDistanceDataI.H +++ b/src/meshTools/meshStructure/pointTopoDistanceDataI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2013-2016 OpenFOAM Foundation @@ -27,12 +27,8 @@ License #include "polyMesh.H" -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Null constructor inline Foam::pointTopoDistanceData::pointTopoDistanceData() : data_(-1), @@ -40,7 +36,6 @@ inline Foam::pointTopoDistanceData::pointTopoDistanceData() {} -// Construct from components inline Foam::pointTopoDistanceData::pointTopoDistanceData ( const label data, @@ -126,10 +121,8 @@ inline bool Foam::pointTopoDistanceData::updatePoint distance_ = edgeInfo.distance_ + 1; return true; } - else - { - return false; - } + + return false; } @@ -149,10 +142,8 @@ inline bool Foam::pointTopoDistanceData::updatePoint operator=(newPointInfo); return true; } - else - { - return false; - } + + return false; } @@ -170,10 +161,8 @@ inline bool Foam::pointTopoDistanceData::updatePoint operator=(newPointInfo); return true; } - else - { - return false; - } + + return false; } @@ -194,10 +183,8 @@ inline bool Foam::pointTopoDistanceData::updateEdge operator=(pointInfo); return true; } - else - { - return false; - } + + return false; } diff --git a/src/meshTools/meshStructure/topoDistanceDataI.H b/src/meshTools/meshStructure/topoDistanceDataI.H index 94f2e73587..197ea9cf34 100644 --- a/src/meshTools/meshStructure/topoDistanceDataI.H +++ b/src/meshTools/meshStructure/topoDistanceDataI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -27,12 +27,8 @@ License #include "polyMesh.H" -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Null constructor inline Foam::topoDistanceData::topoDistanceData() : data_(-1), @@ -40,7 +36,6 @@ inline Foam::topoDistanceData::topoDistanceData() {} -// Construct from components inline Foam::topoDistanceData::topoDistanceData ( const label data, @@ -129,10 +124,8 @@ inline bool Foam::topoDistanceData::updateCell operator=(neighbourInfo); return true; } - else - { - return false; - } + + return false; } @@ -156,10 +149,8 @@ inline bool Foam::topoDistanceData::updateFace distance_ = neighbourInfo.distance_ + 1; return true; } - else - { - return false; - } + + return false; } @@ -180,10 +171,8 @@ inline bool Foam::topoDistanceData::updateFace operator=(neighbourInfo); return true; } - else - { - return false; - } + + return false; } diff --git a/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.C b/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.C index 92f9d0df6a..85bb21a09e 100644 --- a/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.C +++ b/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2010, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -385,15 +385,13 @@ bool Foam::primitiveMeshGeometry::checkFaceDotProduct return true; } - else - { - if (report) - { - Info<< "Non-orthogonality check OK.\n" << endl; - } - return false; + if (report) + { + Info<< "Non-orthogonality check OK.\n" << endl; } + + return false; } @@ -497,15 +495,13 @@ bool Foam::primitiveMeshGeometry::checkFacePyramids return true; } - else - { - if (report) - { - Info<< "Face pyramids OK.\n" << endl; - } - return false; + if (report) + { + Info<< "Face pyramids OK.\n" << endl; } + + return false; } @@ -635,16 +631,14 @@ bool Foam::primitiveMeshGeometry::checkFaceSkewness return true; } - else - { - if (report) - { - Info<< "Max skewness = " << 100*maxSkew - << " percent. Face skewness OK.\n" << endl; - } - return false; + if (report) + { + Info<< "Max skewness = " << 100*maxSkew + << " percent. Face skewness OK.\n" << endl; } + + return false; } @@ -717,16 +711,14 @@ bool Foam::primitiveMeshGeometry::checkFaceWeights return true; } - else - { - if (report) - { - Info<< "Min weight = " << minWeight - << " percent. Weights OK.\n" << endl; - } - return false; + if (report) + { + Info<< "Min weight = " << minWeight + << " percent. Weights OK.\n" << endl; } + + return false; } @@ -857,10 +849,8 @@ bool Foam::primitiveMeshGeometry::checkFaceAngles return true; } - else - { - return false; - } + + return false; } @@ -986,10 +976,8 @@ bool Foam::primitiveMeshGeometry::checkFaceAngles // // return true; // } -// else -// { -// return false; -// } +// +// return false; //} @@ -1095,10 +1083,8 @@ bool Foam::primitiveMeshGeometry::checkFaceTwist return true; } - else - { - return false; - } + + return false; } @@ -1156,10 +1142,8 @@ bool Foam::primitiveMeshGeometry::checkFaceArea return true; } - else - { - return false; - } + + return false; } @@ -1257,10 +1241,8 @@ bool Foam::primitiveMeshGeometry::checkCellDeterminant return true; } - else - { - return false; - } + + return false; } diff --git a/src/meshTools/regionSplit/minDataI.H b/src/meshTools/regionSplit/minDataI.H index a9dd364393..98e10927d9 100644 --- a/src/meshTools/regionSplit/minDataI.H +++ b/src/meshTools/regionSplit/minDataI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2014-2016 OpenFOAM Foundation @@ -113,10 +113,8 @@ inline bool Foam::minData::updateCell operator=(neighbourInfo); return true; } - else - { - return false; - } + + return false; } @@ -132,16 +130,13 @@ inline bool Foam::minData::updateFace ) { // From cell to its faces. - if (neighbourInfo.data_ < data_) { operator=(neighbourInfo); return true; } - else - { - return false; - } + + return false; } @@ -161,10 +156,8 @@ inline bool Foam::minData::updateFace operator=(neighbourInfo); return true; } - else - { - return false; - } + + return false; } diff --git a/src/meshTools/searchableSurfaces/searchableSurfaces/searchableSurfaces.C b/src/meshTools/searchableSurfaces/searchableSurfaces/searchableSurfaces.C index a5f3b58000..e175fc0191 100644 --- a/src/meshTools/searchableSurfaces/searchableSurfaces/searchableSurfaces.C +++ b/src/meshTools/searchableSurfaces/searchableSurfaces/searchableSurfaces.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2004-2011, 2015 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2004-2011, 2015-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -86,15 +86,9 @@ bool Foam::searchableSurfaces::connected return false; } } - else - { - return true; - } - } - else - { - return true; } + + return true; } diff --git a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C index 2c02d305a5..06811ab4a1 100644 --- a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C +++ b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C @@ -436,6 +436,7 @@ Foam::label Foam::triSurfaceTools::vertexUsesFace return face1I; } } + return -1; } @@ -615,6 +616,7 @@ Foam::scalar Foam::triSurfaceTools::edgeCosAngle << v1 << " of collapsed edge" << abort(FatalError); } } + return cosAngle; } @@ -1020,6 +1022,7 @@ Foam::surfaceLocation Foam::triSurfaceTools::cutEdge } } } + return cut; } @@ -2030,10 +2033,8 @@ Foam::triSurface Foam::triSurfaceTools::mergePoints true //reuse storage ); } - else - { - return surf; - } + + return surf; } @@ -3057,6 +3058,7 @@ Foam::surfaceLocation Foam::triSurfaceTools::trackToEdge } snapToEnd(s, end, nearest); } + return nearest; } diff --git a/src/overset/cellCellStencil/inverseDistance/meshToMeshDataI.H b/src/overset/cellCellStencil/inverseDistance/meshToMeshDataI.H index 5bc0923fdf..8dbb00c69b 100644 --- a/src/overset/cellCellStencil/inverseDistance/meshToMeshDataI.H +++ b/src/overset/cellCellStencil/inverseDistance/meshToMeshDataI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2017 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,14 +27,12 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Null constructor inline Foam::meshToMeshData::meshToMeshData() : tgtCelli_(-2) {} -// Construct from components inline Foam::meshToMeshData::meshToMeshData(const label tgtCelli) : tgtCelli_(tgtCelli) @@ -141,6 +139,7 @@ inline bool Foam::meshToMeshData::updateCell // Leave unmatched cell for visit from different face } + return false; } @@ -162,10 +161,8 @@ inline bool Foam::meshToMeshData::updateFace tgtCelli_ = neighbourInfo.tgtCelli_; return true; } - else - { - return false; - } + + return false; } @@ -185,10 +182,8 @@ inline bool Foam::meshToMeshData::updateFace tgtCelli_ = neighbourInfo.tgtCelli_; return true; } - else - { - return false; - } + + return false; } @@ -201,14 +196,7 @@ inline bool Foam::meshToMeshData::equal { if (!valid(td)) { - if (!rhs.valid(td)) - { - return true; - } - else - { - return false; - } + return (!rhs.valid(td)); } else { @@ -222,8 +210,7 @@ inline bool Foam::meshToMeshData::equal inline bool Foam::meshToMeshData::operator== ( const Foam::meshToMeshData& rhs -) - const +) const { return tgtCelli_ == rhs.tgtCelli_; } @@ -232,8 +219,7 @@ inline bool Foam::meshToMeshData::operator== inline bool Foam::meshToMeshData::operator!= ( const Foam::meshToMeshData& rhs -) - const +) const { return !(*this == rhs); } diff --git a/src/overset/dynamicOversetFvMesh/dynamicOversetFvMesh.C b/src/overset/dynamicOversetFvMesh/dynamicOversetFvMesh.C index c354832edf..3f59a96aeb 100644 --- a/src/overset/dynamicOversetFvMesh/dynamicOversetFvMesh.C +++ b/src/overset/dynamicOversetFvMesh/dynamicOversetFvMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2014-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -291,10 +291,8 @@ Foam::word Foam::dynamicOversetFvMesh::baseName(const word& name) { return baseName(name.substr(0, name.size()-2)); } - else - { - return name; - } + + return name; } diff --git a/src/regionModels/pyrolysisModels/noPyrolysis/noPyrolysis.C b/src/regionModels/pyrolysisModels/noPyrolysis/noPyrolysis.C index 493cb3db8b..1c260ed934 100644 --- a/src/regionModels/pyrolysisModels/noPyrolysis/noPyrolysis.C +++ b/src/regionModels/pyrolysisModels/noPyrolysis/noPyrolysis.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -68,29 +68,15 @@ void noPyrolysis::constructThermoChemistry() bool noPyrolysis::read() { - if (pyrolysisModel::read()) - { - // no additional info to read - return true; - } - else - { - return false; - } + // No additional info to read + return pyrolysisModel::read(); } bool noPyrolysis::read(const dictionary& dict) { - if (pyrolysisModel::read(dict)) - { - // no additional info to read - return true; - } - else - { - return false; - } + // No additional info to read + return pyrolysisModel::read(dict); } diff --git a/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.C b/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.C index 6ca5a0d428..3e02793430 100644 --- a/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.C +++ b/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -55,10 +55,8 @@ bool pyrolysisModel::read() readPyrolysisControls(); return true; } - else - { - return false; - } + + return false; } @@ -69,10 +67,8 @@ bool pyrolysisModel::read(const dictionary& dict) readPyrolysisControls(); return true; } - else - { - return false; - } + + return false; } diff --git a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C index b6ee3dbf82..33a53483fa 100644 --- a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C +++ b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2011, 2016 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011, 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -71,10 +71,8 @@ bool reactingOneDim::read() readReactingOneDimControls(); return true; } - else - { - return false; - } + + return false; } @@ -85,10 +83,8 @@ bool reactingOneDim::read(const dictionary& dict) readReactingOneDimControls(); return true; } - else - { - return false; - } + + return false; } diff --git a/src/regionModels/pyrolysisModels/thermo/thermo.C b/src/regionModels/pyrolysisModels/thermo/thermo.C index caf891afb0..e400e03964 100644 --- a/src/regionModels/pyrolysisModels/thermo/thermo.C +++ b/src/regionModels/pyrolysisModels/thermo/thermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016 OpenCFD Ltd + \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,10 +62,8 @@ bool thermo::read() readControls(); return true; } - else - { - return false; - } + + return false; } @@ -76,10 +74,8 @@ bool thermo::read(const dictionary& dict) readControls(); return true; } - else - { - return false; - } + + return false; } diff --git a/src/regionModels/regionModel/regionModel1D/regionModel1D.C b/src/regionModels/regionModel/regionModel1D/regionModel1D.C index e10a159955..52713e2025 100644 --- a/src/regionModels/regionModel/regionModel1D/regionModel1D.C +++ b/src/regionModels/regionModel/regionModel1D/regionModel1D.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2010-2011, 2016 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2010-2011, 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -172,10 +172,8 @@ bool Foam::regionModels::regionModel1D::read() { return true; } - else - { - return false; - } + + return false; } @@ -187,10 +185,8 @@ bool Foam::regionModels::regionModel1D::read(const dictionary& dict) return true; } - else - { - return false; - } + + return false; } diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C index ed3f1c4733..2b4c831bd2 100644 --- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -67,10 +67,8 @@ bool kinematicSingleLayer::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/regionModels/surfaceFilmModels/surfaceFilmRegionModel/surfaceFilmRegionModel.C b/src/regionModels/surfaceFilmModels/surfaceFilmRegionModel/surfaceFilmRegionModel.C index 26caf6339d..e0b778e8cb 100644 --- a/src/regionModels/surfaceFilmModels/surfaceFilmRegionModel/surfaceFilmRegionModel.C +++ b/src/regionModels/surfaceFilmModels/surfaceFilmRegionModel/surfaceFilmRegionModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -48,10 +48,8 @@ bool surfaceFilmRegionModel::read() { return true; } - else - { - return false; - } + + return false; } diff --git a/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C b/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C index 1b93199a39..ef8bd28ee1 100644 --- a/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C +++ b/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2016-2017 OpenFOAM Foundation @@ -375,10 +375,8 @@ bool Foam::rigidBodyMeshMotion::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/rigidBodyMeshMotion/rigidBodyMeshMotionSolver/rigidBodyMeshMotionSolver.C b/src/rigidBodyMeshMotion/rigidBodyMeshMotionSolver/rigidBodyMeshMotionSolver.C index e39d0c7b30..639e492d13 100644 --- a/src/rigidBodyMeshMotion/rigidBodyMeshMotionSolver/rigidBodyMeshMotionSolver.C +++ b/src/rigidBodyMeshMotion/rigidBodyMeshMotionSolver/rigidBodyMeshMotionSolver.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2016-2017 OpenFOAM Foundation @@ -311,10 +311,8 @@ bool Foam::rigidBodyMeshMotionSolver::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C index 8b6898faf5..1a31fd4de3 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2013-2017 OpenFOAM Foundation @@ -289,10 +289,8 @@ bool Foam::sixDoFRigidBodyMotionSolver::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.C b/src/thermophysicalModels/basic/heThermo/heThermo.C index c71adf85ed..af0fc30ab6 100644 --- a/src/thermophysicalModels/basic/heThermo/heThermo.C +++ b/src/thermophysicalModels/basic/heThermo/heThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015-2017 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2015-2017, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -919,10 +919,8 @@ bool Foam::heThermo::read() MixtureType::read(*this); return true; } - else - { - return false; - } + + return false; } diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISAT.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISAT.C index 16ba882a14..afb16ad856 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISAT.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/ISAT.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2016-2017 OpenFOAM Foundation @@ -295,11 +295,9 @@ bool Foam::chemistryTabulationMethods::ISAT::grow { return phi0->grow(phiq); } + // The actual solution and the approximation given by ISAT are too different - else - { - return false; - } + return false; } @@ -501,12 +499,11 @@ bool Foam::chemistryTabulationMethods::ISAT::retrieve ++nRetrieved_; return true; } - else - { - // This point is reached when every retrieve trials have failed - // or if the tree is empty - return false; - } + + + // This point is reached when every retrieve trials have failed + // or if the tree is empty + return false; } 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 2e129592ed..f93df6a225 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/binaryTree/binaryTree.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2016-2017 OpenFOAM Foundation @@ -117,10 +117,9 @@ bool Foam::binaryTree::inSubTree return false; } } - else // test for n2ndSearch is done in the call of inSubTree - { - return inSubTree(phiq, y->nodeRight(), x); - } + + // Test for n2ndSearch is done in the call of inSubTree + return inSubTree(phiq, y->nodeRight(), x); } else { @@ -159,16 +158,12 @@ bool Foam::binaryTree::inSubTree return false; } } - else - { - return inSubTree(phiq, y->nodeLeft(), x); - } + + return inSubTree(phiq, y->nodeLeft(), x); } } - else - { - return false; - } + + return false; } @@ -238,13 +233,10 @@ Foam::binaryTree::chemPSibling(node* y) { return y->parent()->leafLeft(); } - else - { - FatalErrorInFunction - << "wrong addressing of the initial node" - << exit(FatalError); - return nullptr; - } + + FatalErrorInFunction + << "wrong addressing of the initial node" + << exit(FatalError); } // the binaryNode is root_ and has no sibling @@ -269,14 +261,12 @@ Foam::binaryTree::chemPSibling(chemPoint* x) // x is on the right, return left side return x->node()->leafLeft(); } - else - { - FatalErrorInFunction - << "wrong addressing of the initial leaf" - << exit(FatalError); - return nullptr; - } + + FatalErrorInFunction + << "wrong addressing of the initial leaf" + << exit(FatalError); } + // there is only one leaf attached to the root_, no sibling return nullptr; } @@ -297,14 +287,12 @@ Foam::binaryTree::nodeSibling(node* y) { return y->parent()->nodeLeft(); } - else - { - FatalErrorInFunction - << "wrong addressing of the initial node" - << exit(FatalError); - return nullptr; - } + + FatalErrorInFunction + << "wrong addressing of the initial node" + << exit(FatalError); } + return nullptr; } @@ -325,14 +313,12 @@ Foam::binaryTree::nodeSibling(chemPoint* x) // x is on the right, return left side return x->node()->nodeLeft(); } - else - { - FatalErrorInFunction - << "wrong addressing of the initial leaf" - << exit(FatalError); - return nullptr; - } + + FatalErrorInFunction + << "wrong addressing of the initial leaf" + << exit(FatalError); } + return nullptr; } @@ -556,10 +542,11 @@ bool Foam::binaryTree::secondaryBTSearch { return true; } + // if we reach this point, no leafs were found at this depth or lower // we move upward in the tree node* y = x->node(); - while((y->parent()!= nullptr) && (n2ndSearch_ < max2ndSearch_)) + while ((y->parent()!= nullptr) && (n2ndSearch_ < max2ndSearch_)) { xS = chemPSibling(y); if (xS != nullptr) @@ -577,15 +564,14 @@ bool Foam::binaryTree::secondaryBTSearch } y = y->parent(); } + // if we reach this point it is either because // we did not find another covering EOA in the entire tree or // we reach the maximum number of secondary search return false; } - else - { - return false; - } + + return false; } @@ -748,18 +734,16 @@ template Foam::chemPointISAT* Foam::binaryTree::treeMin(node* subTreeRoot) { - if (subTreeRoot!=nullptr) + if (subTreeRoot != nullptr) { - while(subTreeRoot->nodeLeft() != nullptr) + while (subTreeRoot->nodeLeft() != nullptr) { subTreeRoot = subTreeRoot->nodeLeft(); } return subTreeRoot->leafLeft(); } - else - { - return nullptr; - } + + return nullptr; } @@ -798,19 +782,16 @@ Foam::binaryTree::treeSuccessor(chemPoint* x) } y = y->parent(); } + // when we reach this point, y points to the root and // never entered in the if loop (coming from the right) // so we are at the tree maximum and there is no successor return nullptr; } - else - { - FatalErrorInFunction - << "inconsistent structure of the tree, no leaf and no node" - << exit(FatalError); - return nullptr; - } + FatalErrorInFunction + << "inconsistent structure of the tree, no leaf and no node" + << exit(FatalError); } return nullptr; 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 4e8227f824..bdc7debce3 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/tabulation/ISAT/chemPointISAT/chemPointISAT.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | + \\ / A nd | Copyright (C) 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2016-2017 OpenFOAM Foundation @@ -524,10 +524,8 @@ bool Foam::chemPointISAT::inEOA(const scalarField& phiq) } return false; } - else - { - return true; - } + + return true; } @@ -833,10 +831,8 @@ simplifiedToCompleteIndex { return completeSpaceSize_-nAdditionalEqns_ + 2; } - else - { - return -1; - } + + return -1; } diff --git a/src/thermophysicalModels/radiation/radiationModels/P1/P1.C b/src/thermophysicalModels/radiation/radiationModels/P1/P1.C index 7392feba83..a8ef86c266 100644 --- a/src/thermophysicalModels/radiation/radiationModels/P1/P1.C +++ b/src/thermophysicalModels/radiation/radiationModels/P1/P1.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2017 OpenFOAM Foundation @@ -205,10 +205,8 @@ bool Foam::radiation::P1::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C b/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C index 5b57512a09..a84d2c3b14 100644 --- a/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C +++ b/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2011, 2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2018 OpenFOAM Foundation @@ -422,10 +422,8 @@ bool Foam::radiation::fvDOM::read() return true; } - else - { - return false; - } + + return false; } diff --git a/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C b/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C index 2c6852e58b..b37cb3ee38 100644 --- a/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C +++ b/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2016-2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2015 OpenFOAM Foundation @@ -900,10 +900,8 @@ bool Foam::radiation::solarLoad::read() { return true; } - else - { - return false; - } + + return false; } diff --git a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C index bb64710312..793f097e0f 100644 --- a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C +++ b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011, 2016 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2011, 2016-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- | Copyright (C) 2011-2016 OpenFOAM Foundation @@ -348,10 +348,8 @@ bool Foam::radiation::viewFactor::read() { return true; } - else - { - return false; - } + + return false; }