From 51a3decaa1edea25164c4c4b1b3ab886096f2922 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Wed, 8 Aug 2012 22:18:15 +0000 Subject: [PATCH] Moved some classes out of the global namespace into namespace Cantera --- include/cantera/base/utilities.h | 5 ++--- include/cantera/thermo/WaterPropsIAPWSphi.h | 5 +++++ src/thermo/WaterPropsIAPWSphi.cpp | 4 ++++ test_problems/cathermo/testIAPWS/testIAPWSphi.cpp | 1 + 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/include/cantera/base/utilities.h b/include/cantera/base/utilities.h index 940b18443..4bebc09ca 100644 --- a/include/cantera/base/utilities.h +++ b/include/cantera/base/utilities.h @@ -20,6 +20,8 @@ #include +namespace Cantera +{ //! Unary operator to multiply the argument by a constant. /*! * The form of this operator is designed for use by std::transform. @@ -50,9 +52,6 @@ template struct timesConstant : public std::unary_function { T m_c; }; - -namespace Cantera -{ //! Templated Inner product of two vectors of length 4. /*! * If either \a x diff --git a/include/cantera/thermo/WaterPropsIAPWSphi.h b/include/cantera/thermo/WaterPropsIAPWSphi.h index 225ad511e..8078cba2e 100644 --- a/include/cantera/thermo/WaterPropsIAPWSphi.h +++ b/include/cantera/thermo/WaterPropsIAPWSphi.h @@ -15,6 +15,9 @@ #include "cantera/base/config.h" +namespace Cantera +{ + /*! * the WaterPropsIAPSWSphi class support low level calls for * the real description of water. @@ -221,4 +224,6 @@ private: //! Last delta that was used to calculate polynomials doublereal DELTAsave; }; + +} // namespace Cantera #endif diff --git a/src/thermo/WaterPropsIAPWSphi.cpp b/src/thermo/WaterPropsIAPWSphi.cpp index dfec472b5..7c4d412de 100644 --- a/src/thermo/WaterPropsIAPWSphi.cpp +++ b/src/thermo/WaterPropsIAPWSphi.cpp @@ -13,6 +13,9 @@ #include #include +namespace Cantera +{ + using std::printf; using std::sqrt; using std::log; @@ -1308,3 +1311,4 @@ doublereal WaterPropsIAPWSphi::cp_R() const return cpR; } +} // namespace Cantera diff --git a/test_problems/cathermo/testIAPWS/testIAPWSphi.cpp b/test_problems/cathermo/testIAPWS/testIAPWSphi.cpp index 52cdb5de6..15cfc6d5b 100644 --- a/test_problems/cathermo/testIAPWS/testIAPWSphi.cpp +++ b/test_problems/cathermo/testIAPWS/testIAPWSphi.cpp @@ -4,6 +4,7 @@ #include using namespace std; +using namespace Cantera; int main() {