mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
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:
@ -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
|
||||
@ -108,20 +108,20 @@ scalar getEdgeStats(const primitiveMesh& mesh, const direction excludeCmpt)
|
||||
label nY = 0;
|
||||
label nZ = 0;
|
||||
|
||||
scalar minX = GREAT;
|
||||
scalar maxX = -GREAT;
|
||||
scalar minX = great;
|
||||
scalar maxX = -great;
|
||||
vector x(1, 0, 0);
|
||||
|
||||
scalar minY = GREAT;
|
||||
scalar maxY = -GREAT;
|
||||
scalar minY = great;
|
||||
scalar maxY = -great;
|
||||
vector y(0, 1, 0);
|
||||
|
||||
scalar minZ = GREAT;
|
||||
scalar maxZ = -GREAT;
|
||||
scalar minZ = great;
|
||||
scalar maxZ = -great;
|
||||
vector z(0, 0, 1);
|
||||
|
||||
scalar minOther = GREAT;
|
||||
scalar maxOther = -GREAT;
|
||||
scalar minOther = great;
|
||||
scalar maxOther = -great;
|
||||
|
||||
const edgeList& edges = mesh.edges();
|
||||
|
||||
|
||||
@ -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
|
||||
@ -135,7 +135,7 @@ label mergePatchFaces
|
||||
}
|
||||
else
|
||||
{
|
||||
mesh.checkFacePyramids(false, -SMALL, &errorFaces);
|
||||
mesh.checkFacePyramids(false, -small, &errorFaces);
|
||||
}
|
||||
|
||||
// Sets where the master is in error
|
||||
|
||||
@ -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,10 +72,10 @@ label findPoint(const primitivePatch& pp, const point& nearPoint)
|
||||
const labelList& meshPoints = pp.meshPoints();
|
||||
|
||||
// Find nearest and next nearest
|
||||
scalar minDistSqr = GREAT;
|
||||
scalar minDistSqr = great;
|
||||
label minI = -1;
|
||||
|
||||
scalar almostMinDistSqr = GREAT;
|
||||
scalar almostMinDistSqr = great;
|
||||
label almostMinI = -1;
|
||||
|
||||
forAll(meshPoints, i)
|
||||
@ -136,10 +136,10 @@ label findEdge
|
||||
const edgeList& edges = pp.edges();
|
||||
|
||||
// Find nearest and next nearest
|
||||
scalar minDist = GREAT;
|
||||
scalar minDist = great;
|
||||
label minI = -1;
|
||||
|
||||
scalar almostMinDist = GREAT;
|
||||
scalar almostMinDist = great;
|
||||
label almostMinI = -1;
|
||||
|
||||
forAll(edges, edgeI)
|
||||
@ -218,10 +218,10 @@ label findFace
|
||||
const pointField& points = pp.points();
|
||||
|
||||
// Find nearest and next nearest
|
||||
scalar minDist = GREAT;
|
||||
scalar minDist = great;
|
||||
label minI = -1;
|
||||
|
||||
scalar almostMinDist = GREAT;
|
||||
scalar almostMinDist = great;
|
||||
label almostMinI = -1;
|
||||
|
||||
forAll(pp, patchFacei)
|
||||
@ -289,7 +289,7 @@ label findCell(const primitiveMesh& mesh, const point& nearPoint)
|
||||
const labelList& cPoints = mesh.cellPoints()[celli];
|
||||
|
||||
label minI = -1;
|
||||
scalar minDistSqr = GREAT;
|
||||
scalar minDistSqr = great;
|
||||
|
||||
forAll(cPoints, i)
|
||||
{
|
||||
|
||||
@ -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
|
||||
@ -127,20 +127,20 @@ Foam::scalar Foam::edgeStats::minLen(Ostream& os) const
|
||||
label nY = 0;
|
||||
label nZ = 0;
|
||||
|
||||
scalar minX = GREAT;
|
||||
scalar maxX = -GREAT;
|
||||
scalar minX = great;
|
||||
scalar maxX = -great;
|
||||
vector x(1, 0, 0);
|
||||
|
||||
scalar minY = GREAT;
|
||||
scalar maxY = -GREAT;
|
||||
scalar minY = great;
|
||||
scalar maxY = -great;
|
||||
vector y(0, 1, 0);
|
||||
|
||||
scalar minZ = GREAT;
|
||||
scalar maxZ = -GREAT;
|
||||
scalar minZ = great;
|
||||
scalar maxZ = -great;
|
||||
vector z(0, 0, 1);
|
||||
|
||||
scalar minOther = GREAT;
|
||||
scalar maxOther = -GREAT;
|
||||
scalar minOther = great;
|
||||
scalar maxOther = -great;
|
||||
|
||||
const edgeList& edges = mesh_.edges();
|
||||
|
||||
|
||||
@ -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
|
||||
@ -133,7 +133,7 @@ bool largerAngle
|
||||
// which quadrant angle is. (Is correct for unwarped faces only!)
|
||||
// Correct for non-outwards pointing normal.
|
||||
vector c1c0(mesh.faceCentres()[f1] - mesh.faceCentres()[f0]);
|
||||
c1c0 /= mag(c1c0) + VSMALL;
|
||||
c1c0 /= mag(c1c0) + vSmall;
|
||||
|
||||
scalar fcCosAngle = n0 & c1c0;
|
||||
|
||||
@ -282,10 +282,10 @@ bool splitHex
|
||||
loop[3] = ev.vertToEVert(e[1]);
|
||||
|
||||
scalarField loopWeights(4);
|
||||
loopWeights[0] = -GREAT;
|
||||
loopWeights[1] = -GREAT;
|
||||
loopWeights[2] = -GREAT;
|
||||
loopWeights[3] = -GREAT;
|
||||
loopWeights[0] = -great;
|
||||
loopWeights[1] = -great;
|
||||
loopWeights[2] = -great;
|
||||
loopWeights[3] = -great;
|
||||
|
||||
cutCells.append(celli);
|
||||
cellLoops.append(loop);
|
||||
@ -393,7 +393,7 @@ void collectCuts
|
||||
// Cut information per mesh entity
|
||||
boolList vertIsCut(mesh.nPoints(), false);
|
||||
boolList edgeIsCut(mesh.nEdges(), false);
|
||||
scalarField edgeWeight(mesh.nEdges(), -GREAT);
|
||||
scalarField edgeWeight(mesh.nEdges(), -great);
|
||||
|
||||
forAllConstIter(cellSet, cellsToCut, iter)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user