STYLE: use ""_deg user-literal for degrees to radians conversion

ENH: add degToRad() multiplier (useful for scalar fields)

- use degToRad() functions throughout instead of scattered local solutions
This commit is contained in:
Mark Olesen
2017-07-04 15:36:46 +02:00
parent f55c568f13
commit 6a0a8b99b3
31 changed files with 60 additions and 93 deletions

View File

@ -122,7 +122,7 @@ int main(int argc, char *argv[])
fileName pointsFile(runTime.constantPath()/"points.tmp");
OFstream pFile(pointsFile);
scalar a(degToRad(0.1));
const scalar a = 0.1_deg;
tensor rotateZ =
tensor
(

View File

@ -419,7 +419,7 @@ if (pFaces[WEDGE].size() && pFaces[WEDGE][0].size())
{
// Distribute the points to be +/- 2.5deg from the x-z plane
scalar tanTheta = Foam::tan(degToRad(2.5));
const scalar tanTheta = Foam::tan(2.5_deg);
SLList<face>::iterator iterf = pFaces[WEDGE][0].begin();
SLList<face>::iterator iterb = pFaces[WEDGE][1].begin();

View File

@ -33,10 +33,10 @@ License
using namespace Foam::vectorTools;
const Foam::scalar Foam::conformalVoronoiMesh::searchConeAngle
= Foam::cos(degToRad(30));
= Foam::cos(30.0_deg);
const Foam::scalar Foam::conformalVoronoiMesh::searchAngleOppositeSurface
= Foam::cos(degToRad(150));
= Foam::cos(150.0_deg);
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //