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-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -62,7 +62,7 @@ Foam::ODESolver::ODESolver(const ODESystem& ode, const dictionary& dict)
odes_(ode),
maxN_(ode.nEqns()),
n_(ode.nEqns()),
absTol_(n_, dict.lookupOrDefault<scalar>("absTol", SMALL)),
absTol_(n_, dict.lookupOrDefault<scalar>("absTol", small)),
relTol_(n_, dict.lookupOrDefault<scalar>("relTol", 1e-4)),
maxSteps_(dict.lookupOrDefault<scalar>("maxSteps", 10000))
{}

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
@ -102,7 +102,7 @@ void Foam::SIBS::solve
if (relTol_[0] != epsOld_)
{
dxTry = xNew_ = -GREAT;
dxTry = xNew_ = -great;
scalar eps1 = safe1*relTol_[0];
a_[0] = nSeq_[0] + 1;
@ -153,7 +153,7 @@ void Foam::SIBS::solve
label km=0;
label reduct=0;
scalar maxErr = SMALL;
scalar maxErr = small;
for (;;)
{
@ -177,7 +177,7 @@ void Foam::SIBS::solve
if (k != 0)
{
maxErr = SMALL;
maxErr = small;
for (label i=0; i<n_; i++)
{
maxErr = max
@ -234,7 +234,7 @@ void Foam::SIBS::solve
x = xNew_;
first_ = 0;
scalar wrkmin = GREAT;
scalar wrkmin = great;
scalar scale = 1.0;
for (label kk=0; kk<=km; kk++)

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
@ -81,7 +81,7 @@ void Foam::adaptiveSolver::solve
scalar scale = max(safeScale_*pow(err, -alphaDec_), minScale_);
dx *= scale;
if (dx < VSMALL)
if (dx < vSmall)
{
FatalErrorInFunction
<< "stepsize underflow"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -153,7 +153,7 @@ bool Foam::seulex::seul
LUBacksubstitute(a_, pivotIndices_, dy_);
const scalar denom = min(1, dy1 + SMALL);
const scalar denom = min(1, dy1 + small);
scalar dy2 = 0;
for (label i=0; i<n_; i++)
{
@ -243,7 +243,7 @@ void Foam::seulex::solve
stepState& step
) const
{
temp_[0] = GREAT;
temp_[0] = great;
scalar dx = step.dxTry;
y0_ = y;
dxOpt_[0] = mag(0.1*dx);
@ -283,7 +283,7 @@ void Foam::seulex::solve
firstk = false;
step.reject = false;
if (mag(dx) <= mag(x)*sqr(SMALL))
if (mag(dx) <= mag(x)*sqr(small))
{
WarningInFunction
<< "step size underflow :" << dx << endl;
@ -324,7 +324,7 @@ void Foam::seulex::solve
err += sqr((y[i] - table_(0, i))/scale_[i]);
}
err = sqrt(err/n_);
if (err > 1/SMALL || (k > 1 && err >= errOld))
if (err > 1/small || (k > 1 && err >= errOld))
{
step.reject = true;
dxNew = mag(dx)*stepFactor5_;

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];

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
@ -291,7 +291,7 @@ Type Foam::Distribution<Type>::median() const
break;
}
else if (mag(normDist[nD].second()) > VSMALL)
else if (mag(normDist[nD].second()) > vSmall)
{
cumulative +=
normDist[nD].second()*component(binWidth_, cmpt);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -127,7 +127,7 @@ public:
//- Convert a version number into an index
int numberToIndex(const scalar num) const
{
return int(10*num + SMALL);
return int(10*num + small);
}
//- Return major version

View File

@ -74,7 +74,7 @@ Foam::Time::fmtflags Foam::Time::format_(Foam::Time::general);
int Foam::Time::precision_(6);
const int Foam::Time::maxPrecision_(3 - log10(SMALL));
const int Foam::Time::maxPrecision_(3 - log10(small));
Foam::word Foam::Time::controlDictName("controlDict");
@ -84,7 +84,7 @@ Foam::word Foam::Time::controlDictName("controlDict");
void Foam::Time::adjustDeltaT()
{
bool adjustTime = false;
scalar timeToNextWrite = VGREAT;
scalar timeToNextWrite = vGreat;
if (writeControl_ == wcAdjustableRunTime)
{
@ -98,7 +98,7 @@ void Foam::Time::adjustDeltaT()
if (adjustTime)
{
scalar nSteps = timeToNextWrite/deltaT_ - SMALL;
scalar nSteps = timeToNextWrite/deltaT_ - small;
// For tiny deltaT the label can overflow!
if (nSteps < labelMax)
@ -370,7 +370,7 @@ Foam::Time::Time
stopAt_(saEndTime),
writeControl_(wcTimeStep),
writeInterval_(GREAT),
writeInterval_(great),
purgeWrite_(0),
writeOnce_(false),
subCycling_(false),
@ -446,7 +446,7 @@ Foam::Time::Time
stopAt_(saEndTime),
writeControl_(wcTimeStep),
writeInterval_(GREAT),
writeInterval_(great),
purgeWrite_(0),
writeOnce_(false),
subCycling_(false),
@ -529,7 +529,7 @@ Foam::Time::Time
stopAt_(saEndTime),
writeControl_(wcTimeStep),
writeInterval_(GREAT),
writeInterval_(great),
purgeWrite_(0),
writeOnce_(false),
subCycling_(false),
@ -608,7 +608,7 @@ Foam::Time::Time
stopAt_(saEndTime),
writeControl_(wcTimeStep),
writeInterval_(GREAT),
writeInterval_(great),
purgeWrite_(0),
writeOnce_(false),
subCycling_(false),
@ -718,7 +718,7 @@ Foam::instant Foam::Time::findClosestTime(const scalar t) const
}
label nearestIndex = -1;
scalar deltaT = GREAT;
scalar deltaT = great;
for (label timei=1; timei < timeDirs.size(); ++timei)
{
@ -742,7 +742,7 @@ Foam::label Foam::Time::findClosestTimeIndex
)
{
label nearestIndex = -1;
scalar deltaT = GREAT;
scalar deltaT = great;
forAll(timeDirs, timei)
{
@ -850,7 +850,7 @@ bool Foam::Time::stopAt(const stopAtControls sa) const
}
else
{
endTime_ = GREAT;
endTime_ = great;
}
return changed;
}
@ -996,7 +996,7 @@ Foam::Time& Foam::Time::operator++()
if (!subCycling_)
{
// If the time is very close to zero reset to zero
if (mag(value()) < 10*SMALL*deltaT_)
if (mag(value()) < 10*small*deltaT_)
{
setTime(0.0, timeIndex_);
}
@ -1114,13 +1114,13 @@ Foam::Time& Foam::Time::operator++()
{
// Tolerance used when testing time equivalence
const scalar timeTol =
max(min(pow(10.0, -precision_), 0.1*deltaT_), SMALL);
max(min(pow(10.0, -precision_), 0.1*deltaT_), small);
// User-time equivalent of deltaT
const scalar userDeltaT = timeToUserTime(deltaT_);
// Time value obtained by reading timeName
scalar timeNameValue = -VGREAT;
scalar timeNameValue = -vGreat;
// Check that new time representation differs from old one
// reinterpretation of the word
@ -1164,7 +1164,7 @@ Foam::Time& Foam::Time::operator++()
}
// Check if round-off error caused time-reversal
scalar oldTimeNameValue = -VGREAT;
scalar oldTimeNameValue = -vGreat;
if
(
readScalar(oldTimeName.c_str(), oldTimeNameValue)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -343,7 +343,7 @@ void Foam::Time::readDict()
}
else
{
endTime_ = GREAT;
endTime_ = great;
}
}
else if (!controlDict_.readIfPresent("endTime", endTime_))

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -58,7 +58,7 @@ Foam::instant::instant(const word& tname)
bool Foam::instant::equal(const scalar b) const
{
return (value_ < b + SMALL && value_ > b - SMALL);
return (value_ < b + small && value_ > b - small);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -72,7 +72,7 @@ Foam::List<bool> Foam::timeSelector::selected(const instantList& Times) const
scalar target = operator[](rangeI).value();
int nearestIndex = -1;
scalar nearestDiff = Foam::GREAT;
scalar nearestDiff = Foam::great;
forAll(Times, timeI)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -69,8 +69,8 @@ Foam::functionObjects::timeControl::timeControl
functionObject(name),
time_(t),
dict_(dict),
timeStart_(-VGREAT),
timeEnd_(VGREAT),
timeStart_(-vGreat),
timeEnd_(vGreat),
nStepsToStartTimeChange_
(
dict.lookupOrDefault("nStepsToStartTimeChange", 3)
@ -140,7 +140,7 @@ bool Foam::functionObjects::timeControl::adjustTimeStep()
scalar deltaT = time_.deltaTValue();
scalar nSteps = timeToNextWrite/deltaT - SMALL;
scalar nSteps = timeToNextWrite/deltaT - small;
// functionObjects modify deltaT within nStepsToStartTimeChange
// NOTE: Potential problems arise if two function objects dump within

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -70,10 +70,10 @@ class timeControl
// Optional user inputs
//- Activation time - defaults to -VGREAT
//- Activation time - defaults to -vGreat
scalar timeStart_;
//- De-activation time - defaults to VGREAT
//- De-activation time - defaults to vGreat
scalar timeEnd_;
//- Number of steps before the dump-time during which deltaT

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -32,7 +32,7 @@ License
namespace Foam
{
defineTypeNameAndDebug(dimensionSet, 1);
const scalar dimensionSet::smallExponent = SMALL;
const scalar dimensionSet::smallExponent = small;
}

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
@ -58,9 +58,9 @@ void inv(Field<symmTensor>& tf, const UList<symmTensor>& tf1)
scalar scale = magSqr(tf1[0]);
Vector<bool> removeCmpts
(
magSqr(tf1[0].xx())/scale < SMALL,
magSqr(tf1[0].yy())/scale < SMALL,
magSqr(tf1[0].zz())/scale < SMALL
magSqr(tf1[0].xx())/scale < small,
magSqr(tf1[0].yy())/scale < small,
magSqr(tf1[0].zz())/scale < small
);
if (removeCmpts.x() || removeCmpts.y() || removeCmpts.z())

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
@ -56,9 +56,9 @@ void inv(Field<tensor>& tf, const UList<tensor>& tf1)
scalar scale = magSqr(tf1[0]);
Vector<bool> removeCmpts
(
magSqr(tf1[0].xx())/scale < SMALL,
magSqr(tf1[0].yy())/scale < SMALL,
magSqr(tf1[0].zz())/scale < SMALL
magSqr(tf1[0].xx())/scale < small,
magSqr(tf1[0].yy())/scale < small,
magSqr(tf1[0].zz())/scale < small
);
if (removeCmpts.x() || removeCmpts.y() || removeCmpts.z())

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
@ -76,7 +76,7 @@ void Foam::transformPoints
vector T = tr.t();
// Check if any translation
if (mag(T) > VSMALL)
if (mag(T) > vSmall)
{
TFOR_ALL_F_OP_F_OP_S(vector, rtf, =, vector, tf, -, vector, T);
}
@ -86,7 +86,7 @@ void Foam::transformPoints
}
// Check if any rotation
if (mag(tr.r().R() - I) > SMALL)
if (mag(tr.r().R() - I) > small)
{
transform(rtf, tr.r(), rtf);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -56,7 +56,7 @@ Foam::Pair<Foam::scalar> linearInterpolationWeights::integrationWeights
scalar s = (t-samples_[i])/(samples_[i+1]-samples_[i]);
if (s < -SMALL || s > 1+SMALL)
if (s < -small || s > 1+small)
{
FatalErrorInFunction
<< "Value " << t << " outside range " << samples_[i]
@ -159,7 +159,7 @@ bool linearInterpolationWeights::integrationWeights
scalarField& weights
) const
{
if (t2 < t1-VSMALL)
if (t2 < t1-vSmall)
{
FatalErrorInFunction
<< "Integration should be in positive direction."

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -62,7 +62,7 @@ splineInterpolationWeights::splineInterpolationWeights
{
scalar d = samples_[i]-samples[i-1];
if (mag(d-interval) > SMALL)
if (mag(d-interval) > small)
{
WarningInFunction
<< "Spline interpolation only valid for constant intervals."

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
@ -48,7 +48,7 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcPointAddressing() const
pointWeightsPtr_ = new FieldField<Field, scalar>(toPatch_.nPoints());
FieldField<Field, scalar>& pointWeights = *pointWeightsPtr_;
pointDistancePtr_ = new scalarField(toPatch_.nPoints(), GREAT);
pointDistancePtr_ = new scalarField(toPatch_.nPoints(), great);
scalarField& pointDistance = *pointDistancePtr_;
const pointField& fromPatchPoints = fromPatch_.localPoints();
@ -118,7 +118,7 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcPointAddressing() const
// Grab hit point
hitPoint = curHit.hitPoint();
}
else if (projectionTol_ > SMALL)
else if (projectionTol_ > small)
{
// Check for a near miss
pointHit ph =
@ -140,7 +140,7 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcPointAddressing() const
);
// Calculate the local tolerance
scalar minEdgeLength = GREAT;
scalar minEdgeLength = great;
// Do shortest edge of hit object
edgeList hitFaceEdges =
@ -218,7 +218,7 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcPointAddressing() const
hitFacePoints[masterPointi]
- hitPoint
)
+ VSMALL
+ vSmall
);
}
@ -238,7 +238,7 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcFaceAddressing() const
faceWeightsPtr_ = new FieldField<Field, scalar>(toPatch_.size());
FieldField<Field, scalar>& faceWeights = *faceWeightsPtr_;
faceDistancePtr_ = new scalarField(toPatch_.size(), GREAT);
faceDistancePtr_ = new scalarField(toPatch_.size(), great);
scalarField& faceDistance = *faceDistancePtr_;
if (debug)
@ -337,7 +337,7 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcFaceAddressing() const
fromPatchFaceCentres[neighbours[nI]]
- curHit.hitPoint()
)
+ VSMALL
+ vSmall
);
}
}

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
@ -172,7 +172,7 @@ public:
//- Set the projection tolerance, returning the previous value
static scalar setProjectionTol(const scalar t)
{
if (t < -VSMALL)
if (t < -vSmall)
{
FatalErrorInFunction
<< abort(FatalError);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -144,7 +144,7 @@ Type Foam::uniformInterpolationTable<Type>::interpolate(scalar x) const
{
if (bound_)
{
x = max(min(xMax() - SMALL*dx_, x), x0_);
x = max(min(xMax() - small*dx_, x), x0_);
}
else
{

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
@ -67,7 +67,7 @@ Foam::DiagonalMatrix<Type>& Foam::DiagonalMatrix<Type>::invert()
forAll(*this, i)
{
Type x = this->operator[](i);
if (mag(x) < VSMALL)
if (mag(x) < vSmall)
{
this->operator[](i) = Type(0);
}
@ -89,7 +89,7 @@ Foam::DiagonalMatrix<Type> Foam::inv(const DiagonalMatrix<Type>& A)
forAll(A, i)
{
Type x = A[i];
if (mag(x) < VSMALL)
if (mag(x) < vSmall)
{
Ainv[i] = Type(0);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -165,7 +165,7 @@ Foam::LUscalarMatrix::LUscalarMatrix
Pout<< " connects to upper cells :";
for (label columnI = rowI+1; columnI < nColumns; columnI++)
{
if (mag(row[columnI]) > SMALL)
if (mag(row[columnI]) > small)
{
Pout<< ' ' << columnI << " (coeff:" << row[columnI]
<< ")";
@ -175,7 +175,7 @@ Foam::LUscalarMatrix::LUscalarMatrix
Pout<< " connects to lower cells :";
for (label columnI = 0; columnI < rowI; columnI++)
{
if (mag(row[columnI]) > SMALL)
if (mag(row[columnI]) > small)
{
Pout<< ' ' << columnI << " (coeff:" << row[columnI]
<< ")";

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -288,7 +288,7 @@ template<> \
const scalar solverPerformance##Type::small_(1e-20); \
\
template<> \
const scalar solverPerformance##Type::vsmall_(VSMALL); \
const scalar solverPerformance##Type::vsmall_(vSmall); \
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -172,7 +172,7 @@ void Foam::QRMatrix<MatrixType>::solvex
sum -= x[j]*R_(i, j);
}
if (mag(R_(i, i)) < SMALL)
if (mag(R_(i, i)) < small)
{
FatalErrorInFunction
<< "Back-substitution failed due to small diagonal"

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
@ -194,7 +194,7 @@ Foam::tmp<Foam::labelField> Foam::pairGAMGAgglomeration::agglomerate
if (coarseCellMap[celli] < 0)
{
label matchFaceNo = -1;
scalar maxFaceWeight = -GREAT;
scalar maxFaceWeight = -great;
// check faces to find ungrouped neighbour with largest face weight
for
@ -233,7 +233,7 @@ Foam::tmp<Foam::labelField> Foam::pairGAMGAgglomeration::agglomerate
// No match. Find the best neighbouring cluster and
// put the cell there
label clusterMatchFaceNo = -1;
scalar clusterMaxFaceCoeff = -GREAT;
scalar clusterMaxFaceCoeff = -great;
for
(

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -60,7 +60,7 @@ void Foam::GAMGSolver::scale
vector2D scalingVector(scalingFactorNum, scalingFactorDenom);
A.mesh().reduce(scalingVector, sumOp<vector2D>());
const scalar sf = scalingVector.x()/stabilise(scalingVector.y(), VSMALL);
const scalar sf = scalingVector.x()/stabilise(scalingVector.y(), vSmall);
if (debug >= 2)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -150,7 +150,7 @@ Foam::SVD::SVD(const scalarRectangularMatrix& A, const scalar minCondition)
anorm = max(anorm, mag(S_[i]) + mag(rv1[i]));
}
anorm *= SMALL;
anorm *= small;
for (label i=Un-1; i >= 0; i--)
{

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
@ -71,7 +71,7 @@ inline Foam::scalar Foam::SVD::minNonZeroS() const
for (label i=1; i<S_.size(); i++)
{
scalar s = S_[i];
if (s > VSMALL && s < minS) minS = s;
if (s > vSmall && s < minS) minS = s;
}
return minS;
}

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
@ -129,7 +129,7 @@ void Foam::LUDecompose
if (matrixj[j] == 0.0)
{
matrixj[j] = SMALL;
matrixj[j] = small;
}
if (j != m-1)

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
@ -279,7 +279,7 @@ Foam::scalar Foam::solution::fieldRelaxationFactor(const word& name) const
{
return readScalar(fieldRelaxDict_.lookup(name));
}
else if (fieldRelaxDefault_ > SMALL)
else if (fieldRelaxDefault_ > small)
{
return fieldRelaxDefault_;
}
@ -308,7 +308,7 @@ Foam::scalar Foam::solution::equationRelaxationFactor(const word& name) const
{
return readScalar(eqnRelaxDict_.lookup(name));
}
else if (eqnRelaxDefault_ > SMALL)
else if (eqnRelaxDefault_ > small)
{
return eqnRelaxDefault_;
}

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
@ -29,19 +29,19 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
const Foam::scalar Foam::boundBox::great(VGREAT);
const Foam::scalar Foam::boundBox::great(vGreat);
const Foam::boundBox Foam::boundBox::greatBox
(
point(-VGREAT, -VGREAT, -VGREAT),
point(VGREAT, VGREAT, VGREAT)
point(-vGreat, -vGreat, -vGreat),
point(vGreat, vGreat, vGreat)
);
const Foam::boundBox Foam::boundBox::invertedBox
(
point(VGREAT, VGREAT, VGREAT),
point(-VGREAT, -VGREAT, -VGREAT)
point(vGreat, vGreat, vGreat),
point(-vGreat, -vGreat, -vGreat)
);
@ -57,8 +57,8 @@ void Foam::boundBox::calculate(const UList<point>& points, const bool doReduce)
if (doReduce && Pstream::parRun())
{
// Use values that get overwritten by reduce minOp, maxOp below
min_ = point(VGREAT, VGREAT, VGREAT);
max_ = point(-VGREAT, -VGREAT, -VGREAT);
min_ = point(vGreat, vGreat, vGreat);
max_ = point(-vGreat, -vGreat, -vGreat);
}
}
else
@ -119,8 +119,8 @@ Foam::boundBox::boundBox
if (doReduce && Pstream::parRun())
{
// Use values that get overwritten by reduce minOp, maxOp below
min_ = point(VGREAT, VGREAT, VGREAT);
max_ = point(-VGREAT, -VGREAT, -VGREAT);
min_ = point(vGreat, vGreat, vGreat);
max_ = point(-vGreat, -vGreat, -vGreat);
}
}
else

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
@ -76,10 +76,10 @@ public:
//- The great value used for greatBox and invertedBox
static const scalar great;
//- A very large boundBox: min/max == -/+ VGREAT
//- A very large boundBox: min/max == -/+ vGreat
static const boundBox greatBox;
//- A very large inverted boundBox: min/max == +/- VGREAT
//- A very large inverted boundBox: min/max == +/- vGreat
static const boundBox invertedBox;

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
@ -47,8 +47,8 @@ Foam::boundBox::boundBox
if (doReduce && Pstream::parRun())
{
// Use values that get overwritten by reduce minOp, maxOp below
min_ = point(VGREAT, VGREAT, VGREAT);
max_ = point(-VGREAT, -VGREAT, -VGREAT);
min_ = point(vGreat, vGreat, vGreat);
max_ = point(-vGreat, -vGreat, -vGreat);
}
}
else

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
@ -204,7 +204,7 @@ Foam::point Foam::cell::centre
sumArea += a;
}
cEst /= sumArea + VSMALL;
cEst /= sumArea + vSmall;
// Calculate the centre by breaking the cell into pyramids and
// volume-weighted averaging their centres
@ -231,7 +231,7 @@ Foam::point Foam::cell::centre
sumV += pyrVol;
}
return sumVc/(sumV + VSMALL);
return sumVc/(sumV + vSmall);
}

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
@ -65,7 +65,7 @@ Foam::vector Foam::cellModel::centre
cEst
).mag(points);
if (pyrVol > SMALL)
if (pyrVol > small)
{
WarningInFunction
<< "zero or negative pyramid volume: " << -pyrVol
@ -81,7 +81,7 @@ Foam::vector Foam::cellModel::centre
sumV -= pyrVol;
}
return sumVc/(sumV + VSMALL);
return sumVc/(sumV + vSmall);
}
@ -123,7 +123,7 @@ Foam::scalar Foam::cellModel::mag
cEst
).mag(points);
if (pyrVol > SMALL)
if (pyrVol > small)
{
WarningInFunction
<< "zero or negative pyramid volume: " << -pyrVol

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
@ -51,7 +51,7 @@ Foam::face::calcEdges(const pointField& points) const
point nextPt = points[operator[](ni)];
vector vec(nextPt - thisPt);
vec /= Foam::mag(vec) + VSMALL;
vec /= Foam::mag(vec) + vSmall;
edges[i] = vec;
}
@ -84,7 +84,7 @@ Foam::label Foam::face::mostConcaveAngle
vector n(normal(points));
label index = 0;
maxAngle = -GREAT;
maxAngle = -great;
forAll(edges, i)
{
@ -220,7 +220,7 @@ Foam::label Foam::face::split
points[operator[](index)]
- points[operator[](startIndex)]
);
splitEdge /= Foam::mag(splitEdge) + VSMALL;
splitEdge /= Foam::mag(splitEdge) + vSmall;
const scalar splitCos = splitEdge & rightEdge;
const scalar splitAngle = acos(max(-1.0, min(1.0, splitCos)));
@ -538,7 +538,7 @@ Foam::point Foam::face::centre(const pointField& points) const
sumAc += ta*ttc;
}
if (sumA > VSMALL)
if (sumA > vSmall)
{
return sumAc/(3.0*sumA);
}
@ -871,7 +871,7 @@ Foam::label Foam::longestEdge(const face& f, const pointField& pts)
const edgeList& eds = f.edges();
label longestEdgeI = -1;
scalar longestEdgeLength = -SMALL;
scalar longestEdgeLength = -small;
forAll(eds, edI)
{

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
@ -154,7 +154,7 @@ Foam::scalar Foam::face::areaInContact
}
// Calculate relative area
return face(sfl).mag(newFacePoints)/(mag(meshPoints) + VSMALL);
return face(sfl).mag(newFacePoints)/(mag(meshPoints) + vSmall);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -39,10 +39,10 @@ Foam::scalar Foam::face::contactSphereDiameter
{
scalar magN = Foam::mag(n);
vector n1 = n/(magN + SMALL);
vector n1 = n/(magN + small);
vector n2 = normal(meshPoints);
n2 /= Foam::mag(n2) + SMALL;
n2 /= Foam::mag(n2) + small;
return 2*((centre(meshPoints) - p) & n2)/((n1 & n2) - 1.0);
}

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
@ -61,12 +61,12 @@ Foam::pointHit Foam::face::ray
point ctr = Foam::average(points(meshPoints));
scalar nearestHitDist = GREAT;
scalar nearestHitDist = great;
scalar nearestMissDist = GREAT;
scalar nearestMissDist = great;
bool eligible = false;
// Initialize to miss, distance = GREAT
// Initialize to miss, distance = great
pointHit nearest(p);
const labelList& f = *this;
@ -158,9 +158,9 @@ Foam::pointHit Foam::face::intersection
).intersection(p, q, alg, tol);
}
scalar nearestHitDist = VGREAT;
scalar nearestHitDist = vGreat;
// Initialize to miss, distance = GREAT
// Initialize to miss, distance = great
pointHit nearest(p);
const labelList& f = *this;
@ -231,7 +231,7 @@ Foam::pointHit Foam::face::nearestPointClassify
const face& f = *this;
point ctr = centre(meshPoints);
// Initialize to miss, distance=GREAT
// Initialize to miss, distance=great
pointHit nearest(p);
nearType = -1;

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
@ -106,7 +106,7 @@ Type Foam::face::average
sumAf += ta*ttcf;
}
if (sumA > VSMALL)
if (sumA > vSmall)
{
return sumAf/(3*sumA);
}

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
@ -46,7 +46,7 @@ bool Foam::matchPoints
point compareOrigin = origin;
if (origin == point(VGREAT, VGREAT, VGREAT))
if (origin == point(vGreat, vGreat, vGreat))
{
if (pts1.size())
{
@ -75,7 +75,7 @@ bool Foam::matchPoints
// Go through range of equal mag and find nearest vector.
scalar minDistSqr = VGREAT;
scalar minDistSqr = vGreat;
label minFacei = -1;
for
@ -158,7 +158,7 @@ bool Foam::matchPoints
point compareOrigin = origin;
if (origin == point(VGREAT, VGREAT, VGREAT))
if (origin == point(vGreat, vGreat, vGreat))
{
if (pts1.size())
{
@ -186,7 +186,7 @@ bool Foam::matchPoints
}
// Go through range of equal mag and find nearest vector.
scalar minDistSqr = VGREAT;
scalar minDistSqr = vGreat;
scalar minDistNorm = 0;
label minFacei = -1;
@ -208,8 +208,8 @@ bool Foam::matchPoints
if
(
magSqr(pts0Dir[face0I]) < sqr(SMALL)
&& magSqr(pts1Dir[facei]) < sqr(SMALL)
magSqr(pts0Dir[face0I]) < sqr(small)
&& magSqr(pts1Dir[facei]) < sqr(small)
)
{
distNorm = -1;

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
@ -205,7 +205,7 @@ void Foam::cellMapper::calcAddressing() const
w[celli][ci] = V[mo[ci]];
sumV += V[mo[ci]];
}
if (sumV > VSMALL)
if (sumV > vSmall)
{
forAll(mo, ci)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -881,8 +881,8 @@ Foam::polyMesh::cellTree() const
static Random rndGen(261782);
overallBb = overallBb.extend(rndGen, 1e-4);
overallBb.min() -= point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL);
overallBb.max() += point(ROOTVSMALL, ROOTVSMALL, ROOTVSMALL);
overallBb.min() -= point(rootVSmall, rootVSmall, rootVSmall);
overallBb.max() += point(rootVSmall, rootVSmall, rootVSmall);
cellTreePtr_.reset
(

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -62,7 +62,7 @@ bool Foam::polyMesh::checkFaceOrthogonality
::cos(degToRad(primitiveMesh::nonOrthThreshold_));
scalar minDDotS = GREAT;
scalar minDDotS = great;
scalar sumDDotS = 0.0;
label nSummed = 0;
label severeNonOrth = 0;
@ -76,7 +76,7 @@ bool Foam::polyMesh::checkFaceOrthogonality
{
if (ortho[facei] < severeNonorthogonalityThreshold)
{
if (ortho[facei] > SMALL)
if (ortho[facei] > small)
{
if (setPtr)
{
@ -327,7 +327,7 @@ bool Foam::polyMesh::checkEdgeAlignment
vector d(p[p1]-p[p0]);
scalar magD = mag(d);
if (magD > ROOTVSMALL)
if (magD > rootVSmall)
{
d /= magD;
@ -513,7 +513,7 @@ bool Foam::polyMesh::checkFaceWeight
label nErrorFaces = 0;
scalar minDet = GREAT;
scalar minDet = great;
scalar sumDet = 0.0;
label nSummed = 0;
@ -600,7 +600,7 @@ bool Foam::polyMesh::checkVolRatio
label nErrorFaces = 0;
scalar minDet = GREAT;
scalar minDet = great;
scalar sumDet = 0.0;
label nSummed = 0;
@ -821,7 +821,7 @@ bool Foam::polyMesh::checkMeshMotion
cellCtrs,
report, // report,
detailedReport, // detailedReport,
-SMALL, // minPyrVol
-small, // minPyrVol
nullptr // setPtr
);
error = error || pyrVolError;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -195,7 +195,7 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::faceWeights
scalar dOwn = mag(fa & (fc-cellCtrs[own[facei]]));
scalar dNei = mag(fa & (cellCtrs[nei[facei]]-fc));
weight[facei] = min(dNei,dOwn)/(dNei+dOwn+VSMALL);
weight[facei] = min(dNei,dOwn)/(dNei+dOwn+vSmall);
}
@ -220,7 +220,7 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::faceWeights
scalar dOwn = mag(fa & (fc-cellCtrs[own[facei]]));
scalar dNei = mag(fa & (neiCc[bFacei]-fc));
weight[facei] = min(dNei,dOwn)/(dNei+dOwn+VSMALL);
weight[facei] = min(dNei,dOwn)/(dNei+dOwn+vSmall);
}
}
}
@ -248,7 +248,7 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::volRatio
scalar volOwn = vol[own[facei]];
scalar volNei = vol[nei[facei]];
ratio[facei] = min(volOwn,volNei)/(max(volOwn, volNei)+VSMALL);
ratio[facei] = min(volOwn,volNei)/(max(volOwn, volNei)+vSmall);
}
@ -270,7 +270,7 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::volRatio
scalar volOwn = vol[own[facei]];
scalar volNei = neiVol[bFacei];
ratio[facei] = min(volOwn,volNei)/(max(volOwn, volNei)+VSMALL);
ratio[facei] = min(volOwn,volNei)/(max(volOwn, volNei)+vSmall);
}
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,7 +30,7 @@ License
// Note: the use of this tolerance is ad-hoc, there may be extreme
// cases where the resulting tetrahedra still have particle tracking
// problems, or tets with lower quality may track OK.
const Foam::scalar Foam::polyMeshTetDecomposition::minTetQuality = sqr(SMALL);
const Foam::scalar Foam::polyMeshTetDecomposition::minTetQuality = sqr(small);
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
@ -59,7 +59,7 @@ Foam::label Foam::polyMeshTetDecomposition::findSharedBasePoint
forAll(f, faceBasePtI)
{
scalar thisBaseMinTetQuality = VGREAT;
scalar thisBaseMinTetQuality = vGreat;
const point& tetBasePt = pPts[f[faceBasePtI]];
@ -154,7 +154,7 @@ Foam::label Foam::polyMeshTetDecomposition::findBasePoint
forAll(f, faceBasePtI)
{
scalar thisBaseMinTetQuality = VGREAT;
scalar thisBaseMinTetQuality = vGreat;
const point& tetBasePt = pPts[f[faceBasePtI]];

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
@ -213,10 +213,10 @@ Foam::scalarField Foam::coupledPolyPatch::calcFaceTol
// 1. calculate a typical size of the face. Use maximum distance
// to face centre
scalar maxLenSqr = -GREAT;
scalar maxLenSqr = -great;
// 2. as measure of truncation error when comparing two coordinates
// use SMALL * maximum component
scalar maxCmpt = -GREAT;
// use small * maximum component
scalar maxCmpt = -great;
forAll(f, fp)
{
@ -227,8 +227,8 @@ Foam::scalarField Foam::coupledPolyPatch::calcFaceTol
tols[facei] = max
(
SMALL,
max(SMALL*maxCmpt, Foam::sqrt(maxLenSqr))
small,
max(small*maxCmpt, Foam::sqrt(maxLenSqr))
);
}
return tols;
@ -244,7 +244,7 @@ Foam::label Foam::coupledPolyPatch::getRotation
)
{
label anchorFp = -1;
scalar minDistSqr = GREAT;
scalar minDistSqr = great;
forAll(f, fp)
{
@ -314,7 +314,7 @@ void Foam::coupledPolyPatch::calcTransformTensors
// Tolerance calculation.
// - normal calculation: assume absTol is the absolute error in a
// single normal/transformation calculation. Consists both of numerical
// precision (on the order of SMALL and of writing precision
// precision (on the order of small and of writing precision
// (from e.g. decomposition)
// Then the overall error of summing the normals is sqrt(size())*absTol
// - separation calculation: pass in from the outside an allowable error.

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
@ -56,7 +56,7 @@ Foam::label Foam::cyclicPolyPatch::findMaxArea
)
{
label maxI = -1;
scalar maxAreaSqr = -GREAT;
scalar maxAreaSqr = -great;
forAll(faces, facei)
{
@ -180,7 +180,7 @@ void Foam::cyclicPolyPatch::calcTransforms
vectorField half0Normals(half0Areas.size());
vectorField half1Normals(half1Areas.size());
scalar maxAreaDiff = -GREAT;
scalar maxAreaDiff = -great;
label maxAreaFacei = -1;
forAll(half0, facei)
@ -189,10 +189,10 @@ void Foam::cyclicPolyPatch::calcTransforms
scalar nbrMagSf = mag(half1Areas[facei]);
scalar avSf = (magSf + nbrMagSf)/2.0;
if (magSf < ROOTVSMALL && nbrMagSf < ROOTVSMALL)
if (magSf < rootVSmall && nbrMagSf < rootVSmall)
{
// Undetermined normal. Use dummy normal to force separation
// check. (note use of sqrt(VSMALL) since that is how mag
// check. (note use of sqrt(vSmall) since that is how mag
// scales)
half0Normals[facei] = point(1, 0, 0);
half1Normals[facei] = half0Normals[facei];
@ -260,8 +260,8 @@ void Foam::cyclicPolyPatch::calcTransforms
// use calculated normals.
vector n0 = findFaceMaxRadius(half0Ctrs);
vector n1 = -findFaceMaxRadius(half1Ctrs);
n0 /= mag(n0) + VSMALL;
n1 /= mag(n1) + VSMALL;
n0 /= mag(n0) + vSmall;
n1 /= mag(n1) + vSmall;
if (debug)
{
@ -420,8 +420,8 @@ void Foam::cyclicPolyPatch::getCentresAndAnchors
{
vector n0 = findFaceMaxRadius(half0Ctrs);
vector n1 = -findFaceMaxRadius(half1Ctrs);
n0 /= mag(n0) + VSMALL;
n1 /= mag(n1) + VSMALL;
n0 /= mag(n0) + vSmall;
n1 /= mag(n1) + vSmall;
if (debug)
{
@ -500,11 +500,11 @@ void Foam::cyclicPolyPatch::getCentresAndAnchors
// two faces are used to determine the transformation tensors
label max0I = findMaxArea(pp0.points(), pp0);
vector n0 = pp0[max0I].normal(pp0.points());
n0 /= mag(n0) + VSMALL;
n0 /= mag(n0) + vSmall;
label max1I = findMaxArea(pp1.points(), pp1);
vector n1 = pp1[max1I].normal(pp1.points());
n1 /= mag(n1) + VSMALL;
n1 /= mag(n1) + vSmall;
if (mag(n0 & n1) < 1-matchTolerance())
{
@ -690,7 +690,7 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
dict.lookup("rotationCentre") >> rotationCentre_;
scalar magRot = mag(rotationAxis_);
if (magRot < SMALL)
if (magRot < small)
{
FatalIOErrorInFunction(dict)
<< "Illegal rotationAxis " << rotationAxis_ << endl

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
@ -88,7 +88,7 @@ Foam::label Foam::oldCyclicPolyPatch::findMaxArea
)
{
label maxI = -1;
scalar maxAreaSqr = -GREAT;
scalar maxAreaSqr = -great;
forAll(faces, facei)
{
@ -310,8 +310,8 @@ void Foam::oldCyclicPolyPatch::getCentresAndAnchors
vector n0 = ((half0Ctrs[face0] - rotationCentre_) ^ rotationAxis_);
vector n1 = ((half1Ctrs[face1] - rotationCentre_) ^ -rotationAxis_);
n0 /= mag(n0) + VSMALL;
n1 /= mag(n1) + VSMALL;
n0 /= mag(n0) + vSmall;
n1 /= mag(n1) + vSmall;
if (debug)
{
@ -360,11 +360,11 @@ void Foam::oldCyclicPolyPatch::getCentresAndAnchors
// two faces are used to determine the transformation tensors
label max0I = findMaxArea(pp.points(), half0Faces);
vector n0 = half0Faces[max0I].normal(pp.points());
n0 /= mag(n0) + VSMALL;
n0 /= mag(n0) + vSmall;
label max1I = findMaxArea(pp.points(), half1Faces);
vector n1 = half1Faces[max1I].normal(pp.points());
n1 /= mag(n1) + VSMALL;
n1 /= mag(n1) + vSmall;
if (mag(n0 & n1) < 1-matchTolerance())
{
@ -530,8 +530,8 @@ Foam::label Foam::oldCyclicPolyPatch::getConsistentRotationFace
);
label rotFace = -1;
scalar maxMagLenSqr = -GREAT;
scalar maxMagRadSqr = -GREAT;
scalar maxMagLenSqr = -great;
scalar maxMagRadSqr = -great;
forAll(faceCentres, i)
{
if (magLenSqr[i] >= maxMagLenSqr)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -238,13 +238,13 @@ void Foam::processorPolyPatch::calcGeometry(PstreamBuffers& pBufs)
// For small face area calculation the results of the area
// calculation have been found to only be accurate to ~1e-20
if (magSf < SMALL || nbrMagSf < SMALL)
if (magSf < small || nbrMagSf < small)
{
// Undetermined normal. Use dummy normal to force separation
// check.
faceNormals[facei] = point(1, 0, 0);
nbrFaceNormals[facei] = -faceNormals[facei];
tols[facei] = GREAT;
tols[facei] = great;
}
else if (mag(magSf - nbrMagSf) > matchTolerance()*sqr(tols[facei]))
{
@ -637,7 +637,7 @@ Foam::label Foam::processorPolyPatch::matchFace
label matchFp = -1;
scalar closestMatchDistSqr = sqr(GREAT);
scalar closestMatchDistSqr = sqr(great);
ConstCirculator<face> aCirc(a);
ConstCirculator<face> bCirc(b);
@ -816,8 +816,8 @@ bool Foam::processorPolyPatch::order
const scalar absTolSqr = sqr(tols[lFacei]);
scalar closestMatchDistSqr = sqr(GREAT);
scalar matchDistSqr = sqr(GREAT);
scalar closestMatchDistSqr = sqr(great);
scalar matchDistSqr = sqr(great);
label closestFaceMatch = -1;
label closestFaceRotation = -1;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -59,7 +59,7 @@ void Foam::symmetryPlanePolyPatch::calcGeometry(PstreamBuffers&)
// Check the symmetry plane is planar
forAll(nf, facei)
{
if (magSqr(n_ - nf[facei]) > SMALL)
if (magSqr(n_ - nf[facei]) > small)
{
FatalErrorInFunction
<< "Symmetry plane '" << name() << "' is not planar."

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
@ -63,7 +63,7 @@ void Foam::wedgePolyPatch::calcGeometry(PstreamBuffers&)
// Check the wedge is planar
forAll(nf, facei)
{
if (magSqr(n_ - nf[facei]) > SMALL)
if (magSqr(n_ - nf[facei]) > small)
{
// only issue warning instead of error so that the case can
// still be read for post-processing
@ -93,7 +93,7 @@ void Foam::wedgePolyPatch::calcGeometry(PstreamBuffers&)
const scalar cnCmptSum =
centreNormal_.x() + centreNormal_.y() + centreNormal_.z();
if (mag(cnCmptSum) < (1 - SMALL))
if (mag(cnCmptSum) < (1 - small))
{
FatalErrorInFunction
<< "wedge " << name()
@ -105,7 +105,7 @@ void Foam::wedgePolyPatch::calcGeometry(PstreamBuffers&)
axis_ = centreNormal_ ^ n_;
scalar magAxis = mag(axis_);
if (magAxis < SMALL)
if (magAxis < small)
{
FatalErrorInFunction
<< "wedge " << name()

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
@ -129,7 +129,7 @@ Foam::PatchTools::pointNormals
if (nFaces >= 1)
{
n /= mag(n)+VSMALL;
n /= mag(n)+vSmall;
}
// Put back into slave slots
@ -173,7 +173,7 @@ Foam::PatchTools::pointNormals
extrudeN[f[fp]] += n;
}
}
extrudeN /= mag(extrudeN)+VSMALL;
extrudeN /= mag(extrudeN)+vSmall;
}
@ -226,7 +226,7 @@ Foam::PatchTools::edgeNormals
edgeNormals[edgeI] += faceNormals[eFaces[i]];
}
}
edgeNormals /= mag(edgeNormals)+VSMALL;
edgeNormals /= mag(edgeNormals)+vSmall;
}
@ -262,7 +262,7 @@ Foam::PatchTools::edgeNormals
plusEqOp<point>(), // add since normalised later on
mapDistribute::transform()
);
cppEdgeData /= mag(cppEdgeData)+VSMALL;
cppEdgeData /= mag(cppEdgeData)+vSmall;
// Back from cpp-edge to patch-edge data

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -64,13 +64,13 @@ Foam::PatchTools::sortedEdgeFaces
const point& edgePt = localPoints[e.start()];
vector e2 = e.vec(localPoints);
e2 /= mag(e2) + VSMALL;
e2 /= mag(e2) + vSmall;
// Get the vertex on 0th face that forms a vector with the first
// edge point that has the largest angle with the edge
const Face& f0 = localFaces[faceNbs[0]];
scalar maxAngle = GREAT;
scalar maxAngle = great;
vector maxAngleEdgeDir(vector::max);
forAll(f0, fpI)
@ -78,7 +78,7 @@ Foam::PatchTools::sortedEdgeFaces
if (f0[fpI] != e.start())
{
vector faceEdgeDir = localPoints[f0[fpI]] - edgePt;
faceEdgeDir /= mag(faceEdgeDir) + VSMALL;
faceEdgeDir /= mag(faceEdgeDir) + vSmall;
const scalar angle = e2 & faceEdgeDir;
@ -93,7 +93,7 @@ Foam::PatchTools::sortedEdgeFaces
// Get vector normal both to e2 and to edge from opposite vertex
// to edge (will be x-axis of our coordinate system)
vector e0 = e2 ^ maxAngleEdgeDir;
e0 /= mag(e0) + VSMALL;
e0 /= mag(e0) + vSmall;
// Get y-axis of coordinate system
vector e1 = e2 ^ e0;
@ -109,7 +109,7 @@ Foam::PatchTools::sortedEdgeFaces
// edge point that has the largest angle with the edge
const Face& f = localFaces[faceNbs[nbI]];
maxAngle = GREAT;
maxAngle = great;
maxAngleEdgeDir = vector::max;
forAll(f, fpI)
@ -117,7 +117,7 @@ Foam::PatchTools::sortedEdgeFaces
if (f[fpI] != e.start())
{
vector faceEdgeDir = localPoints[f[fpI]] - edgePt;
faceEdgeDir /= mag(faceEdgeDir) + VSMALL;
faceEdgeDir /= mag(faceEdgeDir) + vSmall;
const scalar angle = e2 & faceEdgeDir;
@ -130,7 +130,7 @@ Foam::PatchTools::sortedEdgeFaces
}
vector vec = e2 ^ maxAngleEdgeDir;
vec /= mag(vec) + VSMALL;
vec /= mag(vec) + vSmall;
faceAngles[nbI] = pseudoAngle
(

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -286,7 +286,7 @@ calcPointNormals() const
curNormal += faceUnitNormals[curFaces[facei]];
}
curNormal /= mag(curNormal) + VSMALL;
curNormal /= mag(curNormal) + vSmall;
}
if (debug)
@ -381,7 +381,7 @@ calcFaceNormals() const
forAll(n, facei)
{
n[facei] = this->operator[](facei).normal(points_);
n[facei] /= mag(n[facei]) + VSMALL;
n[facei] /= mag(n[facei]) + vSmall;
}
if (debug)

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
@ -115,7 +115,7 @@ projectPoints
bool foundEligible = false;
scalar sqrDistance = GREAT;
scalar sqrDistance = great;
// Force the full search for the first point to ensure good
// starting face
@ -218,7 +218,7 @@ projectPoints
}
result[curLocalPointLabel] = objectHit(false, -1);
scalar minDistance = GREAT;
scalar minDistance = great;
forAll(masterFaces, facei)
{
@ -360,7 +360,7 @@ projectFaceCentres
bool foundEligible = false;
scalar sqrDistance = GREAT;
scalar sqrDistance = great;
// Force the full search for the first point to ensure good
// starting face
@ -459,7 +459,7 @@ projectFaceCentres
}
result[curLocalFaceLabel] = objectHit(false, -1);
scalar minDistance = GREAT;
scalar minDistance = great;
forAll(masterFaces, facei)
{

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
@ -678,7 +678,7 @@ public:
virtual bool checkFacePyramids
(
const bool report = false,
const scalar minPyrVol = -SMALL,
const scalar minPyrVol = -small,
labelHashSet* setPtr = nullptr
) const;

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
@ -141,7 +141,7 @@ void Foam::primitiveMesh::makeCellCentresAndVols
forAll(cellCtrs, celli)
{
if (mag(cellVols[celli]) > VSMALL)
if (mag(cellVols[celli]) > vSmall)
{
cellCtrs[celli] /= cellVols[celli];
}

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
@ -73,7 +73,7 @@ bool Foam::primitiveMesh::checkClosedBoundary
reduce(sumClosed, sumOp<vector>());
reduce(sumMagClosedBoundary, sumOp<scalar>());
vector openness = sumClosed/(sumMagClosedBoundary + VSMALL);
vector openness = sumClosed/(sumMagClosedBoundary + vSmall);
if (cmptMax(cmptMag(openness)) > closedThreshold_)
{
@ -246,12 +246,12 @@ bool Foam::primitiveMesh::checkFaceAreas
const scalarField magFaceAreas(mag(faceAreas));
scalar minArea = GREAT;
scalar maxArea = -GREAT;
scalar minArea = great;
scalar maxArea = -great;
forAll(magFaceAreas, facei)
{
if (magFaceAreas[facei] < VSMALL)
if (magFaceAreas[facei] < vSmall)
{
if (setPtr)
{
@ -285,7 +285,7 @@ bool Foam::primitiveMesh::checkFaceAreas
reduce(minArea, minOp<scalar>());
reduce(maxArea, maxOp<scalar>());
if (minArea < VSMALL)
if (minArea < vSmall)
{
if (debug || report)
{
@ -322,14 +322,14 @@ bool Foam::primitiveMesh::checkCellVolumes
InfoInFunction << "Checking cell volumes" << endl;
}
scalar minVolume = GREAT;
scalar maxVolume = -GREAT;
scalar minVolume = great;
scalar maxVolume = -great;
label nNegVolCells = 0;
forAll(vols, celli)
{
if (vols[celli] < VSMALL)
if (vols[celli] < vSmall)
{
if (setPtr)
{
@ -352,7 +352,7 @@ bool Foam::primitiveMesh::checkCellVolumes
reduce(maxVolume, maxOp<scalar>());
reduce(nNegVolCells, sumOp<label>());
if (minVolume < VSMALL)
if (minVolume < vSmall)
{
if (debug || report)
{
@ -418,7 +418,7 @@ bool Foam::primitiveMesh::checkFaceOrthogonality
{
if (ortho[facei] < severeNonorthogonalityThreshold)
{
if (ortho[facei] > SMALL)
if (ortho[facei] > small)
{
if (setPtr)
{
@ -678,7 +678,7 @@ bool Foam::primitiveMesh::checkFaceAngles
InfoInFunction << "Checking face angles" << endl;
}
if (maxDeg < -SMALL || maxDeg > 180+SMALL)
if (maxDeg < -small || maxDeg > 180+small)
{
FatalErrorInFunction
<< "maxDeg should be [0..180] but is now " << maxDeg
@ -703,7 +703,7 @@ bool Foam::primitiveMesh::checkFaceAngles
forAll(faceAngles, facei)
{
if (faceAngles[facei] > SMALL)
if (faceAngles[facei] > small)
{
nConcave++;
@ -779,14 +779,14 @@ bool Foam::primitiveMesh::checkFaceFlatness
scalarField magAreas(mag(faceAreas));
scalar minFlatness = GREAT;
scalar minFlatness = great;
scalar sumFlatness = 0;
label nSummed = 0;
label nWarped = 0;
forAll(faceFlatness, facei)
{
if (fcs[facei].size() > 3 && magAreas[facei] > VSMALL)
if (fcs[facei].size() > 3 && magAreas[facei] > vSmall)
{
sumFlatness += faceFlatness[facei];
nSummed++;
@ -886,7 +886,7 @@ bool Foam::primitiveMesh::checkConcaveCells
vector fN = fAreas[fI];
fN /= max(mag(fN), VSMALL);
fN /= max(mag(fN), vSmall);
// Flip normal if required so that it is always pointing out of
// the cell
@ -914,7 +914,7 @@ bool Foam::primitiveMesh::checkConcaveCells
vector pC = (pt - fC);
pC /= max(mag(pC), VSMALL);
pC /= max(mag(pC), vSmall);
if ((pC & fN) > -planarCosAngle_)
{

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
@ -37,8 +37,8 @@ bool Foam::primitiveMesh::checkEdgeLength
const pointField& points = this->points();
const faceList& faces = this->faces();
scalar minLenSqr = sqr(GREAT);
scalar maxLenSqr = -sqr(GREAT);
scalar minLenSqr = sqr(great);
scalar maxLenSqr = -sqr(great);
labelHashSet smallEdgeSet(nPoints()/100);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -47,13 +47,13 @@ Foam::scalar Foam::primitiveMeshTools::faceSkewness
// Skewness vector
vector sv =
Cpf
- ((fAreas[facei] & Cpf)/((fAreas[facei] & d) + ROOTVSMALL))*d;
vector svHat = sv/(mag(sv) + ROOTVSMALL);
- ((fAreas[facei] & Cpf)/((fAreas[facei] & d) + rootVSmall))*d;
vector svHat = sv/(mag(sv) + rootVSmall);
// Normalisation distance calculated as the approximate distance
// from the face centre to the edge of the face in the direction
// of the skewness
scalar fd = 0.2*mag(d) + ROOTVSMALL;
scalar fd = 0.2*mag(d) + rootVSmall;
const face& f = mesh.faces()[facei];
forAll(f, pi)
{
@ -79,20 +79,20 @@ Foam::scalar Foam::primitiveMeshTools::boundaryFaceSkewness
vector Cpf = fCtrs[facei] - ownCc;
vector normal = fAreas[facei];
normal /= mag(normal) + ROOTVSMALL;
normal /= mag(normal) + rootVSmall;
vector d = normal*(normal & Cpf);
// Skewness vector
vector sv =
Cpf
- ((fAreas[facei] & Cpf)/((fAreas[facei] & d) + ROOTVSMALL))*d;
vector svHat = sv/(mag(sv) + ROOTVSMALL);
- ((fAreas[facei] & Cpf)/((fAreas[facei] & d) + rootVSmall))*d;
vector svHat = sv/(mag(sv) + rootVSmall);
// Normalisation distance calculated as the approximate distance
// from the face centre to the edge of the face in the direction
// of the skewness
scalar fd = 0.4*mag(d) + ROOTVSMALL;
scalar fd = 0.4*mag(d) + rootVSmall;
const face& f = mesh.faces()[facei];
forAll(f, pi)
{
@ -113,7 +113,7 @@ Foam::scalar Foam::primitiveMeshTools::faceOrthogonality
{
vector d = neiCc - ownCc;
return (d & s)/(mag(d)*mag(s) + ROOTVSMALL);
return (d & s)/(mag(d)*mag(s) + rootVSmall);
}
@ -296,15 +296,15 @@ void Foam::primitiveMeshTools::cellClosedness
(
maxOpenness,
mag(sumClosed[celli][cmpt])
/(sumMagClosed[celli][cmpt] + ROOTVSMALL)
/(sumMagClosed[celli][cmpt] + rootVSmall)
);
}
openness[celli] = maxOpenness;
// Calculate the aspect ration as the maximum of Cartesian component
// aspect ratio to the total area hydraulic area aspect ratio
scalar minCmpt = VGREAT;
scalar maxCmpt = -VGREAT;
scalar minCmpt = vGreat;
scalar maxCmpt = -vGreat;
for (direction dir = 0; dir < vector::nComponents; dir++)
{
if (meshD[dir] == 1)
@ -314,10 +314,10 @@ void Foam::primitiveMeshTools::cellClosedness
}
}
scalar aspectRatio = maxCmpt/(minCmpt + ROOTVSMALL);
scalar aspectRatio = maxCmpt/(minCmpt + rootVSmall);
if (nDims == 3)
{
scalar v = max(ROOTVSMALL, vols[celli]);
scalar v = max(rootVSmall, vols[celli]);
aspectRatio = max
(
@ -342,7 +342,7 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::faceConcavity
const faceList& fcs = mesh.faces();
vectorField faceNormals(faceAreas);
faceNormals /= mag(faceNormals) + ROOTVSMALL;
faceNormals /= mag(faceNormals) + rootVSmall;
tmp<scalarField> tfaceAngles(new scalarField(mesh.nFaces()));
scalarField& faceAngles = tfaceAngles.ref();
@ -355,7 +355,7 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::faceConcavity
// Get edge from f[0] to f[size-1];
vector ePrev(p[f.first()] - p[f.last()]);
scalar magEPrev = mag(ePrev);
ePrev /= magEPrev + ROOTVSMALL;
ePrev /= magEPrev + rootVSmall;
scalar maxEdgeSin = 0.0;
@ -367,9 +367,9 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::faceConcavity
// Normalized vector between two consecutive points
vector e10(p[f[fp1]] - p[f[fp0]]);
scalar magE10 = mag(e10);
e10 /= magE10 + ROOTVSMALL;
e10 /= magE10 + rootVSmall;
if (magEPrev > SMALL && magE10 > SMALL)
if (magEPrev > small && magE10 > small)
{
vector edgeNormal = ePrev ^ e10;
scalar magEdgeNormal = mag(edgeNormal);
@ -383,7 +383,7 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::faceConcavity
// Check normal
edgeNormal /= magEdgeNormal;
if ((edgeNormal & faceNormals[facei]) < SMALL)
if ((edgeNormal & faceNormals[facei]) < small)
{
maxEdgeSin = max(maxEdgeSin, magEdgeNormal);
}
@ -423,7 +423,7 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::faceFlatness
{
const face& f = fcs[facei];
if (f.size() > 3 && magAreas[facei] > ROOTVSMALL)
if (f.size() > 3 && magAreas[facei] > rootVSmall)
{
const point& fc = fCtrs[facei];
@ -442,7 +442,7 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::faceFlatness
sumA += mag(n);
}
faceFlatness[facei] = magAreas[facei]/(sumA + ROOTVSMALL);
faceFlatness[facei] = magAreas[facei]/(sumA + 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
@ -120,7 +120,7 @@ void Foam::primitiveMesh::makeFaceCentresAndAreas
// This is to deal with zero-area faces. Mark very small faces
// to be detected in e.g., processorPolyPatch.
if (sumA < ROOTVSMALL)
if (sumA < rootVSmall)
{
fCtrs[facei] = fCentre;
fAreas[facei] = Zero;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -46,7 +46,7 @@ bool Foam::primitiveMesh::pointInCellBB
false
);
if (inflationFraction > SMALL)
if (inflationFraction > small)
{
vector inflation = inflationFraction*vector::one*mag(bb.span());
bb = boundBox(bb.min() - inflation, bb.max() + inflation);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -127,7 +127,7 @@ typename Foam::cut::opAddResult<AboveOp, BelowOp>::type Foam::tetCut
{
// Get the min and max over all four vertices and quick return if there is
// no change of sign
scalar levelMin = VGREAT, levelMax = - VGREAT;
scalar levelMin = vGreat, levelMax = - vGreat;
for (label i = 0; i < 4; ++ i)
{
levelMin = min(levelMin, level[i]);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -46,15 +46,15 @@ scalar line<point2D, const point2D&>::nearestDist
scalar d = u.perp(v);
if (Foam::mag(d) > VSMALL)
if (Foam::mag(d) > vSmall)
{
scalar s = v.perp(w) / d;
if (s <= SMALL)
if (s <= small)
{
thisPt = start();
}
else if (s >= (1-SMALL))
else if (s >= (1-small))
{
thisPt = end();
}
@ -66,11 +66,11 @@ scalar line<point2D, const point2D&>::nearestDist
scalar t = u.perp(w) / d;
if (t <= SMALL)
if (t <= small)
{
edgePt = e.start();
}
else if (t >= (1-SMALL))
else if (t >= (1-small))
{
edgePt = e.end();
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -138,7 +138,7 @@ Foam::scalar Foam::line<Point, PointRef>::nearestDist
Point crossab = a ^ b;
scalar magCrossSqr = magSqr(crossab);
if (magCrossSqr > VSMALL)
if (magCrossSqr > vSmall)
{
scalar s = ((c ^ b) & crossab)/magCrossSqr;
scalar t = ((c ^ a) & crossab)/magCrossSqr;

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
@ -86,7 +86,7 @@ public:
:
hit_(false),
hitPoint_(Zero),
distance_(GREAT),
distance_(great),
eligibleMiss_(false)
{}
@ -110,7 +110,7 @@ public:
:
hit_(false),
hitPoint_(p),
distance_(GREAT),
distance_(great),
eligibleMiss_(false)
{}

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
@ -65,7 +65,7 @@ public:
//- Construct null
pointHitSort()
:
inter_(false, Zero, GREAT, false),
inter_(false, Zero, great, false),
index_(-1)
{}

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
@ -30,19 +30,19 @@ License
void Foam::plane::calcPntAndVec(const scalarList& C)
{
if (mag(C[0]) > VSMALL)
if (mag(C[0]) > vSmall)
{
point_ = vector((-C[3]/C[0]), 0, 0);
}
else
{
if (mag(C[1]) > VSMALL)
if (mag(C[1]) > vSmall)
{
point_ = vector(0, (-C[3]/C[1]), 0);
}
else
{
if (mag(C[2]) > VSMALL)
if (mag(C[2]) > vSmall)
{
point_ = vector(0, 0, (-C[3]/C[2]));
}
@ -58,7 +58,7 @@ void Foam::plane::calcPntAndVec(const scalarList& C)
normal_ = vector(C[0], C[1], C[2]);
scalar magUnitVector(mag(normal_));
if (magUnitVector < VSMALL)
if (magUnitVector < vSmall)
{
FatalErrorInFunction
<< "Plane normal defined with zero length"
@ -82,9 +82,9 @@ void Foam::plane::calcPntAndVec
if
(
mag(line12) < VSMALL
|| mag(line23) < VSMALL
|| mag(point3-point1) < VSMALL
mag(line12) < vSmall
|| mag(line23) < vSmall
|| mag(point3-point1) < vSmall
)
{
FatalErrorInFunction
@ -95,7 +95,7 @@ void Foam::plane::calcPntAndVec
normal_ = line12 ^ line23;
scalar magUnitVector(mag(normal_));
if (magUnitVector < VSMALL)
if (magUnitVector < vSmall)
{
FatalErrorInFunction
<< "Plane normal defined with zero length" << nl
@ -116,7 +116,7 @@ Foam::plane::plane(const vector& normalVector)
{
scalar magUnitVector(mag(normal_));
if (magUnitVector > VSMALL)
if (magUnitVector > vSmall)
{
normal_ /= magUnitVector;
}
@ -136,7 +136,7 @@ Foam::plane::plane(const point& basePoint, const vector& normalVector)
{
scalar magUnitVector(mag(normal_));
if (magUnitVector > VSMALL)
if (magUnitVector > vSmall)
{
normal_ /= magUnitVector;
}
@ -230,7 +230,7 @@ Foam::plane::plane(Istream& is)
{
scalar magUnitVector(mag(normal_));
if (magUnitVector > VSMALL)
if (magUnitVector > vSmall)
{
normal_ /= magUnitVector;
}
@ -322,7 +322,7 @@ Foam::scalar Foam::plane::normalIntersect
const vector& dir
) const
{
scalar denom = stabilise((dir & normal_), VSMALL);
scalar denom = stabilise((dir & normal_), vSmall);
return ((point_ - pnt0) & normal_)/denom;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -189,7 +189,7 @@ inline Point Foam::tetrahedron<Point, PointRef>::circumCentre() const
vector num = lambda*ba - mu*ca;
scalar denom = (c & ba);
if (Foam::mag(denom) < ROOTVSMALL)
if (Foam::mag(denom) < rootVSmall)
{
// Degenerate tetrahedron, returning centre instead of circumCentre.
@ -216,10 +216,10 @@ inline Foam::scalar Foam::tetrahedron<Point, PointRef>::circumRadius() const
vector num = lambda*ba - mu*ca;
scalar denom = (c & ba);
if (Foam::mag(denom) < ROOTVSMALL)
if (Foam::mag(denom) < rootVSmall)
{
// Degenerate tetrahedron, returning GREAT for circumRadius.
return GREAT;
// Degenerate tetrahedron, returning great for circumRadius.
return great;
}
return Foam::mag(0.5*(a + num/denom));
@ -233,8 +233,8 @@ inline Foam::scalar Foam::tetrahedron<Point, PointRef>::quality() const
mag()
/(
8.0/(9.0*sqrt(3.0))
*pow3(min(circumRadius(), GREAT))
+ ROOTVSMALL
*pow3(min(circumRadius(), great))
+ rootVSmall
);
}
@ -304,7 +304,7 @@ inline Foam::scalar Foam::tetrahedron<Point, PointRef>::pointToBarycentric
scalar detT = det(t);
if (Foam::mag(detT) < SMALL)
if (Foam::mag(detT) < small)
{
// Degenerate tetrahedron, returning 1/4 barycentric coordinates
@ -338,7 +338,7 @@ inline Foam::pointHit Foam::tetrahedron<Point, PointRef>::nearestPoint
point closestPt = p;
scalar minOutsideDistance = VGREAT;
scalar minOutsideDistance = vGreat;
bool inside = true;
@ -424,7 +424,7 @@ bool Foam::tetrahedron<Point, PointRef>::inside(const point& pt) const
{
// For robustness, assuming that the point is in the tet unless
// "definitively" shown otherwise by obtaining a positive dot
// product greater than a tolerance of SMALL.
// product greater than a tolerance of small.
// The tet is defined: tet(Cc, tetBasePt, pA, pB) where the normal
// vectors and base points for the half-space planes are:
@ -444,9 +444,9 @@ bool Foam::tetrahedron<Point, PointRef>::inside(const point& pt) const
const point& basePt = b_;
n = Sa();
n /= (Foam::mag(n) + VSMALL);
n /= (Foam::mag(n) + vSmall);
if (((pt - basePt) & n) > SMALL)
if (((pt - basePt) & n) > small)
{
return false;
}
@ -457,9 +457,9 @@ bool Foam::tetrahedron<Point, PointRef>::inside(const point& pt) const
const point& basePt = c_;
n = Sb();
n /= (Foam::mag(n) + VSMALL);
n /= (Foam::mag(n) + vSmall);
if (((pt - basePt) & n) > SMALL)
if (((pt - basePt) & n) > small)
{
return false;
}
@ -470,9 +470,9 @@ bool Foam::tetrahedron<Point, PointRef>::inside(const point& pt) const
const point& basePt = b_;
n = Sc();
n /= (Foam::mag(n) + VSMALL);
n /= (Foam::mag(n) + vSmall);
if (((pt - basePt) & n) > SMALL)
if (((pt - basePt) & n) > small)
{
return false;
}
@ -483,9 +483,9 @@ bool Foam::tetrahedron<Point, PointRef>::inside(const point& pt) const
const point& basePt = b_;
n = Sd();
n /= (Foam::mag(n) + VSMALL);
n /= (Foam::mag(n) + vSmall);
if (((pt - basePt) & n) > SMALL)
if (((pt - basePt) & n) > small)
{
return false;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -91,7 +91,7 @@ public:
//- Set the planar tolerance, returning the previous value
static scalar setPlanarTol(const scalar t)
{
if (t < -VSMALL)
if (t < -vSmall)
{
FatalErrorInFunction
<< abort(FatalError);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -119,7 +119,7 @@ inline Point Foam::triangle<Point, PointRef>::circumCentre() const
scalar c = c1 + c2 + c3;
if (Foam::mag(c) < ROOTVSMALL)
if (Foam::mag(c) < rootVSmall)
{
// Degenerate triangle, returning centre instead of circumCentre.
@ -142,17 +142,17 @@ inline Foam::scalar Foam::triangle<Point, PointRef>::circumRadius() const
scalar denom = d2*d3 + d3*d1 + d1*d2;
if (Foam::mag(denom) < VSMALL)
if (Foam::mag(denom) < vSmall)
{
// Degenerate triangle, returning GREAT for circumRadius.
// Degenerate triangle, returning great for circumRadius.
return GREAT;
return great;
}
else
{
scalar a = (d1 + d2)*(d2 + d3)*(d3 + d1) / denom;
return 0.5*Foam::sqrt(min(GREAT, max(0, a)));
return 0.5*Foam::sqrt(min(great, max(0, a)));
}
}
@ -162,10 +162,10 @@ inline Foam::scalar Foam::triangle<Point, PointRef>::quality() const
{
scalar c = circumRadius();
if (c < ROOTVSMALL)
if (c < rootVSmall)
{
// zero circumRadius, something has gone wrong.
return SMALL;
return small;
}
return mag()/(Foam::sqr(c)*3.0*sqrt(3.0)/4.0);
@ -289,7 +289,7 @@ inline Foam::scalar Foam::triangle<Point, PointRef>::pointToBarycentric
scalar denom = d00*d11 - d01*d01;
if (Foam::mag(denom) < SMALL)
if (Foam::mag(denom) < small)
{
// Degenerate triangle, returning 1/3 barycentric coordinates.
@ -326,7 +326,7 @@ inline Foam::pointHit Foam::triangle<Point, PointRef>::ray
vector n(0.5*(E0 ^ E1));
scalar area = Foam::mag(n);
if (area < VSMALL)
if (area < vSmall)
{
// Ineligible miss.
inter.setMiss(false);
@ -392,7 +392,7 @@ inline Foam::pointHit Foam::triangle<Point, PointRef>::ray
|| (alg == intersection::HALF_RAY && dist > -planarPointTol)
|| (
alg == intersection::VISIBLE
&& ((q1 & normal()) < -VSMALL)
&& ((q1 & normal()) < -vSmall)
);
if (hit && eligible)
@ -441,12 +441,12 @@ inline Foam::pointHit Foam::triangle<Point, PointRef>::intersection
const scalar det = edge1 & pVec;
// Initialise to miss
pointHit intersection(false, Zero, GREAT, false);
pointHit intersection(false, Zero, great, false);
if (alg == intersection::VISIBLE)
{
// Culling branch
if (det < ROOTVSMALL)
if (det < rootVSmall)
{
// Ray on wrong side of triangle. Return miss
return intersection;
@ -455,7 +455,7 @@ inline Foam::pointHit Foam::triangle<Point, PointRef>::intersection
else if (alg == intersection::HALF_RAY || alg == intersection::FULL_RAY)
{
// Non-culling branch
if (det > -ROOTVSMALL && det < ROOTVSMALL)
if (det > -rootVSmall && det < rootVSmall)
{
// Ray parallel to triangle. Return miss
return intersection;
@ -552,7 +552,7 @@ Foam::pointHit Foam::triangle<Point, PointRef>::nearestPointClassify
if (vc <= 0.0 && d1 >= 0.0 && d3 <= 0.0)
{
if ((d1 - d3) < ROOTVSMALL)
if ((d1 - d3) < rootVSmall)
{
// Degenerate triangle, for d1 = d3, a_ and b_ are likely coincident
nearType = POINT;
@ -588,7 +588,7 @@ Foam::pointHit Foam::triangle<Point, PointRef>::nearestPointClassify
if (vb <= 0.0 && d2 >= 0.0 && d6 <= 0.0)
{
if ((d2 - d6) < ROOTVSMALL)
if ((d2 - d6) < rootVSmall)
{
// Degenerate triangle, for d2 = d6, a_ and c_ are likely coincident
nearType = POINT;
@ -610,7 +610,7 @@ Foam::pointHit Foam::triangle<Point, PointRef>::nearestPointClassify
if (va <= 0.0 && (d4 - d3) >= 0.0 && (d5 - d6) >= 0.0)
{
if (((d4 - d3) + (d5 - d6)) < ROOTVSMALL)
if (((d4 - d3) + (d5 - d6)) < rootVSmall)
{
// Degenerate triangle, for (d4 - d3) = (d6 - d5), b_ and c_ are
// likely coincident
@ -631,7 +631,7 @@ Foam::pointHit Foam::triangle<Point, PointRef>::nearestPointClassify
// P inside face region. Compute Q through its barycentric
// coordinates (u, v, w)
if ((va + vb + vc) < ROOTVSMALL)
if ((va + vb + vc) < rootVSmall)
{
// Degenerate triangle, return the centre because no edge or points are
// closest
@ -786,12 +786,12 @@ inline Foam::pointHit Foam::triangle<Point, PointRef>::nearestPoint
triInfo.setPoint(nearestEdgePoint);
// Convert point on line to pointHit
if (Foam::mag(nearestLinePoint-ln.start()) < SMALL)
if (Foam::mag(nearestLinePoint-ln.start()) < small)
{
lnInfo.setMiss(true);
lnInfo.setPoint(ln.start());
}
else if (Foam::mag(nearestLinePoint-ln.end()) < SMALL)
else if (Foam::mag(nearestLinePoint-ln.end()) < small)
{
lnInfo.setMiss(true);
lnInfo.setPoint(ln.end());

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
@ -28,19 +28,19 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
const Foam::scalar Foam::treeBoundBox::great(GREAT);
const Foam::scalar Foam::treeBoundBox::great(great);
const Foam::treeBoundBox Foam::treeBoundBox::greatBox
(
vector(-GREAT, -GREAT, -GREAT),
vector(GREAT, GREAT, GREAT)
vector(-great, -great, -great),
vector(great, great, great)
);
const Foam::treeBoundBox Foam::treeBoundBox::invertedBox
(
vector(GREAT, GREAT, GREAT),
vector(-GREAT, -GREAT, -GREAT)
vector(great, great, great),
vector(-great, -great, -great)
);
@ -282,7 +282,7 @@ bool Foam::treeBoundBox::intersects
if (ptBits & LEFTBIT)
{
// Intersect with plane V=min, n=-1,0,0
if (Foam::mag(overallVec.x()) > VSMALL)
if (Foam::mag(overallVec.x()) > vSmall)
{
scalar s = (min().x() - overallStart.x())/overallVec.x();
pt.x() = min().x();
@ -299,7 +299,7 @@ bool Foam::treeBoundBox::intersects
else if (ptBits & RIGHTBIT)
{
// Intersect with plane V=max, n=1,0,0
if (Foam::mag(overallVec.x()) > VSMALL)
if (Foam::mag(overallVec.x()) > vSmall)
{
scalar s = (max().x() - overallStart.x())/overallVec.x();
pt.x() = max().x();
@ -314,7 +314,7 @@ bool Foam::treeBoundBox::intersects
else if (ptBits & BOTTOMBIT)
{
// Intersect with plane V=min, n=0,-1,0
if (Foam::mag(overallVec.y()) > VSMALL)
if (Foam::mag(overallVec.y()) > vSmall)
{
scalar s = (min().y() - overallStart.y())/overallVec.y();
pt.x() = overallStart.x() + overallVec.x()*s;
@ -329,7 +329,7 @@ bool Foam::treeBoundBox::intersects
else if (ptBits & TOPBIT)
{
// Intersect with plane V=max, n=0,1,0
if (Foam::mag(overallVec.y()) > VSMALL)
if (Foam::mag(overallVec.y()) > vSmall)
{
scalar s = (max().y() - overallStart.y())/overallVec.y();
pt.x() = overallStart.x() + overallVec.x()*s;
@ -344,7 +344,7 @@ bool Foam::treeBoundBox::intersects
else if (ptBits & BACKBIT)
{
// Intersect with plane V=min, n=0,0,-1
if (Foam::mag(overallVec.z()) > VSMALL)
if (Foam::mag(overallVec.z()) > vSmall)
{
scalar s = (min().z() - overallStart.z())/overallVec.z();
pt.x() = overallStart.x() + overallVec.x()*s;
@ -359,7 +359,7 @@ bool Foam::treeBoundBox::intersects
else if (ptBits & FRONTBIT)
{
// Intersect with plane V=max, n=0,0,1
if (Foam::mag(overallVec.z()) > VSMALL)
if (Foam::mag(overallVec.z()) > vSmall)
{
scalar s = (max().z() - overallStart.z())/overallVec.z();
pt.x() = overallStart.x() + overallVec.x()*s;

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
@ -105,10 +105,10 @@ public:
//- The great value used for greatBox and invertedBox
static const scalar great;
//- As per boundBox::greatBox, but with GREAT instead of VGREAT
//- As per boundBox::greatBox, but with great instead of vGreat
static const treeBoundBox greatBox;
//- As per boundBox::invertedBox, but with GREAT instead of VGREAT
//- As per boundBox::invertedBox, but with great instead of vGreat
static const treeBoundBox invertedBox;
//- Bits used for octant/point coding.

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
@ -54,25 +54,25 @@ const Foam::diagTensor Foam::diagTensor::vsType::one
template<>
const Foam::diagTensor Foam::diagTensor::vsType::max
(
diagTensor::uniform(VGREAT)
diagTensor::uniform(vGreat)
);
template<>
const Foam::diagTensor Foam::diagTensor::vsType::min
(
diagTensor::uniform(-VGREAT)
diagTensor::uniform(-vGreat)
);
template<>
const Foam::diagTensor Foam::diagTensor::vsType::rootMax
(
diagTensor::uniform(ROOTVGREAT)
diagTensor::uniform(rootVGreat)
);
template<>
const Foam::diagTensor Foam::diagTensor::vsType::rootMin
(
diagTensor::uniform(-ROOTVGREAT)
diagTensor::uniform(-rootVGreat)
);

View File

@ -339,11 +339,11 @@ inline Scalar sqrtSumSqr(const Scalar a, const Scalar b)
if (maga > magb)
{
return maga*sqrt(1.0 + sqr(magb/maga));
return maga*sqrt(1 + sqr(magb/maga));
}
else
{
return magb < ScalarVSmall ? 0.0 : magb*sqrt(1.0 + sqr(maga/magb));
return magb < ScalarVSmall ? 0 : magb*sqrt(1 + sqr(maga/magb));
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -65,32 +65,6 @@ inline bool equal(const T& s1, const T& s2)
}
#define MAXMINPOW(retType, type1, type2) \
\
MAXMIN(retType, type1, type2) \
\
inline double pow(const type1 s, const type2 e) \
{ \
return ::pow(double(s), double(e)); \
}
MAXMINPOW(double, double, double)
MAXMINPOW(double, double, float)
MAXMINPOW(double, float, double)
MAXMINPOW(float, float, float)
MAXMINPOW(double, double, int)
MAXMINPOW(double, int, double)
MAXMINPOW(double, double, long)
MAXMINPOW(double, long, double)
MAXMINPOW(float, float, int)
MAXMINPOW(float, int, float)
MAXMINPOW(float, float, long)
MAXMINPOW(float, long, float)
#undef MAXMINPOW
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam

View File

@ -85,6 +85,26 @@ inline Scalar mag(const Scalar s)
return ::fabs(s);
}
#define MAXMINPOW(retType, type1, type2) \
\
MAXMIN(retType, type1, type2) \
\
inline double pow(const type1 s, const type2 e) \
{ \
return ::pow(Scalar(s), Scalar(e)); \
}
MAXMINPOW(Scalar, Scalar, Scalar)
MAXMINPOW(Scalar, Scalar, int)
MAXMINPOW(Scalar, int, Scalar)
MAXMINPOW(Scalar, Scalar, long)
MAXMINPOW(Scalar, long, Scalar)
MAXMINPOW(Scalar, Scalar, float)
MAXMINPOW(Scalar, float, Scalar)
#undef MAXMINPOW
#define transFunc(func) \
inline Scalar func(const Scalar s) \
{ \

View File

@ -85,6 +85,25 @@ inline Scalar mag(const Scalar s)
return ::fabsf(s);
}
#define MAXMINPOW(retType, type1, type2) \
\
MAXMIN(retType, type1, type2) \
\
inline double pow(const type1 s, const type2 e) \
{ \
return ::powf(s, e); \
}
MAXMINPOW(Scalar, Scalar, Scalar)
MAXMINPOW(Scalar, Scalar, int)
MAXMINPOW(Scalar, int, Scalar)
MAXMINPOW(Scalar, Scalar, long)
MAXMINPOW(Scalar, long, Scalar)
#undef MAXMINPOW
#define transFunc(func) \
inline Scalar func(const Scalar s) \
{ \

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
@ -48,25 +48,25 @@ const Foam::sphericalTensor Foam::sphericalTensor::vsType::one
template<>
const Foam::sphericalTensor Foam::sphericalTensor::vsType::max
(
sphericalTensor::uniform(VGREAT)
sphericalTensor::uniform(vGreat)
);
template<>
const Foam::sphericalTensor Foam::sphericalTensor::vsType::min
(
sphericalTensor::uniform(-VGREAT)
sphericalTensor::uniform(-vGreat)
);
template<>
const Foam::sphericalTensor Foam::sphericalTensor::vsType::rootMax
(
sphericalTensor::uniform(ROOTVGREAT)
sphericalTensor::uniform(rootVGreat)
);
template<>
const Foam::sphericalTensor Foam::sphericalTensor::vsType::rootMin
(
sphericalTensor::uniform(-ROOTVGREAT)
sphericalTensor::uniform(-rootVGreat)
);
template<>

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
@ -54,25 +54,25 @@ const Foam::sphericalTensor2D Foam::sphericalTensor2D::vsType::one
template<>
const Foam::sphericalTensor2D Foam::sphericalTensor2D::vsType::max
(
sphericalTensor2D::uniform(VGREAT)
sphericalTensor2D::uniform(vGreat)
);
template<>
const Foam::sphericalTensor2D Foam::sphericalTensor2D::vsType::min
(
sphericalTensor2D::uniform(-VGREAT)
sphericalTensor2D::uniform(-vGreat)
);
template<>
const Foam::sphericalTensor2D Foam::sphericalTensor2D::vsType::rootMax
(
sphericalTensor2D::uniform(ROOTVGREAT)
sphericalTensor2D::uniform(rootVGreat)
);
template<>
const Foam::sphericalTensor2D Foam::sphericalTensor2D::vsType::rootMin
(
sphericalTensor2D::uniform(-ROOTVGREAT)
sphericalTensor2D::uniform(-rootVGreat)
);
template<>

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
@ -53,25 +53,25 @@ const Foam::symmTensor Foam::symmTensor::vsType::one
template<>
const Foam::symmTensor Foam::symmTensor::vsType::max
(
symmTensor::uniform(VGREAT)
symmTensor::uniform(vGreat)
);
template<>
const Foam::symmTensor Foam::symmTensor::vsType::min
(
symmTensor::uniform(-VGREAT)
symmTensor::uniform(-vGreat)
);
template<>
const Foam::symmTensor Foam::symmTensor::vsType::rootMax
(
symmTensor::uniform(ROOTVGREAT)
symmTensor::uniform(rootVGreat)
);
template<>
const Foam::symmTensor Foam::symmTensor::vsType::rootMin
(
symmTensor::uniform(-ROOTVGREAT)
symmTensor::uniform(-rootVGreat)
);
template<>

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
@ -52,25 +52,25 @@ const Foam::symmTensor2D Foam::symmTensor2D::vsType::one
template<>
const Foam::symmTensor2D Foam::symmTensor2D::vsType::max
(
symmTensor2D::uniform(VGREAT)
symmTensor2D::uniform(vGreat)
);
template<>
const Foam::symmTensor2D Foam::symmTensor2D::vsType::min
(
symmTensor2D::uniform(-VGREAT)
symmTensor2D::uniform(-vGreat)
);
template<>
const Foam::symmTensor2D Foam::symmTensor2D::vsType::rootMax
(
symmTensor2D::uniform(ROOTVGREAT)
symmTensor2D::uniform(rootVGreat)
);
template<>
const Foam::symmTensor2D Foam::symmTensor2D::vsType::rootMin
(
symmTensor2D::uniform(-ROOTVGREAT)
symmTensor2D::uniform(-rootVGreat)
);
template<>

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -49,16 +49,16 @@ template<>
const Foam::tensor Foam::tensor::vsType::one(tensor::uniform(1));
template<>
const Foam::tensor Foam::tensor::vsType::max(tensor::uniform(VGREAT));
const Foam::tensor Foam::tensor::vsType::max(tensor::uniform(vGreat));
template<>
const Foam::tensor Foam::tensor::vsType::min(tensor::uniform(-VGREAT));
const Foam::tensor Foam::tensor::vsType::min(tensor::uniform(-vGreat));
template<>
const Foam::tensor Foam::tensor::vsType::rootMax(tensor::uniform(ROOTVGREAT));
const Foam::tensor Foam::tensor::vsType::rootMax(tensor::uniform(rootVGreat));
template<>
const Foam::tensor Foam::tensor::vsType::rootMin(tensor::uniform(-ROOTVGREAT));
const Foam::tensor Foam::tensor::vsType::rootMin(tensor::uniform(-rootVGreat));
template<>
const Foam::tensor Foam::tensor::I
@ -103,10 +103,10 @@ Foam::vector Foam::eigenValues(const tensor& t)
lambda[i] = 0;
break;
case roots::posInf:
lambda[i] = VGREAT;
lambda[i] = vGreat;
break;
case roots::negInf:
lambda[i] = - VGREAT;
lambda[i] = - vGreat;
break;
case roots::nan:
FatalErrorInFunction
@ -157,7 +157,7 @@ Foam::vector Foam::eigenVector
magSd2 = mag(sd2);
// Evaluate the eigenvector using the largest sub-determinant
if (magSd0 >= magSd1 && magSd0 >= magSd2 && magSd0 > SMALL)
if (magSd0 >= magSd1 && magSd0 >= magSd2 && magSd0 > small)
{
vector ev
(
@ -168,7 +168,7 @@ Foam::vector Foam::eigenVector
return ev/mag(ev);
}
else if (magSd1 >= magSd2 && magSd1 > SMALL)
else if (magSd1 >= magSd2 && magSd1 > small)
{
vector ev
(
@ -179,7 +179,7 @@ Foam::vector Foam::eigenVector
return ev/mag(ev);
}
else if (magSd2 > SMALL)
else if (magSd2 > small)
{
vector ev
(
@ -200,7 +200,7 @@ Foam::vector Foam::eigenVector
magSd2 = mag(sd2);
// Evaluate the eigenvector using the largest sub-determinant
if (magSd0 >= magSd1 && magSd0 >= magSd2 && magSd0 > SMALL)
if (magSd0 >= magSd1 && magSd0 >= magSd2 && magSd0 > small)
{
vector ev
(
@ -211,7 +211,7 @@ Foam::vector Foam::eigenVector
return ev/mag(ev);
}
else if (magSd1 >= magSd2 && magSd1 > SMALL)
else if (magSd1 >= magSd2 && magSd1 > small)
{
vector ev
(
@ -222,7 +222,7 @@ Foam::vector Foam::eigenVector
return ev/mag(ev);
}
else if (magSd2 > SMALL)
else if (magSd2 > small)
{
vector ev
(

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,25 +53,25 @@ const Foam::tensor2D Foam::tensor2D::vsType::one
template<>
const Foam::tensor2D Foam::tensor2D::vsType::max
(
tensor2D::uniform(VGREAT)
tensor2D::uniform(vGreat)
);
template<>
const Foam::tensor2D Foam::tensor2D::vsType::min
(
tensor2D::uniform(-VGREAT)
tensor2D::uniform(-vGreat)
);
template<>
const Foam::tensor2D Foam::tensor2D::vsType::rootMax
(
tensor2D::uniform(ROOTVGREAT)
tensor2D::uniform(rootVGreat)
);
template<>
const Foam::tensor2D Foam::tensor2D::vsType::rootMin
(
tensor2D::uniform(-ROOTVGREAT)
tensor2D::uniform(-rootVGreat)
);
template<>
@ -109,10 +109,10 @@ Foam::vector2D Foam::eigenValues(const tensor2D& t)
lambda[i] = 0;
break;
case roots::posInf:
lambda[i] = VGREAT;
lambda[i] = vGreat;
break;
case roots::negInf:
lambda[i] = - VGREAT;
lambda[i] = - vGreat;
break;
case roots::nan:
FatalErrorInFunction
@ -142,13 +142,13 @@ Foam::vector2D Foam::eigenVector
tensor2D A(T - lambda*tensor2D::I);
// Evaluate the eigenvector using the largest divisor
if (mag(A.yy()) > mag(A.xx()) && mag(A.yy()) > SMALL)
if (mag(A.yy()) > mag(A.xx()) && mag(A.yy()) > small)
{
vector2D ev(1, - A.yx()/A.yy());
return ev/mag(ev);
}
else if (mag(A.xx()) > SMALL)
else if (mag(A.xx()) > small)
{
vector2D ev(- A.xy()/A.xx(), 1);

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
@ -54,25 +54,25 @@ const Foam::complexVector Foam::complexVector::vsType::one
template<>
const Foam::complexVector Foam::complexVector::vsType::max
(
complexVector::uniform(complex(VGREAT, VGREAT))
complexVector::uniform(complex(vGreat, vGreat))
);
template<>
const Foam::complexVector Foam::complexVector::vsType::min
(
complexVector::uniform(complex(-VGREAT, -VGREAT))
complexVector::uniform(complex(-vGreat, -vGreat))
);
template<>
const Foam::complexVector Foam::complexVector::vsType::rootMax
(
complexVector::uniform(complex(ROOTVGREAT, ROOTVGREAT))
complexVector::uniform(complex(rootVGreat, rootVGreat))
);
template<>
const Foam::complexVector Foam::complexVector::vsType::rootMin
(
complexVector::uniform(complex(-ROOTVGREAT, -ROOTVGREAT))
complexVector::uniform(complex(-rootVGreat, -rootVGreat))
);

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
@ -43,16 +43,16 @@ template<>
const Foam::vector Foam::vector::vsType::one(vector::uniform(1));
template<>
const Foam::vector Foam::vector::vsType::max(vector::uniform(VGREAT));
const Foam::vector Foam::vector::vsType::max(vector::uniform(vGreat));
template<>
const Foam::vector Foam::vector::vsType::min(vector::uniform(-VGREAT));
const Foam::vector Foam::vector::vsType::min(vector::uniform(-vGreat));
template<>
const Foam::vector Foam::vector::vsType::rootMax(vector::uniform(ROOTVGREAT));
const Foam::vector Foam::vector::vsType::rootMax(vector::uniform(rootVGreat));
template<>
const Foam::vector Foam::vector::vsType::rootMin(vector::uniform(-ROOTVGREAT));
const Foam::vector Foam::vector::vsType::rootMin(vector::uniform(-rootVGreat));
// ************************************************************************* //

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
@ -51,25 +51,25 @@ const Foam::vector2D Foam::vector2D::vsType::one
template<>
const Foam::vector2D Foam::vector2D::vsType::max
(
vector2D::uniform(VGREAT)
vector2D::uniform(vGreat)
);
template<>
const Foam::vector2D Foam::vector2D::vsType::min
(
vector2D::uniform(-VGREAT)
vector2D::uniform(-vGreat)
);
template<>
const Foam::vector2D Foam::vector2D::vsType::rootMax
(
vector2D::uniform(ROOTVGREAT)
vector2D::uniform(rootVGreat)
);
template<>
const Foam::vector2D Foam::vector2D::vsType::rootMin
(
vector2D::uniform(-ROOTVGREAT)
vector2D::uniform(-rootVGreat)
);

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
@ -52,7 +52,7 @@ Foam::Function1Types::Polynomial<Type>::Polynomial
forAll(coeffs_, i)
{
if (mag(coeffs_[i].second() + pTraits<Type>::one) < ROOTVSMALL)
if (mag(coeffs_[i].second() + pTraits<Type>::one) < rootVSmall)
{
canIntegrate_ = false;
break;
@ -91,7 +91,7 @@ Foam::Function1Types::Polynomial<Type>::Polynomial
forAll(coeffs_, i)
{
if (mag(coeffs_[i].second() + 1) < ROOTVSMALL)
if (mag(coeffs_[i].second() + 1) < rootVSmall)
{
canIntegrate_ = false;
break;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -241,7 +241,7 @@ Foam::Polynomial<PolySize>::integralMinus1(const scalar intConstant) const
{
polyType newCoeffs;
if (this->v_[0] > VSMALL)
if (this->v_[0] > vSmall)
{
newCoeffs.logActive_ = true;
newCoeffs.logCoeff_ = this->v_[0];

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -63,7 +63,7 @@ Foam::polynomialFunction Foam::polynomialFunction::cloneIntegralMinus1
{
polynomialFunction newPoly(poly.size()+1);
if (poly[0] > VSMALL)
if (poly[0] > vSmall)
{
newPoly.logActive_ = true;
newPoly.logCoeff_ = poly[0];

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -63,7 +63,7 @@ Foam::label Foam::globalIndexAndTransform::matchTransform
scalar vectorDiff =
mag(refTransform.t() - testTransform.t())
/(maxVectorMag + VSMALL)
/(maxVectorMag + vSmall)
/tolerance;
// Test the difference between tensor parts to see if it is
@ -98,7 +98,7 @@ Foam::label Foam::globalIndexAndTransform::matchTransform
vectorDiff =
mag(refTransform.t() + testTransform.t())
/(maxVectorMag + VSMALL)
/(maxVectorMag + vSmall)
/tolerance;
tensorDiff = 0;
@ -165,7 +165,7 @@ void Foam::globalIndexAndTransform::determineTransforms()
{
const vector& sepVec = sepVecs[sVI];
if (mag(sepVec) > SMALL)
if (mag(sepVec) > small)
{
vectorTensorTransform transform(sepVec);
@ -195,7 +195,7 @@ void Foam::globalIndexAndTransform::determineTransforms()
{
const tensor& transT = transTensors[tTI];
if (mag(transT - I) > SMALL)
if (mag(transT - I) > small)
{
vectorTensorTransform transform(transT);
@ -244,7 +244,7 @@ void Foam::globalIndexAndTransform::determineTransforms()
{
const vectorTensorTransform& transform = procTransVecs[pSVI];
if (mag(transform.t()) > SMALL || transform.hasR())
if (mag(transform.t()) > small || transform.hasR())
{
if
(
@ -351,7 +351,7 @@ void Foam::globalIndexAndTransform::determinePatchTransformSign()
{
const vector& sepVec = sepVecs[sVI];
if (mag(sepVec) > SMALL)
if (mag(sepVec) > small)
{
vectorTensorTransform t(sepVec);
@ -380,7 +380,7 @@ void Foam::globalIndexAndTransform::determinePatchTransformSign()
{
const tensor& transT = transTensors[tTI];
if (mag(transT - I) > SMALL)
if (mag(transT - I) > small)
{
vectorTensorTransform t(transT);

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
@ -190,7 +190,7 @@ public:
const label transformIndex,
const label patchi,
const bool isSendingSide = true,
const scalar tol = SMALL
const scalar tol = small
) const;
//- Combine two transformIndices

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
@ -188,7 +188,7 @@ Foam::label Foam::globalIndexAndTransform::addToTransformIndex
bool antiCyclic = false;
const vectorTensorTransform& vt = transforms_[matchTransI];
if (mag(vt.t()) < SMALL && vt.hasR())
if (mag(vt.t()) < small && vt.hasR())
{
const tensor& R = vt.R();
scalar sumDiag = tr(R);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -114,7 +114,7 @@ inline Foam::scalar Foam::cubicEqn::derivative(const scalar x) const
inline Foam::scalar Foam::cubicEqn::error(const scalar x) const
{
return mag(SMALL*x*(x*(x*3*a() + 2*b()) + c()));
return mag(small*x*(x*(x*3*a() + 2*b()) + c()));
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2017-2018 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -82,7 +82,7 @@ inline Foam::scalar Foam::linearEqn::derivative(const scalar x) const
inline Foam::scalar Foam::linearEqn::error(const scalar x) const
{
return mag(SMALL*x*a());
return mag(small*x*a());
}
@ -105,7 +105,7 @@ inline Foam::Roots<1> Foam::linearEqn::roots() const
return Roots<1>(roots::nan, 0);
}
if (mag(b/VGREAT) >= mag(a))
if (mag(b/vGreat) >= mag(a))
{
return Roots<1>(sign(a) == sign(b) ? roots::negInf : roots::posInf, 0);
}

Some files were not shown because too many files have changed in this diff Show More