COMP: intel compiler issues with operator ""_deg (fixes #544)

- this represents a partial revert for commit 6a0a8b99b3
This commit is contained in:
Mark Olesen
2017-07-21 16:40:31 +02:00
parent c0c7c39031
commit b0b4c1aae5
17 changed files with 26 additions and 25 deletions

View File

@ -122,7 +122,7 @@ int main(int argc, char *argv[])
fileName pointsFile(runTime.constantPath()/"points.tmp"); fileName pointsFile(runTime.constantPath()/"points.tmp");
OFstream pFile(pointsFile); OFstream pFile(pointsFile);
const scalar a = 0.1_deg; const scalar a = degToRad(0.1);
tensor rotateZ = tensor rotateZ =
tensor 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 // Distribute the points to be +/- 2.5deg from the x-z plane
const scalar tanTheta = Foam::tan(2.5_deg); const scalar tanTheta = Foam::tan(degToRad(2.5));
SLList<face>::iterator iterf = pFaces[WEDGE][0].begin(); SLList<face>::iterator iterf = pFaces[WEDGE][0].begin();
SLList<face>::iterator iterb = pFaces[WEDGE][1].begin(); SLList<face>::iterator iterb = pFaces[WEDGE][1].begin();

View File

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

View File

@ -43,7 +43,7 @@ namespace Foam
} }
// Angle for polys to be considered splitHexes. // Angle for polys to be considered splitHexes.
const Foam::scalar Foam::topoCellLooper::featureCos = Foam::cos(10.0_deg); const Foam::scalar Foam::topoCellLooper::featureCos = Foam::cos(degToRad(10.0));
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

View File

@ -184,7 +184,7 @@ Foam::undoableMeshCutter::undoableMeshCutter
faceRemover_ faceRemover_
( (
mesh, mesh,
Foam::cos(30.0_deg) Foam::cos(degToRad(30.0))
) )
{} {}

View File

@ -204,7 +204,7 @@ Foam::targetCoeffTrim::targetCoeffTrim
nIter_(50), nIter_(50),
tol_(1e-8), tol_(1e-8),
relax_(1.0), relax_(1.0),
dTheta_(0.1_deg), dTheta_(degToRad(0.1)),
alpha_(1.0) alpha_(1.0)
{ {
read(dict); read(dict);

View File

@ -148,14 +148,14 @@ Foam::label Foam::meshRefinement::createBaffle
// { // {
// return true; // return true;
// } // }
// else if (mag(n1&n2) > cos(30.0_deg)) // else if (mag(n1&n2) > cos(degToRad(30.0)))
// { // {
// // Both normals aligned. Check that test vector perpendicularish to // // Both normals aligned. Check that test vector perpendicularish to
// // surface normal // // surface normal
// scalar magTestDir = mag(testDir); // scalar magTestDir = mag(testDir);
// if (magTestDir > VSMALL) // if (magTestDir > VSMALL)
// { // {
// if (mag(n1&(testDir/magTestDir)) < cos(45.0_deg)) // if (mag(n1&(testDir/magTestDir)) < cos(degToRad(45.0)))
// { // {
// //Pout<< "** disabling baffling face " // //Pout<< "** disabling baffling face "
// // << mesh_.faceCentres()[faceI] << endl; // // << mesh_.faceCentres()[faceI] << endl;

View File

@ -526,7 +526,7 @@ Foam::label Foam::meshRefinement::markSurfaceGapRefinement
// const indexedOctree<treeDataTriSurface>& tree = s.tree(); // const indexedOctree<treeDataTriSurface>& tree = s.tree();
// //
// //
// const scalar searchCos = Foam::cos(30.0_deg); // const scalar searchCos = Foam::cos(degToRad(30.0));
// //
// // Normals for ray shooting and inside/outside detection // // Normals for ray shooting and inside/outside detection
// vectorField nearNormal; // vectorField nearNormal;

View File

@ -1632,7 +1632,7 @@ bool Foam::meshRefinement::isNormalGap
d /= magD; d /= magD;
// Check average normal with respect to intersection locations // Check average normal with respect to intersection locations
if (mag(avg&d) > Foam::cos(45.0_deg)) if (mag(avg&d) > Foam::cos(degToRad(45.0)))
{ {
return true; return true;
} }

View File

@ -1134,7 +1134,7 @@ Foam::label Foam::snappyRefineDriver::refinementInterfaceRefine
// } // }
//} //}
const scalar oppositeCos = Foam::cos(135.0_deg); const scalar oppositeCos = Foam::cos(degToRad(135.0));
forAllConstIter(cellSet, transitionCells, iter) forAllConstIter(cellSet, transitionCells, iter)
{ {
@ -1861,8 +1861,8 @@ void Foam::snappyRefineDriver::mergePatchFaces
{ {
meshRefiner_.mergePatchFacesUndo meshRefiner_.mergePatchFacesUndo
( (
Foam::cos(45.0_deg), Foam::cos(degToRad(45.0)),
Foam::cos(45.0_deg), Foam::cos(degToRad(45.0)),
meshRefiner_.meshedPatches(), meshRefiner_.meshedPatches(),
motionDict, motionDict,
labelList(mesh.nFaces(), -1) labelList(mesh.nFaces(), -1)
@ -1873,8 +1873,8 @@ void Foam::snappyRefineDriver::mergePatchFaces
// Still merge refined boundary faces if all four are on same patch // Still merge refined boundary faces if all four are on same patch
meshRefiner_.mergePatchFaces meshRefiner_.mergePatchFaces
( (
Foam::cos(45.0_deg), Foam::cos(degToRad(45.0)),
Foam::cos(45.0_deg), Foam::cos(degToRad(45.0)),
4, // only merge faces split into 4 4, // only merge faces split into 4
meshRefiner_.meshedPatches() meshRefiner_.meshedPatches()
); );
@ -1885,7 +1885,7 @@ void Foam::snappyRefineDriver::mergePatchFaces
meshRefiner_.checkData(); meshRefiner_.checkData();
} }
meshRefiner_.mergeEdgesUndo(Foam::cos(45.0_deg), motionDict); meshRefiner_.mergeEdgesUndo(Foam::cos(degToRad(45.0)), motionDict);
if (debug) if (debug)
{ {

View File

@ -1117,7 +1117,7 @@ void Foam::snappySnapDriver::detectNearSurfaces
//// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// //
//{ //{
// const scalar cos45 = Foam::cos(45.0_deg); // const scalar cos45 = Foam::cos(degToRad(45.0));
// vector n(cos45, cos45, cos45); // vector n(cos45, cos45, cos45);
// n /= mag(n); // n /= mag(n);
// //

View File

@ -2839,7 +2839,7 @@ void Foam::snappySnapDriver::determineBaffleFeatures
// Detect baffle edges. Assume initial mesh will have 0,90 or 180 // Detect baffle edges. Assume initial mesh will have 0,90 or 180
// (baffle) degree angles so smoothing should make 0,90 // (baffle) degree angles so smoothing should make 0,90
// to be less than 90. Choose reasonable value // to be less than 90. Choose reasonable value
const scalar baffleFeatureCos = Foam::cos(110.0_deg); const scalar baffleFeatureCos = Foam::cos(degToRad(110.0));
autoPtr<OBJstream> baffleEdgeStr; autoPtr<OBJstream> baffleEdgeStr;

View File

@ -299,9 +299,9 @@ void Foam::AMIMethod<SourcePatch, TargetPatch>::appendNbrFaces
const vector& n1 = patch.faceNormals()[facei]; const vector& n1 = patch.faceNormals()[facei];
const vector& n2 = patch.faceNormals()[nbrFacei]; const vector& n2 = patch.faceNormals()[nbrFacei];
scalar cosI = n1 & n2; const scalar cosI = n1 & n2;
if (cosI > Foam::cos(89.0_deg)) if (cosI > Foam::cos(degToRad(89.0)))
{ {
faceIDs.append(nbrFacei); faceIDs.append(nbrFacei);
} }

View File

@ -85,7 +85,8 @@ Foam::extendedEdgeMesh::sideVolumeTypeNames_
}; };
Foam::scalar Foam::extendedEdgeMesh::cosNormalAngleTol_ = Foam::cos(0.1_deg); Foam::scalar Foam::extendedEdgeMesh::cosNormalAngleTol_ =
Foam::cos(degToRad(0.1));
Foam::label Foam::extendedEdgeMesh::convexStart_ = 0; Foam::label Foam::extendedEdgeMesh::convexStart_ = 0;

View File

@ -55,7 +55,7 @@ Foam::topoSetSource::addToUsageTable Foam::shapeToCell::usage_
// Angle for polys to be considered splitHexes. // Angle for polys to be considered splitHexes.
Foam::scalar Foam::shapeToCell::featureCos = Foam::cos(10.0_deg); Foam::scalar Foam::shapeToCell::featureCos = Foam::cos(degToRad(10.0));
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

View File

@ -43,7 +43,7 @@ namespace Foam
defineTypeNameAndDebug(edgeIntersections, 0); defineTypeNameAndDebug(edgeIntersections, 0);
} }
Foam::scalar Foam::edgeIntersections::alignedCos_ = Foam::cos(89.0_deg); Foam::scalar Foam::edgeIntersections::alignedCos_ = Foam::cos(degToRad(89.0));
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

View File

@ -41,7 +41,7 @@ namespace Foam
{ {
defineTypeNameAndDebug(surfaceFeatures, 0); defineTypeNameAndDebug(surfaceFeatures, 0);
const scalar surfaceFeatures::parallelTolerance = sin(1.0_deg); const scalar surfaceFeatures::parallelTolerance = sin(degToRad(1.0));
//! \cond fileScope //! \cond fileScope