40 template<
class ReactionThermo>
41 void Reaction<ReactionThermo>::setThermo
43 const HashPtrTable<ReactionThermo>& thermoDatabase
46 ReactionThermo::operator=
48 rhs_[0].stoichCoeff*(*thermoDatabase[species_[rhs_[0].index]])
51 for (label i=1; i<rhs_.size(); i++)
55 rhs_[i].stoichCoeff*(*thermoDatabase[species_[rhs_[i].index]])
59 for (label i=0; i<lhs_.size(); i++)
63 lhs_[i].stoichCoeff*(*thermoDatabase[species_[lhs_[i].index]])
70 template<
class ReactionThermo>
79 ReactionThermo(*thermoDatabase[species[0]]),
84 setThermo(thermoDatabase);
89 template<
class ReactionThermo>
103 template<
class ReactionThermo>
122 exponent = stoichCoeff;
128 size_t i = specieName.find(
'^');
132 string exponentStr = specieName
135 specieName.size() - i - 1
137 exponent = atof(exponentStr.c_str());
138 specieName = specieName(0, i);
141 index = species[specieName];
146 <<
"Expected a word but found " << t.
info()
152 template<
class ReactionThermo>
163 if (t.isPunctuation())
189 <<
"Cannot continue reading reaction data from stream"
195 template<
class ReactionThermo>
203 ReactionThermo(*thermoDatabase[species[0]]),
207 setThermo(thermoDatabase);
213 template<
class ReactionThermo>
225 "Reaction<ReactionThermo>::New(const speciesTable& species,"
226 " const HashPtrTable<ReactionThermo>& thermoDatabase, Istream&)",
228 ) <<
"Reaction type not specified" <<
endl <<
endl
229 <<
"Valid Reaction types are :" <<
endl
230 << IstreamConstructorTablePtr_->sortedToc()
234 word reactionTypeName(is);
236 typename IstreamConstructorTable::iterator cstrIter
237 = IstreamConstructorTablePtr_->find(reactionTypeName);
239 if (cstrIter == IstreamConstructorTablePtr_->end())
243 "Reaction<ReactionThermo>::New(const speciesTable& species,"
244 " const HashPtrTable<ReactionThermo>& thermoDatabase, Istream&)",
246 ) <<
"Unknown reaction type " << reactionTypeName <<
endl <<
endl
247 <<
"Valid reaction types are :" <<
endl
248 << IstreamConstructorTablePtr_->sortedToc()
254 cstrIter()(species, thermoDatabase, is)
261 template<
class ReactionThermo>
264 os <<
type() <<
nl <<
" ";
275 os << species_[sc.
index];
282 if (i < lhs_.size() - 1)
299 os << species_[sc.
index];
306 if (i < rhs_.size() - 1)
316 template<
class ReactionThermo>
328 template<
class ReactionThermo>
340 template<
class ReactionThermo>