From 80d69c27b1b3faa52bde8a64e2d174c4e3222d52 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 26 Jun 2017 17:11:46 +0200 Subject: [PATCH] COMP: compilation with WM_SP - STLpoint.H - isoAdvection.C - checkMesh/writeFields.C STYLE: drop construct STLpoint(Istream&), since it doesn't make much sense - No use case for reading via an OpenFOAM stream and tokenizer. Should always be parsing ASCII or reading binary directly. --- .../mesh/manipulation/checkMesh/writeFields.C | 2 +- src/fileFormats/stl/STLpoint.H | 29 +++++++------------ .../isoAdvection/isoAdvection/isoAdvection.C | 2 +- 3 files changed, 13 insertions(+), 20 deletions(-) diff --git a/applications/utilities/mesh/manipulation/checkMesh/writeFields.C b/applications/utilities/mesh/manipulation/checkMesh/writeFields.C index 1cdc3dbe61..73e02328b0 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/writeFields.C +++ b/applications/utilities/mesh/manipulation/checkMesh/writeFields.C @@ -97,7 +97,7 @@ void Foam::writeFields ( radToDeg ( - Foam::acos(min(1.0, faceOrthogonality)) + Foam::acos(min(scalar(1.0), faceOrthogonality)) ) ); diff --git a/src/fileFormats/stl/STLpoint.H b/src/fileFormats/stl/STLpoint.H index f6c1f2ea92..150df6f7de 100644 --- a/src/fileFormats/stl/STLpoint.H +++ b/src/fileFormats/stl/STLpoint.H @@ -34,7 +34,6 @@ Description #include "point.H" #include "floatVector.H" -#include "Istream.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -58,36 +57,30 @@ public: inline STLpoint() {} - //- Construct from base class - inline STLpoint(const floatVector& v) + //- Construct from single-precision point + inline STLpoint(const Vector& p) : - floatVector(v) + floatVector(p) {} - //- Construct from components + //- Construct from double-precision point + inline STLpoint(const Vector& p) + : + floatVector(float(p.x()), float(p.y()), float(p.z())) + {} + + //- Construct from single-precision components inline STLpoint(float x, float y, float z) : floatVector(x, y, z) {} - //- Construct from components + //- Construct from double-precision components inline STLpoint(double x, double y, double z) : floatVector(float(x), float(y), float(z)) {} - //- Construct from point - inline STLpoint(const point& pt) - : - floatVector(float(pt.x()), float(pt.y()), float(pt.z())) - {} - - //- Construct from istream - inline STLpoint(Istream& is) - : - floatVector(is) - {} - // Member Operators diff --git a/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C b/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C index 33f63c2b6c..85ebdf94b6 100644 --- a/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C +++ b/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C @@ -1024,7 +1024,7 @@ void Foam::isoAdvection::applyBruteForceBounding() bool clip = dict_.lookupOrDefault("clip", true); if (clip) { - alpha1_ = min(1.0, max(0.0, alpha1_)); + alpha1_ = min(scalar(1.0), max(scalar(0.0), alpha1_)); alpha1Changed = true; }