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

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -32,7 +32,7 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
template<class Type>
Foam::scalar Foam::indexedOctree<Type>::perturbTol_ = 10*SMALL;
Foam::scalar Foam::indexedOctree<Type>::perturbTol_ = 10*small;
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
@ -678,13 +678,13 @@ Foam::point Foam::indexedOctree<Type>::pushPoint
if (mag(pt[dir]-bb.min()[dir]) < mag(perturbVec[dir]))
{
// Close to 'left' side. Push well beyond left side.
scalar perturbDist = perturbVec[dir] + ROOTVSMALL;
scalar perturbDist = perturbVec[dir] + rootVSmall;
perturbedPt[dir] = bb.min()[dir] + perturbDist;
}
else if (mag(pt[dir]-bb.max()[dir]) < mag(perturbVec[dir]))
{
// Close to 'right' side. Push well beyond right side.
scalar perturbDist = perturbVec[dir] + ROOTVSMALL;
scalar perturbDist = perturbVec[dir] + rootVSmall;
perturbedPt[dir] = bb.max()[dir] - perturbDist;
}
}
@ -695,12 +695,12 @@ Foam::point Foam::indexedOctree<Type>::pushPoint
{
if (mag(pt[dir]-bb.min()[dir]) < mag(perturbVec[dir]))
{
scalar perturbDist = perturbVec[dir] + ROOTVSMALL;
scalar perturbDist = perturbVec[dir] + rootVSmall;
perturbedPt[dir] = bb.min()[dir] - perturbDist;
}
else if (mag(pt[dir]-bb.max()[dir]) < mag(perturbVec[dir]))
{
scalar perturbDist = perturbVec[dir] + ROOTVSMALL;
scalar perturbDist = perturbVec[dir] + rootVSmall;
perturbedPt[dir] = bb.max()[dir] + perturbDist;
}
}
@ -751,22 +751,22 @@ Foam::point Foam::indexedOctree<Type>::pushPoint
{
if (pushInside)
{
perturbedPt[0] = bb.min()[0] + (perturbVec[0] + ROOTVSMALL);
perturbedPt[0] = bb.min()[0] + (perturbVec[0] + rootVSmall);
}
else
{
perturbedPt[0] = bb.min()[0] - (perturbVec[0] + ROOTVSMALL);
perturbedPt[0] = bb.min()[0] - (perturbVec[0] + rootVSmall);
}
}
else if (faceID & treeBoundBox::RIGHTBIT)
{
if (pushInside)
{
perturbedPt[0] = bb.max()[0] - (perturbVec[0] + ROOTVSMALL);
perturbedPt[0] = bb.max()[0] - (perturbVec[0] + rootVSmall);
}
else
{
perturbedPt[0] = bb.max()[0] + (perturbVec[0] + ROOTVSMALL);
perturbedPt[0] = bb.max()[0] + (perturbVec[0] + rootVSmall);
}
}
@ -774,22 +774,22 @@ Foam::point Foam::indexedOctree<Type>::pushPoint
{
if (pushInside)
{
perturbedPt[1] = bb.min()[1] + (perturbVec[1] + ROOTVSMALL);
perturbedPt[1] = bb.min()[1] + (perturbVec[1] + rootVSmall);
}
else
{
perturbedPt[1] = bb.min()[1] - (perturbVec[1] + ROOTVSMALL);
perturbedPt[1] = bb.min()[1] - (perturbVec[1] + rootVSmall);
}
}
else if (faceID & treeBoundBox::TOPBIT)
{
if (pushInside)
{
perturbedPt[1] = bb.max()[1] - (perturbVec[1] + ROOTVSMALL);
perturbedPt[1] = bb.max()[1] - (perturbVec[1] + rootVSmall);
}
else
{
perturbedPt[1] = bb.max()[1] + (perturbVec[1] + ROOTVSMALL);
perturbedPt[1] = bb.max()[1] + (perturbVec[1] + rootVSmall);
}
}
@ -797,22 +797,22 @@ Foam::point Foam::indexedOctree<Type>::pushPoint
{
if (pushInside)
{
perturbedPt[2] = bb.min()[2] + (perturbVec[2] + ROOTVSMALL);
perturbedPt[2] = bb.min()[2] + (perturbVec[2] + rootVSmall);
}
else
{
perturbedPt[2] = bb.min()[2] - (perturbVec[2] + ROOTVSMALL);
perturbedPt[2] = bb.min()[2] - (perturbVec[2] + rootVSmall);
}
}
else if (faceID & treeBoundBox::FRONTBIT)
{
if (pushInside)
{
perturbedPt[2] = bb.max()[2] - (perturbVec[2] + ROOTVSMALL);
perturbedPt[2] = bb.max()[2] - (perturbVec[2] + rootVSmall);
}
else
{
perturbedPt[2] = bb.max()[2] + (perturbVec[2] + ROOTVSMALL);
perturbedPt[2] = bb.max()[2] + (perturbVec[2] + rootVSmall);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -45,8 +45,8 @@ Foam::treeBoundBox Foam::treeDataCell::calcCellBb(const label celli) const
treeBoundBox cellBb
(
vector(GREAT, GREAT, GREAT),
vector(-GREAT, -GREAT, -GREAT)
vector(great, great, great),
vector(-great, -great, -great)
);
const cell& cFaces = cells[celli];