Minor mods to 10 files, due to trying to compile on multiple
ASC platforms. Most of the mods had to do with namespace issues.
This commit is contained in:
parent
9fee427331
commit
60b66f18af
14 changed files with 29 additions and 16 deletions
|
|
@ -119,7 +119,7 @@ namespace Cantera {
|
|||
const doublereal permeability_0 = 4.0e-7*Pi; // N/A^2
|
||||
|
||||
/// Speed of Light (m/s).
|
||||
const doublereal lightSpeed = 1.0/sqrt(epsilon_0 * permeability_0);
|
||||
const doublereal lightSpeed = 1.0/std::sqrt(epsilon_0 * permeability_0);
|
||||
|
||||
//@}
|
||||
//@}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ using namespace std;
|
|||
#include "xml.h"
|
||||
#include "ck2ctml.h"
|
||||
|
||||
//using namespace Cantera;
|
||||
using namespace Cantera;
|
||||
|
||||
namespace ctml {
|
||||
|
||||
|
|
@ -43,11 +43,11 @@ namespace ctml {
|
|||
XML_Node& f = node.addChild("NASA");
|
||||
if (minx != -999.0) f.addAttribute("Tmin",minx);
|
||||
if (midx != -999.0) f.addAttribute("Tmax",midx);
|
||||
addFloatArray(f,"coeffs",low.size(),low.begin());
|
||||
addFloatArray(f,"coeffs",low.size(),&low[0]);
|
||||
XML_Node& fh = node.addChild("NASA");
|
||||
if (midx != -999.0) fh.addAttribute("Tmin",midx);
|
||||
if (maxx != -999.0) fh.addAttribute("Tmax",maxx);
|
||||
addFloatArray(fh,"coeffs",high.size(),high.begin());
|
||||
addFloatArray(fh,"coeffs",high.size(),&high[0]);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ namespace ctml {
|
|||
// void addTransport(istream& s, XML_Node& node);
|
||||
|
||||
void ck2ctml(string idtag, ckr::CKReader& r,
|
||||
XML_Node& root);
|
||||
Cantera::XML_Node& root);
|
||||
|
||||
int convert_ck(const char * const in_file, const char * const db_file,
|
||||
const char * const tr_file, const char * const out_file, const char * const id_tag);
|
||||
|
|
|
|||
|
|
@ -233,11 +233,11 @@ void vcs_VolPhase::resize(int phaseNum, int nspecies, const char *phaseName,
|
|||
double molesInert) {
|
||||
if (nspecies <= 0) {
|
||||
plogf("nspecies Error\n");
|
||||
exit(-1);
|
||||
std::exit(-1);
|
||||
}
|
||||
if (phaseNum < 0) {
|
||||
plogf("phaseNum should be greater than 0\n");
|
||||
exit(-1);
|
||||
std::exit(-1);
|
||||
}
|
||||
|
||||
TMolesInert = molesInert;
|
||||
|
|
@ -252,7 +252,7 @@ void vcs_VolPhase::resize(int phaseNum, int nspecies, const char *phaseName,
|
|||
if (strcmp(PhaseName.c_str(), phaseName)) {
|
||||
plogf("Strings are different: %s %s :unknown situation\n",
|
||||
PhaseName.c_str(), phaseName);
|
||||
exit(-1);
|
||||
std::exit(-1);
|
||||
}
|
||||
} else {
|
||||
VP_ID = phaseNum;
|
||||
|
|
@ -335,7 +335,7 @@ void vcs_VolPhase::evaluateActCoeff() const {
|
|||
break;
|
||||
default:
|
||||
plogf("%sERROR: unknown model\n", yo);
|
||||
exit(-1);
|
||||
std::exit(-1);
|
||||
}
|
||||
}
|
||||
m_UpToDate_AC = true;
|
||||
|
|
@ -516,7 +516,7 @@ void vcs_VolPhase::setMoleFractions(const double * const xmol) {
|
|||
Xmol[k] = xmol[k];
|
||||
sum+= xmol[k];
|
||||
}
|
||||
if (fabs(sum) > 1.0E-13) {
|
||||
if (std::fabs(sum) > 1.0E-13) {
|
||||
for (int k = 0; k < NVolSpecies; k++) {
|
||||
Xmol[k] /= sum;
|
||||
}
|
||||
|
|
@ -571,7 +571,7 @@ void vcs_VolPhase::setMolesFromVCSCheck(const double * const molesSpeciesVCS,
|
|||
} else {
|
||||
plogf("We have a consistency problem: %21.16g %21.16g\n",
|
||||
Tcheck, TMoles);
|
||||
exit(-1);
|
||||
std::exit(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ using namespace std;
|
|||
|
||||
namespace VCSnonideal {
|
||||
|
||||
int VCSnonideal::vcs_timing_print_lvl = 1;
|
||||
int vcs_timing_print_lvl = 1;
|
||||
|
||||
VCS_SOLVE::VCS_SOLVE() :
|
||||
NSPECIES0(0),
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
#pragma warning(disable:4996)
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace VCSnonideal {
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@
|
|||
|
||||
#include "vcs_internal.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace VCSnonideal {
|
||||
|
||||
/***************************************************************************/
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ namespace Cantera {
|
|||
|
||||
#else
|
||||
|
||||
No sundials!
|
||||
#error No sundials!
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#include "ct_defs.h"
|
||||
#include <math.h>
|
||||
#include "LineBroadener.h"
|
||||
|
||||
using namespace std;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ namespace CanteraSpectra {
|
|||
int nProtons() { return m_np; }
|
||||
int mNeutrons() { return m_nn; }
|
||||
doublereal spin() { return m_spin; }
|
||||
int multiplicity() { return 2*m_spin + 1; }
|
||||
int multiplicity() { return (int)(2*m_spin) + 1; }
|
||||
int atomicNumber() { return m_np; }
|
||||
std::string symbol() { return m_sym; }
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ namespace CanteraSpectra {
|
|||
return !(*this == b);
|
||||
}
|
||||
|
||||
bool isBoson() { return (m_spin - floor(m_spin) < 0.001); }
|
||||
bool isBoson() { return (m_spin - std::floor(m_spin) < 0.001); }
|
||||
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
#include "ct_defs.h"
|
||||
#include "rotor.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace CanteraSpectra {
|
||||
|
||||
/**
|
||||
|
|
@ -65,7 +67,7 @@ namespace CanteraSpectra {
|
|||
if (T_Trot > 100.0)
|
||||
return T_Trot;
|
||||
else {
|
||||
if (cutoff < 0) cutoff = 3.0*sqrt(T/m_Bv);
|
||||
if (cutoff < 0) cutoff = (int) (3.0*sqrt(T/m_Bv));
|
||||
doublereal dsum = 0.0, sum = 0.0;
|
||||
for (j = 0; j < cutoff; j++) {
|
||||
dsum = degeneracy(j)*exp(-wnum_to_J(energy_w(j))/(Boltzmann * T));
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@
|
|||
#include "ctexceptions.h"
|
||||
#include "Nasa9PolyMultiTempRegion.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace Cantera {
|
||||
|
||||
// The NASA 9 polynomial parameterization for a single species
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
|
||||
#include "SemiconductorPhase.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace Cantera {
|
||||
|
||||
const doublereal JD_const1 = 1.0/sqrt(8.0);
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@
|
|||
#include "ThermoFactory.h"
|
||||
#include <cmath>
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace Cantera {
|
||||
/**
|
||||
* Basic list of constructors and duplicators
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue