OpenFOAM: Rationalized the naming of scalar limits

In early versions of OpenFOAM the scalar limits were simple macro replacements and the
names were capitalized to indicate this.  The scalar limits are now static
constants which is a huge improvement on the use of macros and for consistency
the names have been changed to camel-case to indicate this and improve
readability of the code:

    GREAT -> great
    ROOTGREAT -> rootGreat
    VGREAT -> vGreat
    ROOTVGREAT -> rootVGreat
    SMALL -> small
    ROOTSMALL -> rootSmall
    VSMALL -> vSmall
    ROOTVSMALL -> rootVSmall

The original capitalized are still currently supported but their use is
deprecated.
This commit is contained in:
Henry Weller
2018-01-25 09:46:37 +00:00
parent 2c882ab4a7
commit fc2b2d0c05
729 changed files with 2822 additions and 2809 deletions

View File

@ -75,7 +75,7 @@ Foam::scalar Foam::calcVertexNormalWeight
const vector e1 = points[f[index]] - points[f[f.fcIndex(index)]];
const vector e2 = points[f[index]] - points[f[f.rcIndex(index)]];
return mag(fN)/(magSqr(e1)*magSqr(e2) + VSMALL);
return mag(fN)/(magSqr(e1)*magSqr(e2) + vSmall);
}
@ -91,9 +91,9 @@ Foam::point Foam::randomPointInPlane(const plane& p)
const scalar perturbY = refPt.y() + 1e-3;
const scalar perturbZ = refPt.z() + 1e-3;
if (mag(planeCoeffs[2]) < SMALL)
if (mag(planeCoeffs[2]) < small)
{
if (mag(planeCoeffs[1]) < SMALL)
if (mag(planeCoeffs[1]) < small)
{
const scalar x =
-1.0
@ -162,7 +162,7 @@ Foam::triadField Foam::calcVertexCoordSys
const point& pt = points[pI];
const vector& normal = pointNormals[meshPointMap[pI]];
if (mag(normal) < SMALL)
if (mag(normal) < small)
{
pointCoordSys[meshPointMap[pI]] = triad::unset;
continue;
@ -219,7 +219,7 @@ Foam::vectorField Foam::calcVertexNormals(const triSurface& surf)
pointNormals[pI] += weight*fN;
}
pointNormals[pI] /= mag(pointNormals[pI]) + VSMALL;
pointNormals[pI] /= mag(pointNormals[pI]) + vSmall;
}
return pointNormals;
@ -289,7 +289,7 @@ Foam::triSurfacePointScalarField Foam::calcCurvature
const vector eN = f.normal(points);
const vector e1 = (e0 ^ eN);
if (magSqr(eN) < ROOTVSMALL)
if (magSqr(eN) < rootVSmall)
{
continue;
}
@ -405,7 +405,7 @@ Foam::triSurfacePointScalarField Foam::calcCurvature
forAll(curvaturePointField, pI)
{
pointFundamentalTensors[pI] /= (accumulatedWeights[pI] + SMALL);
pointFundamentalTensors[pI] /= (accumulatedWeights[pI] + small);
vector2D principalCurvatures = eigenValues(pointFundamentalTensors[pI]);