8 #ifndef CT_SIMPLETHERMO_H
9 #define CT_SIMPLETHERMO_H
154 virtual void install(std::string name,
size_t index,
int type,
const doublereal* c,
158 m_t0.push_back(c[0]);
175 if (
m_tlow.size() < index + 1) {
176 m_tlow.resize(index + 1, tlow);
177 m_thigh.resize(index + 1, thigh);
184 }
else if (fabs(
m_p0 - refPressure) > 0.1) {
185 std::string logmsg =
" WARNING SimpleThermo: New Species, " + name +
186 ", has a different reference pressure, "
187 +
fp2str(refPressure) +
", than existing reference pressure, " +
fp2str(
m_p0) +
"\n";
189 logmsg =
" This is now a fatal error\n";
191 throw CanteraError(
"install()",
"Species have different reference pressures");
221 virtual void update(doublereal t, doublereal* cp_R,
222 doublereal* h_RT, doublereal* s_R)
const {
224 doublereal logt = log(t);
225 doublereal rt = 1.0/t;
245 virtual void update_one(
size_t k, doublereal t, doublereal* cp_R,
246 doublereal* h_RT, doublereal* s_R)
const {
247 doublereal logt = log(t);
248 doublereal rt = 1.0/t;
249 size_t loc =
m_loc[k];
339 size_t loc =
m_loc[index];
362 size_t loc =
m_loc[index];
365 "modifying parameters for species which hasn't been set yet");
376 #ifdef H298MODIFY_CAPABILITY
378 virtual doublereal reportOneHf298(
int k)
const {
382 virtual void modifyOneHf298(
const int k,
const doublereal Hf298New) {
383 throw CanteraError(
"reportHF298",
"unimplemented");
397 mutable std::map<size_t, size_t>
m_loc;