diff --git a/applications/test/TestTools/TestTools.H b/applications/test/TestTools/TestTools.H index 82dfe5e38b..e8470d8b27 100644 --- a/applications/test/TestTools/TestTools.H +++ b/applications/test/TestTools/TestTools.H @@ -28,15 +28,14 @@ Description \*---------------------------------------------------------------------------*/ -using namespace Foam; - -#include "floatScalar.H" -#include "doubleScalar.H" +#include "scalar.H" #include "complex.H" #include "Matrix.H" #include "Random.H" #include +using namespace Foam; + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Total number of unit tests diff --git a/applications/test/matrices/DiagonalMatrix/Test-DiagonalMatrix.C b/applications/test/matrices/DiagonalMatrix/Test-DiagonalMatrix.C index 3d8ae06979..e0b962be22 100644 --- a/applications/test/matrices/DiagonalMatrix/Test-DiagonalMatrix.C +++ b/applications/test/matrices/DiagonalMatrix/Test-DiagonalMatrix.C @@ -38,8 +38,7 @@ Description #include "DiagonalMatrix.H" #include "RectangularMatrix.H" -#include "floatScalar.H" -#include "doubleScalar.H" +#include "scalar.H" #include "complex.H" #include "TestTools.H" diff --git a/applications/test/matrices/RectangularMatrix/Test-RectangularMatrix.C b/applications/test/matrices/RectangularMatrix/Test-RectangularMatrix.C index fbcf4c6343..86690ba60f 100644 --- a/applications/test/matrices/RectangularMatrix/Test-RectangularMatrix.C +++ b/applications/test/matrices/RectangularMatrix/Test-RectangularMatrix.C @@ -44,8 +44,7 @@ Note #include "RectangularMatrix.H" #include "SquareMatrix.H" -#include "floatScalar.H" -#include "doubleScalar.H" +#include "scalar.H" #include "complex.H" #include "IOmanip.H" #include "TestTools.H" diff --git a/applications/test/matrices/SquareMatrix/Test-SquareMatrix.C b/applications/test/matrices/SquareMatrix/Test-SquareMatrix.C index d114dd3963..3a45461899 100644 --- a/applications/test/matrices/SquareMatrix/Test-SquareMatrix.C +++ b/applications/test/matrices/SquareMatrix/Test-SquareMatrix.C @@ -45,8 +45,7 @@ Note #include "scalarMatrices.H" #include "RectangularMatrix.H" #include "SquareMatrix.H" -#include "floatScalar.H" -#include "doubleScalar.H" +#include "scalar.H" #include "complex.H" #include "IOmanip.H" #include "TestTools.H" diff --git a/applications/test/matrices/SymmetricSquareMatrix/Test-SymmetricSquareMatrix.C b/applications/test/matrices/SymmetricSquareMatrix/Test-SymmetricSquareMatrix.C index c3d47e59b0..ab404872c1 100644 --- a/applications/test/matrices/SymmetricSquareMatrix/Test-SymmetricSquareMatrix.C +++ b/applications/test/matrices/SymmetricSquareMatrix/Test-SymmetricSquareMatrix.C @@ -46,8 +46,7 @@ Note #include "RectangularMatrix.H" #include "SquareMatrix.H" #include "SymmetricSquareMatrix.H" -#include "floatScalar.H" -#include "doubleScalar.H" +#include "scalar.H" #include "complex.H" #include "IOmanip.H" #include "Random.H" diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C index cf683535d0..22f3bdd5c4 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C @@ -232,13 +232,13 @@ vtk::outputOptions getOutputOptions(const argList& args) if (!args.found("ascii")) { - if (sizeof(floatScalar) != 4 || sizeof(label) != 4) + if (sizeof(float) != 4 || sizeof(label) != 4) { opts.ascii(true); WarningInFunction << "Using ASCII rather than legacy binary VTK format since " - << "floatScalar and/or label are not 4 bytes in size." + << "float and/or label are not 4 bytes in size." << nl << endl; } else diff --git a/src/OpenFOAM/db/IOstreams/IOstreams/Istream.H b/src/OpenFOAM/db/IOstreams/IOstreams/Istream.H index d14ab64fb3..998fa0e90a 100644 --- a/src/OpenFOAM/db/IOstreams/IOstreams/Istream.H +++ b/src/OpenFOAM/db/IOstreams/IOstreams/Istream.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017-2021 OpenCFD Ltd. + Copyright (C) 2017-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -156,11 +156,11 @@ public: //- Read a label virtual Istream& read(label&) = 0; - //- Read a floatScalar - virtual Istream& read(floatScalar&) = 0; + //- Read a float + virtual Istream& read(float&) = 0; - //- Read a doubleScalar - virtual Istream& read(doubleScalar&) = 0; + //- Read a double + virtual Istream& read(double&) = 0; //- Read binary block virtual Istream& read(char*, std::streamsize) = 0; diff --git a/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H b/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H index 7f76df67b3..c89b8b4c8e 100644 --- a/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H +++ b/src/OpenFOAM/db/IOstreams/IOstreams/Ostream.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2021 OpenCFD Ltd. + Copyright (C) 2016-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -147,11 +147,11 @@ public: //- Write int64_t virtual Ostream& write(const int64_t val) = 0; - //- Write floatScalar - virtual Ostream& write(const floatScalar val) = 0; + //- Write float + virtual Ostream& write(const float val) = 0; - //- Write doubleScalar - virtual Ostream& write(const doubleScalar val) = 0; + //- Write double + virtual Ostream& write(const double val) = 0; //- Write binary block. virtual Ostream& write(const char* data, std::streamsize count) = 0; diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UIPstream.H b/src/OpenFOAM/db/IOstreams/Pstreams/UIPstream.H index 0e522fa263..e51b0ac9f6 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/UIPstream.H +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UIPstream.H @@ -156,11 +156,11 @@ public: //- Read a label Istream& read(label& val); - //- Read a floatScalar - Istream& read(floatScalar& val); + //- Read a float + Istream& read(float& val); - //- Read a doubleScalar - Istream& read(doubleScalar& val); + //- Read a double + Istream& read(double& val); //- Read binary block with 8-byte alignment. Istream& read(char* data, std::streamsize count); diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UIPstreamBase.C b/src/OpenFOAM/db/IOstreams/Pstreams/UIPstreamBase.C index 9e61fdcad6..0dd6469332 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/UIPstreamBase.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UIPstreamBase.C @@ -359,7 +359,7 @@ Foam::Istream& Foam::UIPstreamBase::read(token& t) // Float case token::tokenType::FLOAT : { - floatScalar val; + float val; if (read(val)) { t = val; @@ -374,7 +374,7 @@ Foam::Istream& Foam::UIPstreamBase::read(token& t) // Double case token::tokenType::DOUBLE : { - doubleScalar val; + double val; if (read(val)) { t = val; @@ -432,14 +432,14 @@ Foam::Istream& Foam::UIPstreamBase::read(label& val) } -Foam::Istream& Foam::UIPstreamBase::read(floatScalar& val) +Foam::Istream& Foam::UIPstreamBase::read(float& val) { readFromBuffer(val); return *this; } -Foam::Istream& Foam::UIPstreamBase::read(doubleScalar& val) +Foam::Istream& Foam::UIPstreamBase::read(double& val) { readFromBuffer(val); return *this; diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UOPstream.H b/src/OpenFOAM/db/IOstreams/Pstreams/UOPstream.H index b5c9248d2d..a316ee450c 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/UOPstream.H +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UOPstream.H @@ -173,11 +173,11 @@ public: //- Write int64_t as a label virtual Ostream& write(const int64_t val); - //- Write floatScalar - virtual Ostream& write(const floatScalar val); + //- Write float + virtual Ostream& write(const float val); - //- Write doubleScalar - virtual Ostream& write(const doubleScalar val); + //- Write double + virtual Ostream& write(const double val); //- Write binary block with 8-byte alignment. virtual Ostream& write(const char* data, std::streamsize count); diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UOPstreamBase.C b/src/OpenFOAM/db/IOstreams/Pstreams/UOPstreamBase.C index 7dee1199c9..12daa2f140 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/UOPstreamBase.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UOPstreamBase.C @@ -304,7 +304,7 @@ Foam::Ostream& Foam::UOPstreamBase::write(const int64_t val) } -Foam::Ostream& Foam::UOPstreamBase::write(const floatScalar val) +Foam::Ostream& Foam::UOPstreamBase::write(const float val) { putChar(token::tokenType::FLOAT); writeToBuffer(val); @@ -312,7 +312,7 @@ Foam::Ostream& Foam::UOPstreamBase::write(const floatScalar val) } -Foam::Ostream& Foam::UOPstreamBase::write(const doubleScalar val) +Foam::Ostream& Foam::UOPstreamBase::write(const double val) { putChar(token::tokenType::DOUBLE); writeToBuffer(val); diff --git a/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C b/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C index ad422dc7c8..7222b81f1b 100644 --- a/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C +++ b/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017-2021 OpenCFD Ltd. + Copyright (C) 2017-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -1001,7 +1001,7 @@ Foam::Istream& Foam::ISstream::read(label& val) } -Foam::Istream& Foam::ISstream::read(floatScalar& val) +Foam::Istream& Foam::ISstream::read(float& val) { is_ >> val; setState(is_.rdstate()); @@ -1009,7 +1009,7 @@ Foam::Istream& Foam::ISstream::read(floatScalar& val) } -Foam::Istream& Foam::ISstream::read(doubleScalar& val) +Foam::Istream& Foam::ISstream::read(double& val) { is_ >> val; setState(is_.rdstate()); diff --git a/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.H b/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.H index 67894c8645..026b672571 100644 --- a/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.H +++ b/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2012 OpenFOAM Foundation - Copyright (C) 2017-2021 OpenCFD Ltd. + Copyright (C) 2017-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -36,8 +36,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef ISstream_H -#define ISstream_H +#ifndef Foam_ISstream_H +#define Foam_ISstream_H #include "Istream.H" #include "fileName.H" @@ -183,11 +183,11 @@ public: //- Read a label virtual Istream& read(label& val); - //- Read a floatScalar - virtual Istream& read(floatScalar& val); + //- Read a float + virtual Istream& read(float& val); - //- Read a doubleScalar - virtual Istream& read(doubleScalar& val); + //- Read a double + virtual Istream& read(double& val); //- Read binary block virtual Istream& read(char* buf, std::streamsize count); diff --git a/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.C b/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.C index 78644b4e89..744274e667 100644 --- a/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.C +++ b/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017-2021 OpenCFD Ltd. + Copyright (C) 2017-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -196,7 +196,7 @@ Foam::Ostream& Foam::OSstream::write(const int64_t val) } -Foam::Ostream& Foam::OSstream::write(const floatScalar val) +Foam::Ostream& Foam::OSstream::write(const float val) { os_ << val; setState(os_.rdstate()); @@ -204,7 +204,7 @@ Foam::Ostream& Foam::OSstream::write(const floatScalar val) } -Foam::Ostream& Foam::OSstream::write(const doubleScalar val) +Foam::Ostream& Foam::OSstream::write(const double val) { os_ << val; setState(os_.rdstate()); diff --git a/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.H b/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.H index 44e1de4afa..ba9a2d607f 100644 --- a/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.H +++ b/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2014 OpenFOAM Foundation - Copyright (C) 2017-2021 OpenCFD Ltd. + Copyright (C) 2017-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -36,8 +36,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef OSstream_H -#define OSstream_H +#ifndef Foam_OSstream_H +#define Foam_OSstream_H #include "Ostream.H" #include "fileName.H" @@ -155,11 +155,11 @@ public: //- Write int64_t virtual Ostream& write(const int64_t val); - //- Write floatScalar - virtual Ostream& write(const floatScalar val); + //- Write float + virtual Ostream& write(const float val); - //- Write doubleScalar - virtual Ostream& write(const doubleScalar val); + //- Write double + virtual Ostream& write(const double val); //- Write binary block virtual Ostream& write(const char* data, std::streamsize count); diff --git a/src/OpenFOAM/db/IOstreams/Sstreams/prefixOSstream.C b/src/OpenFOAM/db/IOstreams/Sstreams/prefixOSstream.C index ccb16b613f..f2c3567bce 100644 --- a/src/OpenFOAM/db/IOstreams/Sstreams/prefixOSstream.C +++ b/src/OpenFOAM/db/IOstreams/Sstreams/prefixOSstream.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2014 OpenFOAM Foundation - Copyright (C) 2020 OpenCFD Ltd. + Copyright (C) 2020-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -140,14 +140,14 @@ Foam::Ostream& Foam::prefixOSstream::write(const int64_t val) } -Foam::Ostream& Foam::prefixOSstream::write(const floatScalar val) +Foam::Ostream& Foam::prefixOSstream::write(const float val) { checkWritePrefix(); return OSstream::write(val); } -Foam::Ostream& Foam::prefixOSstream::write(const doubleScalar val) +Foam::Ostream& Foam::prefixOSstream::write(const double val) { checkWritePrefix(); return OSstream::write(val); diff --git a/src/OpenFOAM/db/IOstreams/Sstreams/prefixOSstream.H b/src/OpenFOAM/db/IOstreams/Sstreams/prefixOSstream.H index f84e1dbd91..fa6967c381 100644 --- a/src/OpenFOAM/db/IOstreams/Sstreams/prefixOSstream.H +++ b/src/OpenFOAM/db/IOstreams/Sstreams/prefixOSstream.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2014 OpenFOAM Foundation - Copyright (C) 2020-2021 OpenCFD Ltd. + Copyright (C) 2020-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -38,8 +38,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef prefixOSstream_H -#define prefixOSstream_H +#ifndef Foam_prefixOSstream_H +#define Foam_prefixOSstream_H #include "OSstream.H" @@ -143,11 +143,11 @@ public: //- Write int64_t virtual Ostream& write(const int64_t val); - //- Write floatScalar - virtual Ostream& write(const floatScalar val); + //- Write float + virtual Ostream& write(const float val); - //- Write doubleScalar - virtual Ostream& write(const doubleScalar val); + //- Write double + virtual Ostream& write(const double val); //- Write binary block virtual Ostream& write(const char* buf, std::streamsize count); diff --git a/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.C b/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.C index 124fdb6396..fb3a491a3e 100644 --- a/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.C +++ b/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2017-2021 OpenCFD Ltd. + Copyright (C) 2017-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -530,14 +530,14 @@ Foam::Istream& Foam::ITstream::read(label&) } -Foam::Istream& Foam::ITstream::read(floatScalar&) +Foam::Istream& Foam::ITstream::read(float&) { NotImplemented; return *this; } -Foam::Istream& Foam::ITstream::read(doubleScalar&) +Foam::Istream& Foam::ITstream::read(double&) { NotImplemented; return *this; diff --git a/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H b/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H index d2dbebfcec..c463bab8f2 100644 --- a/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H +++ b/src/OpenFOAM/db/IOstreams/Tstreams/ITstream.H @@ -304,11 +304,11 @@ public: //- Read a label virtual Istream& read(label&); - //- Read a floatScalar - virtual Istream& read(floatScalar&); + //- Read a float + virtual Istream& read(float&); - //- Read a doubleScalar - virtual Istream& read(doubleScalar&); + //- Read a double + virtual Istream& read(double&); //- Read binary block // \note Not implemented diff --git a/src/OpenFOAM/db/IOstreams/Tstreams/OTstream.C b/src/OpenFOAM/db/IOstreams/Tstreams/OTstream.C index 7dc51413e5..c1134f44e1 100644 --- a/src/OpenFOAM/db/IOstreams/Tstreams/OTstream.C +++ b/src/OpenFOAM/db/IOstreams/Tstreams/OTstream.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019-2021 OpenCFD Ltd. + Copyright (C) 2019-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -125,7 +125,7 @@ Foam::Ostream& Foam::OTstream::write(const int64_t val) } -Foam::Ostream& Foam::OTstream::write(const floatScalar val) +Foam::Ostream& Foam::OTstream::write(const float val) { append(token(val)); // tokenType::FLOAT @@ -133,7 +133,7 @@ Foam::Ostream& Foam::OTstream::write(const floatScalar val) } -Foam::Ostream& Foam::OTstream::write(const doubleScalar val) +Foam::Ostream& Foam::OTstream::write(const double val) { append(token(val)); // tokenType::DOUBLE diff --git a/src/OpenFOAM/db/IOstreams/Tstreams/OTstream.H b/src/OpenFOAM/db/IOstreams/Tstreams/OTstream.H index 2cdd55e2a4..3f7561c5fb 100644 --- a/src/OpenFOAM/db/IOstreams/Tstreams/OTstream.H +++ b/src/OpenFOAM/db/IOstreams/Tstreams/OTstream.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019-2021 OpenCFD Ltd. + Copyright (C) 2019-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -38,8 +38,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef OTstream_H -#define OTstream_H +#ifndef Foam_OTstream_H +#define Foam_OTstream_H #include "token.H" #include "Ostream.H" @@ -146,11 +146,11 @@ public: //- Write int64_t as a label virtual Ostream& write(const int64_t val); - //- Write floatScalar - virtual Ostream& write(const floatScalar val); + //- Write float + virtual Ostream& write(const float val); - //- Write doubleScalar - virtual Ostream& write(const doubleScalar val); + //- Write double + virtual Ostream& write(const double val); //- Write binary block with 8-byte alignment. virtual Ostream& write(const char* data, std::streamsize count); diff --git a/src/OpenFOAM/db/IOstreams/dummy/dummyISstream.H b/src/OpenFOAM/db/IOstreams/dummy/dummyISstream.H index 01ebb38d68..0af74bc015 100644 --- a/src/OpenFOAM/db/IOstreams/dummy/dummyISstream.H +++ b/src/OpenFOAM/db/IOstreams/dummy/dummyISstream.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2017 OpenFOAM Foundation - Copyright (C) 2019-2020 OpenCFD Ltd. + Copyright (C) 2019-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -40,8 +40,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef dummyISstream_H -#define dummyISstream_H +#ifndef Foam_dummyISstream_H +#define Foam_dummyISstream_H #include "StringStream.H" @@ -108,15 +108,15 @@ public: return *this; } - //- Read a floatScalar - virtual Istream& read(floatScalar&) + //- Read a float + virtual Istream& read(float&) { NotImplemented; return *this; } - //- Read a doubleScalar - virtual Istream& read(doubleScalar&) + //- Read a double + virtual Istream& read(double&) { NotImplemented; return *this; diff --git a/src/OpenFOAM/db/IOstreams/token/token.H b/src/OpenFOAM/db/IOstreams/token/token.H index aea0a49629..70a22c1b97 100644 --- a/src/OpenFOAM/db/IOstreams/token/token.H +++ b/src/OpenFOAM/db/IOstreams/token/token.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017-2021 OpenCFD Ltd. + Copyright (C) 2017-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -307,8 +307,8 @@ private: int flagVal; // bitmask - stored as int, not enum punctuationToken punctuationVal; label labelVal; - floatScalar floatVal; - doubleScalar doubleVal; + float floatVal; + double doubleVal; // Pointers word* wordPtr; @@ -365,10 +365,10 @@ public: inline explicit token(const label val, label lineNum=0) noexcept; //- Construct float token - inline explicit token(const floatScalar val, label lineNum=0) noexcept; + inline explicit token(const float val, label lineNum=0) noexcept; //- Construct double token - inline explicit token(const doubleScalar val, label lineNum=0) noexcept; + inline explicit token(const double val, label lineNum=0) noexcept; //- Copy construct word token inline explicit token(const word& w, label lineNum=0); @@ -531,11 +531,11 @@ public: //- Return float value. // Report FatalIOError and return \b 0 if token is not FLOAT - inline floatScalar floatToken() const; + inline float floatToken() const; //- Return double value. // Report FatalIOError and return \b 0 if token is not DOUBLE - inline doubleScalar doubleToken() const; + inline double doubleToken() const; //- Return float or double value. // Report FatalIOError and return \b 0 if token is not a @@ -607,10 +607,10 @@ public: inline void operator=(const label val); //- Copy assign from float - inline void operator=(const floatScalar val); + inline void operator=(const float val); //- Copy assign from double - inline void operator=(const doubleScalar val); + inline void operator=(const double val); //- Copy assign from word content inline void operator=(const word& w); @@ -636,8 +636,8 @@ public: inline bool operator==(const token& tok) const; inline bool operator==(const punctuationToken p) const noexcept; inline bool operator==(const label val) const noexcept; - inline bool operator==(const floatScalar val) const noexcept; - inline bool operator==(const doubleScalar val) const noexcept; + inline bool operator==(const float val) const noexcept; + inline bool operator==(const double val) const noexcept; inline bool operator==(const std::string& s) const; @@ -646,8 +646,8 @@ public: inline bool operator!=(const token& tok) const; inline bool operator!=(const punctuationToken p) const noexcept; inline bool operator!=(const label val) const noexcept; - inline bool operator!=(const floatScalar val) const noexcept; - inline bool operator!=(const doubleScalar val) const noexcept; + inline bool operator!=(const float val) const noexcept; + inline bool operator!=(const double val) const noexcept; inline bool operator!=(const std::string& s) const; @@ -677,11 +677,11 @@ public: //- Return float value. // \deprecated(2020-01) - floatToken() - floatScalar floatScalarToken() const { return floatToken(); } + float floatScalarToken() const { return floatToken(); } //- Return double value. // \deprecated(2020-01) - doubleToken() - doubleScalar doubleScalarToken() const { return doubleToken(); } + double doubleScalarToken() const { return doubleToken(); } //- Deprecated(2017-11) transfer word pointer to the token // \deprecated(2017-11) - use move assign from word diff --git a/src/OpenFOAM/db/IOstreams/token/tokenI.H b/src/OpenFOAM/db/IOstreams/token/tokenI.H index aa401e3496..e863649b73 100644 --- a/src/OpenFOAM/db/IOstreams/token/tokenI.H +++ b/src/OpenFOAM/db/IOstreams/token/tokenI.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017-2021 OpenCFD Ltd. + Copyright (C) 2017-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -174,7 +174,7 @@ inline Foam::token::token(const label val, label lineNum) noexcept } -inline Foam::token::token(const floatScalar val, label lineNum) noexcept +inline Foam::token::token(const float val, label lineNum) noexcept : data_(), type_(tokenType::FLOAT), @@ -184,7 +184,7 @@ inline Foam::token::token(const floatScalar val, label lineNum) noexcept } -inline Foam::token::token(const doubleScalar val, label lineNum) noexcept +inline Foam::token::token(const double val, label lineNum) noexcept : data_(), type_(tokenType::DOUBLE), @@ -528,7 +528,7 @@ inline bool Foam::token::isFloat() const noexcept } -inline Foam::floatScalar Foam::token::floatToken() const +inline float Foam::token::floatToken() const { if (type_ == tokenType::FLOAT) { @@ -546,7 +546,7 @@ inline bool Foam::token::isDouble() const noexcept } -inline Foam::doubleScalar Foam::token::doubleToken() const +inline double Foam::token::doubleToken() const { if (type_ == tokenType::DOUBLE) { @@ -817,7 +817,7 @@ inline void Foam::token::operator=(const label val) } -inline void Foam::token::operator=(const floatScalar val) +inline void Foam::token::operator=(const float val) { reset(); type_ = tokenType::FLOAT; @@ -825,7 +825,7 @@ inline void Foam::token::operator=(const floatScalar val) } -inline void Foam::token::operator=(const doubleScalar val) +inline void Foam::token::operator=(const double val) { reset(); type_ = tokenType::DOUBLE; @@ -955,7 +955,7 @@ inline bool Foam::token::operator==(const label val) const noexcept } -inline bool Foam::token::operator==(const floatScalar val) const noexcept +inline bool Foam::token::operator==(const float val) const noexcept { return ( @@ -965,7 +965,7 @@ inline bool Foam::token::operator==(const floatScalar val) const noexcept } -inline bool Foam::token::operator==(const doubleScalar val) const noexcept +inline bool Foam::token::operator==(const double val) const noexcept { return ( @@ -993,13 +993,13 @@ inline bool Foam::token::operator!=(const label val) const noexcept } -inline bool Foam::token::operator!=(const floatScalar val) const noexcept +inline bool Foam::token::operator!=(const float val) const noexcept { return !operator==(val); } -inline bool Foam::token::operator!=(const doubleScalar val) const noexcept +inline bool Foam::token::operator!=(const double val) const noexcept { return !operator==(val); } diff --git a/src/OpenFOAM/primitives/Scalar/doubleScalar/doubleScalar.H b/src/OpenFOAM/primitives/Scalar/doubleScalar/doubleScalar.H index c75623c51c..5718d2d79d 100644 --- a/src/OpenFOAM/primitives/Scalar/doubleScalar/doubleScalar.H +++ b/src/OpenFOAM/primitives/Scalar/doubleScalar/doubleScalar.H @@ -35,8 +35,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef doubleScalar_H -#define doubleScalar_H +#ifndef Foam_doubleScalar_H +#define Foam_doubleScalar_H #include "scalarFwd.H" #include "doubleFloat.H" diff --git a/src/OpenFOAM/primitives/Scalar/floatScalar/floatScalar.H b/src/OpenFOAM/primitives/Scalar/floatScalar/floatScalar.H index a8546c87a8..cb5dd78912 100644 --- a/src/OpenFOAM/primitives/Scalar/floatScalar/floatScalar.H +++ b/src/OpenFOAM/primitives/Scalar/floatScalar/floatScalar.H @@ -35,8 +35,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef floatScalar_H -#define floatScalar_H +#ifndef Foam_floatScalar_H +#define Foam_floatScalar_H #include "scalarFwd.H" #include "doubleFloat.H" diff --git a/src/OpenFOAM/primitives/Tensor/floats/doubleTensor.H b/src/OpenFOAM/primitives/Tensor/floats/doubleTensor.H index 2002a5cb5b..b7eb317c7e 100644 --- a/src/OpenFOAM/primitives/Tensor/floats/doubleTensor.H +++ b/src/OpenFOAM/primitives/Tensor/floats/doubleTensor.H @@ -1,7 +1,7 @@ // Compatibility include -#ifndef doubleTensor_H -#define doubleTensor_H +#ifndef FoamCompat_doubleTensor_H +#define FoamCompat_doubleTensor_H #include "tensor.H" diff --git a/src/OpenFOAM/primitives/Tensor/floats/floatTensor.H b/src/OpenFOAM/primitives/Tensor/floats/floatTensor.H index adb30f7975..26b67bcd5a 100644 --- a/src/OpenFOAM/primitives/Tensor/floats/floatTensor.H +++ b/src/OpenFOAM/primitives/Tensor/floats/floatTensor.H @@ -1,7 +1,7 @@ // Compatibility include -#ifndef floatTensor_H -#define floatTensor_H +#ifndef FoamCompat_floatTensor_H +#define FoamCompat_floatTensor_H #include "tensor.H" diff --git a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C index 920ef17b67..4d8660050d 100644 --- a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C +++ b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C @@ -2460,7 +2460,7 @@ Foam::triSurface Foam::triSurfaceTools::delaunay2D(const List& pts) { // Vertices in geompack notation. Note that could probably just use // pts.begin() if double precision. - List geompackVertices(2*pts.size()); + List geompackVertices(2*pts.size()); label doubleI = 0; for (const vector2D& pt : pts) {