STYLE: Code clean-up

This commit is contained in:
Andrew Heather
2018-12-17 12:02:55 +00:00
parent 4c14bc66ef
commit e145034a6d
6 changed files with 37 additions and 131 deletions

View File

@ -228,13 +228,6 @@ Foam::functionObjects::pressure::pressure
rhoInfInitialised_(false)
{
read(dict);
dimensionSet pDims(dimPressure);
if (calcCoeff_)
{
pDims /= dimPressure;
}
}

View File

@ -183,48 +183,39 @@ bool Foam::functionObjects::wallShearStress::execute()
volVectorField& wallShearStress =
mesh_.lookupObjectRef<volVectorField>(type());
bool ok = false;
// compressible
if (!ok)
// Compressible
{
typedef compressible::turbulenceModel turbType;
const turbType* modelPtr =
findObject<turbType>(turbulenceModel::propertiesName);
ok = modelPtr;
if (ok)
if (modelPtr)
{
calcShearStress(modelPtr->devRhoReff(), wallShearStress);
return true;
}
}
// incompressible
if (!ok)
// Incompressible
{
typedef incompressible::turbulenceModel turbType;
const turbType* modelPtr =
findObject<turbType>(turbulenceModel::propertiesName);
ok = modelPtr;
if (ok)
if (modelPtr)
{
calcShearStress(modelPtr->devReff(), wallShearStress);
return true;
}
}
if (!ok)
{
FatalErrorInFunction
<< "Unable to find turbulence model in the "
<< "database" << exit(FatalError);
}
FatalErrorInFunction
<< "Unable to find turbulence model in the "
<< "database" << exit(FatalError);
return ok;
return false;
}