From 810520f4acbd9d955bcb0737dbac59ceeb26df8f Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Tue, 20 Mar 2007 21:51:12 +0000 Subject: [PATCH] Solaris 10 update Various std:: additions to stl functions and additions of c include files. --- Cantera/src/thermo/DebyeHuckel.cpp | 1 + Cantera/src/thermo/HMWSoln.cpp | 43 ++++++++++++++-------------- Cantera/src/thermo/HMWSoln_input.cpp | 1 + Cantera/src/thermo/WaterPDSS.cpp | 1 + Cantera/src/thermo/WaterProps.cpp | 2 +- 5 files changed, 26 insertions(+), 22 deletions(-) diff --git a/Cantera/src/thermo/DebyeHuckel.cpp b/Cantera/src/thermo/DebyeHuckel.cpp index 348cfe5d9..107615975 100644 --- a/Cantera/src/thermo/DebyeHuckel.cpp +++ b/Cantera/src/thermo/DebyeHuckel.cpp @@ -20,6 +20,7 @@ #include "importCTML.h" #include "WaterProps.h" #include "WaterPDSS.h" +#include using namespace std; diff --git a/Cantera/src/thermo/HMWSoln.cpp b/Cantera/src/thermo/HMWSoln.cpp index fb1b10482..1e526354b 100644 --- a/Cantera/src/thermo/HMWSoln.cpp +++ b/Cantera/src/thermo/HMWSoln.cpp @@ -20,6 +20,7 @@ #include "importCTML.h" #include "WaterProps.h" #include "WaterPDSS.h" +#include namespace Cantera { @@ -274,7 +275,7 @@ namespace Cantera { { if (testProb != 1) { printf("unknown test problem\n"); - exit(-1); + std::exit(-1); } constructPhaseFile("HMW_NaCl.xml", ""); @@ -819,7 +820,7 @@ namespace Cantera { _updateStandardStateThermo(); A_Debye_TP(-1.0, -1.0); s_update_lnMolalityActCoeff(); - copy(m_lnActCoeffMolal.begin(), m_lnActCoeffMolal.end(), acMolality); + std::copy(m_lnActCoeffMolal.begin(), m_lnActCoeffMolal.end(), acMolality); for (int k = 0; k < m_kk; k++) { acMolality[k] = exp(acMolality[k]); } @@ -1215,7 +1216,7 @@ namespace Cantera { */ void HMWSoln::getStandardVolumes(doublereal *vol) const { _updateStandardStateThermo(); - copy(m_speciesSize.begin(), m_speciesSize.end(), vol); + std::copy(m_speciesSize.begin(), m_speciesSize.end(), vol); double dd = m_waterSS->density(); vol[0] = molecularWeight(0)/dd; } @@ -1358,7 +1359,7 @@ namespace Cantera { break; default: printf("shouldn't be here\n"); - exit(-1); + std::exit(-1); } return A; } @@ -1393,7 +1394,7 @@ namespace Cantera { break; default: printf("shouldn't be here\n"); - exit(-1); + std::exit(-1); } return dAdT; } @@ -1427,7 +1428,7 @@ namespace Cantera { break; default: printf("shouldn't be here\n"); - exit(-1); + std::exit(-1); } return dAdP; } @@ -1534,7 +1535,7 @@ namespace Cantera { break; default: printf("shouldn't be here\n"); - exit(-1); + std::exit(-1); } return d2AdT2; } @@ -1911,7 +1912,7 @@ namespace Cantera { */ if (m_indexSolvent != 0) { printf("Wrong index solvent value!\n"); - exit(-1); + std::exit(-1); } #ifdef DEBUG_MODE @@ -2573,7 +2574,7 @@ namespace Cantera { if (j == (m_kk-1)) { // we should never reach this step printf("logic error 1 in Step 9 of hmw_act"); - exit(1); + std::exit(1); } if (charge[k] > 0.0) { /* @@ -2603,7 +2604,7 @@ namespace Cantera { if (j == m_kk-1) { // we should never reach this step printf("logic error 2 in Step 9 of hmw_act"); - exit(1); + std::exit(1); } if (charge[k] < 0) { /* @@ -2742,7 +2743,7 @@ namespace Cantera { #endif if (m_indexSolvent != 0) { printf("Wrong index solvent value!\n"); - exit(-1); + std::exit(-1); } double d_wateract_dT; @@ -3371,7 +3372,7 @@ namespace Cantera { if (j == (m_kk-1)) { // we should never reach this step printf("logic error 1 in Step 9 of hmw_act"); - exit(1); + std::exit(1); } if (charge[k] > 0.0) { /* @@ -3401,7 +3402,7 @@ namespace Cantera { if (j == m_kk-1) { // we should never reach this step printf("logic error 2 in Step 9 of hmw_act"); - exit(1); + std::exit(1); } if (charge[k] < 0) { /* @@ -3522,7 +3523,7 @@ namespace Cantera { #endif if (m_indexSolvent != 0) { printf("Wrong index solvent value!\n"); - exit(-1); + std::exit(-1); } double d2_wateract_dT2; @@ -4159,7 +4160,7 @@ namespace Cantera { if (j == (m_kk-1)) { // we should never reach this step printf("logic error 1 in Step 9 of hmw_act"); - exit(1); + std::exit(1); } if (charge[k] > 0.0) { /* @@ -4189,7 +4190,7 @@ namespace Cantera { if (j == m_kk-1) { // we should never reach this step printf("logic error 2 in Step 9 of hmw_act"); - exit(1); + std::exit(1); } if (charge[k] < 0) { /* @@ -4329,7 +4330,7 @@ namespace Cantera { #endif if (m_indexSolvent != 0) { printf("Wrong index solvent value!\n"); - exit(-1); + std::exit(-1); } double d_wateract_dP; @@ -4969,7 +4970,7 @@ namespace Cantera { if (j == (m_kk-1)) { // we should never reach this step printf("logic error 1 in Step 9 of hmw_act"); - exit(1); + std::exit(1); } if (charge[k] > 0.0) { /* @@ -5000,7 +5001,7 @@ namespace Cantera { if (j == m_kk-1) { // we should never reach this step printf("logic error 2 in Step 9 of hmw_act"); - exit(1); + std::exit(1); } if (charge[k] < 0) { /* @@ -5187,13 +5188,13 @@ namespace Cantera { #ifdef DEBUG_MODE if (i > 4 || j > 4) { printf("we shouldn't be here\n"); - exit(-1); + std::exit(-1); } #endif if ((i == 0) || (j == 0)) { printf("ERROR calc_thetas called with one species being neutral\n"); - exit(-1); + std::exit(-1); } /* diff --git a/Cantera/src/thermo/HMWSoln_input.cpp b/Cantera/src/thermo/HMWSoln_input.cpp index 1789bde94..9d37338ff 100644 --- a/Cantera/src/thermo/HMWSoln_input.cpp +++ b/Cantera/src/thermo/HMWSoln_input.cpp @@ -14,6 +14,7 @@ #include "importCTML.h" #include "WaterProps.h" #include "WaterPDSS.h" +#include using namespace std; diff --git a/Cantera/src/thermo/WaterPDSS.cpp b/Cantera/src/thermo/WaterPDSS.cpp index ad00adb1a..7d92787cc 100644 --- a/Cantera/src/thermo/WaterPDSS.cpp +++ b/Cantera/src/thermo/WaterPDSS.cpp @@ -16,6 +16,7 @@ #include "WaterPDSS.h" #include "WaterPropsIAPWS.h" #include "importCTML.h" +#include #include "ThermoPhase.h" diff --git a/Cantera/src/thermo/WaterProps.cpp b/Cantera/src/thermo/WaterProps.cpp index 69198bbc0..6304875ab 100644 --- a/Cantera/src/thermo/WaterProps.cpp +++ b/Cantera/src/thermo/WaterProps.cpp @@ -19,7 +19,7 @@ #include "ctml.h" #include "WaterPDSS.h" #include "WaterPropsIAPWS.h" - +#include namespace Cantera {