STYLE: reduced nesting on return branching

This commit is contained in:
Mark Olesen
2019-02-13 08:06:36 +01:00
parent f3d9c8e2be
commit 6c68c4fe13
208 changed files with 1052 additions and 1759 deletions

View File

@ -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<ReactionThermo>::read()
{
return true;
}
else
{
return false;
}
return false;
}

View File

@ -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<ReactionThermo>::read()
return true;
}
else
{
return false;
}
return false;
}

View File

@ -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<ReactionThermo, ThermoType>::read()
reactionRateFlameArea_->read(this->coeffs());
return true;
}
else
{
return false;
}
return false;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -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<ReactionThermo>::read()
this->coeffs().readEntry("Cmix", Cmix_);
return true;
}
else
{
return false;
}
return false;
}

View File

@ -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<ReactionThermo, ThermoType>::read()
this->coeffs().readIfPresent("oxidant", oxidantName_);
return true;
}
else
{
return false;
}
return false;
}

View File

@ -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<ReactionThermo, ThermoType>::read()
this->coeffs().readEntry("Cd", Cd_);
return true;
}
else
{
return false;
}
return false;
}

View File

@ -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<ReactionThermo, ThermoType>::read()
this->coeffs().readEntry("CEDC", CEDC_);
return true;
}
else
{
return false;
}
return false;
}

View File

@ -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<ReactionThermo, ThermoType>::read()
this->coeffs().readEntry("C", C_);
return true;
}
else
{
return false;
}
return false;
}

View File

@ -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<ReactionThermo>::read()
this->coeffs().lookupOrDefault("integrateReactionRate", true);
return true;
}
else
{
return false;
}
return false;
}

View File

@ -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<ReactionThermo>::Qdot() const
template<class ReactionThermo>
bool Foam::combustionModels::noCombustion<ReactionThermo>::read()
{
if (ThermoCombustion<ReactionThermo>::read())
{
return true;
}
else
{
return false;
}
return ThermoCombustion<ReactionThermo>::read();
}

View File

@ -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<fvScalarMatrix> singleStepCombustion<ReactionThermo, ThermoType>::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<ReactionThermo, ThermoType>::read()
{
return true;
}
else
{
return false;
}
return false;
}

View File

@ -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<ReactionThermo>::read()
combustionModelPtr_->read();
return true;
}
else
{
return false;
}
return false;
}