mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Reverted the Americanism "math" back to the original "mathematical" and reverted name of
the include file back to mathematicalConstants.H to make upgrading code slightly easier.
This commit is contained in:
@ -26,7 +26,7 @@ License
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "cellQuality.H"
|
||||
#include "mathConstants.H"
|
||||
#include "mathematicalConstants.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
@ -67,7 +67,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::nonOrthogonality() const
|
||||
|
||||
scalar cosDDotS =
|
||||
Foam::acos(min(1.0, (d & s)/(mag(d)*magS + VSMALL)))
|
||||
*180.0/constant::math::pi;
|
||||
*180.0/constant::mathematical::pi;
|
||||
|
||||
result[own[faceI]] = max(cosDDotS, result[own[faceI]]);
|
||||
|
||||
@ -93,7 +93,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::nonOrthogonality() const
|
||||
|
||||
scalar cosDDotS =
|
||||
Foam::acos(min(1.0, (d & s)/(mag(d)*magS + VSMALL)))
|
||||
*180.0/constant::math::pi;
|
||||
*180.0/constant::mathematical::pi;
|
||||
|
||||
result[faceCells[faceI]] = max(cosDDotS, result[faceCells[faceI]]);
|
||||
}
|
||||
@ -208,7 +208,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::faceNonOrthogonality() const
|
||||
|
||||
scalar cosDDotS =
|
||||
Foam::acos(min(1.0, (d & s)/(mag(d)*magS + VSMALL)))
|
||||
*180.0/constant::math::pi;
|
||||
*180.0/constant::mathematical::pi;
|
||||
|
||||
result[faceI] = cosDDotS;
|
||||
}
|
||||
@ -234,7 +234,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::faceNonOrthogonality() const
|
||||
|
||||
scalar cosDDotS =
|
||||
Foam::acos(min(1.0, (d & s)/(mag(d)*magS + VSMALL)))
|
||||
*180.0/constant::math::pi;
|
||||
*180.0/constant::mathematical::pi;
|
||||
|
||||
result[globalFaceI++] = cosDDotS;
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ License
|
||||
#include "EulerCoordinateRotation.H"
|
||||
|
||||
#include "Switch.H"
|
||||
#include "mathConstants.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
@ -59,9 +59,9 @@ void Foam::EulerCoordinateRotation::calcTransform
|
||||
|
||||
if (inDegrees)
|
||||
{
|
||||
phi *= constant::math::pi/180.0;
|
||||
theta *= constant::math::pi/180.0;
|
||||
psi *= constant::math::pi/180.0;
|
||||
phi *= constant::mathematical::pi/180.0;
|
||||
theta *= constant::mathematical::pi/180.0;
|
||||
psi *= constant::mathematical::pi/180.0;
|
||||
}
|
||||
|
||||
tensor::operator=
|
||||
|
||||
@ -27,7 +27,7 @@ License
|
||||
#include "STARCDCoordinateRotation.H"
|
||||
|
||||
#include "Switch.H"
|
||||
#include "mathConstants.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
@ -60,9 +60,9 @@ void Foam::STARCDCoordinateRotation::calcTransform
|
||||
|
||||
if (inDegrees)
|
||||
{
|
||||
x *= constant::math::pi/180.0;
|
||||
y *= constant::math::pi/180.0;
|
||||
z *= constant::math::pi/180.0;
|
||||
x *= constant::mathematical::pi/180.0;
|
||||
y *= constant::mathematical::pi/180.0;
|
||||
z *= constant::mathematical::pi/180.0;
|
||||
}
|
||||
|
||||
tensor::operator=
|
||||
|
||||
@ -28,7 +28,7 @@ License
|
||||
|
||||
#include "one.H"
|
||||
#include "Switch.H"
|
||||
#include "mathConstants.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
@ -133,7 +133,7 @@ Foam::vector Foam::cylindricalCS::localToGlobal
|
||||
{
|
||||
scalar theta
|
||||
(
|
||||
local.y()*(inDegrees_ ? constant::math::pi/180.0 : 1.0)
|
||||
local.y()*(inDegrees_ ? constant::mathematical::pi/180.0 : 1.0)
|
||||
);
|
||||
|
||||
return coordinateSystem::localToGlobal
|
||||
@ -153,7 +153,7 @@ Foam::tmp<Foam::vectorField> Foam::cylindricalCS::localToGlobal
|
||||
scalarField theta =
|
||||
(
|
||||
local.component(vector::Y)
|
||||
*(inDegrees_ ? constant::math::pi/180.0 : 1.0)
|
||||
*(inDegrees_ ? constant::mathematical::pi/180.0 : 1.0)
|
||||
);
|
||||
|
||||
|
||||
@ -181,7 +181,7 @@ Foam::vector Foam::cylindricalCS::globalToLocal
|
||||
(
|
||||
lc.y(),
|
||||
lc.x()
|
||||
)*(inDegrees_ ? 180.0/constant::math::pi : 1.0),
|
||||
)*(inDegrees_ ? 180.0/constant::mathematical::pi : 1.0),
|
||||
lc.z()
|
||||
);
|
||||
}
|
||||
@ -212,7 +212,7 @@ Foam::tmp<Foam::vectorField> Foam::cylindricalCS::globalToLocal
|
||||
(
|
||||
lc.component(vector::Y),
|
||||
lc.component(vector::X)
|
||||
)*(inDegrees_ ? 180.0/constant::math::pi : 1.0)
|
||||
)*(inDegrees_ ? 180.0/constant::mathematical::pi : 1.0)
|
||||
);
|
||||
|
||||
result.replace(vector::Z, lc.component(vector::Z));
|
||||
|
||||
@ -28,7 +28,7 @@ License
|
||||
|
||||
#include "one.H"
|
||||
#include "Switch.H"
|
||||
#include "mathConstants.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
@ -135,12 +135,12 @@ Foam::vector Foam::sphericalCS::localToGlobal
|
||||
const scalar theta
|
||||
(
|
||||
local.y()
|
||||
*(inDegrees_ ? constant::math::pi/180.0 : 1.0)
|
||||
*(inDegrees_ ? constant::mathematical::pi/180.0 : 1.0)
|
||||
);
|
||||
const scalar phi
|
||||
(
|
||||
local.z()
|
||||
*(inDegrees_ ? constant::math::pi/180.0 : 1.0)
|
||||
*(inDegrees_ ? constant::mathematical::pi/180.0 : 1.0)
|
||||
);
|
||||
|
||||
return coordinateSystem::localToGlobal
|
||||
@ -161,12 +161,12 @@ Foam::tmp<Foam::vectorField> Foam::sphericalCS::localToGlobal
|
||||
const scalarField theta
|
||||
(
|
||||
local.component(vector::Y)
|
||||
*(inDegrees_ ? constant::math::pi/180.0 : 1.0)
|
||||
*(inDegrees_ ? constant::mathematical::pi/180.0 : 1.0)
|
||||
);
|
||||
const scalarField phi
|
||||
(
|
||||
local.component(vector::Z)
|
||||
*(inDegrees_ ? constant::math::pi/180.0 : 1.0)
|
||||
*(inDegrees_ ? constant::mathematical::pi/180.0 : 1.0)
|
||||
);
|
||||
|
||||
vectorField lc(local.size());
|
||||
@ -193,11 +193,11 @@ Foam::vector Foam::sphericalCS::globalToLocal
|
||||
atan2
|
||||
(
|
||||
lc.y(), lc.x()
|
||||
)*(inDegrees_ ? 180.0/constant::math::pi : 1.0),
|
||||
)*(inDegrees_ ? 180.0/constant::mathematical::pi : 1.0),
|
||||
acos
|
||||
(
|
||||
lc.z()/(r + SMALL)
|
||||
)*(inDegrees_ ? 180.0/constant::math::pi : 1.0)
|
||||
)*(inDegrees_ ? 180.0/constant::mathematical::pi : 1.0)
|
||||
);
|
||||
}
|
||||
|
||||
@ -227,7 +227,7 @@ Foam::tmp<Foam::vectorField> Foam::sphericalCS::globalToLocal
|
||||
(
|
||||
lc.component(vector::Y),
|
||||
lc.component(vector::X)
|
||||
)*(inDegrees_ ? 180.0/constant::math::pi : 1.0)
|
||||
)*(inDegrees_ ? 180.0/constant::mathematical::pi : 1.0)
|
||||
);
|
||||
|
||||
result.replace
|
||||
@ -236,7 +236,7 @@ Foam::tmp<Foam::vectorField> Foam::sphericalCS::globalToLocal
|
||||
acos
|
||||
(
|
||||
lc.component(vector::Z)/(r + SMALL)
|
||||
)*(inDegrees_ ? 180.0/constant::math::pi : 1.0)
|
||||
)*(inDegrees_ ? 180.0/constant::mathematical::pi : 1.0)
|
||||
);
|
||||
|
||||
return tresult;
|
||||
|
||||
@ -26,7 +26,7 @@ License
|
||||
|
||||
#include "toroidalCS.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "mathConstants.H"
|
||||
#include "mathematicalConstants.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
@ -72,8 +72,8 @@ Foam::vector Foam::toroidalCS::localToGlobal
|
||||
) const
|
||||
{
|
||||
// Notation: r = local.x()
|
||||
scalar theta = local.y()*constant::math::pi/180.0;
|
||||
scalar phi = local.z()*constant::math::pi/180.0;
|
||||
scalar theta = local.y()*constant::mathematical::pi/180.0;
|
||||
scalar phi = local.z()*constant::mathematical::pi/180.0;
|
||||
|
||||
scalar rprime = radius_ + local.x()*sin(phi);
|
||||
|
||||
@ -101,10 +101,10 @@ Foam::tmp<Foam::vectorField> Foam::toroidalCS::localToGlobal
|
||||
const scalarField r = local.component(vector::X);
|
||||
|
||||
const scalarField theta =
|
||||
local.component(vector::Y)*constant::math::pi/180.0;
|
||||
local.component(vector::Y)*constant::mathematical::pi/180.0;
|
||||
|
||||
const scalarField phi =
|
||||
local.component(vector::Z)*constant::math::pi/180.0;
|
||||
local.component(vector::Z)*constant::mathematical::pi/180.0;
|
||||
|
||||
const scalarField rprime = radius_ + r*sin(phi);
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ License
|
||||
|
||||
#include "primitiveMeshGeometry.H"
|
||||
#include "pyramidPointFaceRef.H"
|
||||
#include "mathConstants.H"
|
||||
#include "mathematicalConstants.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -272,7 +272,7 @@ bool Foam::primitiveMeshGeometry::checkFaceDotProduct
|
||||
|
||||
// Severe nonorthogonality threshold
|
||||
const scalar severeNonorthogonalityThreshold =
|
||||
::cos(orthWarn/180.0*constant::math::pi);
|
||||
::cos(orthWarn/180.0*constant::mathematical::pi);
|
||||
|
||||
scalar minDDotS = GREAT;
|
||||
|
||||
@ -304,7 +304,7 @@ bool Foam::primitiveMeshGeometry::checkFaceDotProduct
|
||||
<< " between cells " << own[faceI]
|
||||
<< " and " << nei[faceI]
|
||||
<< ": Angle = "
|
||||
<< ::acos(dDotS)/constant::math::pi*180.0
|
||||
<< ::acos(dDotS)/constant::mathematical::pi*180.0
|
||||
<< " deg." << endl;
|
||||
}
|
||||
|
||||
@ -330,7 +330,7 @@ bool Foam::primitiveMeshGeometry::checkFaceDotProduct
|
||||
<< " between cells " << own[faceI] << " and "
|
||||
<< nei[faceI]
|
||||
<< ": Angle = "
|
||||
<< ::acos(dDotS)/constant::math::pi*180.0
|
||||
<< ::acos(dDotS)/constant::mathematical::pi*180.0
|
||||
<< " deg." << endl;
|
||||
}
|
||||
|
||||
@ -376,9 +376,9 @@ bool Foam::primitiveMeshGeometry::checkFaceDotProduct
|
||||
if (neiSize > 0)
|
||||
{
|
||||
Info<< "Mesh non-orthogonality Max: "
|
||||
<< ::acos(minDDotS)/constant::math::pi*180.0
|
||||
<< ::acos(minDDotS)/constant::mathematical::pi*180.0
|
||||
<< " average: " <<
|
||||
::acos(sumDDotS/neiSize)/constant::math::pi*180.0
|
||||
::acos(sumDDotS/neiSize)/constant::mathematical::pi*180.0
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
@ -780,7 +780,7 @@ bool Foam::primitiveMeshGeometry::checkFaceAngles
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
const scalar maxSin = Foam::sin(maxDeg/180.0*constant::math::pi);
|
||||
const scalar maxSin = Foam::sin(maxDeg/180.0*constant::mathematical::pi);
|
||||
|
||||
const faceList& fcs = mesh.faces();
|
||||
|
||||
@ -861,7 +861,7 @@ bool Foam::primitiveMeshGeometry::checkFaceAngles
|
||||
{
|
||||
scalar maxConcaveDegr =
|
||||
Foam::asin(Foam::min(1.0, maxEdgeSin))
|
||||
*180.0/constant::math::pi;
|
||||
*180.0/constant::mathematical::pi;
|
||||
|
||||
Info<< "There are " << nConcave
|
||||
<< " faces with concave angles between consecutive"
|
||||
|
||||
@ -26,7 +26,7 @@ License
|
||||
|
||||
#include "shapeToCell.H"
|
||||
#include "polyMesh.H"
|
||||
#include "mathConstants.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "hexMatcher.H"
|
||||
#include "cellFeatures.H"
|
||||
|
||||
@ -57,7 +57,7 @@ Foam::topoSetSource::addToUsageTable Foam::shapeToCell::usage_
|
||||
|
||||
// Angle for polys to be considered splitHexes.
|
||||
Foam::scalar Foam::shapeToCell::featureCos =
|
||||
Foam::cos(10.0*Foam::constant::math::pi/180.0);
|
||||
Foam::cos(10.0*Foam::constant::mathematical::pi/180.0);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
@ -36,7 +36,7 @@ License
|
||||
#include "meshTools.H"
|
||||
#include "plane.H"
|
||||
#include "Random.H"
|
||||
#include "mathConstants.H"
|
||||
#include "mathematicalConstants.H"
|
||||
#include "treeBoundBox.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
@ -44,7 +44,7 @@ License
|
||||
defineTypeNameAndDebug(Foam::edgeIntersections, 0);
|
||||
|
||||
Foam::scalar Foam::edgeIntersections::alignedCos_ =
|
||||
Foam::cos(89.0*Foam::constant::math::pi/180.0);
|
||||
Foam::cos(89.0*Foam::constant::mathematical::pi/180.0);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
@ -33,7 +33,7 @@ License
|
||||
#include "linePointRef.H"
|
||||
#include "OFstream.H"
|
||||
#include "IFstream.H"
|
||||
#include "mathConstants.H"
|
||||
#include "mathematicalConstants.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
@ -491,7 +491,7 @@ Foam::labelList Foam::surfaceFeatures::selectFeatureEdges
|
||||
void Foam::surfaceFeatures::findFeatures(const scalar includedAngle)
|
||||
{
|
||||
scalar minCos =
|
||||
Foam::cos((180.0 - includedAngle)*constant::math::pi/180.0);
|
||||
Foam::cos((180.0 - includedAngle)*constant::mathematical::pi/180.0);
|
||||
|
||||
const labelListList& edgeFaces = surf_.edgeFaces();
|
||||
const vectorField& faceNormals = surf_.faceNormals();
|
||||
|
||||
Reference in New Issue
Block a user